SlideShare a Scribd company logo
1 of 26
Download to read offline
FreeCAD-CFD Workbench
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
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) alfredbogaers@gmail.com,
WINDOWS:
● https://www.freecadweb.org/wiki/Download
● Install CfdOF from Tools | Addon manager
● Go to Edit | Preferences | CFD to check and
install dependencies
LINUX:
● https://www.freecadweb.org/wiki/Install_on_Unix
● Install CfdOF from Tools | Addon manager
● Install OpenFOAM (https://openfoam.com/download/)
● Install Paraview
● Go to Edit | Preferences | CFD to check dependencies and install cfMesh
Background
● We aim to introduce the basic functionality of
the CFD workbench on a simplistic pipe
elbow with two inlets.
● The pipe flow benchmark problem is usually
modelled in 2D. Unfortunately, the CFD
workbench is currently limited to 3D problems
only. We will therefore model the problem as
a thin sliver, where the front and back faces
will be treated with a slip condition.
● It is assumed that the user is familiar with
FreeCAD geometry creation.
Outlet
Inlet 1
Inlet 2
Elbow design
Part Design
Start a new sketch
A certain familiarity with the sketching
environment within FreeCAD is expected. For
more information on sketching and part design
see:
https://www.freecadweb.org/wiki/Sketcher_tutorial
https://www.freecadweb.org/wiki/Basic_Part_Design_Tutorial
1
2
3
4
5
6
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
Basic primitives toolbar
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.
CFD Task bar:
New CFD analysis
● To create a new analysis, click on the
“CFD” icon button (or by selecting
“Analysis Container” from the “CFD” drop
down menu).
● Along with the “CfdAnalysis” object, the
following objects are automatically
created, with a set of default values
assigned, which we will now go about
modifying for the simulation:
○ PhysicsModel
○ FluidProperties
○ IntialiseFields
○ OpenFOAM
Physics model selection
● The Physics Model Selection is where the
user specifies the desired simulation type.
● Upon creating a new analysis, default
values is applied to the “PhysicsModel”
object in the form of:
○ Steady state, incompressible, laminar flow.
● The simulation types that are not yet
supported have been grayed out.
● For the current simulation we retain the
default values as shown in the Figure.
● Click “OK” to save.
Select fluid properties
● Click on the material icon (or alternatively
double click on “FluidProperties” object or
select “Add fluid properties” from the Cfd
dropdown menu).
● The mechanical material tab will appear.
● Properties can be set by either choosing
an item from the predefined library, or by
manually entering the desired values.
● Choose “Air” from the predefined library.
● Click “OK” to save
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
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.
or
Creating the mesh
● Highlight the 3D object “Pad” by clicking on it
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
characteristic length (as a start, you can make
a more coarse mesh by setting it to 1500
mm).
● Click on the “Mesh” button.
1
2
3
4
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.
NOTE: In the follow up tutorials, we will show how a mesh
with different refinement regions can be generated. For
now, we make use of a constant sized mesh.
Adding boundary conditions: Inlet 1
● To add a new boundary condition, click on
the boundary condition icon.
● Let’s add the first inlet boundary condition.
○ Click on the first inlet face, and click
“Add Face” button.
○ Change “boundary” to “Inlet”
○ Change “subtype” to “Uniform velocity”
○ Specify cartesian velocity components
to U=(1m/s,0m/s,0m/s). (this can also
be done by specifying “Magnitude and
normal”).
○ Change the object name to “Inlet1”.
The object name can be changed by
pressing “F2” on the object list or by
right clicking and choosing “Rename”.
1
3
4
2
5
6
Adding boundary conditions: Inlet 2
● As with “Inlet1”, choose the corresponding
face and click “Add face”.
● Choose Boundary: “Inlet”
● Choose Subtype: “Uniform velocity”
● Enter velocity corresponding to
U=(0m/s,3m/s,0m/s).
● Rename the object to “Inlet2”.
Note: Inlet boundary conditions are colored blue.
Adding boundary conditions: Outlet
● Select the correct face, and click “Add
face” button.
● Change Boundary: “Outlet”
● Change Subtype: “Static pressure”
● Set Pressure: 0 m/kg/s^2.
● Change object name to “Outlet”
Note: Output faces are colored in red.
Note: In incompressible simulations, pressure is treated as a
relative value (‘gauge pressure’)
Adding boundary conditions: Pipe walls
● Add all the wall faces and set the walls as Boundary:
“wall”, Subtype: “slip”
● Multiple faces can be added in one of two ways:
1. Click on “Add face” without having selected any
faces. All the faces can then one by one be
added. Once all the desired faces have been
selected, click “Add face” button again to deselect
the button.
2. Multiple faces can be simultaneously
highlighted/selected by holding in the “Ctrl” button
while clicking on multiple faces.
Note: Walls are colored in dark grey.
Adding boundary conditions: Front and back slip
● Finally, we add the front and back face
boundary conditions.
● To emulate a 2D simulation in 3D, we set
the front and back faces to a “slip”
boundary condition.
Tip: Boundary faces that are not specified default to “slip”.
Final set of properties
● If correctly set up, CfdAnalysis should now
contain the following set of items.
● To make sure all boundary conditions have
been allocated correctly, as a final check
you can hide all objects, and one by one
make each of the boundaries visible. Click
on the item and press “spacebar” or
right-click, and select “toggle visibility”.
● We are now ready to run the CFD
simulation.
Solver control settings
● The solver settings can be modified by
○ Highlighting the “OpenFOAM” object.
○ At the bottom select the “Data” tab.
● The following settings can be modified
○ Parallel: True/False
○ Parallel Cores: If Parallel=True, set the number of
cores to be used
○ End Time:
■ Steady state: Maximum number of
iterations
■ Transient: End time
○ Time Step: Time step size for transient simulations
(default = 1 for steady state, 0.001 for transient).
○ Write Interval: How frequently information is stored
to the hard drive for post processing.
○ Convergence Criteria: default = 1e-4.
Note: Convergence criteria will not necessarily be achievable if transient flow
structures are present, which will result in residuals flattening out at a nonzero
value. If in doubt, convergence of quantities being calculated (e.g. lift) should
be checked.
Write the case to a directory
● Click on the solver icon (or double click on
“OpenFOAM” or select “Solver job control”
from the CFD dropdown menu).
● “Working Directory” is the directory where the
simulation will be temporarily stored.
WARNING: If the case within the directory
already exists, it will be overridden.
● Click “Write” button.
● Depending on the mesh size, writing the case
directory may take some time.
● If successful, the output message will state so
accordingly.
● The “Edit” button will open the case directory
for manual editing.
If successful
Initial
Running the CFD simulation
● If the case was successfully created, the
“Run” button will become active.
● Clicking “Run” starts the simulation which
can be terminated at any time by clicking
“Stop”.
● A dynamic residual plot will be shown.
● The solver stops naturally once the
convergence criteria has been satisfied or
maximum number of iterations have been
reached. Default convergence criteria is
1e-4 for Ux,Uy,Uz and pressure.
● To view the results, click the “Paraview”
button.
Post-processing: Paraview
For more information visit: http://www.paraview.org/Wiki/The_ParaView_Tutorial
Time step
to plot
What to plot,
eg. U or
pressure.
Refresh button: If
simulation is still
running, refresh to load
new information as it
becomes available.
An assortment of
post-processing tools,
such as plotting glyphs,
streamlines,
cross-section, contours
etc.
Optional: Creating a 2D mesh
● Since we are modelling a 2D problem, we would
like to have a mesh with only one element
through the thickness
● First delete the previous ‘slipWalls’ boundary
condition by right-clicking it in the tree view and
selecting ‘Delete’
● Now create a boundary condition for the front
plane, selecting Boundary: ‘Constraint’ and
Subtype: ‘2D bounding plane’
● For the back plane, create a second boundary
condition in the same way
● Now, re-generate the mesh and re-run the
analysis
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

More Related Content

Similar to CFD Tutorial 1 freeCAD Computational Fluid Dynamics

Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Pantech ProLabs India Pvt Ltd
 
Solidworks tips - First edition.pdf
Solidworks tips - First edition.pdfSolidworks tips - First edition.pdf
Solidworks tips - First edition.pdfZaheerAhmed905221
 
AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...
AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...
AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...Ndianabasi Udonkang
 
InnerSoft CAD Manual
InnerSoft CAD ManualInnerSoft CAD Manual
InnerSoft CAD ManualInnerSoft
 
Viva Questions for Engineering Dawing and Graphics
Viva Questions for Engineering Dawing and GraphicsViva Questions for Engineering Dawing and Graphics
Viva Questions for Engineering Dawing and Graphicsshyamranjan2006
 
Thermal Analysis in Hypermesh (Conduction, Convention and Thermal Expansion)
Thermal Analysis in Hypermesh (Conduction, Convention and Thermal Expansion)Thermal Analysis in Hypermesh (Conduction, Convention and Thermal Expansion)
Thermal Analysis in Hypermesh (Conduction, Convention and Thermal Expansion)Akshay Mistri
 
CHAPTER 1 - Introduction to AutoCAD.ppt
CHAPTER 1 - Introduction to AutoCAD.pptCHAPTER 1 - Introduction to AutoCAD.ppt
CHAPTER 1 - Introduction to AutoCAD.pptMuhammad Taufik
 
SPHARM-PDM_Tutorial_July2015
SPHARM-PDM_Tutorial_July2015SPHARM-PDM_Tutorial_July2015
SPHARM-PDM_Tutorial_July2015Jonathan Perdomo
 
2D CAD Module by gonzalochris
2D CAD Module by gonzalochris2D CAD Module by gonzalochris
2D CAD Module by gonzalochrisChris Gonzalo
 
Workbench tutorial airfoil
Workbench tutorial airfoilWorkbench tutorial airfoil
Workbench tutorial airfoilApriansyah Azis
 
2 d autocad_2009
2 d autocad_20092 d autocad_2009
2 d autocad_2009Syed Javeed
 

Similar to CFD Tutorial 1 freeCAD Computational Fluid Dynamics (20)

Pyxis sdl manual
Pyxis sdl   manualPyxis sdl   manual
Pyxis sdl manual
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812
 
Solidworks tips - First edition.pdf
Solidworks tips - First edition.pdfSolidworks tips - First edition.pdf
Solidworks tips - First edition.pdf
 
AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...
AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...
AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...
 
InnerSoft CAD Manual
InnerSoft CAD ManualInnerSoft CAD Manual
InnerSoft CAD Manual
 
Viva Questions for Engineering Dawing and Graphics
Viva Questions for Engineering Dawing and GraphicsViva Questions for Engineering Dawing and Graphics
Viva Questions for Engineering Dawing and Graphics
 
Motor3 d v13
Motor3 d v13Motor3 d v13
Motor3 d v13
 
Auto cad tutorial 002
Auto cad tutorial 002Auto cad tutorial 002
Auto cad tutorial 002
 
Auto Cad tutorial
Auto Cad tutorialAuto Cad tutorial
Auto Cad tutorial
 
AutoCad Basic tutorial
AutoCad Basic tutorialAutoCad Basic tutorial
AutoCad Basic tutorial
 
Thermal Analysis in Hypermesh (Conduction, Convention and Thermal Expansion)
Thermal Analysis in Hypermesh (Conduction, Convention and Thermal Expansion)Thermal Analysis in Hypermesh (Conduction, Convention and Thermal Expansion)
Thermal Analysis in Hypermesh (Conduction, Convention and Thermal Expansion)
 
CHAPTER 1 - Introduction to AutoCAD.ppt
CHAPTER 1 - Introduction to AutoCAD.pptCHAPTER 1 - Introduction to AutoCAD.ppt
CHAPTER 1 - Introduction to AutoCAD.ppt
 
SPHARM-PDM_Tutorial_July2015
SPHARM-PDM_Tutorial_July2015SPHARM-PDM_Tutorial_July2015
SPHARM-PDM_Tutorial_July2015
 
2D CAD Module by gonzalochris
2D CAD Module by gonzalochris2D CAD Module by gonzalochris
2D CAD Module by gonzalochris
 
2 d autocad_2009
2 d autocad_20092 d autocad_2009
2 d autocad_2009
 
Eagle tut
Eagle tutEagle tut
Eagle tut
 
Casa lab manual
Casa lab manualCasa lab manual
Casa lab manual
 
Workbench tutorial airfoil
Workbench tutorial airfoilWorkbench tutorial airfoil
Workbench tutorial airfoil
 
2 d autocad_2009
2 d autocad_20092 d autocad_2009
2 d autocad_2009
 
2 d autocad_2009
2 d autocad_20092 d autocad_2009
2 d autocad_2009
 

Recently uploaded

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

CFD Tutorial 1 freeCAD Computational Fluid Dynamics

  • 2. 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 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) alfredbogaers@gmail.com, WINDOWS: ● https://www.freecadweb.org/wiki/Download ● Install CfdOF from Tools | Addon manager ● Go to Edit | Preferences | CFD to check and install dependencies LINUX: ● https://www.freecadweb.org/wiki/Install_on_Unix ● Install CfdOF from Tools | Addon manager ● Install OpenFOAM (https://openfoam.com/download/) ● Install Paraview ● Go to Edit | Preferences | CFD to check dependencies and install cfMesh
  • 3. Background ● We aim to introduce the basic functionality of the CFD workbench on a simplistic pipe elbow with two inlets. ● The pipe flow benchmark problem is usually modelled in 2D. Unfortunately, the CFD workbench is currently limited to 3D problems only. We will therefore model the problem as a thin sliver, where the front and back faces will be treated with a slip condition. ● It is assumed that the user is familiar with FreeCAD geometry creation. Outlet Inlet 1 Inlet 2
  • 5. Start a new sketch A certain familiarity with the sketching environment within FreeCAD is expected. For more information on sketching and part design see: https://www.freecadweb.org/wiki/Sketcher_tutorial https://www.freecadweb.org/wiki/Basic_Part_Design_Tutorial 1 2 3 4 5 6
  • 6. 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 Basic primitives toolbar Constraints toolbar
  • 7. 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”
  • 9. 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. CFD Task bar:
  • 10. New CFD analysis ● To create a new analysis, click on the “CFD” icon button (or by selecting “Analysis Container” from the “CFD” drop down menu). ● Along with the “CfdAnalysis” object, the following objects are automatically created, with a set of default values assigned, which we will now go about modifying for the simulation: ○ PhysicsModel ○ FluidProperties ○ IntialiseFields ○ OpenFOAM
  • 11. Physics model selection ● The Physics Model Selection is where the user specifies the desired simulation type. ● Upon creating a new analysis, default values is applied to the “PhysicsModel” object in the form of: ○ Steady state, incompressible, laminar flow. ● The simulation types that are not yet supported have been grayed out. ● For the current simulation we retain the default values as shown in the Figure. ● Click “OK” to save.
  • 12. Select fluid properties ● Click on the material icon (or alternatively double click on “FluidProperties” object or select “Add fluid properties” from the Cfd dropdown menu). ● The mechanical material tab will appear. ● Properties can be set by either choosing an item from the predefined library, or by manually entering the desired values. ● Choose “Air” from the predefined library. ● Click “OK” to save NOTE: To change the units used by FreeCAD, or increase the number of significant figures that are displayed, see Edit->Preferences->Units
  • 13. 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 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. or
  • 14. Creating the mesh ● Highlight the 3D object “Pad” by clicking on it 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 characteristic length (as a start, you can make a more coarse mesh by setting it to 1500 mm). ● Click on the “Mesh” button. 1 2 3 4 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. NOTE: In the follow up tutorials, we will show how a mesh with different refinement regions can be generated. For now, we make use of a constant sized mesh.
  • 15. Adding boundary conditions: Inlet 1 ● To add a new boundary condition, click on the boundary condition icon. ● Let’s add the first inlet boundary condition. ○ Click on the first inlet face, and click “Add Face” button. ○ Change “boundary” to “Inlet” ○ Change “subtype” to “Uniform velocity” ○ Specify cartesian velocity components to U=(1m/s,0m/s,0m/s). (this can also be done by specifying “Magnitude and normal”). ○ Change the object name to “Inlet1”. The object name can be changed by pressing “F2” on the object list or by right clicking and choosing “Rename”. 1 3 4 2 5 6
  • 16. Adding boundary conditions: Inlet 2 ● As with “Inlet1”, choose the corresponding face and click “Add face”. ● Choose Boundary: “Inlet” ● Choose Subtype: “Uniform velocity” ● Enter velocity corresponding to U=(0m/s,3m/s,0m/s). ● Rename the object to “Inlet2”. Note: Inlet boundary conditions are colored blue.
  • 17. Adding boundary conditions: Outlet ● Select the correct face, and click “Add face” button. ● Change Boundary: “Outlet” ● Change Subtype: “Static pressure” ● Set Pressure: 0 m/kg/s^2. ● Change object name to “Outlet” Note: Output faces are colored in red. Note: In incompressible simulations, pressure is treated as a relative value (‘gauge pressure’)
  • 18. Adding boundary conditions: Pipe walls ● Add all the wall faces and set the walls as Boundary: “wall”, Subtype: “slip” ● Multiple faces can be added in one of two ways: 1. Click on “Add face” without having selected any faces. All the faces can then one by one be added. Once all the desired faces have been selected, click “Add face” button again to deselect the button. 2. Multiple faces can be simultaneously highlighted/selected by holding in the “Ctrl” button while clicking on multiple faces. Note: Walls are colored in dark grey.
  • 19. Adding boundary conditions: Front and back slip ● Finally, we add the front and back face boundary conditions. ● To emulate a 2D simulation in 3D, we set the front and back faces to a “slip” boundary condition. Tip: Boundary faces that are not specified default to “slip”.
  • 20. Final set of properties ● If correctly set up, CfdAnalysis should now contain the following set of items. ● To make sure all boundary conditions have been allocated correctly, as a final check you can hide all objects, and one by one make each of the boundaries visible. Click on the item and press “spacebar” or right-click, and select “toggle visibility”. ● We are now ready to run the CFD simulation.
  • 21. Solver control settings ● The solver settings can be modified by ○ Highlighting the “OpenFOAM” object. ○ At the bottom select the “Data” tab. ● The following settings can be modified ○ Parallel: True/False ○ Parallel Cores: If Parallel=True, set the number of cores to be used ○ End Time: ■ Steady state: Maximum number of iterations ■ Transient: End time ○ Time Step: Time step size for transient simulations (default = 1 for steady state, 0.001 for transient). ○ Write Interval: How frequently information is stored to the hard drive for post processing. ○ Convergence Criteria: default = 1e-4. Note: Convergence criteria will not necessarily be achievable if transient flow structures are present, which will result in residuals flattening out at a nonzero value. If in doubt, convergence of quantities being calculated (e.g. lift) should be checked.
  • 22. Write the case to a directory ● Click on the solver icon (or double click on “OpenFOAM” or select “Solver job control” from the CFD dropdown menu). ● “Working Directory” is the directory where the simulation will be temporarily stored. WARNING: If the case within the directory already exists, it will be overridden. ● Click “Write” button. ● Depending on the mesh size, writing the case directory may take some time. ● If successful, the output message will state so accordingly. ● The “Edit” button will open the case directory for manual editing. If successful Initial
  • 23. Running the CFD simulation ● If the case was successfully created, the “Run” button will become active. ● Clicking “Run” starts the simulation which can be terminated at any time by clicking “Stop”. ● A dynamic residual plot will be shown. ● The solver stops naturally once the convergence criteria has been satisfied or maximum number of iterations have been reached. Default convergence criteria is 1e-4 for Ux,Uy,Uz and pressure. ● To view the results, click the “Paraview” button.
  • 24. Post-processing: Paraview For more information visit: http://www.paraview.org/Wiki/The_ParaView_Tutorial Time step to plot What to plot, eg. U or pressure. Refresh button: If simulation is still running, refresh to load new information as it becomes available. An assortment of post-processing tools, such as plotting glyphs, streamlines, cross-section, contours etc.
  • 25. Optional: Creating a 2D mesh ● Since we are modelling a 2D problem, we would like to have a mesh with only one element through the thickness ● First delete the previous ‘slipWalls’ boundary condition by right-clicking it in the tree view and selecting ‘Delete’ ● Now create a boundary condition for the front plane, selecting Boundary: ‘Constraint’ and Subtype: ‘2D bounding plane’ ● For the back plane, create a second boundary condition in the same way ● Now, re-generate the mesh and re-run the analysis 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