Problem to start Calculix in 0.16

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
ASenger
Posts: 36
Joined: Tue Nov 29, 2016 3:39 pm

Problem to start Calculix in 0.16

Post by ASenger »

System info:

Code: Select all

OS: Ubuntu 18.04 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6712 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: da2d364457257a7a8c6fb2137cea12c45becd71a
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
While I'm aware of this post: https://forum.freecadweb.org/viewtopic.php?f=18&t=12212 I still need to use FreeCAD 0.16 for older models which are too complex and thus too tedious to port over to 0.17+.

In 0.16 I now have a problem to run even basic FEM analysis. E.g. if I use the cantilever example from the start page everything is fine until I try to run the solver (after purging the results).
I generate the .inp-file through the Solver dialog. When I click 'run CalculiX´ I get this:

Code: Select all

Analysis failed with exit code -1
--------start of stderr-------

--------end of stderr---------
--------start of stdout-------

--------end of stdout---------
CalculiX failed ccx finished with error -1
Using CalculiX binary path from FEM preferences: /usr/bin/ccx
runCalculix
run CalculiX at: /usr/bin/ccx with: /home/alexander/test/Box_Mesh
calculixStarted()
PySide.QtCore.QProcess.ProcessState.Running
calculixFinished() 1
PySide.QtCore.QProcess.ProcessState.NotRunning
Using CalculiX binary path from FEM preferences: /usr/bin/ccx
runCalculix
run CalculiX at: /usr/bin/ccx with: /home/alexander/test/Box_Mesh
calculixStarted()
PySide.QtCore.QProcess.ProcessState.Running
calculixFinished() 1
PySide.QtCore.QProcess.ProcessState.NotRunning
runCalculix
run CalculiX at: /usr/bin/ccx with: /home/alexander/test/Box_Mesh
calculixStarted()
PySide.QtCore.QProcess.ProcessState.Running
calculixFinished() 1
PySide.QtCore.QProcess.ProcessState.NotRunning
Traceback (most recent call last):
  File "/tmp/.mount_FreeCA403sMA/usr/lib/freecad-0.16/Mod/Fem/_TaskPanelFemSolverCalculix.py", line 148, in calculixFinished
    fea.load_results()
  File "/tmp/.mount_FreeCA403sMA/usr/lib/freecad-0.16/Mod/Fem/FemTools.py", line 470, in load_results
    raise Exception('FEM: No results found at {}!'.format(frd_result_file))
Exception: FEM: No results found at /home/alexander/test/Box_Mesh.frd!
It seems, this way no results are generated.
However, when I run CalculiX from the command line, all is well and I get the expected result files.
I can even import the results into FreeCAD by generating the .inp file, running

Code: Select all

cxx Box_Mesh
from the command line in the appropriate directory and then start a fake calculix job through the solver dialog. Calculix still fails this way but the results are read correctly.

While I can live with this work-around I wonder if there is a more elegant solution to this?
chrisb
Veteran
Posts: 54206
Joined: Tue Mar 17, 2015 9:14 am

Re: Problem to start Calculix in 0.16

Post by chrisb »

As far as I know, there has happened unbelievably much in the FEM development of 0.17. So I would recommend to edit the models in 0.16. Then open them in 0.17 and perform the FEM analysis.
You can edit in 0.17 the old objects as far as non PartDesign elements are concerned, for new PartDesign features you have to migrate.

I have worked like this for pretty long time with the Path workbench and it was ok. There is a "Revert" in FreeCAD so it is easy to restart with a model edited in 0.16.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ASenger
Posts: 36
Joined: Tue Nov 29, 2016 3:39 pm

Re: Problem to start Calculix in 0.16

Post by ASenger »

Thank you for your suggestion!

However, I mostly use PartDesign workbench for my models, so I can only open older models in 'legacy mode' in 0.17+. It seems from these legacy bodies I cannot generate meshes in FreeCAD 0.17 (or so it seems from quickly trying it).

So, this doesn't look like a straight way forward to me...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem to start Calculix in 0.16

Post by bernd »

In the regard of FEM, FreeCAD 0.16 is AGES behind 0.17. Use at least 0.17 for FEM, better 0.18 dev.

What you could do is, refine the geometry you would like to make a FEM analysis with, save just this geometry and only use this non parametric geometry in 0.17 or even better in 0.18 dev to make the FEM analysis with.

If you than have problems we will takle them down ...
chrisb
Veteran
Posts: 54206
Joined: Tue Mar 17, 2015 9:14 am

Re: Problem to start Calculix in 0.16

Post by chrisb »

ASenger wrote: Thu Jun 28, 2018 11:02 am However, I mostly use PartDesign workbench for my models, so I can only open older models in 'legacy mode' in 0.17+. It seems from these legacy bodies I cannot generate meshes in FreeCAD 0.17 (or so it seems from quickly trying it).
I succeded meshing a 0.16 PartDesign object. You have to select the last feature - which in fact contains all previous features as well.
So, this doesn't look like a straight way forward to me...
You may be right, with all these additional entities created it might be too much effort.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ASenger
Posts: 36
Joined: Tue Nov 29, 2016 3:39 pm

Re: Problem to start Calculix in 0.16

Post by ASenger »

I fully agree that switching to 0.17 or 0.18dev would make sense from a software-centric point of view.

Only in my experience FEM analysis is much more of a back-and-forth process than a 'start at point A and work your way to D over B and C' thing. E.g. I often need to make small changes to a model because some parts cannot be automatically meshed. If you get results than it's often altering some details in the model - simulating - evaluating - repeat to successively optimize the geometry until some goal is met.

This gets so much more complicated if one has to switch between different versions of FreeCAD in between. That's why I would very much prefer to stay with one version (and this - rather unfortunately - is 0.16 for old models) for the whole process.

Nevertheless I understand that 0.16 is outdated and that any idiosyncrasy found is probably something one has to cope with. In this case it's not too bad, though. I still thought it might be worth asking...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem to start Calculix in 0.16

Post by bernd »

ASenger wrote: Thu Jun 28, 2018 4:22 pm Only in my experience FEM analysis is much more of a back-and-forth process than a 'start at point A and work your way to D over B and C' thing. E.g. I often need to make small changes to a model because some parts cannot be automatically meshed. If you get results than it's often altering some details in the model - simulating - evaluating - repeat to successively optimize the geometry until some goal is met.
You can stay in 0.16 as long as the mesh fits your needs and afterwards change to 0.17. You may even make a simple frequency analysis in 0.17 to see if the mesh runs in ccx. But I would not recommend to set up a analysis with forces and fixes and other boundaries. You will encounter bugs which where fixed years ago ...
ASenger
Posts: 36
Joined: Tue Nov 29, 2016 3:39 pm

Re: Problem to start Calculix in 0.16

Post by ASenger »

OK. Thank you!
Post Reply