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

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Tue Jan 16, 2018 7:24 am

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

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » Thu Jan 18, 2018 5:36 am

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 681 times
User avatar
oliveroxtoby
Posts: 322
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Thu Jan 18, 2018 6:58 am

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

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » 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
macro_01.JPG (82.98 KiB) Viewed 654 times
User avatar
oliveroxtoby
Posts: 322
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Thu Jan 18, 2018 9:56 am

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

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » Thu Jan 18, 2018 10:38 am

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 639 times
cfmesh.JPG
cfmesh.JPG (24.32 KiB) Viewed 639 times
User avatar
oliveroxtoby
Posts: 322
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Thu Jan 18, 2018 12:40 pm

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

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby thschrader » Thu Jan 18, 2018 2:47 pm

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 612 times
User avatar
Kunda1
Posts: 5909
Joined: Thu Jan 05, 2017 9:03 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Kunda1 » Thu Jan 18, 2018 2:55 pm

thschrader wrote:
Thu Jan 18, 2018 10:38 am
Version: 0.17.12940 (Git)
Perhaps update to latest HEAD (0.17.13050) and retest?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
oliveroxtoby
Posts: 322
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Thu Jan 18, 2018 3:00 pm

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.