CFD Tutorial 2a - Mesh Regions and Porous Media (snappyHexMesh)
CFD Tutorial 2a - Mesh Regions and Porous Media (snappyHexMesh)
CFD Tutorial 2a - Mesh Regions and Porous Media (snappyHexMesh)
INSTALLATION
WINDOWS: LINUX:
● https://www.freecadweb.org/wiki/Download ● https://www.freecadweb.org/wiki/Install_on_Unix
● Install CfdOF from Tools | Addon manager ● Install CfdOF from Tools | Addon manager
● Go to Edit | Preferences | CFD to check and ● Install OpenFOAM (https://openfoam.com/download/)
install dependencies ● Install Paraview
● Go to Edit | Preferences | CFD to check dependencies and install cfMesh
LATEST INFORMATION
Please see the CfdOF README file for up-to-date information.
LEAD DEVELOPERS
Johan Heyns (CSIR, 2016-2018) [email protected],
Oliver Oxtoby (CSIR, 2016-2018) [email protected],
Alfred Bogaers (CSIR, 2016-2018) [email protected],
Part Design
2
1
Create Cube
● As part of this tutorial, we are going
to create a long thin cube with an
internal porous zone and a porous
baffle. 3
● To create the first cube, activate
the “Part” workbench.
● Click on the predefined primitive 4
“Cube” icon.
● To change the cube’s length, width
and height:
○ Highlight the “Cube” object
○ Within the “Data” tab, change the
properties
Length: 500mm, Width: 500mm, Height: 5
40000mm
Add 1 More Cube
● Create 1 more cube:
Inlet:
Uniform Velocity
U = (0,0,1 m/s)
Porous zone results
● With the problem setup we can now write
the test case, and run the solver.
● We show here the residual plot and
pressure results for the porous zone test
problem.
● Notice the large pressure drop across the
porous zone.
3 4
Move face
● Move the newly created face to the centre
of the 3 cubes. To do so: 1
○ Highlight the “Face” in the list of objects.
○ Within the “Data” tab, change the
z-Position to 2000mm.
● As before, create a snappyHexMesh with
a characteristic length of 50mm.
3
2
Set mesh baffle mesh region
1
● After having created a snappyHexMesh
object, highlight the mesh object and click
on the MeshRegion icon. 6
● As before, click on “Add reference”, select 3
the face and set the levels of refinement.
● Importantly, ensure that the “Baffle” option
4
is selected. By selecting the Baffle option,
guarantees that snappyHexMesh
generates an internal face of 0 thickness. 5
2
Re-compute the new mesh
● In the list of objects, double-click on the
parent (“Box_CartesianMesh”) mesh
object (or right-click and select
“Transform”).
● Click “Mesh” to re-compute the mesh with
the new refined region.
● The mesh should now be locally refined in
the vicinity of the newly created internal
face.
Add porous baffle 1
Inlet:
Uniform velocity
U=(0,0,1 m/s)
Porous baffle results
● With the problem setup we can now write
the test case, and run the solver.
● We show here the residual plot and
pressure results for the baffle test problem
● Notice the large distinct pressure drop
across the porous baffle.