Loading results failed

About the development of the FEM module/workbench.

Moderator: bernd

FaDa3D
Posts: 307
Joined: Tue Aug 08, 2017 8:21 am
Location: Savoie France

Loading results failed

Postby FaDa3D » Wed May 27, 2020 8:24 pm

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 4 times
Fada de 3D.
Linux Mint
User avatar
bernd
Posts: 10097
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Loading results failed

Postby bernd » Wed May 27, 2020 10:12 pm

- 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 310 times
User avatar
bernd
Posts: 10097
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Loading results failed

Postby bernd » 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 ...

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 307 times
FaDa3D
Posts: 307
Joined: Tue Aug 08, 2017 8:21 am
Location: Savoie France

Re: Loading results failed

Postby FaDa3D » Thu May 28, 2020 3:23 pm

@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
Capture du 2020-05-28 17-06-46.png
Warning on Python Konsole
Capture du 2020-05-28 17-06-46.png (132.5 KiB) Viewed 259 times
Capture du 2020-05-28 17-06-00.png
Results of cube_static
Capture du 2020-05-28 17-06-00.png (78.39 KiB) Viewed 259 times
Capture du 2020-05-28 17-01-57.png
Results of ring
Capture du 2020-05-28 17-01-57.png (65.64 KiB) Viewed 259 times
Fada de 3D.
Linux Mint
User avatar
bernd
Posts: 10097
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Loading results failed

Postby bernd » Thu May 28, 2020 5:18 pm

would you try in FreeCAD python konsole

Code: Select all

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

Re: Loading results failed

Postby FaDa3D » Thu May 28, 2020 7:58 pm

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 221 times
Thank you in advance.
Fada de 3D.
Linux Mint
User avatar
bernd
Posts: 10097
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Loading results failed

Postby bernd » Fri May 29, 2020 5:52 am

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.
FaDa3D
Posts: 307
Joined: Tue Aug 08, 2017 8:21 am
Location: Savoie France

Re: Loading results failed

Postby FaDa3D » Fri May 29, 2020 1:18 pm

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
Posts: 10097
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Loading results failed

Postby bernd » Fri May 29, 2020 2:36 pm

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.