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

Re: Fork of CFD workbench

Post by oliveroxtoby »

makkemal wrote:When can we have this available via "addon manager" ?
The name has now and directory has now changed
Soon. We wanted to wait until we have a decent pre-requisite checker, so that a user who installs it via the addon manager and tries to run it without first having installed necessary dependencies, will at least get a helpful error message. This is in the works right now, together with cut-cell Cartesian meshing / boundary layers!
Please provide all the information requested in this post before reporting problems with CfdOF.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Fork of CFD workbench

Post by Kunda1 »

oliveroxtoby wrote: We wanted to wait until we have a decent pre-requisite checker, so that a user who installs it via the addon manager and tries to run it without first having installed necessary dependencies, will at least get a helpful error message. This is in the works right now
A pre-requisite checker would be a helpful tool for FreeCAD in general, I believe. Maybe it's worth making a FC wide function that can do this for plugins in general?
It would help working towards realizing issue #857
yorik wrote:ping
Edit: clarity + added ticket reference
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Fork of CFD workbench

Post by Kunda1 »

oliveroxtoby wrote:ping
I've also opened a ticket on FreeCAD-addons
https://github.com/FreeCAD/FreeCAD-addons/issues/29
That we might as well think of the logic needed to implement this for all of FC.
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
wafi
Posts: 82
Joined: Sat Oct 15, 2016 8:45 am

Re: Fork of CFD workbench

Post by wafi »

impressing work :D

I have two different problems:

Windows installation:
FreeCAD 0.17 Rev No 11091
the icons in the CfdFoam bench will not be shown

Solved, simple ... the extracted zip file called the workbench CfdFoam-master, renaming into CfdFoam and the problem is solved.

Linux installation
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11090 (Git)
Build type: None
Branch: master
Hash: 4d7554197ee622ac5a4b709aa4205989e54484f3
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

I am not able to call openfoam solver. Error message: OpenFOAM installation directory not found
In the bashrc the source is added with: source /opt/openfoam4/etc/bashrc
No problem to start i.e. simplefoam from terminal.
User avatar
oliveroxtoby
Posts: 812
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Fork of CFD workbench

Post by oliveroxtoby »

wafi wrote:impressing work :D

I have two different problems:

Windows installation:
FreeCAD 0.17 Rev No 11091
the icons in the CfdFoam bench will not be shown

Solved, simple ... the extracted zip file called the workbench CfdFoam-master, renaming into CfdFoam and the problem is solved.

Linux installation
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11090 (Git)
Build type: None
Branch: master
Hash: 4d7554197ee622ac5a4b709aa4205989e54484f3
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

I am not able to call openfoam solver. Error message: OpenFOAM installation directory not found
In the bashrc the source is added with: source /opt/openfoam4/etc/bashrc
No problem to start i.e. simplefoam from terminal.
Thank you for testing!

Regarding the windows installation, for now I would suggest you install the prepackaged install at https://opensimsa.github.io/download.html, as some of the dependencies in the FreeCAD directory (as listed in the README file) need to be updated to work correctly.

I was unable to reproduce the problem in the Linux install, however as possible workaround, could you try adding the OpenFOAM install directory to preferences:
Choose Tools | Edit Parameters ... and navigate to:
Preferences | Mod | Cfd | OpenFOAM
and edit the Installation Path parameter. Set this to
/opt/openfoam4
in your case.
Please provide all the information requested in this post before reporting problems with CfdOF.
wafi
Posts: 82
Joined: Sat Oct 15, 2016 8:45 am

Re: Fork of CFD workbench

Post by wafi »

Hi Oliver

perfect! :D

This solved the problem:
Choose Tools | Edit Parameters ... and navigate to:
Preferences | Mod | Cfd | OpenFOAM
and edit the Installation Path parameter. Set this to
/opt/openfoam4
Thank you for your assistance
Peter
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Fork of CFD workbench

Post by Kunda1 »

oliveroxtoby wrote:ping
An aside: for better visibility of this thread do you mind putting OpenFOAM in the title and even perhaps spelling out what CFD means so it could show up better in searches etc... ?
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
wafi
Posts: 82
Joined: Sat Oct 15, 2016 8:45 am

Re: Fork of CFD workbench

Post by wafi »

Hi Oliver

I have played a little bit today and I had several problems.
... meshing ... mesh region, for bigger meshes this will not work, or ... with my model it did not work, but in general it us unclear what you mean with the relative size, should it be read as percentage?

... material constants ... I do not know why, but i.e. placing "sea water" in, next edit it`s stated "None" with totally different figures.

I had several crashs of the system when using a big model, underwater area of a 12m sailing boat incl. keel and rudder in a box of 20m length, 10m width and 5m draft. I do not know if these crashs were based on evt wrong material inputs, but in general the crashes were when gnuplot showed app. 50 iterations, than gnuplot stopped and shortly after gnuplot stopps solver also stopped. Due to the size of the unv file I did not looked into the materials, so maybe it is something with gnuplot constants or material, I do not know.


Grummmel .. forgot to state

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11104 (Git)
Build type: None
Branch: master
Hash: 1b2b964c35bd0f989f1f833a372c48e08cec0194
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Worufu
Posts: 41
Joined: Wed Jan 13, 2016 10:44 am
Location: Italy

Re: Fork of CFD workbench

Post by Worufu »

Amazing work! It works very well, it was time I'm searching of something like this, simple to set, easy to process and full open also for Windows. Congratulations again.
I try some test with wing simulation, it works good, but the parallel core feature doesn't work. Case writes data, Solver starts the calculation, but after a little time, about a 1/10 of single core simulation, it stops and tell me the simulation is solved.
However the iteration plot doesn't show any data and work only a thread of the various cpus I tested. Obviously the results are not calculated.
Am I missing something or is this feature not supported yet?
Tested both on Windows 7 and 10 with the same problem.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10432 (Git)
Build type: Release
Branch: master
Hash: 84ac526f62b394dba749e3086b6787308d5c7702
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
wafi
Posts: 82
Joined: Sat Oct 15, 2016 8:45 am

Re: Fork of CFD workbench

Post by wafi »

hm, I installed the updated files from your GitHub because I wanted to have the files update.
Now the writing process stop with the failure :

27.6: Command '['bash', '-c', 'source "/opt/openfoam4/etc/bashrc" && cd "/tmp/case" && ideasUnvToFoam "/tmp/case/case.unv" > log.ideasUnvToFoam 2>&1']' returned non-zero exit status 134

seems to be same problem as some posts ago.
In the output window, following is stated:

File "/home/peter/.FreeCAD/Mod/CfdFoam/FoamCaseBuilder/utility.py", line 633, in runFoamApplication
out = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT, startupinfo=si)
File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['bash', '-c', 'source "/opt/openfoam4/etc/bashrc" && cd "/tmp/case" && ideasUnvToFoam "/tmp/case/case.unv" > log.ideasUnvToFoam 2>&1']' returned non-zero exit status 134
Post Reply