FEM: change ccx solver property name

from IterationsMaximum to IterationsThermoMechMaximum and
only write if set > 0
This commit is contained in:
Bernd Hahnebach 2016-09-25 19:36:22 +01:00 committed by Yorik van Havre
parent 33efb04d47
commit 6e05fb0d29
3 changed files with 5 additions and 4 deletions

View File

@ -414,7 +414,8 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter):
thermomech_step = '*STEP'
if self.solver_obj.GeometricalNonlinearity == "nonlinear":
thermomech_step += ', NLGEOM'
thermomech_step += ', INC=' + str(self.solver_obj.IterationsMaximum)
if self.solver_obj.IterationsThermoMechMaximum:
thermomech_step += ', INC=' + str(self.solver_obj.IterationsThermoMechMaximum)
f.write(thermomech_step + '\n')
if self.solver_obj.IterationsControlParameterTimeUse:
f.write('*CONTROLS, PARAMETERS=TIME INCREMENTATION\n')

View File

@ -339,7 +339,7 @@ class TherMechFemTest(unittest.TestCase):
self.solver_object.GeometricalNonlinearity = 'linear'
self.solver_object.ThermoMechSteadyState = True
self.solver_object.MatrixSolverType = 'default'
self.solver_object.IterationsMaximum = 2000
self.solver_object.IterationsThermoMechMaximum = 2000
self.solver_object.IterationsControlParameterTimeUse = True
self.active_doc.recompute()

View File

@ -72,9 +72,9 @@ class _FemSolverCalculix():
ehl = ccx_prefs.GetFloat("EigenmodeHighLimit", 1000000.0)
obj.EigenmodeHighLimit = (ehl, 0.0, 1000000.0, 10000.0)
obj.addProperty("App::PropertyIntegerConstraint", "IterationsMaximum", "Fem", "Number of iterations allowed before stopping jobs")
obj.addProperty("App::PropertyIntegerConstraint", "IterationsThermoMechMaximum", "Fem", "Maximum Number of thermo mechanical iterations in each time step before stopping jobs")
niter = ccx_prefs.GetInt("AnalysisMaxIterations", 200)
obj.IterationsMaximum = niter
obj.IterationsThermoMechMaximum = niter
obj.addProperty("App::PropertyFloatConstraint", "TimeInitialStep", "Fem", "Initial time steps")
ini = ccx_prefs.GetFloat("AnalysisTimeInitialStep", 1.0)