From 3e5c5ceccd9dab3a458d4b5e38a276caf1a8053f Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Mon, 8 Sep 2025 03:31:38 +0200 Subject: [PATCH] FEM: Fix the shell to shell contact example (#23533) * FEM: Update constraint_contact_shell_shell.py * FEM: Update constraint_contact_shell_shell.inp --- .../constraint_contact_shell_shell.py | 13 +++++++---- .../constraint_contact_shell_shell.inp | 23 ++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Mod/Fem/femexamples/constraint_contact_shell_shell.py b/src/Mod/Fem/femexamples/constraint_contact_shell_shell.py index 4d082c63f9..55e6bf0af6 100644 --- a/src/Mod/Fem/femexamples/constraint_contact_shell_shell.py +++ b/src/Mod/Fem/femexamples/constraint_contact_shell_shell.py @@ -40,7 +40,7 @@ def get_information(): "name": "Constraint Contact Shell Shell", "meshtype": "face", "meshelement": "Tria3", - "constraints": ["fixed", "force", "contact"], + "constraints": ["displacement", "force", "contact"], "solvers": ["ccxtools"], "material": "solid", "equations": ["mechanical"], @@ -171,13 +171,16 @@ def setup(doc=None, solvertype="ccxtools"): material_obj.Material = mat analysis.addObject(material_obj) - # constraint fixed - con_fixed = ObjectsFem.makeConstraintFixed(doc, "ConstraintFixed") - con_fixed.References = [ + # constraint displacement + con_displacement = ObjectsFem.makeConstraintDisplacement(doc, "ConstraintDisplacement") + con_displacement.References = [ (lower_tube, "Edge2"), (upper_tube, "Edge3"), ] - analysis.addObject(con_fixed) + con_displacement.xFree = False + con_displacement.yFree = False + con_displacement.zFree = False + analysis.addObject(con_displacement) # constraint force con_force = ObjectsFem.makeConstraintForce(doc, "ConstraintForce") diff --git a/src/Mod/Fem/femtest/data/calculix/constraint_contact_shell_shell.inp b/src/Mod/Fem/femtest/data/calculix/constraint_contact_shell_shell.inp index cb0128a2fe..357f6db849 100644 --- a/src/Mod/Fem/femtest/data/calculix/constraint_contact_shell_shell.inp +++ b/src/Mod/Fem/femtest/data/calculix/constraint_contact_shell_shell.inp @@ -22998,9 +22998,9 @@ Efaces Efaces *********************************************************** -** constraints fixed node sets -** ConstraintFixed -*NSET,NSET=ConstraintFixed +** constraints displacement node sets +** ConstraintDisplacement +*NSET,NSET=ConstraintDisplacement 2, 3, 136, @@ -38383,15 +38383,12 @@ DEPConstraintContact, INDConstraintContact *********************************************************** -** Fixed Constraints -** ConstraintFixed +** Displacement constraint applied +** ConstraintDisplacement *BOUNDARY -ConstraintFixed,1 -ConstraintFixed,2 -ConstraintFixed,3 -ConstraintFixed,4 -ConstraintFixed,5 -ConstraintFixed,6 +ConstraintDisplacement,1,1,0.0 +ConstraintDisplacement,2,2,0.0 +ConstraintDisplacement,3,3,0.0 *********************************************************** @@ -38410,8 +38407,8 @@ U *EL FILE S, E ** outputs --> dat file -** reaction forces for Constraint fixed -*NODE PRINT, NSET=ConstraintFixed, TOTALS=ONLY +** reaction forces for Constraint displacement constraining translation +*NODE PRINT, NSET=ConstraintDisplacement, TOTALS=ONLY RF ** contact forces for Constraint contact *CONTACT PRINT, MASTER=INDConstraintContact, SLAVE=DEPConstraintContact