Computational Fluid Dynamics (CFD) workbench using OpenFOAM

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
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Quick update on my progress into my still shallow understanding of CFD and blueCFD/OpenFOAM

After another six months of torture I have a model that I think is now very close to the geometry of the historic device that I've been trying to obtain a CFD characteristic copy of. Following my observation that it was giving me what looked like a mirrored version of the empirical characteristic.

The latest version of my model has resulted in a characteristic that is in close agreement with the historic empirical version, when mirrored.


As I hope, we can agree the mirroring looks to be very acceptable from the new model and seems to be the way for me to move forward until I can fully explain it. I am now pretty sure that this is indicating that CFD is producing an exit vortex core that is generating a low pressure at the diffuser entry and pulling additional flow from the axial supply inlet. This may be being supported by the Glyph image that is showing dominant radial flow rather than the vortex that I expect and should be a product of the resulting mirrored characteristic.

I cannot explain this and I'm not calling the coding into question, just my understanding of how to apply it. And of course any comments and thoughts are dramatically welcomed by this still novice CFD guy :?

Many Thanks and I'm happy to remove this if it does not fit in with the Forum's intentions.

Michael
Last edited by Crossleyuk on Fri Dec 25, 2020 4:16 pm, edited 3 times in total.
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by oliveroxtoby »

Crossleyuk wrote: Tue Nov 10, 2020 12:40 pm Quick update on my progress into my still shallow understanding of CFD and blueCFD/OpenFOAM

After another six months of torture I have a model that I think is now very close to the geometry of the historic device that I've been trying to obtain a CFD characteristic copy of. Following my observation that it was giving me what looked like a mirrored version of the empirical characteristic.

The latest version of my model has resulted in a characteristic that is in close agreement with the historic empirical version, when mirrored.


Small_300_Full_Build_Rev_P4_Case_03_Step_01_Characteristics.png

As I hope, we can agree the mirroring looks to be very acceptable from the new model and seems to be the way for me to move forward until I can fully explain it. I am now pretty sure that this is indicating that CFD is producing an exit vortex core that is generating a low pressure at the diffuser entry and pulling additional flow from the axial supply inlet. This may be being supported by the Glyph image that is showing dominant radial flow rather than the vortex that I expect and should be a product of the resulting mirrored characteristic.

I cannot explain this and I'm not calling the coding into question, just my understanding of how to apply it. And of course any comments and thoughts are dramatically welcomed by this still novice CFD guy :?

Many Thanks and I'm happy to remove this if it does not fit in with the Forum's intentions.

Michael
Thanks for sharing your results - always nice to see the workbench in use.
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Cheers Oliver, very impressed and love learning. 8-) :!:
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Hello All, I've reached the next lack of understanding stage

Another step forward after a thought regarding the selection of Turbulent or Laminar model selection. It turns out that I had been using RANS Turbulence and conducted a Reynolds Number check that suggested Laminar.

Got what I took was a better result that was closer to expected measured characteristic curve but still required mirroring so decided to look at other options including "Initialise Internal Flow Variable" (IFV).

IFV had been chosen as "Specify Values" but I had left them all as default zero values. So entered values that were close to the expected starting values and the result was very poor.

So tried "Potential Flow# with no real understanding. This failed completely with the following reports:
pvScript.py
(823 Bytes) Downloaded 94 times
MJC Case_03 Potential Flow Log - Rev P1.pdf
(91.11 KiB) Downloaded 105 times
Sorry to trouble you and dont expect solutions but comments would be gratefully received.

Michael
80_Rev_P3_Case_02_Characteristic.PNG
80_Rev_P3_Case_02_Characteristic.PNG (128.34 KiB) Viewed 4063 times
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by oliveroxtoby »

Crossleyuk wrote: Thu Dec 10, 2020 3:47 pm Hello All, I've reached the next lack of understanding stage

Another step forward after a thought regarding the selection of Turbulent or Laminar model selection. It turns out that I had been using RANS Turbulence and conducted a Reynolds Number check that suggested Laminar.

Got what I took was a better result that was closer to expected measured characteristic curve but still required mirroring so decided to look at other options including "Initialise Internal Flow Variable" (IFV).

IFV had been chosen as "Specify Values" but I had left them all as default zero values. So entered values that were close to the expected starting values and the result was very poor.

So tried "Potential Flow# with no real understanding. This failed completely with the following reports:

pvScript.py
MJC Case_03 Potential Flow Log - Rev P1.pdf

Sorry to trouble you and dont expect solutions but comments would be gratefully received.

Michael80_Rev_P3_Case_02_Characteristic.PNG
Are you using pressure boundaries for your inlets? If that is the case, potential flow initialisation will fail. Potential flow is an approximate solution to the flow equations which ignores viscosity (among other approximations), in the absence of which there may be no solution for the prescribed pressure drop (think of a stright, uniform pipe - these will be no pressure drop in the absence of viscosity).

If the solution is converged, it should not be sensitive to the initialisation. However, a poor initialisation can cause divergence. So I would check the convergence of your candidate solutions and only trust those that seem to be converged.
mmohaqeqf
Posts: 4
Joined: Sun Dec 13, 2020 4:25 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by mmohaqeqf »

johan wrote: Wed May 31, 2017 2:16 pm Just to add to Oliver, for the cut-cell Cartesian mesh generators the CFD WB write a multi-element stl which contains all the faces of the mesh object and the points are scaled to meters when the STL is written. The WB then performs a similarity check which generates a createPatchDict to rename the patches using the prescribed boundary condition names.
Does anybody know how this thing works?
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

Many many thanks gents, it's fantastic to have you’re support to my naive ignorance of CFD deployment!

Great news after finding a problem that I actually hadn’t noticed. I have an exit diffuser at the downstream face of the vortex chamber and I had problems picking the to two chamber faces in CfdOF workbench. Changed the geometry with little improvement and decided to add a. "Open" boundary at the change of section. Fantastic result that now needs more work to really understand.

So, I now have a complete characteristic with no mirroring required

300 Rev P7 - Zeroed CFD Characteristic P2.PNG
300 Rev P7 - Zeroed CFD Characteristic P2.PNG (191.51 KiB) Viewed 3878 times

22:30 Christmas Eve so now taking a break and thanking you.

Have a fantastic holiday and 2021 guys

Michael
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by RatonLaveur »

Michael,

Though many experienced users and devs have been able to help you and dedicate time with you. I would like, as a bona-fide lurker, to thank you very much for your persistence and documentation of your work. It is exciting to read your posts and to see your progress, exciting as well as instructive.

So thanks and good luck with your further work in this new year 2021!
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

RatonLaveur wrote: Wed Feb 10, 2021 12:49 pm Michael,

Though many experienced users and devs have been able to help you and dedicate time with you. I would like, as a bona-fide lurker, to thank you very much for your persistence and documentation of your work. It is exciting to read your posts and to see your progress, exciting as well as instructive.

So thanks and good luck with your further work in this new year 2021!
Thank you RatonLaveur!

Its a fantastic help to myself to be able to share my work and thoughts. Thank you very much for your kind words and I already have more to share in the near future. It's great to hear you have interest in my very nieve approaches :lol:

Thank you!!

Michael
aruizreina
Posts: 4
Joined: Sat Mar 20, 2021 1:00 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by aruizreina »

Hi,

Just landed to freecad and this workbench. After installing v0.19 and CfdOF I got results for the first case. But now, I have made a new geometry to solve a free surface case with water and air. However, when I write the case I get this error:

0.0: Error writing case:
0.0: AttributeError: 'FeaturePython' object has no attribute 'Phase'
0.0: Write case setup file failed

And after that, I cannot access previous data to revise it. I already installed freecad and workbench twice.

02:05:38 Traceback (most recent call last):
File "C:\Users\Antonio Ruiz Reina\AppData\Roaming\FreeCAD\Mod\CfdOF-9b2565821cfc4751f821026ef09eea4f2000fd33\CfdFluidMaterial.py", line 150, in setEdit
taskd = _TaskPanelCfdFluidProperties.TaskPanelCfdFluidProperties(self.Object, physics_model)
File "C:\Users\Antonio Ruiz Reina\AppData\Roaming\FreeCAD\Mod\CfdOF-9b2565821cfc4751f821026ef09eea4f2000fd33\_TaskPanelCfdFluidProperties.py", line 56, in __init__
self.createTextBoxesBasedOnPhysics()
File "C:\Users\Antonio Ruiz Reina\AppData\Roaming\FreeCAD\Mod\CfdOF-9b2565821cfc4751f821026ef09eea4f2000fd33\_TaskPanelCfdFluidProperties.py", line 67, in createTextBoxesBasedOnPhysics
if self.physics_obj.Flow == 'Incompressible':
<class 'AttributeError'>: 'FeaturePython' object has no attribute 'Flow'

I would appreciate any suggestion to fix it. Thanks in advance and congratulations on this script, it is a helpful tool to begin with OF.

Antonio
Post Reply