Appendix: Gravity
The gravity run-control variable specifies a spatially uniform physical
gravity vector. Gravity can be constant or vary with time. The vector
components use the solver coordinate system and retain the sign supplied by
the user.
Constant Gravity
Specify a constant vector with g. The optional rhoref value is the
reference density used by the buoyancy formulation.
gravity: <g=[0.0,-9.81,0.0],rhoref=0.0>
This form retains the existing constant-gravity behavior.
Time-Varying Gravity
The gravity vector can vary with time according to an expression or a history
file. The optional rhoref value remains constant throughout the
calculation.
Expression Specification
Specify an expression for each Cartesian component with g=function(...):
gravity: <g=function(gX="2.0*sin(t)",gY="-9.81",gZ="0.5*t"),rhoref=0.0>
The only expression variable is t, the simulation time in seconds. A
component that is omitted is zero. Units are not supported inside expressions,
so each result is interpreted in meters per second squared. The mathematical
syntax and available functions are the same as for
functional velocity specifications.
File Specification
Specify a gravity-vector history with file:
gravity: <file="gravity.dat",rhoref=0.0>
Each nonblank line in the file contains time followed by the three gravity components:
# time gx gy gz 0.0 0.0 -9.81 0.0 0.5 0.0 -4.00 0.0 1.0 0.0 0.00 0.0
File values use seconds and meters per second squared. Text following # is
treated as a comment. Times must be finite and strictly increasing, and all
vector components must be finite. Gravity is linearly interpolated between
rows. Before the first time and after the last time, the corresponding endpoint
vector is held constant.
The g and file options are mutually exclusive. Both the expression and
file forms specify the physical gravity vector itself. Time-varying gravity is
not supported by the PISO solver.