FEM on Mac OSX
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: FEM on Mac OSX
That should be stated in the documentation somewhere
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
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
Re: FEM on Mac OSX
Update/comprehension to these posts:
https://forum.freecadweb.org/viewtopic. ... 30#p198642
https://forum.freecadweb.org/viewtopic. ... 40#p216356
I used the FreeCAD precompiled version shown below.
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13346 (Git)
Build type: Release
Branch: (HEAD detached at 22ee06d)
Hash: 22ee06de8441bfcc9fded2c6de4232d763fb11bc
Python version: 2.7.14
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
https://forum.freecadweb.org/viewtopic. ... 30#p198642
https://forum.freecadweb.org/viewtopic. ... 40#p216356
I used the FreeCAD precompiled version shown below.
- Install homebrew see https://brew.sh/
- open a Terminal
- run the command
This is because the repository where the formula for installing calculix has been retired and moved to this new location.
Code: Select all
brew tap brewsci/science
(No "sudo" is needed, nor even allowed.) - run the command
(again no sudo or root installation)
Code: Select all
brew install calculix-ccx
- type "ccx" and hit the TAB key. the "ccx" is expanded to the program found in the search path, in my case "ccx_2.13". Now go to the beginning of the line and enter in total the command
This shows the place where ccx is installed. To be precise: this is only a link pointing to the executable. In my case it showed
Code: Select all
type ccx_2.13
Code: Select all
ccx_2.13 is /usr/local/bin/ccx_2.13
- Start FreeCAD.
Switch to FEM. This is important; otherwise the FEM preferences will not show up. Open Preferences, and switch to FEM->Calculix - Enter for ccx binary path the previously determined position. If you use the finder to select the binary, hit the keys CMD+SHIFT+. (the dot key).
Dont worry if the path changes after selection. It's only the symbolic link being expanded - Save the Preferences
- Close FreeCAD. This is important, otherwise calculix might not be found.
- After restarting FreeCAD, you can go through the example as described in the wiki.
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13346 (Git)
Build type: Release
Branch: (HEAD detached at 22ee06d)
Hash: 22ee06de8441bfcc9fded2c6de4232d763fb11bc
Python version: 2.7.14
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: FEM on Mac OSX
I just finished my first FEM calculation. Thank you!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: FEM on Mac OSX
If it was my own model: sure. But now I have to confess that it was only one of the examples given on the Start page.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: FEM on Mac OSX
On a side note (since, no offense, the postproc capabilities of FC are a bit limited), I have had great results using paraview as a post processor for FEM results.
Re: FEM on Mac OSX
what version of FreeCAD are you comparing to? The Help forum has a "forum rules" link above it that will show you how to use the FreeCAD tool to quote all your version data.
Re: FEM on Mac OSX
I'm trying to run FEM in FreeCAD on Mac OSX and having an issue that I don't believe was covered here. I did the following:
1. Installed freecad 0.17 using the dmg from the free cad wiki
2. Installed Gmsh using home brew (ie brew install gmsh --with-opencascade) and changed the binary path (ie /usr/local/Cellar/gmsh/3.0.6_2/bin/gmsh)
3. Tested Gmsh on a simple part which worked
4. Installed CalculiX (ie brew install Homebrew/homebrew-science/calculix-ccx) and changed the binary path (ie /usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13)
5. Loaded the "FEM 3D example analysis", purged the results and tried executing the "Write .inp file" command.
The result is an error popup:
FEM: CalculiX ccx '/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13' output '' doesn't contain expected phrase 'CalculiX'. Please use ccx 2.6 or newer"
the message:
0.0: Check dependencies...
and the following in report view:
Using CalculiX binary path from FEM preferences: /usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13
FemConstraintForce has Face reference shapes.
FEM preferences working dir is not set, the solver working directory is used.
Dir '' doesn't exist and cannot be created.
Dir '/var/folders/dh/d9y38r797610qkqhwf9qn6n00000gn/T' will be used instead.
FemToolsCCx.setup_working_dir() --> self.working_dir = /var/folders/dh/d9y38r797610qkqhwf9qn6n00000gn/T
FEM: wrong ccx binaryTraceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femguiobjects/_ViewProviderFemSolverCalculix.py", line 258, in write_input_file_handler
if self.check_prerequisites_helper():
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femguiobjects/_ViewProviderFemSolverCalculix.py", line 279, in check_prerequisites_helper
fea = ccxtools.FemToolsCcx(None, self.solver_object)
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femtools/ccxtools.py", line 81, in __init__
self.setup_ccx()
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femtools/ccxtools.py", line 625, in setup_ccx
raise Exception(error_message)
Exception: FEM: CalculiX ccx '/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13' output '' doesn't contain expected phrase 'CalculiX'. Please use ccx 2.6 or newer
Has anyone had this issue in the past. From reading through posts on this forum it seems like I've installed everything properly. I'm stumped and would appreciate some advice regarding solving it.
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13519 (Git)
Build type: Release
Branch: (HEAD detached at 1a8b868)
Hash: 1a8b868018f45ea486c0023fdbfeb06febc1fb89
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
1. Installed freecad 0.17 using the dmg from the free cad wiki
2. Installed Gmsh using home brew (ie brew install gmsh --with-opencascade) and changed the binary path (ie /usr/local/Cellar/gmsh/3.0.6_2/bin/gmsh)
3. Tested Gmsh on a simple part which worked
4. Installed CalculiX (ie brew install Homebrew/homebrew-science/calculix-ccx) and changed the binary path (ie /usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13)
5. Loaded the "FEM 3D example analysis", purged the results and tried executing the "Write .inp file" command.
The result is an error popup:
FEM: CalculiX ccx '/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13' output '' doesn't contain expected phrase 'CalculiX'. Please use ccx 2.6 or newer"
the message:
0.0: Check dependencies...
and the following in report view:
Using CalculiX binary path from FEM preferences: /usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13
FemConstraintForce has Face reference shapes.
FEM preferences working dir is not set, the solver working directory is used.
Dir '' doesn't exist and cannot be created.
Dir '/var/folders/dh/d9y38r797610qkqhwf9qn6n00000gn/T' will be used instead.
FemToolsCCx.setup_working_dir() --> self.working_dir = /var/folders/dh/d9y38r797610qkqhwf9qn6n00000gn/T
FEM: wrong ccx binaryTraceback (most recent call last):
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femguiobjects/_ViewProviderFemSolverCalculix.py", line 258, in write_input_file_handler
if self.check_prerequisites_helper():
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femguiobjects/_ViewProviderFemSolverCalculix.py", line 279, in check_prerequisites_helper
fea = ccxtools.FemToolsCcx(None, self.solver_object)
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femtools/ccxtools.py", line 81, in __init__
self.setup_ccx()
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femtools/ccxtools.py", line 625, in setup_ccx
raise Exception(error_message)
Exception: FEM: CalculiX ccx '/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13' output '' doesn't contain expected phrase 'CalculiX'. Please use ccx 2.6 or newer
Has anyone had this issue in the past. From reading through posts on this forum it seems like I've installed everything properly. I'm stumped and would appreciate some advice regarding solving it.
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13519 (Git)
Build type: Release
Branch: (HEAD detached at 1a8b868)
Hash: 1a8b868018f45ea486c0023fdbfeb06febc1fb89
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
Re: FEM on Mac OSX
could you run
/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13
in a shell and post the output?
/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13
in a shell and post the output?
Re: FEM on Mac OSX
I'm not all the familiar with python, but here are some outputs.
If I run it as a subprocess (ie subprocess.check_output("/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13")) I get
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/FreeCAD.app/Contents/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13' returned non-zero exit status -6
I also tried running it in terminal (ie ./usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13) and got something similar
./ccx_2.13
dyld: Library not loaded: /usr/local/opt/gcc/lib/gcc/7/libgfortran.4.dylib
Referenced from: /usr/local/Cellar/calculix-ccx/2.13/bin/./ccx_2.13
Reason: image not found
Abort trap: 6
If I run through the FEM python tutorial (ie https://www.freecadweb.org/wiki/FEM_Tutorial_Python) I get an error in the python console after running fea = ccxtools.FemToolsCcx()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femtools/ccxtools.py", line 81, in __init__
self.setup_ccx()
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femtools/ccxtools.py", line 625, in setup_ccx
raise Exception(error_message)
Exception: FEM: CalculiX ccx '/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13' output '' doesn't contain expected phrase 'CalculiX'. Please use ccx 2.6 or newer
and in report view
FemConstraintForce has Face reference shapes.
FEM preferences working dir is not set, the solver working directory is used.
Dir '' doesn't exist and cannot be created.
Dir '/var/folders/dh/d9y38r797610qkqhwf9qn6n00000gn/T' will be used instead.
FemToolsCCx.setup_working_dir() --> self.working_dir = /var/folders/dh/d9y38r797610qkqhwf9qn6n00000gn/T
FEM: wrong ccx binary
If I run it as a subprocess (ie subprocess.check_output("/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13")) I get
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/FreeCAD.app/Contents/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13' returned non-zero exit status -6
I also tried running it in terminal (ie ./usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13) and got something similar
./ccx_2.13
dyld: Library not loaded: /usr/local/opt/gcc/lib/gcc/7/libgfortran.4.dylib
Referenced from: /usr/local/Cellar/calculix-ccx/2.13/bin/./ccx_2.13
Reason: image not found
Abort trap: 6
If I run through the FEM python tutorial (ie https://www.freecadweb.org/wiki/FEM_Tutorial_Python) I get an error in the python console after running fea = ccxtools.FemToolsCcx()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femtools/ccxtools.py", line 81, in __init__
self.setup_ccx()
File "/Applications/FreeCAD.app/Contents/Mod/Fem/femtools/ccxtools.py", line 625, in setup_ccx
raise Exception(error_message)
Exception: FEM: CalculiX ccx '/usr/local/Cellar/calculix-ccx/2.13/bin/ccx_2.13' output '' doesn't contain expected phrase 'CalculiX'. Please use ccx 2.6 or newer
and in report view
FemConstraintForce has Face reference shapes.
FEM preferences working dir is not set, the solver working directory is used.
Dir '' doesn't exist and cannot be created.
Dir '/var/folders/dh/d9y38r797610qkqhwf9qn6n00000gn/T' will be used instead.
FemToolsCCx.setup_working_dir() --> self.working_dir = /var/folders/dh/d9y38r797610qkqhwf9qn6n00000gn/T
FEM: wrong ccx binary
Last edited by Locost on Wed May 09, 2018 2:52 am, edited 1 time in total.