3D FEM modeling for OOFEM in Salome

OOFEM can use some UNV files to create the “.in” input file for simulation. UNV is a common format for saving FEM meshed models.

You can preprocess a model in Salome and export the mesh into UNV format to be later used by OOFEM. UNV file only includes the mesh and the also group of elements, nodes, etc. for application of BC but it does not include the BC. BC can be applied later to the UNV groups.

Here is a simple example of how to create a simple 3D box model in Salome and export it to the UNV file. We create groups for the top and bottom surfaces for loading and applying supports. We also create groups for lateral faces of the box so if we need to confine the lateral displacement we can easily do so by applying corresponding BC to those groups.

1. If you need help with installing Salome in Linux refer to the post for installing Salome in Ubuntu. If you use macOS you can install a virtual Ubuntu and then install Salome there. For Windows, there is a Salome installation wizard setup file.

2. Open Salome,  Open Geometry module from the drop-down  

3. Select Create a box (blue cube button) and follow the dialog to create the box object  In the object browser

4. Right-click the box and select Create Group

5. Fill the dialog box to create a group for the top facet of the box:
Shape Type: 2D face (blue square)  
Name: top  
Main Shape: Box_1  
Press select all and by looking on the highlighted facet find the top facet (in this case 33)  
Remove Other numbers from the group and Apply  

6. Create similar groups for the bottom (bot), and sides in x and y directions (sides_x and sides_y). Finally, create one group for all 3D elements (all_3D).
The final results are shown in the figure below.

7. Now change the Salome module (drop-down) from “Geometry” to “Mesh”

8. Select Create mesh button. Follow the dialog to set up the mesh settings (you can simply use “Assign a set of automatic hypotheses”)

9. Select the created mesh from Object Browser and press Compute (blue gear button in the toolbar). Mesh_1 will be created.

10. Now we create mesh groups from geometry groups that we created earlier.
Right-click the Mesh_1 in the Object Browser and select create a group  
Name the group “top_nodes” and select the “Node” radio button  
From Object Browser select the “top” group under geometry and press the blue arrow next to the “Geometrical Object” and from the pop-menu that appears, choose to directly select geometry then select the top group in the object browser, “top” should appear in the Geometrical Object text box, then apply to create top nodes group:


11. Repeat the process with other boundary groups bot, sides_x, and sides_y.

12. Note that so far we created “Node” groups. We need one element group to assign materials to elements. Repeat the process with “all_3D” which contains all elements and make sure to select “Volume” instead of the “Node” radio button.

13. Now we are ready to export the model into the UNV file. Before we continue note that the UNV file only contains mesh. You can save the file first so you can modify it later.

14. Select the target mesh (Mesh_1) from the Object Browser. Select from menu bar File>Export>UNV file…
Save the file in the desired location.

This is the end of the process for creating the UNV file. UNV file will be used by UNV2OOFEM Python script that comes with OOFEM to create a .in file. You can refer to official help on this or Part 2 of the related post on preprocessing by GMSH.

Leave a comment

Design a site like this with WordPress.com
Get started