Testing oofem solver

About the development of the FEM module/workbench.

Moderator: bernd

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

Testing oofem solver

Post by johnwang »

Hi,

I got oofem solver from this folder https://github.com/berndhahnebach/FreeC ... lver/oofem
also this file: https://raw.githubusercontent.com/bernd ... femMesh.py

1. Under my FreeCAD\Mod\Fem\femsolver folder, I moved the z88 folder outside FreeCAD.
2. Copy the importOofemMesh.py into the Mod/Fem/feminout folder.
3. Copy the oofem folder in and rename it to z88.

Now I'll treat oofem as z88.

I don't have z88 in my computer.

1. Under new z88 folder, there are only 4 python files: init, solver, tasks and writer.py. Check these files, if it mention oofem, change it to z88. Someplace is Z88. Not all need to be changed.
2. Find oofem.exe in my computer, rename it to z88r.exe

Start FreeCad, go to FEM z88 solver setting, found the renamed z88r.exe.
In FEM workbench, open one z88 example, write out the case file. If it complains about material lacking of thermoExpansionCoeff, change to one that does has that value. Run the solver, you will get a result.

Cool.

John
Screenshot 2021-08-04 141235.jpg
Screenshot 2021-08-04 141235.jpg (146.68 KiB) Viewed 837 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: Testing oofem solver

Post by bernd »

do not use just the oofem directory. The branch is rebased on master thus take all fem. Than you wll have oofemimportMesh and the examples as well see this post how to update FEM ... https://forum.freecadweb.org/viewtopic. ... 60#p521908
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Testing oofem solver

Post by bernd »

it is much simpler ... just use the property editor and add the binary preferences for oofem exact the way as they are there for mystran or gmsh.
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: Testing oofem solver

Post by johnwang »

bernd wrote: Wed Aug 04, 2021 9:02 am it is much simpler ... just use the property editor and add the binary preferences for oofem exact the way as they are there for mystran or gmsh.
No need to change oofem.exe to z88r.exe. The preferences askes for 'binary path'. I normally think path means folder. But it is actually the exe file.

I got this error:

Code: Select all

21:56:30  QObject::killTimer: Timers cannot be stopped from another thread
21:56:30  QObject::startTimer: Timers cannot be started from another thread
21:56:30  Illegal storage access...
21:56:30  Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Illegal storage access! Please save your work under a new file name and restart the application!
21:56:30  The event type 12 was sent to QOpenGLWidget
Object tree:
	QOpenGLWidget is child of
	SIM::Coin3D::Quarter::QuarterWidget is child of
	QStackedWidget is child of
	Gui::View3DInventor is child of
	QMdiSubWindow is child of
	QWidget is child of
	QMdiArea is child of
	Gui::MainWindow
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: Testing oofem solver

Post by bernd »

not need to use any preference at all. Just uncomment this line and add your binary path including the binary file. https://github.com/berndhahnebach/FreeC ... sks.py#L92
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: Testing oofem solver

Post by johnwang »

bernd wrote: Wed Aug 04, 2021 12:09 pm not need to use any preference at all.
Then if I set up a FC3rd button, rename the oofem folder as FC3rd, change solver.py as:

Code: Select all

#def create(doc, name="SolverOOFEM"):
def create(doc, name="SolverFC3rd"):
    return femutils.createObject(
        doc, name, Proxy, ViewProxy)


class Proxy(solverbase.Proxy):
    """
    The Fem::FemSolver's Proxy python type, add solver specific properties
    """
    #Type = "Fem::SolverOofem"
    Type = "Fem::SolverFC3rd"
Also add FC3rd into FreeCAD\Mod\Fem\femsolver\settings.py

It will work.
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
Post Reply