OOFem
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: OOFem
not at all. you may undestood me wrong. My words where more in the direction of helping you coding than taking some pressure.
Re: OOFem
I wasn't serious Bernd
Re: OOFem
A preview of where I am heading with the input file
The meta code in the comments is (a selection) from the OOFEM input manual. It gives an impression of the capability of OOFEM, but also indicates that there is still a bit of work required on the FC material object and solver object (data tab) to collect some of that information from the user.
I will first start with what is currently readily available from material, mesh and solver objects and (if time permits) later try to extend those objects to capture the information/parameters for the more exotic capabilities of OOFEM.
Code: Select all
def write_OOFEM_input_file(self):
timestart = time.clock()
inpfile = open(self.file_name, 'a')
self.write_output_file_record(inpfile)
''' Filename String '''
self.write_job_description_record(inpfile)
''' Job description string '''
self.write_analysis_record(inpfile)
'''*AnalysisType nsteps # (in)
[renumber # (in) ]
[profileopt # (in) ]
attributes # (string)
[ninitmodules # (in) ]
[nmodules # (in) ]
[nxfemman # (in) ]
*StaticStructural
nsteps # (in)
[deltat # (...) ]
[prescribedtimes # (...) ]
[stiffmode # (...) ]
[nonlocalext # (...) ]
[sparselinsolverparams # (...) ]
*LinearStability
nroot # (in)
rtolv # (rn)
[eigensolverparams # (...) ]
*NonLinearStatic
[nmsteps # (in) ]
nsteps # (in)
[contextOutputStep # (in) ]
[sparselinsolverparams # (string) ]
[nonlinform # (in) ]
[nonlocstiff # (in) ]
[nonlocalext]
[loadbalancing]'''
self.write_domain_record(inpfile)
'''domain *domainType
*2dPlaneStress
*2d-Truss
*3d
*2dMindlinPlate
*3dShell
*2dBeam
'''
self.write_output_manager_record(inpfile)
'''OutputManager
[tstep all]
[tstep step # (in) ]
[tsteps out # (rl) ]
[dofman all]
[dofman output # (rl) ]
[dofman except # (rl) ]
[element all]
[element output # (rl) ]
[element except # (rl) ]
ndofman # (in)
nelem # (in)
ncrosssect # (in)
nmat # (in)
nbc # (in)
nic # (in)
nltf # (in)
[nbarrier # (in) ]'''
self.write_dof_manager_record(inpfile)
'''*DofManagerType
(num#) (in)
[load # (ra) ]
[DofIDMask # (ia) ]
[bc # (ia) ]
[ic # (ia) ]
[doftype # (ia) masterMask # (ia) ]
[shared]i | h[remote]i | h[null]
[partitions # (ia) ]
*Node coords # (ra)
[lcs # (ra) ]'''
self.write_element_record(inpfile)
'''*ElementType
(num#) (in)
mat # (in) crossSect # (in) nodes # (ia)
[bodyLoads # (ia) ] [boundaryLoads # (ia) ]
[activityltf # (in) ] [lcs # (ra) ]
[partitions # (ia) ] [remote]
*beam2d
2D beam element
[dofstocondense # (ia) ]
*beam3d
3D beam element
refnode # (in) [dofstocondense # (ia) ]
*planestress2d
4-noded 2D quadrilateral element for plane stress analysis
[NIP # (in) ]
*qplanestress2d
8-noded 2D quadrilateral element for plane stress analysis
[NIP # (in) ]
*trplanestress2d
3-noded 2D triangular element for plane stress analysis
*qtrplstr
6-noded 2D triangular element for plane stress analysis [NIP # (in) ]
*quad1planestrain
4-noded 2D quadrilateral element for plane strain analysis
[NIP # (in) ]
*trplanestrain
3-noded 2D triangular element for plane strain analysis
*lspace
Linear 8-node isoparametric brick element
[NIP # (in) ]
*qspace
Quadratic 20-node isoparametric brick element
[NIP # (in) ]
*LTRSpace
Linear 4-node tetrahedra element
*QTRSpace
Quadratic 10-node tetrahedra element
[NIP # (in) ] '''
self.write_set_record(inpfile)
'''Set (num#) (in)
[elements # (ia) ] [elementranges # (rl) ] [allElements]
[nodes # (ia) ] [noderanges # (rl) ] [allNodes]
[elementboundaries # (ia) ] [elementedges # (ia) ] '''
self.write_cross_section_record(inpfile)
'''*CrossSectType (num#) (in)
*SimpleCS [thick # (rn) ] [width # (rn) ] [area # (rn) ]
[iy # (rn) ] [iz # (rn) ] [ik # (rn) ]
[shearareay # (rn) ] [shearareaz # (rn) ] beamshearcoeff # (rn)
*VariableCS [thick # (expr) ] [width # (expr) ] [area # (expr) ]
[iy # (expr) ] [iz # (expr) ] [ik # (expr) ]
[shearareay # (expr) ] [shearareaz # (expr) ]
*LayeredCS nLayers # (in)
LayerMaterials # (ia)
Thicks # (ra) Widths # (ra)
midSurf # (rn) '''
self.write_material_type_record(inpfile)
'''*MaterialType (num#) (in) d # (rn)
Linear isotropic elastic material
*IsoLE num (in) # d (rn) # E (rn) # n (rn) # tAlpha (rn) #
Mooney-Rivlin
*MooneyRivlin (in) # d (rn) # K (rn) # C1 (rn) # C2 (rn) #
Large-strain master material material
*LSmasterMat (in) # m (rn) # slavemat (in) #
DP material
*DruckerPrager num (in) # d (rn) # tAlpha (rn) # E (rn) # n (rn) # alpha (rn) # alphaPsi (rn) # ht (in) # iys (rn) # lys (rn) # hm (rn) # kc (rn) # [ yieldtol (rn) #]
Mises plasticity model with isotropic hardening
*MisesMat (in) # d (rn) # E (rn) # n (rn) # sig0 (rn) # H (rn) # omega crit (rn) #a (rn) #
Rotating crack model for concrete
*Concrete3 d (rn) # E (rn) # n (rn) # Gf (rn) # Ft (rn) # exp soft (in) # tAlpha (rn) #
EC2CreepMat model for concrete creep and shrinkage
*EC2CreepMat n (rn) # [ begOfTimeOfInterest (rn) #] [ end-OfTimeOfInterest (rn) #] relMatAge (rn) # [ timeFactor (rn) #] stiffnessFactor (rn) # [ tAlpha (rn) #] fcm28 (rn) # t0 (rn) # cem- Type (in) # [ henv (rn) #] h0 (rn) # shType (in) # [ spectrum ][ temperatureDependent ]'''
# footer
self.write_footer(inpfile)
inpfile.close()
FreeCAD.Console.PrintMessage("Writing time input file: " + str(time.clock() - timestart) + ' \n\n')
return self.file_name
I will first start with what is currently readily available from material, mesh and solver objects and (if time permits) later try to extend those objects to capture the information/parameters for the more exotic capabilities of OOFEM.
Re: OOFem
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: OOFem
I have made 0% progress since my last post.
Re: OOFem
FreeCAD motto is: It's done when it's done!
Re: OOFem
Bernd,
I am able to write the OOFEM input file to disk (replicating Z88 logic), but the mesh is empty.
I make the following call to importOOFEMMesh.write_OOFEM_mesh_to_file () in writer.py:
https://github.com/HarryvL/FreeCAD/blob ... er.py#L286
after which the following shows zero nodes and elements:
https://github.com/HarryvL/FreeCAD/blob ... #L322-L340
I have not been able to trace back where self.femnodes_mesh and self.femelement_table get assigned ... apart from the initiation here:
https://github.com/HarryvL/FreeCAD/blob ... py#L86-L87
and the assignment in the unrelated(?) method get_constraints_pressure_faces() here:
https://github.com/HarryvL/FreeCAD/blob ... #L187-L201
In summary, I am lost on how to access node and element data for writing to file.
I am able to write the OOFEM input file to disk (replicating Z88 logic), but the mesh is empty.
I make the following call to importOOFEMMesh.write_OOFEM_mesh_to_file () in writer.py:
https://github.com/HarryvL/FreeCAD/blob ... er.py#L286
after which the following shows zero nodes and elements:
https://github.com/HarryvL/FreeCAD/blob ... #L322-L340
I have not been able to trace back where self.femnodes_mesh and self.femelement_table get assigned ... apart from the initiation here:
https://github.com/HarryvL/FreeCAD/blob ... py#L86-L87
and the assignment in the unrelated(?) method get_constraints_pressure_faces() here:
https://github.com/HarryvL/FreeCAD/blob ... #L187-L201
In summary, I am lost on how to access node and element data for writing to file.