CFD Tutorial 1 - Elbow
CFD Tutorial 1 - Elbow
Tutorial 1: Elbow
CFD Workbench
WORKBENCH
This workbench aims to help users set up and run CFD analysis. It guides the user in selecting the relevant physics, specifying the
material properties, generating a mesh, assigning boundary conditions and setting the solver settings before running the
simulation. Where possible best practices are included to improve the stability of the solvers.
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 (5.0 recommended) (https://openfoam.org/download/)
install dependencies ● Install Paraview (tested with 5.0.1)
● Optional - Install GMSH (optional, 2.13+)
● 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) jaheyns@gmail.com,
Oliver Oxtoby (CSIR, 2016-2018) oliveroxtoby@gmail.com,
Alfred Bogaers (CSIR, 2016-2018) abogaers@csir.co.za,
Background Outlet
Inlet 2
Elbow design
Part Design
2
1
Start a new sketch
A certain familiarity with the sketching
environment within FreeCAD is expected. For 3
more information on sketching and part design
see:
https://www.freecadweb.org/wiki/Sketcher_tutorial
4
https://www.freecadweb.org/wiki/Basic_Part_Design_Tutorial
6
Alternatively, have a look at the Eskom-FEM
tutorial slides. 5
Sketch
● Create the sketch on the right, with the given set
of dimensions.
● The sketch is easily created by first constructing
the primitives in the form of interconnected lines
and arcs. Then use the various constraint tools to
insert horizontal, vertical, length and radius
constraints where applicable.
● Nice tooltip descriptions of each function is shown
by hovering the mouse pointer over any of the
icons. The basic toolbars for sketch creation are
Constraints toolbar
Pad the sketch
● Once the sketch has been completed,
close the sketch creation.
● While still in the “Part Design” workbench,
click on the “Pad” icon.
● Choose a length of 1m (1000mm) of Type
Dimension.
● The pad function, takes a sketch and
extrudes it in the 3rd direction.
● Click “Ok”
Fluid flow
Case setup
Activate CFD workbench
● To activate the Cfd Workbench, click on
the dropdown menu in the taskbar, and
select “CfdOF”
● Once activated, the CFD task bar should
appear.
NOTE: To change the units used by FreeCAD, or increase the number of significant figures that are displayed, see Edit->Preferences->Units
Initialise the internal flow variables
● The internal flow variables need to be
initialised prior to starting the simulation.
● Click on the initialise icon (or double click
on the “InitialiseFields” object or select
“Initialise” from the CFD dropdown menu).
● Internal flow variables can be initialised
either by using PotentialFoam, or by
individually entering the initial flow or
variables.
● Select “Potential flow” for the current
tutorial.
● Click “OK” to save.
NOTE: Potential flow uses OpenFOAM’s PotentialFoam solver to
automatically initialise internal flow variables by solving a set of
incompressible, potential flow equations.
2
Creating the mesh
● Highlight the 3D object “Pad” by clicking on it 1
in the list of objects. This will activate the
mesh Icon
● Click on the mesh Icon.
● In the Mesh task panel, choose ‘Gmsh’ as the
meshing utility (for a tetrahedral mesh)
● Enter 800 mm as the max element size 4
characteristic length (as a start, you can make
a more coarse mesh by setting it to 1500
mm). 3
● Click on the “Mesh” button.
TIP: When meshing, start with as coarse a mesh as
possible. Once a mesh has been successfully created,
only then is it advised to refine the mesh. It can take a
very long time to create highly refined meshes.
Refresh button: If
simulation is still
running, refresh to load
new information as it
becomes available.
Note: Currently, a full 3D mesh is first created and then extruded to form the
2D mesh, so it is best to mesh a thin object to avoid spending too much time
generating lots of unused cells
The End