[FEM] activate spring constraint

- the spring constraint is currently unused but it can be used for Elmer mechanical analyses
This PR does so and also overhaul the dialog UI.
- use the spring constraint also in an example file
This commit is contained in:
Uwe
2023-03-23 06:56:01 +01:00
parent ab01f8e143
commit dfbc6b168e
11 changed files with 123 additions and 76 deletions

View File

@@ -41,7 +41,7 @@ def get_information():
"name": "Deformation (nonlinear elasticity) - Elmer",
"meshtype": "solid",
"meshelement": "Tet10",
"constraints": ["displacement"],
"constraints": ["displacement", "spring"],
"solvers": ["elmer"],
"material": "solid",
"equations": ["deformation"]
@@ -166,6 +166,19 @@ def setup(doc=None, solvertype="elmer"):
DisplaceRight.References = [(SpringObject, "Face5")]
analysis.addObject(DisplaceRight)
# constraints spring
StiffnessLeft = doc.addObject("Fem::ConstraintSpring", "StiffnessLeft")
StiffnessLeft.TangentialStiffness = "50 N/m"
StiffnessLeft.ElmerStiffness = "Tangential Stiffness"
StiffnessLeft.References = [(SpringObject, "Face1")]
analysis.addObject(StiffnessLeft)
StiffnessRight = doc.addObject("Fem::ConstraintSpring", "StiffnessRight")
StiffnessRight.TangentialStiffness = "50 N/m"
StiffnessRight.ElmerStiffness = "Tangential Stiffness"
StiffnessRight.References = [(SpringObject, "Face5")]
analysis.addObject(StiffnessRight)
# mesh
femmesh_obj = analysis.addObject(ObjectsFem.makeMeshGmsh(doc, get_meshname()))[0]
femmesh_obj.Part = body