Example Input Files - geomechanics/mpm GitHub Wiki
Many input files include references to direction or dimension.
- The 2D direction order is
(x|y)
with equivalent number representation(0|1)
. - The 3D direction order is
(x|y|z)
with equivalent number representation(0|1|2)
. - In both 2D and 3D, the y-direction (direction 1) is typically considered the vertical axis.
For the purposes of this page, all example files are provided for a 3D model.
MPM (.json)
For information on the mpm.json
main input file, visit this page.
Mesh (.txt)
The mesh.txt
file is a required input file which gives nodal coordinates followed by nodal connectivity.
- There are 3 header rows describing the element type, the number of nodes per element, and the total number of nodes and elements, respectively.
- For the first section of the file, each row represents a single node. Each column contains the coordinate in the associated direction (see order at the top of this page).
- For the second section of the file, each row represents a single element. Each column contains a node ID, in the order of connectivity for that element. The connectivity order for the two most common elements, the 4-noded quadrilateral (2D) and the 8-noded hexahedron (3D) are shown below. The nodal connectivity order for other elements may be found in the associated header files within the codebase.
Nodal Connectivity Ordering
2D: 4-noded (linear) quadrilateral
3 0----------0 2
| |
| |
| |
| |
0 0----------0 1
3D: 8-noded (linear) hexahedron
3 2
0_ _ _ _ _ _0
/| /|
/ | / |
7 0_ |_ _ _ _ _0 6|
| | | |
| | | |
| 0_ _ _ _ _|_ 0
| / 0 | / 1
|/ |/
0_ _ _ _ _ _ 0
4 5
mesh.txt
Example #! elementShape hexahedron
#! elementNumPoints 8
8 1
0.0 0.0 0.0
1.0 0.0 0.0
1.0 1.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
1.0 0.0 1.0
1.0 1.0 1.0
0.0 1.0 1.0
0 1 2 3 4 5 6 7
Particles (.txt)
- A
particle.txt
file is an optional input file which gives initial particle coordinates. The alternative to providing particle coordinates is to use the built-in Gauss point generator. Visit this page for information on the Gauss generator. - There is a header row with the total number of particles.
- Each row represents a single particle or material point (MP). Each column contains the coordinate in the associated direction (see order at the top of this page).
particles.txt
Example 8
0.25 0.25 0.25
0.75 0.25 0.25
0.75 0.75 0.25
0.25 0.75 0.25
0.25 0.25 0.75
0.75 0.25 0.75
0.75 0.75 0.75
0.25 0.75 0.75
Particles Stresses (.txt)
particles-stresses.txt
file is an optional input file which gives the initial MP stresses. The default is zeroed stresses.- There is a header row with the total number of particles.
- Each row represents a single MP. Each of the 6 columns contains a component of the Cauchy stress tensor, according to Voigt convention. I.e., the columns are ordered as
(xx|yy|zz|xy|xz|yz)
or, equivalently,(00|11|22|01|02|12)
. The sign convention for stresses in this codebase is tension-positive.
particles-stresses.txt
Example 8
-2452.5 -4905.0 -2452.5 0.0 0.0 0.0
-2452.5 -4905.0 -2452.5 0.0 0.0 0.0
-7357.5 -14715.0 -7357.5 0.0 0.0 0.0
-7357.5 -14715.0 -7357.5 0.0 0.0 0.0
-2452.5 -4905.0 -2452.5 0.0 0.0 0.0
-2452.5 -4905.0 -2452.5 0.0 0.0 0.0
-7357.5 -14715.0 -7357.5 0.0 0.0 0.0
-7357.5 -14715.0 -7357.5 0.0 0.0 0.0
Particles Volumes (.txt)
particles-volumes.txt
file is an optional input file which gives initial MP volumes. The default is to split the cell volume equally among MPs.- Each row represents a single MP. The first column contains MP ID; the second column contains MP volume.
particles-volumes.txt
Example 0 0.125
1 0.125
2 0.125
3 0.125
4 0.125
5 0.125
6 0.125
7 0.125
Particles Cells (.txt)
particles-cells.txt
file is an optional input file which gives the initial cell location for each MP. If this file is not input, the program will attempt to calculate the initial cell locations, which can be computationally expensive.- Each row represents a single MP. The first column contains MP ID; the second column contains cell ID.
particles-cells.txt
Example 0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
Entity Sets (.json)
- An
entity_sets.json
file is an optional input file which provides IDs of particles, nodes, or cells, associated to some entity set ID. The entity set ID can be used to reference the associated particles/nodes/cells for other inputs.
entity_sets.json
Example {
"node_sets": [
{
"id": 0,
"set": [
0,
1,
4,
5
]
},
{
"id": 1,
"set": [
2,
3,
6,
7
]
}
]
}
Boundary Condition Files (.txt)
- These file inputs for boundary conditions are optional, and are an available alternative to using entity set inputs for certain boundary conditions. See this page for more information.