Loading results failed

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
User avatar
FaDa3D
Posts: 873
Joined: Tue Aug 08, 2017 8:21 am
Location: Savoie France

Loading results failed

Post by FaDa3D »

Hello,
With any model, I cannot see the results after calculation. However, all the input and output files of the calculation seem correct. ResultMesh and CCX_Results are out of the Analyse. Resultmesh is like FEMMeshGmsh and CCX_Results is empty.
Do you have a solution to find them ?
Thank you very much.

View report :

Custom material directory set by user: does not exist.
choose_material in FEM material task panel:
/usr/share/freecad-daily/Mod/Material/StandardMaterial/Steel-Generic.FCMat

References: empty in MaterialSolid, MaterialSolid
References: Face in ConstraintDisplacement, ConstraintDisplacement
References: Face in ConstraintFixed, ConstraintFixed
Check prerequisites.
Check prerequisites.
References: empty in MaterialSolid, MaterialSolid
Start writing CalculiX input file
Write ccx input file to: /tmp/fcfem_0as4_3sc/FEMMeshGmsh.inp
ConstraintFixed:
Type: Fem::ConstraintFixed, Name: ConstraintFixed
found mesh group for the IDs: ConstraintFixed_Nodes, Type: Node
ConstraintDisplacement:
Type: Fem::ConstraintDisplacement, Name: ConstraintDisplacement
found mesh group for the IDs: ConstraintDisplacement_Nodes, Type: Node
Writing time CalculiX input file: 0.02 seconds

run CalculiX at: /usr/bin/ccx with: /tmp/fcfem_0as4_3sc/FEMMeshGmsh.inp
CalculiX done without error!
We will load the ccx frd and dat result file.
Read ccx results from frd file: /tmp/fcfem_0as4_3sc/FEMMeshGmsh.frd
loading results failed


OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: c1ca01b0e79efa44f39ee377bb97517e2fd7debf
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Attachments
Anneau-1.FCStd
(120.15 KiB) Downloaded 29 times
Fada de 3D.
Linux Mint
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Loading results failed

Post by bernd »

- start FreeCAD
- load your file
- delete results
- rerun analysis
- show results

works great here, no problem with your file ...
Screenshot_20200528_001138.png
Screenshot_20200528_001138.png (173.76 KiB) Viewed 2222 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Loading results failed

Post by bernd »

would you try to run this code in FreeCAD python konsole and see if the results import fine ...

Code: Select all

import feminout.importCcxFrdResults
feminout.importCcxFrdResults.open(FreeCAD.ConfigGet("AppHomePath") + 'Mod/Fem/femtest/data/ccx/cube_static.frd')
Screenshot_20200528_002056.png
Screenshot_20200528_002056.png (93.34 KiB) Viewed 2219 times
User avatar
FaDa3D
Posts: 873
Joined: Tue Aug 08, 2017 8:21 am
Location: Savoie France

Re: Loading results failed

Post by FaDa3D »

@Bernd : thank you for your quick answer.

bernd wrote: Wed May 27, 2020 10:12 pm - start FreeCAD
- load your file
- delete results
- rerun analysis
- show results
No change about the ring.

bernd wrote: Wed May 27, 2020 10:21 pm would you try to run this code in FreeCAD python konsole and see if the results import fine ...

import feminout.importCcxFrdResults
feminout.importCcxFrdResults.open(FreeCAD.ConfigGet("AppHomePath") + 'Mod/Fem/femtest/data/ccx/cube_static.frd')
The results import from the cube_static doesn't work.
See the attached pictures of results of ring and cube_static ; picture of warning on the Python Konsole

Thank you for your help.
Attachments
Warning on Python Konsole
Warning on Python Konsole
Capture du 2020-05-28 17-06-46.png (132.5 KiB) Viewed 2171 times
Results of cube_static
Results of cube_static
Capture du 2020-05-28 17-06-00.png (78.39 KiB) Viewed 2171 times
Results of ring
Results of ring
Capture du 2020-05-28 17-01-57.png (65.64 KiB) Viewed 2171 times
Fada de 3D.
Linux Mint
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Loading results failed

Post by bernd »

would you try in FreeCAD python konsole

Code: Select all

import matplotlib.pyplot
import tkinter
User avatar
FaDa3D
Posts: 873
Joined: Tue Aug 08, 2017 8:21 am
Location: Savoie France

Re: Loading results failed

Post by FaDa3D »

Good night,

Import of matplotlib.pyplot and tkinter impossible in a new freeCAD window, with or without file. Is it a problem of python version ?
Capture du 2020-05-28 21-48-31.png
Capture du 2020-05-28 21-48-31.png (83.39 KiB) Viewed 2133 times
Thank you in advance.
Fada de 3D.
Linux Mint
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Loading results failed

Post by bernd »

it clearly say what is missing on your Linux mint, the package tkinter. Thus

Code: Select all

sudo apt-get install python3-tk
should do the trick


BTW: if you post error messages it would be much more helpful if you would copy them and put them into code tags than making a screen shot. Thus the error message will be found by the search engines and other users with the same problem will find this topic.
User avatar
FaDa3D
Posts: 873
Joined: Tue Aug 08, 2017 8:21 am
Location: Savoie France

Re: Loading results failed

Post by FaDa3D »

Thank you Bernd. Now I can see the results.

When I activate the ccx_results, or when I change displacement direction or stress it remains a warning on the report view as follow for example :

Code: Select all

Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 316, in abs_displacement_selected
    self.result_selected("Uabs", self.result_obj.DisplacementLengths, "mm")
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 533, in result_selected
    fig_manager.window.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)    # stay ontop
  File "/usr/lib/python3.6/tkinter/__init__.py", line 2101, in __getattr__
    return getattr(self.tk, attr)
AttributeError: '_tkinter.tkapp' object has no attribute 'setWindowFlags'
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 316, in abs_displacement_selected
    self.result_selected("Uabs", self.result_obj.DisplacementLengths, "mm")
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 533, in result_selected
    fig_manager.window.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)    # stay ontop
  File "/usr/lib/python3.6/tkinter/__init__.py", line 2101, in __getattr__
    return getattr(self.tk, attr)
AttributeError: '_tkinter.tkapp' object has no attribute 'setWindowFlags'
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 326, in x_displacement_selected
    self.result_selected("U1", res_disp_u1, "mm")
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 533, in result_selected
    fig_manager.window.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)    # stay ontop
  File "/usr/lib/python3.6/tkinter/__init__.py", line 2101, in __getattr__
    return getattr(self.tk, attr)
AttributeError: '_tkinter.tkapp' object has no attribute 'setWindowFlags'
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 326, in x_displacement_selected
    self.result_selected("U1", res_disp_u1, "mm")
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 533, in result_selected
    fig_manager.window.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)    # stay ontop
  File "/usr/lib/python3.6/tkinter/__init__.py", line 2101, in __getattr__
    return getattr(self.tk, attr)
AttributeError: '_tkinter.tkapp' object has no attribute 'setWindowFlags'
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 336, in y_displacement_selected
    self.result_selected("U2", res_disp_u2, "mm")
  File "/usr/share/freecad-daily/Mod/Fem/femviewprovider/view_result_mechanical.py", line 533, in result_selected
    fig_manager.window.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)    # stay ontop
  File "/usr/lib/python3.6/tkinter/__init__.py", line 2101, in __getattr__
    return getattr(self.tk, attr)
AttributeError: '_tkinter.tkapp' object has no attribute 'setWindowFlags'
Is it dangerous ?
thank you a lot.
Fada de 3D.
Linux Mint
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Loading results failed

Post by bernd »

AFAIK this module is needed for the histogramm only. Give it a try, it might not work. All other should be working in result task panel.
Post Reply