massed_pressure_gradient#

ptrace.massed_pressure_gradient(p0: Any) int#

Specify the name of the pressure gradient variable used in the pressure force term of the massed-particle calculation.

The “ptrace: massed_particles” command does not have to be ON in order to specify this command. If “none” is specified, then the pressure force term is ignored in the massed-particle calculation. The default setting is “none”.
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