In Metafor, gravity is introduced with a ElementProperties on volume or shell elements, using the codes GRAVITY_X, GRAVITY_Y or GRAVITY_Z.
ElementProperties
GRAVITY_X
GRAVITY_Y
GRAVITY_Z