Open frame3DD result file (*.OUT)

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Open frame3DD result file (*.OUT)

Post by johnwang »

Hi,

I have written a frame3DD result file (*.OUT) importer followed this: https://github.com/FreeCAD/FreeCAD/blob ... Results.py

Since OUT file extension is not supported by fc at the moment, when you try to open it, fc will show a message saying not supported.

To try this new open:
1. Rename the original importCcxFrdResults.py to other name, which is located at Freecad\Mod\Fem\feminout to save it
2. Copy my one into this folder
3. Rename frame3DD's OUT file to FRD file, that is exA.OUT-->exA.Frd
4. Use fc to open that exA.Frd

If fc support OUT later, my one could be named importFrame3DDResults.py

Regards,

John

t.jpg
t.jpg (26.24 KiB) Viewed 1104 times
tout.jpg
tout.jpg (23.94 KiB) Viewed 1104 times
importCcxFrdResults.py
(13.34 KiB) Downloaded 22 times
Last edited by johnwang on Wed Mar 04, 2020 5:46 am, edited 1 time in total.
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

would you post an example out file?
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: Open frame3DD result file (*.OUT)

Post by johnwang »

bernd wrote: Wed Mar 04, 2020 5:12 am would you post an example out file?
You could get the examples from frame3dd site here:

http://frame3dd.sourceforge.net/
tex.jpg
tex.jpg (103.79 KiB) Viewed 1069 times
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

name your module "importFrame3DDResults" and place it in "feminout"

place following line in init.py in Fem above this line:

https://github.com/FreeCAD/FreeCAD/blob ... nit.py#L51

Code: Select all

FreeCAD.addImportType("FEM result Frame3DD (*.out)", "feminout.importFrame3DDResults")
Start FreeCAD --> open an out file --> enjoy :)


exA.out from the link you provided ...

screen.png
screen.png (172.3 KiB) Viewed 1038 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

if you use github, you could make a PR and we will include it in the main repo
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

on example exH.out I get this error:

Code: Select all

F R A M E   E L E M E N T   E N D   F O R C E S				(local)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\0_BHA_privat\progr\FreeCAD_0.19.xxxxx_Py3Qt5\Mod\Fem\feminout\importFrame3DDResults.py", line 27, in open
    insert(filename, docname)
  File "C:\0_BHA_privat\progr\FreeCAD_0.19.xxxxx_Py3Qt5\Mod\Fem\feminout\importFrame3DDResults.py", line 40, in insert
    importFrame3DD(filename)
  File "C:\0_BHA_privat\progr\FreeCAD_0.19.xxxxx_Py3Qt5\Mod\Fem\feminout\importFrame3DDResults.py", line 51, in importFrame3DD
    m = read_Frame3DD_result(filename)
  File "C:\0_BHA_privat\progr\FreeCAD_0.19.xxxxx_Py3Qt5\Mod\Fem\feminout\importFrame3DDResults.py", line 317, in read_Frame3DD_result
    elem = int(dataNode[0])
<class 'ValueError'>: invalid literal for int() with base 10: 'F'
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

ahh forgot to write cool stuff :D
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

in your module is still a lot commented calculix specific (eigenvslue, flow, etc) code. Have a look here on Z88 result importer what is really needed and what not. https://github.com/FreeCAD/FreeCAD/blob ... Results.py
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: Open frame3DD result file (*.OUT)

Post by johnwang »

bernd wrote: Wed Mar 04, 2020 10:52 am on example exH.out I get this error:
Frame3DD sometimes doesn't write displacement for all nodes. Have to deal with this.

Double click the result node, one can drag to view the result animation. So cool.

One thing I noticed, fc fem result obj only defined one load case. For displacement is like this:

Code: Select all

mode_results["disp"] = mode_disp
I tried in a loop:

Code: Select all

mode_results["disp"+str(LCnum)] = mode_disp


I got an error message from the compact mesh tool.

For frame3DD, most time needs load case more than one. Hope fc fea could support multi load case.
t10.jpg
t10.jpg (110.08 KiB) Viewed 955 times
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

simplest workround, create one resultobject for each loadcase. Like in a frequecy analysis we create one result object for each mode shape. But you can use the same result mesh object for all result objects.
Post Reply