hfcMYSTRAN - a test case

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: hfcMYSTRAN - a test case

Post by johnwang »

bernd wrote: Wed Jul 14, 2021 12:04 pm

Code: Select all

14:02:03  Running the Python command 'hfcMystranNeuInWire' failed:
Traceback (most recent call last):
  File "/home/hugo/.FreeCAD/Mod/hfcMystran/hfcMystranNeuInWire.py", line 203, in Activated
    iniFout = open(inifileOut,"w")

[Errno 2] Datei oder Verzeichnis nicht gefunden: '/usr/local/Mod/hfcMystran/hfcMystran.ini'
I use:

Code: Select all

ininame="Mod/hfcMystran/hfcMystran.ini"
        inifile = FreeCAD.getHomePath()+ininame
Under Windows 10, FreeCAD.getHomePath() is where your installed FreeCAD. So hfcMystran.ini is in the same folder as all the PY files.

You installed the WB at "/home/hugo/.FreeCAD/Mod/hfcMystran/hfcMystranNeuInWire.py", the WB expects hfcMystran.ini at "/home/hugo/.FreeCAD/Mod/hfcMystran/hfcMystran/hfcMystran.ini'.
Don't know why FreeCAD.getHomePath() is pointing to '/usr/local/'.
Even so, you put hfcMystran.ini at '/usr/local/Mod/hfcMystran/hfcMystran.ini', it should be found.

The content of hfcMystran.ini could be one line text like:

Code: Select all

/usr/local/Mod/hfcMystran/
Not sure if you need the end '/'. No Linux, can't test.
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: hfcMYSTRAN - a test case

Post by bernd »

If my PR is merged it works out of the box even if mystran is not installed at all. No ini is needed. Just your module, open file and the result will be read into FreeCAD.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: hfcMYSTRAN - a test case

Post by bernd »

Thanks for mergin... New issues around... See https://github.com/ceanwang/hfcMystran/issues/2

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

Re: hfcMYSTRAN - a test case

Post by johnwang »

bernd wrote: Sat Jul 17, 2021 8:01 am
Merged, but when open NEU, it still says not supported. Windows.
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: hfcMYSTRAN - a test case

Post by bernd »

you only merged the changes in NEU reader but not the Init.py file I added. My branch is deleted already. I am on the way, I will post it if I am on a computer.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: hfcMYSTRAN - a test case

Post by bernd »

ohh no my fault ... I forgot to include it ...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: hfcMYSTRAN - a test case

Post by bernd »

attached the init file for your hfcMYSTRAN workbench to directly load NEU files. It is just one line of code.

Code: Select all

FreeCAD.addImportType("FEM result Mystran displacements (*.NEU)", "hfcMystranNeuIn")
Init.py
(85 Bytes) Downloaded 32 times
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: hfcMYSTRAN - a test case

Post by johnwang »

bernd wrote: Sun Jul 18, 2021 11:42 am Init.py
Thanks, Worked. Just the file extension is 'bdf'. I prefer 'dat', because Mystran testcases are mostly 'dat'.

In you screenshot, there is a ResultPipeLine. Is that you created after open the file?
Last edited by johnwang on Sun Jul 18, 2021 12:39 pm, edited 1 time in total.
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: hfcMYSTRAN - a test case

Post by johnwang »

A test case using CBAR pin flag as hinge
from http://www.iberisa.com/soporte/femap/cbar.htm
Solved with Mystran.
b.gif
b.gif (84.5 KiB) Viewed 1186 times
Bridge.dat.txt
(9.4 KiB) Downloaded 26 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: hfcMYSTRAN - a test case

Post by bernd »

johnwang wrote: Sun Jul 18, 2021 12:27 pmIn you screenshot, there is a ResultPipeLine. Is that you created after open the file?
yes. manually created vtk resultpipeline and deformed with some factor.
Post Reply