FEM: Add hard contact with CalculiX (#22513)

This commit is contained in:
FEA-eng
2025-07-18 16:56:39 +02:00
committed by GitHub
parent 7e7de8837f
commit 2a42e87c57
3 changed files with 12 additions and 3 deletions

View File

@@ -68,6 +68,11 @@ ConstraintContact::ConstraintContact()
"ConstraintContact",
App::PropertyType(App::Prop_None),
"Thermal contact conductance");
ADD_PROPERTY_TYPE(HardContact,
(false),
"ConstraintContact",
App::PropertyType(App::Prop_None),
"Enable hard contact");
}
App::DocumentObjectExecReturn* ConstraintContact::execute()

View File

@@ -53,6 +53,7 @@ public:
App::PropertyStiffnessDensity StickSlope;
App::PropertyBool EnableThermalContact;
App::PropertyStringList ThermalContactConductance;
App::PropertyBool HardContact;
// etc
/* */

View File

@@ -81,9 +81,12 @@ def write_constraint(f, femobj, contact_obj, ccxwriter):
dep_surf = "DEP" + contact_obj.Name
f.write(f"{dep_surf}, {ind_surf}\n")
f.write(f"*SURFACE INTERACTION, NAME=INT{contact_obj.Name}\n")
f.write("*SURFACE BEHAVIOR, PRESSURE-OVERCLOSURE=LINEAR\n")
slope = contact_obj.Slope.getValueAs("MPa/mm").Value
f.write(f"{slope:.13G}\n")
if contact_obj.HardContact:
f.write("*SURFACE BEHAVIOR, PRESSURE-OVERCLOSURE=HARD\n")
else:
f.write("*SURFACE BEHAVIOR, PRESSURE-OVERCLOSURE=LINEAR\n")
slope = contact_obj.Slope.getValueAs("MPa/mm").Value
f.write(f"{slope:.13G}\n")
if contact_obj.Friction:
f.write("*FRICTION\n")
friction = contact_obj.FrictionCoefficient