massed_gravity#
- ptrace.massed_gravity(p0: str) int #
Specify whether the gravity 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. If this command is ON, then the gravity force term in the massed-particle momentum balance equation is computed according to the “ptrace: massed_gravity_vector” 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 gravity force term # Specify 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