Getting Started with Simmodeler

From PHASTA Wiki
Jump to: navigation, search

Goal of using SimModeler

In this section you will learn how to create a mesh and apply boundary and initial conditions to your translated-model.smd model file from the previous step. You will save both the model and mesh containing the boundary/initial conditions under new file names, which we will later prepare to be passed into Chef.

Launching the Software

First, tunnel to viz002 or viz003 using vglconnect -s viz00x.

Then, set your environment as shown in the convert step video.

Finally, run vglrun simmodeler in your terminal to launch simmodeler. Once SimModeler is opened, select File > Open Model. If you ran vglrun simmodeler while in your working directory, the translated-model.smd file should be immediately available to select and open.

Accessing the User Manual

When launching simmodeler, there is a blue question mark at the top right of the GUI. Click it and then click "launch manual" to open the user manual associated with the version of simmodeler you are using. This gives detailed descriptions of the various attributes and how they are defined to generate the desired mesh.

Surface Meshing

2D and 1D Boundary Layers

To generate a proper surface mesh, it is important that both 2D and 1D boundary layers are implemented. Note that a 2D Boundary layer is defined on a surface and a 1D Boundary layer is defined on a line. The linked video shows both 2D and 1D boundary layers being applied to an airfoil and the mesh that results from these applied attributes.

Boundary Layer Mesh Height Grows in X

An advanced technique for boundary layer meshing utilizes the "Specific Thicknesses" option of the 2D Boundary Layer attribute in SimModeler. This option can prescribe the boundary layer mesh to grow as it develops along the surface, mimicking the behavior of the boundary layer itself.

  1. Create a 2D Boundary Layer attribute on the edge where you expect the boundary layer to grow. Select the "Specific Thicknesses" type.
  2. Select and set the face where you want the boundary layer mesh to propagate into (it should be connected to the selected edge).
  3. Edit "Layer Thicknesses" and select "Import" in the pop-up window.
    • The imported file should have the thicknesses of each layer of the mesh, growing as a function of x. The example below shows the first and last few lines of such a setup. In this case, the first layer of the mesh is 5e-6 m tall at the beginning of the selected edge. In the geometry file of this example, the beginning of the selected edge starts at 0.25 meters. As you traverse in x, the thickness of the mesh is scaled by a factor of 20. This pattern can be easily extrapolated in an excel file to grow the mesh at a desired rate.

(1) 5.00E-06*(1.0+($x-0.25)*20)
(2) 5.88E-06*(1.0+($x-0.25)*20)
(3) 6.92E-06*(1.0+($x-0.25)*20)
...
(49) 1.00E-04*(1.0+($x-0.25)*20)
(50) 1.00E-04*(1.0+($x-0.25)*20)

Mesh Size and Face Extrusions

Two more useful attributes when generating proper surface meshes are defining Mesh Sizes and Face Extrusions on your desired surfaces. Face Extrusions are useful when adding refinement over curved surfaces. This process is well covered in this video.

Volume Meshing

3D Boundary Layers

One of the most important aspects of volume mesh development is generating proper 3D boundary layers. This process is well outlined here from around 8:30 to 16:00. Note that all mesh attributes are set up under the "Meshing" tab.

Mesh Refinement Zones

Mesh refinement zones are useful for increasing the grid density within certain volumes of your simulation domain. The linked mesh refinement tutorial will briefly walk you through how these are implemented.

Applying Boundary and Initial Conditions

A nice description of each of the common BCs used in both the Compressible and Incompressible builds of PHASTA is provided here. The same video as the volume meshing step shows how to apply boundary conditions for an incompressible case starting at around 16:20. This linked video also shows how the BCs are applied for an incompressible case. Note that the case needs to be called geom as is done and explained in the tutorial video. Once you are done applying the BC's, it is very important that you save out the model .smd file with these applied boundary conditions.

Saving Out the Mesh

Once you are satisfied with your mesh refinement and have applied boundary/initial conditions to your model, you are ready to generate and save out the final mesh. In the meshing tab, you will want to click Generate Mesh. The default settings will suffice for proper mesh generation. If your grid is large, this step can take some time. Once the grid is finished generating, you will want to save out the generated .sms file as you will need it for the next step in the process.

Next Steps - Preping for Chef

Once the BCs are successfully implemented, you have saved out a model file with these BCs (.smd), and have generated and saved your mesh grid (.sms file), you are ready to prepare the grid for Chef. To get started on this step, head over to Prepping the Grid for Chef.