1.Trelis interface
The Trelis software interface is shown below.
Panels that are frequently used::
- Command Panel: For quick geometry creation, segmentation, combination and mesh division
- Command Line: Complete the same function as command panel but by the way of the command lines.
- Tool bar: The first five lines are create, open, save, import and export files. The middle part includes running the journal script file and adjusting the observation mode.
- Model Tree: Each part of the model is displayed at the level of body-volume-surface-curve-vertex. And each element has a corresponding ID number for designation.
More details can be found in Official Guide. Note that each step of Trelis has a corresponding script command, which is convenient for saving and sharing.
2.Create Geometry
2.1. Create a volume
First create a 600km x 600km x 400km volume. Since the default origin is in the center of the new volume, we will move the volume down by 200km. Thus the upside surface represents the surface.
The following script can be copied and pasted directly to the command line.
1 | # Like shell script,Trelis uses '#' for comments# ---------------------------------------------------------------------- |
In addition to the above method, Trelis can also create a volume by:
creating vertexes–> creating surfaces by specified vertex–>create a volume by specify surfaces
Although it is more cumbersome, an example also shows here for reference.
1 | # ---------------------------------------------------------------------- |
The results of the above two ways are exactly the same. For more complicated examples, you can choose your own way according to the situation. Note that if you use the second method to establish the geometry, the id number of most elements will change for the left part of this manual.
2.2. Split the cuboid into two parts
Here we create a plane to divide the cuboid into a upper part as the elastic layer and a lower part as the viscoelastic layer. And a fault plane will be created for simulation.
1 | # ---------------------------------------------------------------------- |
A more detailed segmentation process can be found in the official tutorial . (A proper vpn tool is required)
2.3. imprint & merge
After creating the split the volume, the points and lines of each sub volumes are probably not the same, so they need to be merged, which takes a certain amount of time under complex geometry.
1 | # ---------------------------------------------------------------------- |
3.Meshing
We need to specify the size of each curve, surface or volume before meshing them. And the map
meshing scheme is set by default. You can use the command panal or type help volume scheme
in the command line to view all the possible meshing schemes. The tetmesh scheme is applied in this example.
1 | volume all scheme tetmesh |
Now the mesh part has completed, and we recommend you to do mesh QA. You can use the command panal or type
1 | quality volume all shape global draw mesh |
in the command line to do mesh QA.Generally the minimum value should be greater than 0.2 for a reliable Pylith calculation.
The mesh quality of this example is as follows
4.Declare each block and the boundary surfaces
Then we need to declare each block and the bounding surfaces for calculations and determining the boundary conditions of Pylith.
1 | # ---------------------------------------------------------------------- |
5. Export the mesh file
At this point, we only need to exported the mesh file in exo format.
1 | # ---------------------------------------------------------------------- |
From the output of the Command Line you can see how many elements and nodes you have in the generated mesh file. Generally speaking, the more nodes, the longer the calculation time.
Reference
[1] Aagaard, B.T., Kientz, S., Knepley, M.G., Strand, L., Williams, C., 2017. PyLith User Manual: version 2.2.1. Davis: California: Computational Infrastructure of Geodynamics
[2] Tutorial of Trelis