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 Jan 15, 2018 8:57 pm ;)
https://github.com/opensimsa/opensim/tr ... niumFalcon
I_did_my_best.JPG
I am not able to reproduce the problem. If you scroll up in the python console, do you see an earlier error message - such as when you ran the 01 macro?

Here is the final FreeCAD file I get after running the macros: https://drive.google.com/uc?export=down ... 50QezjtCWJ
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: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

oliveroxtoby wrote: Tue Jan 16, 2018 7:24 am I am not able to reproduce the problem. If you scroll up in the python console, do you see an earlier error message - such as when you ran the 01 macro?

Here is the final FreeCAD file I get after running the macros: https://drive.google.com/uc?export=down ... 50QezjtCWJ
Hi Oliver,
I ran you file from google. Works fine. But I get different residuals (means no convergence?),
using the predefined values. About macro: I will do another try.
The step-file must be located in the same folder like the macros, correct?
falcon.JPG
falcon.JPG (215.82 KiB) Viewed 1780 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 Jan 18, 2018 5:36 am Hi Oliver,
I ran you file from google. Works fine. But I get different residuals (means no convergence?),
Ah, that is because turbulence is turned off in the physics model (my mistake).
thschrader wrote: Thu Jan 18, 2018 5:36 am using the predefined values. About macro: I will do another try.
The step-file must be located in the same folder like the macros, correct?
falcon.JPG
Yes, correct.
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: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

@Oliver:
macro 01 does not detect the falcon (fusion part). I tried to import the step
and fused/cuted by hand and skipped the fusion/cut command in script (as I did in my post above),
but that does not work too. When you import the step alone, you will get the model-tree with
the yellow body. After renaming the parts (eliminating the point), exporting/importing
I get a different tree structure. Maybe thats the reason...
Thomas
macro_01.JPG
macro_01.JPG (82.98 KiB) Viewed 1753 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 Jan 18, 2018 9:45 am @Oliver:
macro 01 does not detect the falcon (fusion part). I tried to import the step
and fused/cuted by hand and skipped the fusion/cut command in script (as I did in my post above),
but that does not work too. When you import the step alone, you will get the model-tree with
the yellow body. After renaming the parts (eliminating the point), exporting/importing
I get a different tree structure. Maybe thats the reason...
Thomas
macro_01.JPG
How are you running the macro? Are you pasting its contents into the python console? Please try opening the file with File | Open and then executing it with Macro | Execute macro. The macro uses the python __file__ variable to detect its location which is not set if you paste into the console.
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: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

oliveroxtoby wrote: Thu Jan 18, 2018 9:56 am How are you running the macro? Are you pasting its contents into the python console? Please try opening the file with File | Open and then executing it with Macro | Execute macro. The macro uses the python __file__ variable to detect its location which is not set if you paste into the console.
Yes, at first I pasted the macro into the python console. Now I used
File/open and Execute/macro. The falcon is detected, but doubleclick
on CfdAnalysis does not activate the buttons, meshing does not start.
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12940 (Git)
Build type: Release
Branch: master
Hash: 22ed0bce514174558bf09f6d4f0237f2ac382fc6
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)
all_macros.JPG
all_macros.JPG (54.6 KiB) Viewed 1738 times
cfmesh.JPG
cfmesh.JPG (24.32 KiB) Viewed 1738 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 Jan 18, 2018 10:38 am Yes, at first I pasted the macro into the python console. Now I used
File/open and Execute/macro. The falcon is detected, but doubleclick
on CfdAnalysis does not activate the buttons, meshing does not start.
Looks like there must have been an earlier error when the first macro was run ('Cut' has an error) - could you check back in Report view or python console for the first error message that occurs?
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: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by thschrader »

oliveroxtoby wrote: Thu Jan 18, 2018 12:40 pm Looks like there must have been an earlier error when the first macro was run ('Cut' has an error) - could you check back in Report view or python console for the first error message that occurs?
I did this:
Start FC, File/open macro 01, Macro/execute macro.
The tree appears, but there are no additional messages plotted in the report/python console.
BTW: there is something wrong with the step-file. After fusing the two step parts I checked
in part-wb the geometry, no errors. After that I scaled up the fusion in arch-wb with a factor of 21
(to get the "real" dimensions of the falcon). When checking the scaled part, it is no more a solid... :o
python_report_console.JPG
python_report_console.JPG (149.82 KiB) Viewed 1711 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Post by Kunda1 »

thschrader wrote: Thu Jan 18, 2018 10:38 am Version: 0.17.12940 (Git)
Perhaps update to latest HEAD (0.17.13050) and retest?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
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 Jan 18, 2018 2:47 pm I did this:
Start FC, File/open macro 01, Macro/execute macro.
The tree appears, but there are no additional messages plotted in the report/python console.
Can you confirm that if you right-click in the report view and go to options, everything is checked, then re-run the macro please?
Please provide all the information requested in this post before reporting problems with CfdOF.
Post Reply