FreeCAD CalculiX Fails to write .frd file

About the development of the FEM module/workbench.

Moderator: bernd

chopboy
Posts: 2
Joined: Thu Aug 15, 2019 3:50 am

FreeCAD CalculiX Fails to write .frd file

Postby chopboy » Thu Aug 15, 2019 4:18 am

Hi,
I've been using FreeCAD for a little while to model geometry for Salome - Openfoam, and recently attempted to utilise the FreeCAD FEM workbench for FEA linear stress analysis. Using the tutorials I have been able to build a case, write an input file and run the case. However the solver gets to the'
271.6: CalculiX done without error!
271.6: Loading result sets...
'stage and stops. There is a .frd file created at 7kb in size only.
The input file appears valid as I can run calculiX on the file externally to FreeCAD and it completes + writes an .frd file (20+Mb).

I'm on CAElinux (ubuntu) using FreeCAD 18 Build: 16131.

Has anyone experienced this or could point me in the direction to look for a solution?

I have not at this stage confirmed results from the external CalculiX run as I do not have a .frd post-processor aside from FreeCAD,
A follow up question: is it possible to load a .frd file created externally into FreeCAD for post processing?

The Following is the error log from FreeCAD 19:
PySide2.QtCore.QProcess.ProcessState.Running
Error() PySide2.QtCore.QProcess.ProcessError.Crashed
calculixFinished() 11
PySide2.QtCore.QProcess.ProcessState.NotRunning
PySide2.QtCore.QRegExp('\*ERROR.*\n\n', 1, 0)
CalculiX done without error!
We will load the ccx frd and dat result file.
Read ccx results from frd file: /tmp/femuhooy5mc/FEMMeshNetgen.frd
FEM: No nodes found in Frd file.
Problem on frd file import. No nodes found in frd file.
Traceback (most recent call last):
File "/tmp/.mount_FreeCANBCX2n/usr/Mod/Fem/femguiobjects/_ViewProviderFemSolverCalculix.py", line 308, in calculixFinished
self.fea.load_results()
File "/tmp/.mount_FreeCANBCX2n/usr/Mod/Fem/femtools/ccxtools.py", line 1110, in load_results
self.load_results_ccxfrd()
File "/tmp/.mount_FreeCANBCX2n/usr/Mod/Fem/femtools/ccxtools.py", line 1119, in load_results_ccxfrd
importCcxFrdResults.importFrd(frd_result_file, self.analysis, 'CCX_')
File "/tmp/.mount_FreeCANBCX2n/usr/Mod/Fem/feminout/importCcxFrdResults.py", line 192, in importFrd
return res_obj
UnboundLocalError: local variable 'res_obj' referenced before assignment

OS: Ubuntu 16.04.6 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17646 (Git) AppImage
Build type: Release
Branch: master
Hash: 641d946fa47573562026e042b1706759bd47611e
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

(edit to add error log and installation details)
fandaL
Posts: 333
Joined: Thu Jul 24, 2014 8:29 am

Re: FreeCAD CalculiX Fails to write .frd file

Postby fandaL » Thu Aug 15, 2019 11:52 am

chopboy wrote:
Thu Aug 15, 2019 4:18 am
A follow up question: is it possible to load a .frd file created externally into FreeCAD for post processing?
Yes, it should work in the same way as if it is loaded automatically. Just drag and drop .frd file.

Error message looks similar to this thread https://forum.freecadweb.org/viewtopic.php?f=18&t=38450
chopboy
Posts: 2
Joined: Thu Aug 15, 2019 3:50 am

Re: FreeCAD CalculiX Fails to write .frd file

Postby chopboy » Thu Aug 15, 2019 10:20 pm

An Update on my progress to date:
I've tested again on a different virtual machine and the FreeCAD analysis completed successfully. It may be that my current VM is not working properly or is damaged in some way. I know Salome-CFD will no longer run on the machine, so there may be some dependency missing.
User avatar
bernd
Posts: 8046
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FreeCAD CalculiX Fails to write .frd file

Postby bernd » Fri Aug 16, 2019 3:13 am

chopboy wrote:
Thu Aug 15, 2019 4:18 am
...
The Following is the error log from FreeCAD 19:
PySide2.QtCore.QProcess.ProcessState.Running
Error() PySide2.QtCore.QProcess.ProcessError.Crashed
calculixFinished() 11
PySide2.QtCore.QProcess.ProcessState.NotRunning
PySide2.QtCore.QRegExp('\*ERROR.*\n\n', 1, 0)
CalculiX done without error!
We will load the ccx frd and dat result file.
Read ccx results from frd file: /tmp/femuhooy5mc/FEMMeshNetgen.frd
FEM: No nodes found in Frd file.
Problem on frd file import. No nodes found in frd file.
...
From the above it seams the frd file is not valid becaus there where some problem during calculix run. As stated just drag and drop the frd file, or use file open to open it and see if it realy has problems.

You could also try to run the calculix input file created from FreeCAD directly in a shell by "ccx -i filename_without_.inp" and again load the frd file manually. With this it should be possible to tackle it down.

bernd
User avatar
bernd
Posts: 8046
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FreeCAD CalculiX Fails to write .frd file

Postby bernd » Fri Aug 16, 2019 3:15 am

chopboy wrote:
Thu Aug 15, 2019 4:18 am
I'm on CAElinux (ubuntu) using FreeCAD 18 Build: 16131.
...

Code: Select all

Version: 0.19.17646 (Git) AppImage
These are different ones ... For FEM I stongly recomend 0.19 versions !