LHS-RHS naming conventions in EXUDYN
The general idea of the Exudyn is to have objects, which provide equations (ODE2, ODE1, AE). The solver then assembles these equations and solves the static or dynamic problem. The system structure and solver are similar but much more advanced and modular as earlier solvers by the main developer .
Functions and variables contain the abbreviations LHS and RHS, sometimes lower-case, in order to distinguish if terms are computed at the LHS or RHS.
The objects have the following LHS–RHS conventions:
the acceleration term, e.g., \(m \cdot \ddot q\) is always positive on the LHS
objects, connectors, etc., use LHS conventions for most terms: mass, stiffness matrix, elastic forces, damping, etc., are computed at LHS of the object equation
object forces are written at the RHS of the object equation
in case of constraint or connector equations, there is no LHS or RHS, as there is no acceleration term.
Therefore, the computation function evaluates the term as given in the description of the object, adding it to the LHS. Object equations may read, e.g., for one coordinate \(q\), mass \(m\), damping coefficient \(d\), stiffness \(k\) and applied force \(f\),
In this case, the C++ function ComputeODE2LHS(const Vector\& ode2Lhs)
will compute the term
\(d \cdot \dot q + k \cdot q\) with positive sign. Note that the acceleration term \(m \cdot \ddot q\) is computed separately, as it
is computed from mass matrix and acceleration.
However, system quantities (e.g. within the solver) are always written on RHS(except for the acceleration \(\times\) mass matrix and constraint reaction forces, see Eq. (33)):
In the case of the object equation
the RHS term becomes \(f_{sys} = -(d \cdot \dot q + k \cdot q) + f\) and it is computed by the C++ function ComputeSystemODE2RHS
.
This means, that during computation, terms which appear at the LHS of the object are transferred to the RHS of the system equation.
This enables a simpler setup of equations for the solver.