massed_drag#

ptrace.massed_drag(p0: str) int#

Specify whether the drag force term is used in the massed-particle calculation.

The default setting is ON. The “ptrace: massed_particles” command does not have to be ON in order to specify this command. Drag force term in the massed-particle momentum balance equation is computed according to the ptrace: massed_pressure_gradient setting.
Args:
p0:

‘toggle’

  • ON

  • OFF

Examples:
#
# Create a massless point trace
#
ensight.part.select_all()
ensight.ptrace.select_default()
ensight.part.modify_begin()
ensight.ptrace.variable("velocity")
ensight.part.modify_end()
ensight.part.select_all()
ensight.ptrace.create_pt()
ensight.part.select_begin(2)
#
# Toggle on massed-particle drag force term
# Specify default drag coefficient function table
#
ensight.part.modify_begin()
ensight.ptrace.massed_drag("ON")
ensight.ptrace.massed_drag_coefficient("none")
ensight.part.modify_end()
#
# Change part to massed trace using current settings
#
ensight.part.modify_begin()
ensight.ptrace.massed_particles("ON")
ensight.part.modify_end()
Returns:

zero on success, non-zero on error