Running a CFD Simulation in OpenFOAM Made Easy
This tutorial demonstrates how to use ChopMesh and OpenFOAM for CFD simulations.
Requirements:
• ChopMesh v1.1.0
• Ubuntu on Windows Subsystem for Linux (WSL)
• ParaView for postprocessing
Getting Started:
• Open ChopMesh.
• If you don’t already have a license, you can request a trial license by navigating to the License Setup option in the top-right corner of the screen.
Step 1: Load Geometry
• Open ChopMesh v1.1.0 and load your geometry.
• Supported file formats: STL or VDB.
Step 2: Define the Meshing Domain
• Choose whether the meshing domain should be inside or outside the surface, based on your application.
• Note: Overset mesh support will be available in the next version.
Step 3: Set Mesh Resolution
• Specify the resolution parameter, (an integer), for the X direction.
• The domain in the X direction will be divided into segments.
• Use the Octree refinement level to refine the mesh further.
• The actual resolution in the X direction will be calculated as , where is the refinement level.
Step 4: Generate the Mesh
• Click to generate the mesh.
• Once completed, you can visualize the mesh in the GUI.
Step 5: Assign Boundary Conditions
• Use the GUI to assign patch boundary conditions.
• Currently, ChopMesh supports up to 6 patches.
• Note: Automatic patch generation is limited to planar surfaces.
Step 6: Set Simulation Parameters
• Configure the simulation settings, including:
• Viscosity
• Simulation time
• Output frequency
Step 7: Export and Run in OpenFOAM
• Export the mesh to OpenFOAM.
• Ensure that the scaling is correct before running the simulation.
• Use the simpleFOAM solver to run the simulation.
Common Issues:
1. Mesh Quality Check
Before running simpleFOAM, use checkMesh to ensure the meshes pass the quality check.
• If the mesh fails, consider increasing the mesh resolution in Step 3.
2. Unit Standardization
We recommend converting the mesh and simulation setup to standard units.
• During the final mesh export step, apply a scaling factor to adjust the length.
• For example, if your geometry was imported in millimetres (mm), use a scaling factor of to convert the mesh to meters (m).
3. Turbulence Models
• If the Reynolds number is high, consider using turbulence models in OpenFOAM.
• Note: Automatic scripting turbulence model will be supported in a future release.
Comments