Gravitational Field

From OSUPDOCS
Revision as of 07:46, 3 June 2016 by Nairnj (talk | contribs) (→‎Gravity Commands)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Gravity Commands

MPM simulations can include gravity or any other body forces by forces on the grid. These forces can depend on position and time, although gravity is usually constant in a fixed reference frame. In scripted files, the command to add body forces is:

Gravity <(bodyX)>,<(bodyY)>,<(bodyZ)>

In XML files, body forces are added with a <Gravity> element:

<Gravity>
  <GridBodyXForce>(bodyX)</GridBodyXForce>
  <GridBodyYForce>(bodyY)</GridBodyYForce>
  <GridBodyZForce>(bodyZ)</GridBodyZForce>
  <BodyXForce>(gravX)</BodyXForce>
  <BodyYForce>(gravY)</BodyYForce>
  <BodyZForce>(gravZ)</BodyZForce>
</Gravity>

where (bodyX), (bodyY), and (bodyZ) are user-defined functions of position and time that evaluate to a body force acceleration in acceleration units. In XML files, the body forces can alternatively be entered using (gravX), (gravY), and (gravZ), but these must be constant (by numeric value) accelerations due to gravity in the x, y, and z directions, respectively (in acceleration units). In axisymmetric calculations, the X and Y forces set the R and Z forces.

In scripted files, the three parameters can either by constants or user-defined functions of position and time. Both should evaluate to acceleration in acceleration units. All three parameters are optional. If any are omitted, the gravitational force field is set to Earth's gravity with down being in the negative y direction (i.e., it is equivalent to the command Gravity 0,-9806.65,0). If no Gravity command is used at all, the simulation will have no gravitational forces. Thus to have the default Earth's gravity you still need a Gravity command, even if it has no parameters.

In XML files, you can enter user-defined functions or constant values. If the desired result is a constant acceleration, it is more efficient to enter using (gravX), (gravY), or (gravZ) then to enter a function with a constant value (because it avoids needless function evaluations for each node). If you enter both constant values and functions, the two are added to get total body forces. Any omitted forces are set to zero.