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: 1380
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

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

Postby thschrader » Mon Oct 02, 2017 9:03 pm

Hello Oliver,

I tried to do the same simulation like the "flooding-tank" tutorial from Jozsef Nagy on YT.
(The tank is flooded with water against gravity, like a fountain. The result should look like
the picture below). The calculation allways stops after 30s with openFOAM fatal error.
Probably I do something wrong with the field initialization or my workflow is garbage.
Please have a look at the FC-file. After writing the case you will see in the alpha.water-dict,
that the inlet/outlet values are not assigned (like in the alpha.water from tutorial), there
is a "TODO" entry. The blue cube is the initialization-zone for water.
regards Thomas
(the error "out of scope" on the mesh in tree has no effect...)
testCFD.FCStd
(183.19 KiB) Downloaded 30 times
floodingTank.JPG
floodingTank.JPG (51.57 KiB) Viewed 1080 times
alphaWaterCFDwb.JPG
alphaWaterCFDwb.JPG (25.52 KiB) Viewed 1080 times
alphaWaterTutorial.JPG
alphaWaterTutorial.JPG (29.25 KiB) Viewed 1080 times
result_tutorial.JPG
result_tutorial.JPG (24.12 KiB) Viewed 1080 times
User avatar
oliveroxtoby
Posts: 232
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Tue Oct 03, 2017 2:48 pm

thschrader wrote:
Mon Oct 02, 2017 9:03 pm
I tried to do the same simulation like the "flooding-tank" tutorial from Jozsef Nagy on YT.
(The tank is flooded with water against gravity, like a fountain. The result should look like
the picture below). The calculation allways stops after 30s with openFOAM fatal error.
Probably I do something wrong with the field initialization or my workflow is garbage.
Please have a look at the FC-file. After writing the case you will see in the alpha.water-dict,
that the inlet/outlet values are not assigned (like in the alpha.water from tutorial), there
is a "TODO" entry. The blue cube is the initialization-zone for water.

I thought that the alpha initialisation zone would cause the inlet alpha value to be set to 1, but I see that it doesn't work out like that.

The alpha inflow value can now be set in the boundary condition, and a couple of bugs are fixed. Should work now.
Attachments
testCFD.FCStd
(182.02 KiB) Downloaded 30 times
thschrader
Posts: 1380
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

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

Postby thschrader » Wed Oct 04, 2017 1:36 pm

@Oliver, short info
after updating CFDOF via addon-manager, close/restart FC:
try to mesh a cube. snappyhexMesh breaks,
gmsh/cfmesh works. system:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12284 (Git)
Build type: Release
Branch: master
Hash: 2244292552c004e6b506af9e1e98d3423e524ee7
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)
errorMesh.JPG
errorMesh.JPG (55.57 KiB) Viewed 994 times
gmsh.JPG
gmsh.JPG (117.46 KiB) Viewed 994 times
User avatar
oliveroxtoby
Posts: 232
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Wed Oct 04, 2017 2:47 pm

thschrader wrote:
Wed Oct 04, 2017 1:36 pm
@Oliver, short info
after updating CFDOF via addon-manager, close/restart FC:
try to mesh a cube. snappyhexMesh breaks,
gmsh/cfmesh works. system:
Thanks - fixed.
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 Oct 06, 2017 10:07 am

Is it possibile to have the "volumetric flow rate" and "mass flow rate" also in outlet as in inlet?
User avatar
oliveroxtoby
Posts: 232
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Mon Oct 09, 2017 7:48 am

Worufu wrote:
Fri Oct 06, 2017 10:07 am
Is it possibile to have the "volumetric flow rate" and "mass flow rate" also in outlet as in inlet?
At present the OpenFOAM boundary condition is only designed as an inlet (all three components of velocity are constrained); of course you can achieve much the same effect with the 'uniform velocity' outlet. If you would be interested, you could code up a new BC which allows users to specify mass flow rate and divides this by density and area to get the normal component of velocity.
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 » Tue Oct 10, 2017 3:38 pm

oliveroxtoby wrote:
Mon Oct 09, 2017 7:48 am
Worufu wrote:
Fri Oct 06, 2017 10:07 am
Is it possibile to have the "volumetric flow rate" and "mass flow rate" also in outlet as in inlet?
At present the OpenFOAM boundary condition is only designed as an inlet (all three components of velocity are constrained); of course you can achieve much the same effect with the 'uniform velocity' outlet. If you would be interested, you could code up a new BC which allows users to specify mass flow rate and divides this by density and area to get the normal component of velocity.
Thank for the information. It can be a good start to put me on coding in freecad. In your opinion is it possible to code all through python?
makkemal
Posts: 381
Joined: Wed Apr 29, 2015 12:41 pm

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

Postby makkemal » Wed Oct 11, 2017 4:43 pm

believe this post is actually part of this thread
https://forum.freecadweb.org/viewtopic.php?f=18&t=24857
User avatar
oliveroxtoby
Posts: 232
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Wed Oct 11, 2017 5:21 pm

Worufu wrote:
Tue Oct 10, 2017 3:38 pm
oliveroxtoby wrote:
Mon Oct 09, 2017 7:48 am
Worufu wrote:
Fri Oct 06, 2017 10:07 am
Is it possibile to have the "volumetric flow rate" and "mass flow rate" also in outlet as in inlet?
At present the OpenFOAM boundary condition is only designed as an inlet (all three components of velocity are constrained); of course you can achieve much the same effect with the 'uniform velocity' outlet. If you would be interested, you could code up a new BC which allows users to specify mass flow rate and divides this by density and area to get the normal component of velocity.
Thank for the information. It can be a good start to put me on coding in freecad. In your opinion is it possible to code all through python?
Great! Yes, definitely possible in python.
User avatar
oliveroxtoby
Posts: 232
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

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

Postby oliveroxtoby » Wed Oct 11, 2017 5:21 pm

makkemal wrote:
Wed Oct 11, 2017 4:43 pm
believe this post is actually part of this thread
https://forum.freecadweb.org/viewtopic.php?f=18&t=24857
Thanks for the notification.