massed_pressure#

ptrace.massed_pressure(p0: str) int#

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

The default setting is OFF. The “ptrace: massed_particles” command does not have to be ON in order to specify this command. If this command is ON, then the pressure 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 pressure force term
# Specify pressure gradient variable
#
ensight.part.modify_begin()
ensight.ptrace.massed_pressure("ON")
ensight.ptrace.massed_pressure_gradient("grad_pressure")
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