massed_gravity_vector#

ptrace.massed_gravity_vector(p0: float, p1: float, p2: float) int#

Specify the name of the gravity vector used in the pressure force term of the massed-particle calculation.

The default setting is <0., -9.81, 0.>. The “ptrace: massed_particles” command does not have to be ON in order to specify this command.
Args:
p0:

‘gx’ the x-component of the gravity vector

p1:

‘gy’ the y-component of the gravity vector

p2:

‘gz’ the z-component of the gravity vector

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 gravity force term
# Specify the gravity vector
#
ensight.part.modify_begin()
ensight.ptrace.massed_gravity("ON")
ensight.ptrace.massed_gravity_vector("0.00000e+00-9.81000e+00",0.00000e+00)
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