FEM on Mac OSX

About the development of the FEM module/workbench.

Moderator: bernd

chrisb
Posts: 18134
Joined: Tue Mar 17, 2015 9:14 am

Re: FEM on Mac OSX

Postby chrisb » Sun Jun 03, 2018 5:30 am

oldmachine wrote:
Sun Jun 03, 2018 2:25 am
I figure I'm on my own regarding the '2.6' error and getting Calculix to work on a Mac. So, I looked at the python files and found the Error Msg (scrnshot below)...
So the "2.6" is hard coded and doesn't necessarily mean what it says.
What raises the exception?
Where is the python file?
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM on Mac OSX

Postby bernd » Sun Jun 03, 2018 7:19 am

see my posts before, he has ccx installed, FreeCAD finds ccx but ccx has problems, thus the error message. He managed to run ccx in console, see posts before. Ccx gives an error in the regard of a fortran library. Here is where I'm out. Some advanced osx user is needed. He needs to get run ccx in a terminal WITHOUT FreeCAD first.

BTW: The error message in the regard of ccx 2.6 is not good. This will change with my next PR
oldmachine
Posts: 241
Joined: Wed May 31, 2017 11:49 pm

Re: FEM on Mac OSX

Postby oldmachine » Sun Jun 03, 2018 5:07 pm

... Info, Questions/bug's...

1. The File (on my OSX) referring to the exception/error: /FreeCAD/Content/Mod/Femtools/cxtools.py (it's about 3/4 down the page or, Just do a 'Find' for "2.6" - there's only one).

2. I did a full review of the ccx Installation instructions: Outdated (year=2015), older gcc and enough older info to make my head spin (and, of course, it's nearly all directed to Linux&Windows with ref's to old OSX Maverick) :cry:

3. Fortran is in the gcc folder (of course, mine is newer Fortran and cxx is looking for older version

4. I created a Path/link to it but, given it wants older fortran...

5. Homebrew Tap's have changed - I can't locate a Calculix to install (except for the old version)

6. Bug's:
* The 'Pipeline' display fonts are so small I can't read them with a magnifying glass!! HOW to change the Pipeline's Font Size and Font Color? Also, clicking it opens a popup but, the options don't work...
* When clicking the Calculixtools, my mouse Cursor changes to a Black & White Circle and won't change back until quitting FreeCAD. Big circle is useless as a cursor...

7. The only success I've had for FEA is using Z88Aroura but, that too, is geared to Linux/Windows (stand-alone does not open a display window). It does 'sort of' run inside FreeCAD but, only the displacement and the only results are colors indicating displacements - no actual data values.

? Has anyone actually gotten Calculix to work on a Mac? On osx Sierra? If so, how?

[UPDATE] I commented out the exception in the Python file - not getting the message now but, still not working...
MAC OSX Sierra
3D Parts & Links (made using FreeCad and Solidworks): https://www.thingiverse.com/Still_Breathing/designs
Android App & Links: https://play.google.com/store/apps/deta ... .bestknots
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM on Mac OSX

Postby bernd » Sun Jun 03, 2018 8:31 pm

as said two times before. You need to get ccx runing on osx.

May be this should help ...

- FreeCAD FEM creates an text input file in Abaqus file format *.inp
- FreeCAD calls CacluliX FEM solver software ccx with this *.inp file
- ccx creates an Result file
- FreeCAD reads this result file.

means if you would like to work with FreeCAD FEM you need CalculiX binary ccx get working. This is best done in a terminal by starting ccx without any parameter, because ccx will give you an answer that you should give him a file name. As long as you get any other error message there is something wrong with ccx.

All what I try to say is, do not search for a problem in FreeCAD, try to fix your ccx instead!
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM on Mac OSX

Postby bernd » Sun Jun 03, 2018 8:34 pm

oldmachine wrote:
Sun Jun 03, 2018 5:07 pm
7. The only success I've had for FEA is using Z88Aroura but, that too, is geared to Linux/Windows (stand-alone does not open a display window). It does 'sort of' run inside FreeCAD but, only the displacement and the only results are colors indicating displacements - no actual data values.
The Z88 solver in FreeCAD was more or less a proof of concept to get another solver running. No one so far was interested in Z88 in FreeCAD. Thus most constraints of FEM workbench are not supported for Z88. ATM no one is developing on the Z88 writer which would need to be extended to support all the FreeCAD FEM constraints in Z88.

bernd
oldmachine
Posts: 241
Joined: Wed May 31, 2017 11:49 pm

Re: FEM on Mac OSX

Postby oldmachine » Sun Jun 03, 2018 8:49 pm

Yes - I understand I need to get ccx working from Terminal first.

My main intent in my last post was to inform readers and to see if there's a Pipline/Results fix...

I've installed ccx 2.9 and it does not error from Terminal - it runs and I just need to complete the effort to get it fully running. It has nothing to do with Pipeline display but can't find python file for it...

I understand re the .inp file... etc.

Thanks
MAC OSX Sierra
3D Parts & Links (made using FreeCad and Solidworks): https://www.thingiverse.com/Still_Breathing/designs
Android App & Links: https://play.google.com/store/apps/deta ... .bestknots
oldmachine
Posts: 241
Joined: Wed May 31, 2017 11:49 pm

Re: FEM on Mac OSX

Postby oldmachine » Sun Jun 03, 2018 9:35 pm

Though not fully setup, using a vanilla .inp and Calculix 2.9, the Terminal output is:
MAC OSX Sierra
3D Parts & Links (made using FreeCad and Solidworks): https://www.thingiverse.com/Still_Breathing/designs
Android App & Links: https://play.google.com/store/apps/deta ... .bestknots
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM on Mac OSX

Postby bernd » Mon Jun 04, 2018 4:56 am

oldmachine wrote:
Sun Jun 03, 2018 9:35 pm
Though not fully setup, using a vanilla .inp and Calculix 2.9, the Terminal output is:
this looks very good. Seams you only gave ccx a mesh and nothing else. Add "/Users/bruce/Downloads/ccx_2.9" in FreeCAD as ccx binary path and try to recalculate the 3D FEM example from Start workbench (FEM_CalculiX_Cantilever_3D) Be aware cxx 2.9 is outdated and a few years old already.
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM on Mac OSX

Postby bernd » Mon Jun 04, 2018 4:59 am

try this input file ...

remove .txt
Box_Mesh.inp.txt
(10.99 KiB) Downloaded 24 times

Code: Select all

hugo@ahorn:/tmp/FEMWB$ ccx Box_Mesh

************************************************************

CalculiX Version 2.11, Copyright(C) 1998-2015 Guido Dhondt
CalculiX comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
certain conditions, see gpl.htm

************************************************************

You are using an executable made on So 31. Jul 13:26:31 CEST 2016

  The numbers below are estimated upper bounds

  number of:

   nodes:          228
   elements:          227
   one-dimensional elements:            0
   two-dimensional elements:            0
   integration points per element:            4
   degrees of freedom per node:            3
   layers per element:            1

   distributed facial loads:            0
   distributed volumetric loads:            0
   concentrated loads:           13
   single point constraints:           39
   multiple point constraints:            1
   terms in all multiple point constraints:            1
   tie constraints:            0
   dependent nodes tied by cyclic constraints:            0
   dependent nodes in pre-tension constraints:            0

   sets:            5
   terms in all sets:          706

   materials:            1
   constants per material and temperature:            2
   temperature points per material:            1
   plastic data points per material:            0

   orientations:            0
   amplitudes:            2
   data points in all amplitudes:            2
   print requests:            0
   transformations:            0
   property cards:            0


 STEP            1

 Static analysis was selected

 Decascading the MPC's

 Determining the structure of the matrix:
 number of equations
 645
 number of nonzero lower triangular matrix elements
 17268

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the symmetric stiffness/mass contributions.

 Factoring the system of equations using the symmetric spooles solver
 Using up to 1 cpu(s) for spooles.

 Using up to 1 cpu(s) for the stress calculation.


 Job finished

hugo@ahorn:/tmp/FEMWB$ 
open the frd file with FreeCAD ...

Screenshot_20180604_070147.png
Screenshot_20180604_070147.png (109.45 KiB) Viewed 482 times

if this works it will work from inside FreeCAD too :)
oldmachine
Posts: 241
Joined: Wed May 31, 2017 11:49 pm

Re: FEM on Mac OSX

Postby oldmachine » Mon Jun 04, 2018 8:24 am

<r><QUOTE author="bernd" post_id="237268" time="1528088395" user_id="2069"><s>
bernd wrote:
Mon Jun 04, 2018 4:59 am
</s>
by bernd » Sun Jun 03, 2018 7:59 pm<br/>
try this input file ..
<e>
Thank you - Success!

I was able to open your file. All data compared.
I was able to load & run the Example 3D file from 'Start' wb
I was able to load & run my test file (scrnshot) :D

To do:
Update ccx to more current version.
How to get the Pipeline legend text & color? Any tips? where it the files it's located (I looked at all the files but can't find it) ??

Thank you for your support :)
MAC OSX Sierra
3D Parts & Links (made using FreeCad and Solidworks): https://www.thingiverse.com/Still_Breathing/designs
Android App & Links: https://play.google.com/store/apps/deta ... .bestknots