If the strain energy of an elastic structure can be expressed as a function of generalised displacement q i then the partial derivative of the strain energy with respect to generalised displacement gives the generalised force Q i.