Update on the development of the OpenFOAM CFD workbench (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

Worufu
Posts: 41
Joined: Wed Jan 13, 2016 10:44 am
Location: Italy

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by Worufu »

oliveroxtoby wrote: Fri Sep 01, 2017 2:32 pm Aha. The issue seems to occur when the 'digit grouping symbol' in your Windows localisation settings is set to '.' Something is obviously being printed internally as "xxx.0" and this is being interpreted as a multiplication by 10. I will dig around and see if I can find the culprit, but for now you could work around it by changing your digit grouping symbol (1000s separator) in the Windows control panel.
Oh so good. It works! Yes the problem is the italian decimal separator and grouping symbol (comma instead dot and dot instead quotation mark). In the future can this problem be written in the CFDOF readme? I think I will not the only one to have this external issue :D . Thanks again.
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by oliveroxtoby »

Worufu wrote: Fri Sep 01, 2017 3:30 pm
oliveroxtoby wrote: Fri Sep 01, 2017 2:32 pm Aha. The issue seems to occur when the 'digit grouping symbol' in your Windows localisation settings is set to '.' Something is obviously being printed internally as "xxx.0" and this is being interpreted as a multiplication by 10. I will dig around and see if I can find the culprit, but for now you could work around it by changing your digit grouping symbol (1000s separator) in the Windows control panel.
Oh so good. It works! Yes the problem is the italian decimal separator and grouping symbol (comma instead dot and dot instead quotation mark). In the future can this problem be written in the CFDOF readme? I think I will not the only one to have this external issue :D . Thanks again.
Found the error - my bad! It should be working now with your normal settings, I hope.
Thanks for reporting the issue.
Please provide all the information requested in this post before reporting problems with CfdOF.
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by thschrader »

looo wrote: Fri Sep 01, 2017 8:51 am just succeeded with a first example :D
laminar_flow_sphere.png
this is a very nice way to play with open-foam. thanks for this nice add-on.

Hi looo,
is that a "half-model" you are using or is the sphere fully integrated in the cube?
I get an error when i want to simulate a cylinder in a channel.
(patch without faces in boundary-dict)
Thomas
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11939 (Git)
Build type: Release
Branch: master
Hash: 6e7952ec672895900eec0c2a25807b25befba818
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
cylinder_in_channel.JPG
cylinder_in_channel.JPG (86.68 KiB) Viewed 2928 times
missing_faces.JPG
missing_faces.JPG (58.53 KiB) Viewed 2928 times
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by looo »

thschrader wrote:is that a "half-model" you are using or is the sphere fully integrated in the cube?
I used a box and a sphere and removed the sphere from the box. To select the sphere you can use a clipping plane from coin:
https://forum.freecadweb.org/viewtopic. ... 10#p170965

But I have no idea what your problem is. I made a 2d-case too and it worked out of the box.
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by HoWil »

oliveroxtoby wrote: Fri Sep 01, 2017 4:06 pm Found the error - my bad! It should be working now with your normal settings, I hope.
Thanks for reporting the issue.
Hi Oliver,
can you please explain in more detail what kind of error you corrected. There is a similar problem with the material dialogue in fem-wb (see https://forum.freecadweb.org/viewtopic. ... 3e#p187725) and I am sure your infos could help here ;) .
Thanks in advance,
HoWil
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by HoWil »

looo wrote: Sat Sep 02, 2017 3:01 pm
thschrader wrote:is that a "half-model" you are using or is the sphere fully integrated in the cube?
I used a box and a sphere and removed the sphere from the box. To select the sphere you can use a clipping plane from coin:
https://forum.freecadweb.org/viewtopic. ... 10#p170965

But I have no idea what your problem is. I made a 2d-case too and it worked out of the box.
In such cases you could also use the "ListSelect" developed by m42kus ... see : https://github.com/drhooves/SelectionTools
EDIT: a nice screencast can be found here https://forum.freecadweb.org/viewtopic. ... or#p181397
BR HoWil
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by thschrader »

HoWil wrote: Sat Sep 02, 2017 5:25 pm
looo wrote: Sat Sep 02, 2017 3:01 pm
thschrader wrote:is that a "half-model" you are using or is the sphere fully integrated in the cube?
I used a box and a sphere and removed the sphere from the box. To select the sphere you can use a clipping plane from coin:
https://forum.freecadweb.org/viewtopic. ... 10#p170965

But I have no idea what your problem is. I made a 2d-case too and it worked out of the box.
In such cases you could also use the "ListSelect" developed by m42kus ... see : https://github.com/drhooves/SelectionTools
EDIT: a nice screencast can be found here https://forum.freecadweb.org/viewtopic. ... or#p181397
BR HoWil
My fault. I produced an "empty" boundary condition... :oops:
I love this WB :)
cylinder_channel.JPG
cylinder_channel.JPG (35.44 KiB) Viewed 2887 times
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by thschrader »

oliveroxtoby wrote: Fri Sep 01, 2017 9:08 am We probably don't have the spare time or funding to implement this any time soon, so editing case dictionaries is the best bet. You would want the 'forces' function object, see the OpenFOAM user guide - https://cfd.direct/openfoam/user-guide/ ... 390006.2.2 - and the template you would need to use can be copied from <OpenFOAM directory>/etc/caseDicts/postProcessing/forces/forcesIncompressible

Of course, if anyone wants to add this functionality to the workbench, that would be great.
No need :)
You can calculte the resulting forces in paraview by projecting/integrating the pressure field along
the x,y,z-Axes. I have stolen the idea from this guy:
https://www.youtube.com/watch?v=J944HOj_4b0
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by thschrader »

@oliveroxtoby
Here is a little info about a calculation I have done.
The pic above (cylinder in channel) is a test case. The channel is 6 m long, 2 m high and 100 mm "thick".

Theory:
Diameter cylinder is D=400 mm. Fluid is water with rho=1000 kg/m^3, inlet speed 1,5 m/s.
This gives a pressure of q=1085 N/m^2, Re=5,9*10^5 ==> drag-coeff=0,8 according to DIN4131.
The resulting force on an infinite long cylinder is F=cf*D*q=348 N/m.

openfoam-result, see spreadsheet in paraview pic:
the resulting drag-force on the 10 cm long simulation-cylinder is 35,3 N, so for a 1m part it is 353 N!
I think that is a perfect matching!

(btw: as far as I understood the input-files, openfoam caculates a "normalized" pressure field,
p_openfoam=p_real/density.
So to get the real pressure, you must multiply the calculated field with fluid-density. OK?)
regards Thomas

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11939 (Git)
Build type: Release
Branch: master
Hash: 6e7952ec672895900eec0c2a25807b25befba818
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
drag_lift_forces.JPG
drag_lift_forces.JPG (140.05 KiB) Viewed 2836 times
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by oliveroxtoby »

makkemal wrote: Fri Sep 01, 2017 8:08 am When will this be part of the addon manager ?
It really full featured workbench already
It is now available in the addons manager (CfdOF) - thanks @yorick.
Please provide all the information requested in this post before reporting problems with CfdOF.
Post Reply