Moderator: bernd
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