# LIGGGHTS-DUMP

The dump files generated by [LIGGGHTS](http://www.cfdem.com/liggghts-open-source-discrete-element-method-particle-simulation-code), for the particles, can have any selection of variables. However, to be processed in Iota a minimum number of variables is required and the order is fixed. The same restriction affect the [LIGGGHTS](http://www.cfdem.com/liggghts-open-source-discrete-element-method-particle-simulation-code) particle-particle and particle-geometry contacts files

In the particles file, the filename must have the extension ".p". The variables in the command must follow :

* *id*: column one
* *type*: column two
* *x,y,z*: columns three to five
* *vx,vy,vz*: columns nine to eleven
* *radius*: column eighteen

The rest of columns will be considered as user defined variables, and will be processed in that way. An example of the [LIGGGHTS](http://www.cfdem.com/liggghts-open-source-discrete-element-method-particle-simulation-code) dump command for the particles file is:

```
dump Pfile all custom 400 dumpfile.p id type x y z ix iy iz vx vy vz fx fy fz &
  omegax omegay omegaz radius
```

The particle-particle contacts file must have the extension ".c". In this file, just the IDs of particles in contact and forces will be read:

* id: IDs of particles in contact. Columns seven to nine
* fx,fy,fz: Contact forces. Columns two ten to twelve

The rest of the columns will not be considered.

In the case of the particle-geometry contact files must have the extension ".w". The rules for such files are similar to the particle-particle contact files, with a condition on the contact point position:

* *cx,cy,cz*: Contact point position. Columns one to three
* *id*: IDs of particles in contact. Columns seven to nine
* *fx,fy,fz*: Contact forces. Columns ten to twelve

An example of the [LIGGGHTS](http://www.cfdem.com/liggghts-open-source-discrete-element-method-particle-simulation-code) dump command for both contact files is:

```
compute cp all pair/gran/local id pos force
compute cw all wall/gran/local id pos force
dump Cfile all local 400 dumpfile.c c_cp[1] c_cp[2] c_cp[3] c_cp[4] c_cp[5] &
  c_cp[6] c_cp[7] c_cp[8] c_cp[9] c_cp[10] c_cp[11] c_cp[12]
dump Wfile all local 400 dumpfile.w c_cw[1] c_cw[2] c_cw[3] c_cw[4] c_cw[5] &
  c_cw[6] c_cw[7] c_cw[8] c_cw[9] c_cw[10] c_cw[11] c_cw[12]
```

In the case of the CAD wall/geometries, the only restriction is that all the meshes to be processed should be contained in a single stl file per time-step for the case of moving CAD walls/geometries. In the case of static CAD wall/geometries, it is possible to just provide a single stl file for the processing.

Example of the [LIGGGHTS](http://www.cfdem.com/liggghts-open-source-discrete-element-method-particle-simulation-code) dump command for moving and static CAD wall/geometries files are:

* Static meshes:  `dump dmpstl all mesh/stl 400 dump.stl`
* Moving meshes:  `dump dmpstl all mesh/stl 400 dump*.stl`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://particle-analytics-1.gitbook.io/iota-user-manual/simulation_data_interfaces/support_liggghts/using_liggghts_dump.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
