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

thschrader
Posts: 1384
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

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

Postby thschrader » Fri Sep 01, 2017 8:12 am

saso wrote:
Fri Sep 01, 2017 1:29 am
One of the interesting use cases of cfd for structural engineering can be wind loads (wind tunnel) simulations on structures / buildings...
That is exactly what I am looking for.
Please see here: (german site, but manual in english)
https://www.kathrein.com/de/loesungen/m ... /windlast/

I am not sure how to compute resulting forces (lets say the reacting forces of a cylinder
under wind-loading) with the cfd-wb. I think you must edit the case-dictionaries, but
I dont know the needed commands and where to put them.
User avatar
oliveroxtoby
Posts: 235
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Fri Sep 01, 2017 8:38 am

makkemal wrote:
Fri Sep 01, 2017 8:08 am
When will this be part of the addon manager ?
It really full featured workbench already
Thanks, we have requested it to be added (https://github.com/FreeCAD/FreeCAD-addons/issues/44) so hopefully it'll be available soon...
yorik wrote: ping?
;)
looo
Posts: 2400
Joined: Mon Nov 11, 2013 5:29 pm

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

Postby looo » Fri Sep 01, 2017 8:51 am

just succeeded with a first example :D
laminar_flow_sphere.png
laminar_flow_sphere.png (88.97 KiB) Viewed 880 times
this is a very nice way to play with open-foam. thanks for this nice add-on.
User avatar
oliveroxtoby
Posts: 235
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Fri Sep 01, 2017 9:08 am

thschrader wrote:
Fri Sep 01, 2017 8:12 am
saso wrote:
Fri Sep 01, 2017 1:29 am
One of the interesting use cases of cfd for structural engineering can be wind loads (wind tunnel) simulations on structures / buildings...
That is exactly what I am looking for.
Please see here: (german site, but manual in english)
https://www.kathrein.com/de/loesungen/m ... /windlast/

I am not sure how to compute resulting forces (lets say the reacting forces of a cylinder
under wind-loading) with the cfd-wb. I think you must edit the case-dictionaries, but
I dont know the needed commands and where to put them.
Hi Thomas

Thank you for the feedback in your earlier message :)

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.
Worufu
Posts: 40
Joined: Wed Jan 13, 2016 10:44 am
Location: Italy

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

Postby Worufu » Fri Sep 01, 2017 10:27 am

Yeah, I'm very happy about this workbench, it has a lot of potentialities. A little knowledgements of paraview can show very useful results, as wing lift, drag, etc...

I found a problem in the re-opening the constraint forms, the fields of pressure and velocity changes values every time the form is opened or closed. The image below can explain the problem.
insertion.png
insertion.png (81.48 KiB) Viewed 870 times
ickby
Posts: 2857
Joined: Wed Oct 05, 2011 7:36 am

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

Postby ickby » Fri Sep 01, 2017 10:59 am

@oliveroxtoby: As you use Paraview as post processor I suppose openFOAM creates vtk result files? If so you could also import the results into FreeCAD just like @m42kus does with his elmer code. Postprocessing it in FreeCAD is of course not as powerful as in ParaView, but for basic and fast needs it is nice already. It could be a nice addition to the workbench.
User avatar
oliveroxtoby
Posts: 235
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Fri Sep 01, 2017 1:05 pm

Worufu wrote:
Fri Sep 01, 2017 10:27 am
Yeah, I'm very happy about this workbench, it has a lot of potentialities. A little knowledgements of paraview can show very useful results, as wing lift, drag, etc...

I found a problem in the re-opening the constraint forms, the fields of pressure and velocity changes values every time the form is opened or closed. The image below can explain the problem.

insertion.png
Ouch.
I can't seem to reproduce this issue. Can you confirm which Units system you are using (Edit | Preferences | Units) and FreeCAD version information?
User avatar
oliveroxtoby
Posts: 235
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Fri Sep 01, 2017 1:09 pm

ickby wrote:
Fri Sep 01, 2017 10:59 am
@oliveroxtoby: As you use Paraview as post processor I suppose openFOAM creates vtk result files? If so you could also import the results into FreeCAD just like @m42kus does with his elmer code. Postprocessing it in FreeCAD is of course not as powerful as in ParaView, but for basic and fast needs it is nice already. It could be a nice addition to the workbench.
Paraview has a reader for the native OpenFOAM structure so it isn't necessary to create vtks. Still, Johan did write some code to import vtk results early on. It worked but we couldn't really justify maintaining it. It's certainly an option if someone has time.
Worufu
Posts: 40
Joined: Wed Jan 13, 2016 10:44 am
Location: Italy

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

Postby Worufu » Fri Sep 01, 2017 1:33 pm

oliveroxtoby wrote:
Fri Sep 01, 2017 1:05 pm
Worufu wrote:
Fri Sep 01, 2017 10:27 am
Yeah, I'm very happy about this workbench, it has a lot of potentialities. A little knowledgements of paraview can show very useful results, as wing lift, drag, etc...

I found a problem in the re-opening the constraint forms, the fields of pressure and velocity changes values every time the form is opened or closed. The image below can explain the problem.

insertion.png
Ouch.
I can't seem to reproduce this issue. Can you confirm which Units system you are using (Edit | Preferences | Units) and FreeCAD version information?
I'm using "standard (mm/kg/s/deg)" on:

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11919 (Git)
Build type: Release
Branch: master
Hash: fccb5dbc87b919164610296adc96aa8b4fe4825e
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: Italian/Italy (it_IT)

But I got the same issue on older freecad version. I tried also MKS unit system, but the problem persists.
User avatar
oliveroxtoby
Posts: 235
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Fri Sep 01, 2017 2:32 pm

Worufu wrote:
Fri Sep 01, 2017 1:33 pm
oliveroxtoby wrote:
Fri Sep 01, 2017 1:05 pm
Worufu wrote:
Fri Sep 01, 2017 10:27 am
Yeah, I'm very happy about this workbench, it has a lot of potentialities. A little knowledgements of paraview can show very useful results, as wing lift, drag, etc...

I found a problem in the re-opening the constraint forms, the fields of pressure and velocity changes values every time the form is opened or closed. The image below can explain the problem.

insertion.png
Ouch.
I can't seem to reproduce this issue. Can you confirm which Units system you are using (Edit | Preferences | Units) and FreeCAD version information?
I'm using "standard (mm/kg/s/deg)" on:

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11919 (Git)
Build type: Release
Branch: master
Hash: fccb5dbc87b919164610296adc96aa8b4fe4825e
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: Italian/Italy (it_IT)

But I got the same issue on older freecad version. I tried also MKS unit system, but the problem persists.
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.