FEM: solver CalculiX: add geometrical nonlinear analysis
This commit is contained in:
parent
da91fded97
commit
d8c294c54d
|
@ -225,8 +225,12 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter):
|
|||
f.write('\n***********************************************************\n')
|
||||
f.write('** One step is needed to run the mechanical analysis of FreeCAD\n')
|
||||
f.write('** written by {} function\n'.format(sys._getframe().f_code.co_name))
|
||||
f.write('*STEP\n')
|
||||
f.write('*STATIC\n')
|
||||
static_frequency_step = '*STEP'
|
||||
if self.solver_obj.GeometricalNonlinearity == "nonlinear" and self.analysis_type == 'static':
|
||||
static_frequency_step += ', NLGEOM' # https://www.comsol.com/blogs/what-is-geometric-nonlinearity/
|
||||
elif self.solver_obj.GeometricalNonlinearity == "nonlinear" and self.analysis_type == 'frequency':
|
||||
print('Analysis type frequency and geometrical nonlinear analyis are not allowed together, linear is used instead!')
|
||||
f.write(static_frequency_step + '\n')
|
||||
|
||||
def write_constraints_fixed(self, f):
|
||||
f.write('\n***********************************************************\n')
|
||||
|
|
|
@ -35,6 +35,7 @@ from PySide import QtCore
|
|||
class FemToolsCcx(FemTools.FemTools):
|
||||
|
||||
known_analysis_types = ["static", "frequency"]
|
||||
known_geom_nonlinear_types = ["linear", "nonlinear"]
|
||||
finished = QtCore.Signal(int)
|
||||
|
||||
## The constructor
|
||||
|
|
|
@ -50,6 +50,15 @@ class _FemSolverCalculix():
|
|||
analysis_type = fem_prefs.GetInt("AnalysisType", 0)
|
||||
obj.AnalysisType = FemToolsCcx.FemToolsCcx.known_analysis_types[analysis_type]
|
||||
|
||||
known_geom_nonlinear_types = ["linear", "nonlinear"]
|
||||
obj.addProperty("App::PropertyEnumeration", "GeometricalNonlinearity", "Fem", "Type of geometrical nonlinearity")
|
||||
obj.GeometricalNonlinearity = known_geom_nonlinear_types
|
||||
geom = ccx_prefs.GetBool("NonlinearGeometry", False)
|
||||
if geom is True:
|
||||
obj.GeometricalNonlinearity = known_geom_nonlinear_types[1] # nonlinear
|
||||
else:
|
||||
obj.GeometricalNonlinearity = known_geom_nonlinear_types[0] # linear
|
||||
|
||||
obj.addProperty("App::PropertyIntegerConstraint", "NumberOfEigenmodes", "Fem", "Number of modes for frequency calculations")
|
||||
noe = fem_prefs.GetInt("NumberOfEigenmodes", 10)
|
||||
obj.NumberOfEigenmodes = (noe, 1, 100, 1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user