Remove the need to include geometrical nonlinearity when nonlinear material is used in CalculiX FEM (#12703)

* Update commands.py

* Update checksanalysis.py
This commit is contained in:
FEA-eng
2024-03-04 18:16:54 +01:00
committed by GitHub
parent 0f68957817
commit a4612bd636
2 changed files with 1 additions and 12 deletions

View File

@@ -696,8 +696,6 @@ class _MaterialMechanicalNonlinear(CommandManager):
# set some property of the solver to nonlinear
# (only if one solver is available and if this solver is a CalculiX solver):
# nonlinear material
# nonlinear geometry --> it is triggered anyway
# https://forum.freecad.org/viewtopic.php?f=18&t=23101&p=180489#p180489
solver_object = None
for m in self.active_analysis.Group:
if m.isDerivedFrom("Fem::FemSolverObjectPython"):
@@ -715,11 +713,10 @@ class _MaterialMechanicalNonlinear(CommandManager):
or is_of_type(solver_object, "Fem::SolverCalculix")
):
FreeCAD.Console.PrintMessage(
"Set MaterialNonlinearity and GeometricalNonlinearity to nonlinear for {}\n"
"Set MaterialNonlinearity to nonlinear for {}\n"
.format(solver_object.Label)
)
solver_object.MaterialNonlinearity = "nonlinear"
solver_object.GeometricalNonlinearity = "nonlinear"
FreeCAD.ActiveDocument.commitTransaction()
FreeCADGui.Selection.clearSelection()
FreeCAD.ActiveDocument.recompute()

View File

@@ -61,14 +61,6 @@ def check_member_for_solver_calculix(analysis, solver, mesh, member):
"Solver is set to nonlinear materials, "
"but there is no nonlinear material in the analysis.\n"
)
if solver.Proxy.Type == "Fem::SolverCcxTools" \
and solver.GeometricalNonlinearity != "nonlinear":
# nonlinear geometry --> should be set
# https://forum.freecad.org/viewtopic.php?f=18&t=23101&p=180489#p180489
message += (
"Solver CalculiX triggers nonlinear geometry for nonlinear material, "
"thus it should to be set too.\n"
)
# mesh
if not mesh: