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!
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 857
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.
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.
Choose Tools | Edit Parameters … and navigate to:
Preferences | Mod | Cfd | OpenFOAM
and edit the Installation Path parameter. Set this to
/opt/openfoam4
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… ?
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
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
GMSH is not well suited to large meshes one typically require for CFD, we are currently busy implementing cut-cell Cartesian meshing (using cfMeh and snappyHexMesh). This would provide an efficient solution to generate more realistic meshes. We are hoping to finish this in the next couple of weeks.
I know, that`s why I tried to work with the region, idea behind, to create a boundary layer and mesh this with a fine mesh, but this did not work at all. A better meshing system would be highly appreciate, of cause RANS, possibility to work with waves … etc I know a lot of things what I would like to have, but early spring is not chrismas
after trying to understand where the failure during writing the case files ocures, I have got now an Ubuntu message, stating that openfoam crashed with the error message:
ideasUnvToFoam crashed with SIGABRT in Foam::error::abort
I have tried now to stop the crash by #raise in line 639 in utility.py to try to understand what happens. Please note what output in python window was shown in freecad. I think there is something wrong with the data structure and this data structure which is already on your computer, works fine, try to delete them and I am pretty sure, you will have same problem that the actual workbench do not check the necessary data structure and does not create them in advance … that is my impression.
Here the errors shown in python window:
Start to write case to folder /tmp
Run pre-build check.
/home/peter/.FreeCAD/Mod/CfdFoam/data/defaults/simpleFoam
/tmp/case
Info: Initialise solver created fields (variables): set([‘p’, ‘U’])
Writing GMSHExport FemMesh to UNV format file: /tmp/case/case.unv
Running ideasUnvToFoam “/tmp/case/case.unv”
bash: Zeile 1: 4108 Abgebrochen (Speicherabzug geschrieben) ideasUnvToFoam “/tmp/case/case.unv” > log.ideasUnvToFoam 2>&1
Traceback (most recent call last):
File “/home/peter/.FreeCAD/Mod/CfdFoam/CfdCaseWriterFoam.py”, line 83, in run
success = self.write_case()
File “/home/peter/.FreeCAD/Mod/CfdFoam/CfdCaseWriterFoam.py”, line 124, in write_case
self.write_mesh()
File “/home/peter/.FreeCAD/Mod/CfdFoam/CfdCaseWriterFoam.py”, line 195, in write_mesh
self.builder.setupMesh(unvMeshFile, scale = 0.001)
File “/home/peter/.FreeCAD/Mod/CfdFoam/FoamCaseBuilder/BasicBuilder.py”, line 134, in setupMesh
convertMesh(self._casePath, updated_mesh_path, scale)
File “/home/peter/.FreeCAD/Mod/CfdFoam/FoamCaseBuilder/utility.py”, line 668, in convertMesh
setPatchType(case, ‘defaultFaces’, ‘wall’) # rename default boundary type to wall
File “/home/peter/.FreeCAD/Mod/CfdFoam/FoamCaseBuilder/utility.py”, line 684, in setPatchType
f = BoundaryDict(case)
File “/usr/local/lib/python2.7/dist-packages/PyFoam/RunDictionary/BoundaryDict.py”, line 36, in init
backup=backup)
File “/usr/local/lib/python2.7/dist-packages/PyFoam/RunDictionary/ParsedParameterFile.py”, line 1292, in init
boundaryDict=True)
File “/usr/local/lib/python2.7/dist-packages/PyFoam/RunDictionary/ParsedParameterFile.py”, line 85, in init
self.readFile()
File “/usr/local/lib/python2.7/dist-packages/PyFoam/RunDictionary/FileBasis.py”, line 98, in readFile
self.openFile()
File “/usr/local/lib/python2.7/dist-packages/PyFoam/RunDictionary/FileBasis.py”, line 84, in openFile
self.fh=gzip.open(self.name+“.gz”,mode)
File “/usr/lib/python2.7/gzip.py”, line 34, in open
return GzipFile(filename, mode, compresslevel)
File “/usr/lib/python2.7/gzip.py”, line 94, in init
fileobj = self.myfileobj = builtin.open(filename, mode or ‘rb’)
IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: u’/tmp/case/constant/polyMesh/boundary.gz’
one step ahead …
after #raise in utility.py line 639 the program wrote the log file ideasUnvToFoam and in this file I could see, that boundary conditions failed and that this was the reason that openfoam stopped. Changing boundary conditions and everything was perfect.
So … I think the main problem here is the error message, which should state, “OpenFoam stopped due to failures, please note log file”. Second problem, this logfile has to be printed regardless if the solver crashes or not. I am not a programmer, but in my point of view, leave th raise command.
Wafi, can you share the freecad file? I notice some problem in some constraints that I think they are not supported yet (as symmetry). I can check on it.
@developers: have you any suggestion for my parallel computation problem?
Ok, solved, thanks a lot. I needed a clean installation of MPI, because I had a no upgradable MPI version. So I uninstall MPI and then I have installed BlueCFD-core.
Yes, relative size is a fraction of the maximum mesh spacing. This is new functionality and we should probably clarify.
As Johan mentioned, this will hopefully work better when the cartesian meshing functionality is done.
… material constants … I do not know why, but i.e. placing “sea water” in, next edit it`s stated “None” with totally different figures.
This is a bit of an issue we have with formatting of dimensioned quantities in FreeCAD at present - fixed number of decimal places results in truncation of small quantities, athough the correct value is stored behind the scenes.
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.
It is hard to know without more details. Viewing the exact output may give you a better idea:
Enable Tools | Panels | Report view
Right click in the report panel that appears, go to Options and check all the options to display all output.
Try to run the case again and see what output appears.