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
oliveroxtoby
Posts: 645
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by oliveroxtoby »

Crossleyuk wrote: Mon Oct 04, 2021 9:35 am Sorry Oliver, you were correctbith times :roll:

But the calclations crearly start providing me with the Ux, Uy and Uz chart dialogue, but I then get exit with error and:

C:\Users\Michael Crossley\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdResidualPlot.py:68: UserWarning: Data has no positive values, and therefore cannot be log-scaled.
ax.set_yscale('log')


Seriously wish I could follow all this.

Michael
oliveroxtoby wrote: Mon Sep 13, 2021 7:16 pm This happens when "Use value from boundary" is chosen in the "InitialiseFields" object, but a valid boundary has not (yet) been selected. Simply double-clicking the "InitialiseFields" object should automatically choose the first suitable boundary ("inlet" in this case); click OK and all should be well. The run then fails since this is an inviscid analysis with prescribed pressure drop - changing to viscous will fix that.
You are prescribing a fixed input and output pressure; however the analysis is inviscid which means that there is no counterbalancing friction to balance this prescribed force and so the problem has no solution. This causes the calculation to immediately fail.

If you go into "PhysicsModel" and tick "Viscous", you should find that it works.
User avatar
Crossleyuk
Posts: 153
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

HaHa, and I'd just changed the inviscid wall to viscous, Grrr! Thanks for guidance, I now have a working FC19 model. So all I have to do now is get my historic FC18 cases to work.

Thank you Oliver

Michael
nixxx
Posts: 4
Joined: Wed Jun 05, 2019 8:05 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by nixxx »

oliveroxtoby wrote: Sat Oct 02, 2021 12:51 pm
nixxx wrote: Fri Oct 01, 2021 8:45 am Hi guys,
I understand the CFDOF user interface does not provide access to all of the functionality of OpenFOAM, right? But, can this be accessed via the OpenFOAM_Start shortcut that is created during the installation? E.g, is this a full OpenFOAM installation or does it have some limitations?
Yes, CfdOF interfaces with an external installation of OpenFOAM from one of its various suppliers. The installation is just a convenience and it is indeed the full, unaltered version.
Awesome Oliver, thank you!
thschrader
Veteran
Posts: 2638
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

Just for fun:
Blue origin capsule reentry at
18 km height, v=3600 km/h
Atmosphere 7500 Pa, 220 K, 0,12 kg/m^3

Excel-Data from Blue-origin YT-channel, writing down telemetry-data every 5 sec.

max v=4100 km/h, max g-force 6g, max temperature 720 K.
Not bad for a 90 year old…

Solver Hisa. Zip contains FC-file and Excel-Data.
tiberius_kirk.zip
(1001.82 KiB) Downloaded 67 times
kirk001.JPG
kirk001.JPG (83.62 KiB) Viewed 3862 times
cad1234
Posts: 299
Joined: Fri Dec 28, 2018 11:11 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by cad1234 »

Very impressive thomas! Amazing what this software can give, if it is under the finger tips of people, who know how to work with it and have the theoretical background, to make such simulations!
A bit of new dimension, to see what happens in 18 km high...
thschrader
Veteran
Posts: 2638
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

There is only telemetry-data from the booster available (over the full ride), not from the capsule.
The booster reaches maxV=4100 km/h between 35-24 km height, there is practically no atmosphere.
So the capsule should reach this speed too (free fall).
You can see on the blueorigin videos, that the capsule sometimes spins during zero-g,
and is slightly tilted. I wonder how the stabilize the capsule without active thrusters.
Is the capsule a "self-stabilizing" body at reentry?
How they avoid crashing between booster/capsule at reentry? The booster runs ahead the capsule and
reaches denser layers first ;)
I my opinion this is a pretty dangrous ride...
And Mr. Bezos has some trouble to get an insurance.
https://www.reuters.com/technology/bezo ... 021-06-24/
https://www.youtube.com/watch?v=uEhdlIor-do
At 3:02:20
crash.JPG
crash.JPG (10.12 KiB) Viewed 3681 times
User avatar
Crossleyuk
Posts: 153
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Crossleyuk »

oliveroxtoby wrote: Mon Oct 04, 2021 11:14 am
Crossleyuk wrote: Mon Oct 04, 2021 9:35 am Sorry Oliver, you were correctbith times :roll:

But the calclations crearly start providing me with the Ux, Uy and Uz chart dialogue, but I then get exit with error and:

C:\Users\Michael Crossley\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdResidualPlot.py:68: UserWarning: Data has no positive values, and therefore cannot be log-scaled.
ax.set_yscale('log')


Seriously wish I could follow all this.

Michael
oliveroxtoby wrote: Mon Sep 13, 2021 7:16 pm This happens when "Use value from boundary" is chosen in the "InitialiseFields" object, but a valid boundary has not (yet) been selected. Simply double-clicking the "InitialiseFields" object should automatically choose the first suitable boundary ("inlet" in this case); click OK and all should be well. The run then fails since this is an inviscid analysis with prescribed pressure drop - changing to viscous will fix that.
You are prescribing a fixed input and output pressure; however the analysis is inviscid which means that there is no counterbalancing friction to balance this prescribed force and so the problem has no solution. This causes the calculation to immediately fail.

If you go into "PhysicsModel" and tick "Viscous", you should find that it works.

Thanks yet again Oliver. All sorted after your help to overcome my thought/memory troubles.

I decided to go back to and repeat my original CFD models, even reusing my original Excell analysis workbooks, using FreeCAD 0.19. I repeted my FreeCAD_018 runs in FreeCAD_019 and got some very interesting results. I have not been able to obtain a direct repeat. No point in going into detail here but large (50%) dissagreement in velocities. Have you heard of any other cases where 0.18 and 0.19 FreeCAD cases have not agreed ?

Many Thanks

Michael
User avatar
oliveroxtoby
Posts: 645
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by oliveroxtoby »

Crossleyuk wrote: Fri Oct 29, 2021 12:11 pm
oliveroxtoby wrote: Mon Oct 04, 2021 11:14 am
Crossleyuk wrote: Mon Oct 04, 2021 9:35 am Sorry Oliver, you were correctbith times :roll:

But the calclations crearly start providing me with the Ux, Uy and Uz chart dialogue, but I then get exit with error and:

C:\Users\Michael Crossley\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdResidualPlot.py:68: UserWarning: Data has no positive values, and therefore cannot be log-scaled.
ax.set_yscale('log')


Seriously wish I could follow all this.

Michael
oliveroxtoby wrote: Mon Sep 13, 2021 7:16 pm This happens when "Use value from boundary" is chosen in the "InitialiseFields" object, but a valid boundary has not (yet) been selected. Simply double-clicking the "InitialiseFields" object should automatically choose the first suitable boundary ("inlet" in this case); click OK and all should be well. The run then fails since this is an inviscid analysis with prescribed pressure drop - changing to viscous will fix that.
You are prescribing a fixed input and output pressure; however the analysis is inviscid which means that there is no counterbalancing friction to balance this prescribed force and so the problem has no solution. This causes the calculation to immediately fail.

If you go into "PhysicsModel" and tick "Viscous", you should find that it works.

Thanks yet again Oliver. All sorted after your help to overcome my thought/memory troubles.

I decided to go back to and repeat my original CFD models, even reusing my original Excell analysis workbooks, using FreeCAD 0.19. I repeted my FreeCAD_018 runs in FreeCAD_019 and got some very interesting results. I have not been able to obtain a direct repeat. No point in going into detail here but large (50%) dissagreement in velocities. Have you heard of any other cases where 0.18 and 0.19 FreeCAD cases have not agreed ?

Many Thanks

Michael
There shouldn't be, especially if you are using the same versions of CfdOF and OpenFOAM. You could compare the meshCase and case folders that are written in the two cases and see if there are any differences in inputs.
User avatar
oliveroxtoby
Posts: 645
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 Feb 08, 2022 11:54 am After some success following great help from the forum, I can offer some more progress on my CFD success.
...
@Crossleyuk, I took the liberty of moving your post to a new topic in the CFD forum here to prevent it getting lost in this very long thread.
thschrader
Veteran
Posts: 2638
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

Just updated the
cfdof-wb, hisa-solver, cfmesh

Hisa:
when running this file
capsule_hisa.FCStd
(845.44 KiB) Downloaded 22 times
this happens:

Code: Select all

--> FOAM FATAL IO ERROR: 
Cannot find patchField entry for inlet

file: C:/GA-NT/Anwendungen/TS_513538/CFD/case/0/epsilon/boundaryField from line 26 to line 18.
From function void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField(const Foam::DimensionedField<TypeR, GeoMesh>&, const Foam::dictionary&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]
in file X:/OpenFOAM-8/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C at line 184.
FOAM exiting



keps.JPG
keps.JPG (10.41 KiB) Viewed 837 times
I wanted to run the new k-epsilon turbulence model with this file:
naca2412_k_epsilon.FCStd
(384.29 KiB) Downloaded 22 times
this happens:

Code: Select all

Traceback (most recent call last):
File "C:\Users\thomas.schrader\AppData\Roaming\FreeCAD\Mod\CfdOF\.\_TaskPanelCfdPhysicsSelection.py", line 180, in accept
FreeCADGui.doCommand("obj.TurbulenceModel = '{}'".format(
File "<string>", line 1, in <module>
<class 'ValueError'>: 'kEpsilon' is not part of the enumeration in naca2412_k_epsilon#PhysicsModel.TurbulenceModel

I forgot:
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)
Post Reply