variable#
- shock.variable(p0: Any) int #
Specify the variable (i.e Density, Energy, Pressure, or Temperature) in which to create the Surface method shock part(s).
For the Surface method, this variable is either Density, Energy, Pressure, or Temperature; and this variable must have previously been defined via its respective shock: density, energy, pressure, or temperature definition.For the Region method, this variable is always pressure, and thus the specification is not needed; thus, <none> is used as the shock variable.- Args:
- p0:
‘variable_name’ name of the variable in which to use as the creation variable or the variable in which to apply the gradient calculations for the shock function
- Examples:
# # Specify the 3D parent part(s) # from which to create the shock part # ensight.part.select_begin(1) # # Compute the shock part by the Surface method # ensight.shock.begin() ensight.shock.variable("Pressure") ensight.shock.end() ensight.shock.create() # # Now select the newly created shock part # for subsequent operations # ensight.part.select_begin(5)
# # Specify the 3D parent part(s) # from which to create the shock part # ensight.part.select_begin(1) # # Compute the shock part by the Region method # ensight.shock.begin() ensight.shock.variable("none") ensight.shock.end() ensight.shock.create() # # Now select the newly created shock part # for subsequent operations # ensight.part.select_begin(5)
- Returns:
zero on success, non-zero on error