OOFem
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: OOFem
I will have a look.
Re: OOFem
They will be assigned if needed ...
For example for the CalculiX mesh they are not needed. Thus for calculix they are only needed for constraints like force or pressure, thus they are assigned inside each constraint writer. For example on calculix frequency analysis without constraints they are not needed at all. Z88 needs them for mesh writing too. Means they are needed for any input file writing. Thus they are assigned just at start of writing. They are assigned here: https://github.com/HarryvL/FreeCAD/blob ... py#L66-L69
Means for oofem your would copy the lines from above to https://github.com/HarryvL/FreeCAD/blob ... ter.py#L75 if you need them in any file write (which will be true if you need them for mesh writing).
hope that helps bernd
For example for the CalculiX mesh they are not needed. Thus for calculix they are only needed for constraints like force or pressure, thus they are assigned inside each constraint writer. For example on calculix frequency analysis without constraints they are not needed at all. Z88 needs them for mesh writing too. Means they are needed for any input file writing. Thus they are assigned just at start of writing. They are assigned here: https://github.com/HarryvL/FreeCAD/blob ... py#L66-L69
Means for oofem your would copy the lines from above to https://github.com/HarryvL/FreeCAD/blob ... ter.py#L75 if you need them in any file write (which will be true if you need them for mesh writing).
hope that helps bernd
Re: OOFem
Thanks. I will give it a try.
Re: OOFem
BTW: Does oofem has its own mesh format like Z88? If it would support any of the known standard mesh format FreeCAD supports already you would not need to write a mesh exporter for oofem in FreeCAD like I had to do it for Z88.
Bernd
Bernd
Re: OOFem
AFAIK the mesh information is typed in the input file in a connectivity format (global node numbers by element) unique to OOFEM. The developers make available a converter script (unv2oofem) that turns UNV files into OOFEM format, but going via UNV would be a roundabout way to get to the required result. Not sure this answers your question.
Re: OOFem
PS: what standard mesh format does CCX use and how is this written to the input file?
Re: OOFem
ccx uses Abaqus inp file format. It is written here: https://github.com/berndhahnebach/FreeC ... ter.py#L82 The writer ist done in C++ see https://github.com/berndhahnebach/FreeC ... .cpp#L1185
Some Formats are done in C++ See https://github.com/berndhahnebach/FreeC ... .cpp#L1575
to write a mesh in various formats just load the 3D example from Start WB
Code: Select all
expath = '/home/hugo/Desktop/'
mesh = App.ActiveDocument.Box_Mesh.FemMesh
mesh.write(expath + 'mesh.inp')
mesh.write(expath + 'mesh.vtk')
mesh.write(expath + 'mesh.stl')
mesh.write(expath + 'mesh.unv')
Code: Select all
expath = '/home/hugo/Desktop/'
from feminout.importZ88Mesh import export as z88export
z88export([App.ActiveDocument.Box_Mesh], expath + 'mesh.txt')
Re: OOFem
similar to z88. They have a converter too. My first idea was use the converter, but than I realised to write an exporter just for nodes and tet10 elements is not difficult and just some lines of code. With this one can export lots of analysis already. All other element types where added step by step later on.HarryvL wrote: ↑Thu Nov 01, 2018 9:57 pm AFAIK the mesh information is typed in the input file in a connectivity format (global node numbers by element) unique to OOFEM. The developers make available a converter script (unv2oofem) that turns UNV files into OOFEM format, but going via UNV would be a roundabout way to get to the required result. Not sure this answers your question.
cheers bernd
Re: OOFem
That's exactly the thought process I went through for OOFEMbernd wrote: ↑Fri Nov 02, 2018 6:23 am similar to z88. They have a converter too. My first idea was use the converter, but than I realised to write an exporter just for nodes and tet10 elements is not difficult and just some lines of code. With this one can export lots of analysis already. All other element types where added step by step later on.
cheers bernd