Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below the steps needed for pre-meshing and pro-meshing are given. In red: the path of the tutorial files is given: 

  1. Generation of fluid domain domain 
    1. Output: preferably ‘step’ or ‘brep’ file of the fluid domain that needs to mesh.  Working with an ‘stl’ file requires some additional steps when using Salome. (docs/solarPanel.brep) 

...

      1. Perform inspections of the structure: self-intersections and free boundaries are not allowed.
      2. Make a solid of the structure.  
      3. Make the fluid domain based on points and create a box of it.
      4. Cut the domain with the structure.
  1. FMS file (best input for cfMesh) preparation
    1. Open Salome and load in the CAD model with the fluid domain. (docs/solarPanel.brep)
      1. Go to the geometry module by opening.
    2. Select patches in Salome and/or refinement boundaries you want.
      1. Geometry: New entity -> group -> create group  
      2. Press surface as shape type, fill in the name of the patch that matches the name of your working directory in OpenFOAM, press the arrow and select the surface, apply, and start with the next patch.
    3. Extract edges covering the domain.
      1. Geometry: Select geometry -> press CTRL+t-> select ExtractFeatureEdges3.py 
      2. Check the feature edges. Are these the main edges that describe the domain? If not remove the ones you do not need.
    4. Generate surface Mesh.
      1. Go to the mesh module, and press  
      2. Mesh for 2D -> algorithm NETGEN 1D-2D -> set settings to represent the shape.
      3. Apply and close.
      4. Build the 2D mesh using the gear tool  
    5. Delete the groups and edges in the mesh directory (only if it contains not only the name of the patches you gave).
      1. Unfold the generated mesh.
      2. Unfold either groups or edges and remove everything from groups and edges.
      3. Mesh: select the mesh in the toolbar -> go to mesh -> create groups from geometry -> select the patches and featureEdges -> Apply and close
      4. The groups and edges should now appear again.
    6. Output as FMS file.
      1. Do not use surfaceFeatureEdges module. It can lose data (stl -> fms).
      2. Mesh: select the mesh -> press CTRL+t -> Open SalomeTriSurf.py
      3. In the command shell of Salome (python): type triSurf('<path>').writeFms('<filename>.fms') and press enter
      4. File is generated on the given path (usually the OpenFOAM directory -> folder called ‘surfaceMeshes’).
  2. Mesh using CfMesh
    1. <see next section>
    2. Makes use of when following the tutorial when you did not prepare a structure: docs/solarPanel.stl, docs/solarPanel.fms 

 

  1. Check the mesh for quality 
    1. Use the checkMesh utility of OpenFOAM.
     
    1. Improve the mesh with improveMeshQuality.
     
      1. This reads the meshDict file and uses the defined settings again for improving the mesh. 

Mesh using CfMesh 

Meshing with CfMesh is done using a meshDict file. The file should be positioned in the working directory (OpenFOAM) in the folder ‘system’. A .FMS file is required for the best quality meshing and has the format that CfMesh can directly read (including patches). The structure of meshDict is: 

...