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

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by oliveroxtoby »

thschrader wrote: Mon Mar 28, 2022 3:31 pm Just updated the
cfdof-wb, hisa-solver, cfmesh

Hisa:
when running this file
capsule_hisa.FCStd

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
I wanted to run the new k-epsilon turbulence model with this file:
naca2412_k_epsilon.FCStd

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
Thanks for the testing! Both issues hopefully resolved.
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

oliveroxtoby wrote: Mon Mar 28, 2022 9:52 pm ...
Thanks for the testing! Both issues hopefully resolved.
Tested the naca-profile from above, works.
But you must edit the epsilon file. The epsilon value is too low
in the written file, simplefoam crashes. However...

But interesting result. k-omega model converges, k-epsilon not :o
epsilonDict.JPG
epsilonDict.JPG (76.91 KiB) Viewed 2622 times
Komega_vs_Kepsilon.JPG
Komega_vs_Kepsilon.JPG (52.28 KiB) Viewed 2622 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 »

thschrader wrote: Tue Mar 29, 2022 4:01 pm
oliveroxtoby wrote: Mon Mar 28, 2022 9:52 pm ...
Thanks for the testing! Both issues hopefully resolved.
Tested the naca-profile from above, works.
But you must edit the epsilon file. The epsilon value is too low
in the written file, simplefoam crashes. However...
Did you not mean to enter 2.5 m^2/s^3 = 2.5e6 mm^2/s^3? 2.5e3 mm^2/s^3 as shown is equal to 0.0025 m^2/s^3, as written. Or am I missing something?
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

oliveroxtoby wrote: Tue Mar 29, 2022 7:09 pm ...
Did you not mean to enter 2.5 m^2/s^3 = 2.5e6 mm^2/s^3?
:oops:
Yes, you are right, exponent must be 6, because of m^2. Tricky unit gambling...
I guess there will be some more users in the future posting a question about this :)
Maybe switching to m^2 input in epsilon? Like in k.
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 »

thschrader wrote: Wed Mar 30, 2022 5:41 am
oliveroxtoby wrote: Tue Mar 29, 2022 7:09 pm ...
Did you not mean to enter 2.5 m^2/s^3 = 2.5e6 mm^2/s^3?
:oops:
Yes, you are right, exponent must be 6, because of m^2. Tricky unit gambling...
I guess there will be some more users in the future posting a question about this :)
Maybe switching to m^2 input in epsilon? Like in k.
Yes, I plan to put in a pull request to the FreeCAD base code to address this. There are a few places in CfdOF where similar illogical units are displayed. It would be good to fix them all at the same time, so if you encounter any others please let me know here. So far I have:
mm^2/s^3 -> m^2/s^3 (epsilon)
mm^3/s -> m^3/s (or l/s - it can be adaptive) (volumetric flow rate)
1/mm -> 1/m (Darcy-Forchheimer inertial coeff)
1/mm^2 -> 1/m^2 (Darcy-Forchheimer viscous coeff)
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

oliveroxtoby wrote: Wed Mar 30, 2022 7:20 am ... so if you encounter any others please let me know here. So far I have:
mm^2/s^3 -> m^2/s^3 (epsilon)
mm^3/s -> m^3/s (or l/s - it can be adaptive) (volumetric flow rate)
1/mm -> 1/m (Darcy-Forchheimer inertial coeff)
1/mm^2 -> 1/m^2 (Darcy-Forchheimer viscous coeff)
some more...
unit_change.JPG
unit_change.JPG (37.71 KiB) Viewed 2415 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 »

thschrader wrote: Thu Mar 31, 2022 2:56 pm some more...
unit_change.JPG
Thanks. The first three will actually change as you request if you set your unit system to m/kg/s. We unfortunately can't change them under mm/kg/s as they are used globally and defined this way already. The places where you requested mm should be fine as they are adaptive and should show up as the appropriate unit whether under m/kg/s or mm/kg/s.
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

8-)
Thanks for this add.
checkmesh.JPG
checkmesh.JPG (51.48 KiB) Viewed 2245 times
trijonb
Posts: 10
Joined: Mon May 24, 2021 1:07 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by trijonb »

thschrader wrote: Sun Apr 03, 2022 12:22 pm 8-)
Thanks for this add.
checkmesh.JPG
:thumbsup
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,

Moved back to my old Forum page to keep my new VXA page tidy. I have a request for a little help on the next step of my CFD equiries on a new CFD model. This is the failure I received and the report text.

Hope you can help, realy keen to make progress
Body_Cyl_Axial_Complete_Rev_P2_Error_05-22-22.png
Body_Cyl_Axial_Complete_Rev_P2_Error_05-22-22.png (166.38 KiB) Viewed 1819 times
Body_Cyl_Axial_Complete_Rev_P2_Error_05-22-22.png
Body_Cyl_Axial_Complete_Rev_P2_Error_05-22-22.png (166.38 KiB) Viewed 1819 times
Thank you again

Michael
Attachments
Body_Cyl_Axial_Complete_Rev_P2_Error_05-22-22.docx
(29 KiB) Downloaded 44 times
Post Reply