FEM: Print contact forces (#18840)
* FEM: Update write_step_output.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * FEM: Update constraint_contact_shell_shell.inp --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -60,9 +60,6 @@ def write_step_output(f, ccxwriter):
|
||||
f.write(variables + "\n")
|
||||
|
||||
# dat file
|
||||
# reaction forces: freecad.org/tracker/view.php?id=2934
|
||||
# some hint can be found in this topic:
|
||||
# https://forum.freecad.org/viewtopic.php?f=18&t=20664&start=10#p520642
|
||||
if ccxwriter.member.cons_fixed or ccxwriter.member.cons_displacement:
|
||||
f.write("** outputs --> dat file\n")
|
||||
if ccxwriter.member.cons_fixed:
|
||||
@@ -107,7 +104,21 @@ def write_step_output(f, ccxwriter):
|
||||
"*NODE PRINT, NSET={}_RotNode, TOTALS=ONLY\n".format(femobj["Object"].Name)
|
||||
)
|
||||
f.write("RF\n")
|
||||
if ccxwriter.member.cons_fixed or ccxwriter.member.cons_displacement:
|
||||
if ccxwriter.member.cons_contact:
|
||||
# contact forces for all Constraint contact (only available for face-to-face penalty contact)
|
||||
f.write("** contact forces for Constraint contact\n")
|
||||
for femobj in ccxwriter.member.cons_contact:
|
||||
# femobj --> dict, FreeCAD document object is femobj["Object"]
|
||||
f.write(
|
||||
"*CONTACT PRINT, MASTER={}, SLAVE={}\n".format(
|
||||
"IND" + femobj["Object"].Name, "DEP" + femobj["Object"].Name
|
||||
)
|
||||
)
|
||||
f.write("CF, CFN, CFS\n")
|
||||
if any(
|
||||
vars(ccxwriter.member).get(f"cons_{key}")
|
||||
for key in ["fixed", "displacement", "rigidbody", "contact"]
|
||||
):
|
||||
f.write("\n")
|
||||
f.write(f"*OUTPUT, FREQUENCY={ccxwriter.solver_obj.OutputFrequency}")
|
||||
|
||||
|
||||
@@ -38411,6 +38411,9 @@ S, E
|
||||
** reaction forces for Constraint fixed
|
||||
*NODE PRINT, NSET=ConstraintFixed, TOTALS=ONLY
|
||||
RF
|
||||
** contact forces for Constraint contact
|
||||
*CONTACT PRINT, MASTER=INDConstraintContact, SLAVE=DEPConstraintContact
|
||||
CF, CFN, CFS
|
||||
|
||||
*OUTPUT, FREQUENCY=1
|
||||
***********************************************************
|
||||
|
||||
Reference in New Issue
Block a user