Gravity โ
Applies the self-weight of every element in the model, derived from the material density and the section or thickness.
๐ง Grasshopper component โ

1.0 is plain self-weight; 0.0 disables it; 1.35 gives a factored permanent load; values above 1 are also a quick way to include finishes not modelled explicitly.There is no geometry input. Gravity applies to the whole model, and its direction is โZ. Model View, with Show Loads on, draws it as OpenSees is given it, in the Gravity colour: a line load along each beam, and a point load down on each node of the rest.

A steel frame's own weight along its members, 0.393 kN/m, and the slab's on its nodes: 4.905 kN inside, half on an edge, a quarter at a corner
๐ When to use it โ
Use it when
- Any model where self-weight matters. Put it in its own permanent pattern (a "G" case) and combine it with the others.
Do not use it when
- You are modelling weight that is not in the elements โ plant, finishes, a stored material โ use Point Load, Beam Load or Shell Load, and Mass Point for the dynamic side.
Note
A beam carries its weight along it, as a uniform load, so a beam of one element bends under it: w Lยฒ / 8 at the middle of a simply supported span. A truss has no bending to carry a load along it with, so half its weight goes on each end, as a Linear Load on it does.
๐ Relation to OpenSees
Gravity is resolved by Alpaca4d during assembly rather than written as its own command. Each element's weight becomes loads inside the enclosing pattern: an element load along each beam, and load entries on the nodes of everything else.
pattern Plain $tag $tsTag -fact $factor {
eleLoad -ele $beamTag -type -beamUniform $Wy $Wz $Wx
load $nodeTag 0.0 0.0 -$w 0.0 0.0 0.0
...
}A beam's load is A ร ฯ ร g per metre, straight down, written in the beam's local axes as a Linear Load is. A truss's weight, A ร ฯ ร L, goes half on each end. A shell's, t ร ฯ ร area, is split between its nodes. A solid's, ฯ ร volume, is shared equally among its nodes, except a Ten Node Tetrahedron's: โ1/20 of it on each corner and 1/5 on each edge node, the way the element shares a body force.
