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

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Sat Mar 20, 2021 10:51 am

aruizreina wrote: Sat Mar 20, 2021 1:09 am Hi,

Just landed to freecad and this workbench. After installing v0.19 and CfdOF I got results for the first case. But now, I have made a new geometry to solve a free surface case with water and air. However, when I write the case I get this error:

0.0: Error writing case:
0.0: AttributeError: 'FeaturePython' object has no attribute 'Phase'
0.0: Write case setup file failed

And after that, I cannot access previous data to revise it. I already installed freecad and workbench twice.

02:05:38 Traceback (most recent call last):
File "C:\Users\Antonio Ruiz Reina\AppData\Roaming\FreeCAD\Mod\CfdOF-9b2565821cfc4751f821026ef09eea4f2000fd33\CfdFluidMaterial.py", line 150, in setEdit
taskd = _TaskPanelCfdFluidProperties.TaskPanelCfdFluidProperties(self.Object, physics_model)
File "C:\Users\Antonio Ruiz Reina\AppData\Roaming\FreeCAD\Mod\CfdOF-9b2565821cfc4751f821026ef09eea4f2000fd33\_TaskPanelCfdFluidProperties.py", line 56, in __init__
self.createTextBoxesBasedOnPhysics()
File "C:\Users\Antonio Ruiz Reina\AppData\Roaming\FreeCAD\Mod\CfdOF-9b2565821cfc4751f821026ef09eea4f2000fd33\_TaskPanelCfdFluidProperties.py", line 67, in createTextBoxesBasedOnPhysics
if self.physics_obj.Flow == 'Incompressible':
<class 'AttributeError'>: 'FeaturePython' object has no attribute 'Flow'

I would appreciate any suggestion to fix it. Thanks in advance and congratulations on this script, it is a helpful tool to begin with OF.

Antonio
Please could you upload your file for easier debugging?
aruizreina
Posts: 4
Joined: Sat Mar 20, 2021 1:00 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby aruizreina » Sat Mar 20, 2021 11:13 am

Of course, please find .FCStd and meshcase here:

https://www.dropbox.com/sh/zkeaacfry20s ... oh6Va?dl=0

Thanks in advance!
thschrader
Posts: 2134
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » Sat Mar 20, 2021 12:02 pm

aruizreina wrote: Sat Mar 20, 2021 11:13 am Of course, please find .FCStd and meshcase here:

https://www.dropbox.com/sh/zkeaacfry20s ... oh6Va?dl=0

Thanks in advance!
You posted the backup-file...
backup.JPG
backup.JPG (9.57 KiB) Viewed 1475 times
aruizreina
Posts: 4
Joined: Sat Mar 20, 2021 1:00 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby aruizreina » Sat Mar 20, 2021 12:06 pm

Ups... let's try again...
sorry
Attachments
ALI-ESPA.FCStd
(103.71 KiB) Downloaded 36 times
User avatar
oliveroxtoby
Posts: 496
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Sat Mar 20, 2021 8:57 pm

aruizreina wrote: Sat Mar 20, 2021 12:06 pm Ups... let's try again...
sorry
The 'PhysicsModel' object has been moved outside the 'CfdAnalysis' group. Move it back in by dragging it onto 'CfdAnalysis'.

Note that you will also need to change the pressure initialisation to a constant value as potential initialisation is not supported for this solver.

After these changes the solver runs for me.
aruizreina
Posts: 4
Joined: Sat Mar 20, 2021 1:00 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby aruizreina » Sat Mar 20, 2021 9:19 pm

Oh, it runs!! so easy and so quick, no words. Thank you very much for your interest and help!
Logry
Posts: 5
Joined: Fri Apr 23, 2021 1:57 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Logry » Fri Apr 30, 2021 2:39 pm

Hi everyone,
When I launch the analysis it works but I can't do the meshing part.
I receive the following message. I precise that I tried several paths too : /usr, /lib ...
———————————————————————————
OS: Ubuntu Core 20 (XFCE/xubuntu) . . . . . . . . .Word size of OS: 64-bit
Word size of FreeCAD: 64-bit . . . . . . . . . . . . . . . Version: 0.19.24276 (Git)
Build type: Unknown . . . . . . . . . . . . . . . . . . . . . Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.5 . . . . . . . . . . . . . . . . . . . . . Qt version: 5.12.8
Coin version: 4.0.0 . . . . . . . . . . . . . . . . . . . . . . . OCC version: 7.5.0
Locale: English/United States (en_US)
Attachments
bug.png
bug.png (95.71 KiB) Viewed 1189 times
User avatar
oliveroxtoby
Posts: 496
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Sat May 08, 2021 7:37 pm

Logry wrote: Fri Apr 30, 2021 2:39 pm Hi everyone,
When I launch the analysis it works but I can't do the meshing part.
I receive the following message. I precise that I tried several paths too : /usr, /lib ...
———————————————————————————
OS: Ubuntu Core 20 (XFCE/xubuntu) . . . . . . . . .Word size of OS: 64-bit
Word size of FreeCAD: 64-bit . . . . . . . . . . . . . . . Version: 0.19.24276 (Git)
Build type: Unknown . . . . . . . . . . . . . . . . . . . . . Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.5 . . . . . . . . . . . . . . . . . . . . . Qt version: 5.12.8
Coin version: 4.0.0 . . . . . . . . . . . . . . . . . . . . . . . OCC version: 7.5.0
Locale: English/United States (en_US)
CfdOF is not finding your OpenFOAM installation. It needs to be installed separately. Take note of the install location for the version you install, and set the OpenFOAM install directory to this.
thschrader
Posts: 2134
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » Thu May 13, 2021 4:43 pm

Did some calculations on the ingenuity-heli, using this model:
https://mars.nasa.gov/resources/25043/m ... -3d-model/

I tried to reconstruct the wing-profile from the obj-file.

Rotor-lift:
At 2400 rpm the wing segment in the middle moves with approx 75 m/s. At this speed
and this Angle of Attack the segment produces practically no lift.
heli-mass=1,8 kg, required lift on Mars approx 6,8 N (equals 680 gramm).
Sounds like nothing, but atmospheric density is only 0,015 kg/m^3 (earth 1,25 kg/m^3).

Rotor-imbalance:
How do they handle this?
At 2400 rpm a imbalance of 1/10 gramm at rotor-tip produces more than 3 N horizontal force.
Half of the heli-weight.

Energy:
Solar input at mars ground level approx 500 W/m^2.
Solar-panel area approx 640 cm^2. Efficiency 25%, gives power output of 10 Watt to reload accus.
Thats not much...

Rover:
Only one fixing at the gear, how is it balanced? Active control?
heliCFD.JPG
heliCFD.JPG (73.18 KiB) Viewed 954 times
profile.JPG
profile.JPG (29.32 KiB) Viewed 954 times
rover.JPG
rover.JPG (57.35 KiB) Viewed 954 times