A new series of 10 tutorials about Freecad CfdOf

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

User avatar
Raedchen_im_System
Posts: 95
Joined: Sun Oct 27, 2019 5:22 pm
Location: In der Nähe von Stuttgart
Contact:

A new series of 10 tutorials about Freecad CfdOf

Post by Raedchen_im_System »

The collection of tutorials can be seen here: https://youtube.com/playlist?list=PL9H9 ... nx-42AYCCX

I attached the models. In order to keep the file size small, I deleted the mesh, so create the mesh before running the simulation. Please note that I recorded the tutorials before the change in 2D modelling: https://forum.freecadweb.org/viewtopic ... 37&t=66741

Thanks to the German “Kurzarbeit” (= short-time work) and Corona lockdown, I had time to record some tutorials about Freecad CfdOF. Of course, there are a lot of real good tutorial. My objective was to record tutorials for advanced users and tutorials that provide a deeper understanding of the methods in CFD.

The tutorials #2 - #5 can be regarded as a verification of CFD, the results of the CFD-simulation are compared to analytical solutions. These tutorials show the difference between a laminar flow and a turbulent flow, the use of boundary conditions and show how to add boundary conditions that are not given in the CfdOF Workbench itself. Tutorials #8, #9 and #10 are advanced tutorials, they show how to set up a simulation with 2 phasis, a transient simulation and how to invoke a new solver (rhoPimpleFoam).

I really enjoyed recording these tutorials, I hope you enjoy watching them as well. When I started with Freecad, many tutorials - especially the tutorials by r-frank, anisim and Pawel Lojek - helped me a lot. I am very grateful for that. I hope that my tutorials will make the CfdOF community even bigger and that more users will use this marvellous software.

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: German/Germany (de_DE)
User avatar
Raedchen_im_System
Posts: 95
Joined: Sun Oct 27, 2019 5:22 pm
Location: In der Nähe von Stuttgart
Contact:

Re: A new series of 10 tutorials about Freecad CfdOf

Post by Raedchen_im_System »

Tutorial #1: Getting started

This tutorial shows how to install Freecad CfdOF and how to build up a simple simulation.

Physics Model: steady, single phase, incompressible, Viscous, Turbulence (RANS)
3D Model
Fluid: Water
Mesher: CfMesh
Solver Openfoam: SimpleFoam
Link: https://youtu.be/OS4sbbBtZUw
Tutorial #1 Getting started.FCStd
(21.76 KiB) Downloaded 496 times
###############################################################################

Tutorial #2: Tube Flow

In this tutorial, the flow of water in a tube with a diameter shift was calculated. In order to show the effects of a laminar and a turbulent flow, both physics models were used and compared. These results were compared with the analytical solution.

Physics Model: steady, single phase, incompressible, Viscous
In order to show the difference between turbulent and laminar flow, both models were calculated
3D Model
Fluid: Water
Mesher: CfMesh with refinements
Solver Openfoam: SimpleFoam
Link: https://youtu.be/Vo6PRvtJYVc
Tutorial #2 Tube Flow.FCStd
(24.05 KiB) Downloaded 405 times
################################################

Tutorial #3: Simulation of 2 Plates

The simplicity of this model is hard to beat: This model only contains one cube. The boundary conditions inlet and outlet are not used for the simulation, specifying a velocity on the upper surface of the cube is sufficient. The velocity distribution that results in this model is very close to Newton's definition of shear stress tau, so the forces determined in the CFD can be compared with the analytical model.

Physics Model: steady, single phase, incompressible, Viscous
In order to show the difference between turbulent and laminar flow, both models were calculated
3D Model
Fluid: Oil
Mesher: gMesh with refinements
Solver Openfoam: SimpleFoam
Link: https://youtu.be/5HMtEuLlsto
Tutorial #3 Simulation of 2 plates.FCStd
(17.03 KiB) Downloaded 316 times
#################################################

Tutorial #4: Couette Flow

Again, a very simple model: The geometrical body is a hollow tube, generated in the part workbench. The boundary condition “rotatingWallVelocity” cannot be generated with Freecad CfdOF, for this reason, the “U” file must be edited. This simulation is equal to the Couette equations, as a verification of CFD, the resulting torques are compared.

Physics Model: steady, single phase, incompressible, Viscous, laminar flow
3D Model
Fluid: Oil
Mesher: CfMesh
Solver Openfoam: SimpleFoam
Link: https://youtu.be/Gu5qhZ6UL9g
Tutorial #4 Couette Flow.FCStd
(12.29 KiB) Downloaded 288 times
#############################################

Tutorial #5: Journal bearing

Journal bearings are used in mechanical engineering to support shafts. This tutorial is very similar to the tutorial with the Couette flow. The difference is the eccentricity of the shaft. This eccentricity leads to a lifting force. This lifting force is compared to an analytical solution.

Physics Model: steady, single phase, incompressible, Viscous, turbulence (RANS)
3D Model
Fluid: Oil
Mesher: CfMesh with refinements
Solver Openfoam: SimpleFoam
Link: https://youtu.be/JtUuMXlOV6k
Tutorial #5 Journal Bearing.FCStd
(21.89 KiB) Downloaded 228 times
User avatar
Raedchen_im_System
Posts: 95
Joined: Sun Oct 27, 2019 5:22 pm
Location: In der Nähe von Stuttgart
Contact:

Re: A new series of 10 tutorials about Freecad CfdOf

Post by Raedchen_im_System »

Tutorial #6: Flow around a car

In order to build up a simulation model, a simple car is created using the part design workbench. The air resistance and the lifting force is calculated. With the force generated by the air resistance and the area of the vehicle, the drag coefficient cw can be calculated.

Physics Model: steady, single phase, incompressible, Viscous, turbulence (RANS)
3D Model
Fluid: Air
Mesher: CfMesh with refinements
Solver Openfoam: SimpleFoam
Link: https://youtu.be/KWbUaiE9SBc
Tutorial #6 Flow around a car.FCStd
(244.65 KiB) Downloaded 322 times
#######################################################

Tutorial #7: Wind Turbine

Torque is generated by converting a flow into a rotation on the rotor blades. In this tutorial, a very simple model of a wind turbine is created using the Part Workbench. To create the boundary condition “RotatingWallVelocity”, the "U" file containing the speeds is edited.

Physics Model: steady, single phase, incompressible, Viscous, turbulence (RANS)
3D Model
Fluid: Air
Mesher: CfMesh with refinements
Solver Openfoam: SimpleFoam
Link: https://youtu.be/Q10MbSFEiEM
Tutorial #7 Wind Turbine.FCStd
(41.29 KiB) Downloaded 339 times
################################

Tutorial #8: Simulation of a 2 phasis flow

The use of a multi-phase physics model is shown in this tutorial. Using the part design workbench, a simple model is built up.

Physics Model: transient, multi-phase, incompressible, Viscous, laminar
2D Model
Fluid: Water / Air
Mesher: gmesh
Solver Openfoam: Interfoam
Link: https://youtu.be/H5vWh0NG6z0
Tutorial #8 simulation of a flow with 2 phasis.FCStd
(31.45 KiB) Downloaded 319 times
Please note that this tutorial was created before the change in 2D-modelling: https://forum.freecadweb.org/viewtopic.php?f=37&t=66741

####################################################

Tutorial #9: von Karman vortex

The need for a transient simulation is shown in this tutorial: In this simulation, air flows around a pillar. After a short time, vortices form as a result of vibration processes, the so-called Karman vortices.

Physics Model: transient, single phase, incompressible, Viscous, laminar
2D Model
Fluid: Air
Mesher: gmesh
Solver Openfoam: PimpleFoam
Link: https://youtu.be/gzDfP9ohJdA

Regarding the simulation model, I had asked a question in the forum, many thanks to thschrader for his great help: https://forum.freecadweb.org/viewtopic.php?f=37&t=58848

Please note that this tutorial was created before the change in 2D-modelling: https://forum.freecadweb.org/viewtopic.php?f=37&t=66741
Tutorial #9 von Karman vortex.FCStd
(23.73 KiB) Downloaded 246 times
############################################################################

Tutorial #10: Organ Pipe

The development of the model took a long time and was very complicated, but the result is impressive: The excitation and vibration behavior of an organ pipe can also be simulated with FreeCad CfdOF.

This video shows by comparing incompressible flow with compressible flow why a compressible physics model must be used to calculate the vibrational behaviour of an air column. Freecad CfdOF can address a solver (“buoyantPimpleFoam”) that can calculate a compressible physics model, but test calculations showed that the solution will not converge.

Physics Model: transient, single phase, compressible, Viscous, laminar
2D Model
Fluid: Air
Mesher: CfMesh with refinements
Solver Openfoam: rhoPimpleFoam
Link: https://youtu.be/JbTz6gHiEsc

Please note that this tutorial was created before the change in 2D-modelling: https://forum.freecadweb.org/viewtopic.php?f=37&t=66741
Tutorial #10 Organ Pipe.FCStd
(35.37 KiB) Downloaded 250 times
trijonb
Posts: 10
Joined: Mon May 24, 2021 1:07 am

Re: A new series of 10 tutorials about Freecad CfdOf

Post by trijonb »

Well done, these are really great.
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: A new series of 10 tutorials about Freecad CfdOf

Post by thschrader »

Raedchen_im_System wrote: Thu May 05, 2022 7:45 pm ...
Please note that this tutorial was created before the change in 2D-modelling: https://forum.freecadweb.org/viewtopic.php?f=37&t=66741
Did some tutorials with the new cfdof version.
Thanks for your work, very interesting stuff!
TechBernd_tuto8.FCStd
(23.42 KiB) Downloaded 223 times
TechBernd_tuto9.FCStd
(21.45 KiB) Downloaded 196 times
TechBernd_tuto10.FCStd
(29.94 KiB) Downloaded 191 times

Done with bluecfd-core 2020 and
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.27428 (Git)
Build type: Release
Branch: master
Hash: 27460358508a2057e0ec57a418641435f12628dd
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: German/Germany (de_DE)
User avatar
NewJoker
Veteran
Posts: 3016
Joined: Sun Oct 11, 2020 7:49 pm

Re: A new series of 10 tutorials about Freecad CfdOf

Post by NewJoker »

Thank you for sharing this. YouTube tutorials for CfdOF and FEM workbenches are always appreciated. I plan to prepare some in the near future too.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: A new series of 10 tutorials about Freecad CfdOf

Post by Kunda1 »

Wow, quite a body of work!
Though isn't it better to use v0.20 for FEM related activities?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
ReneSci
Posts: 23
Joined: Thu Aug 18, 2022 4:30 pm

Re: A new series of 10 tutorials about Freecad CfdOf

Post by ReneSci »

A very usefully series !
A couple of time you referee to some PDF-tutorials named "CFD Tutorial xx" - Do you know a place where they can be obtained somehow ?

A suggestion for a new video: How to make a CFD with two (or more) incoming flow with different densities and velocities. For example like the one I have attached with a pipe with an airflow sticking into an big air stream. Blue surfaces are inlets. Without assuming "potential flow".

/Rene'
Attachments
RSH_Two_Flows.FCStd
(30.3 KiB) Downloaded 180 times
Last edited by ReneSci on Thu Aug 18, 2022 8:05 pm, edited 1 time in total.
Ajciam
Posts: 1
Joined: Tue Nov 01, 2022 2:34 am

Re: A new series of 10 tutorials about Freecad CfdOf

Post by Ajciam »

The PDF toy referenced would be much appreciated:). Thank you for the tutorials.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: A new series of 10 tutorials about Freecad CfdOf

Post by Kunda1 »

@bernd did you see this?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply