# Equation generation¶

class PyMbs.Input.MbsSystem.GenEqns(world)

Class that provides interface to equation generation

Explicit(diff=0, kinematicsOnly=False, simplify=False, graphOptimizations=False)

This function derives equations of motion for the given system. It should be run after the system has been assembled, i.e. all bodies, joints, load elements and sensors are defined.

The explicit scheme is only recommended for small systems with up to three degree of freedoms. If the mechanism is planar, then it might be suitable for up to five degrees of freedom.

Parameters: diff (list of int) – With diff the user can specify how often the algebraic constraints (on position level) shall be differentiated with respect to time (if there are any kinematic loops present). Valid values are: * 0 - position level * 1 - velocity level * 2 - acceleration level If you need the constraints on more than one level, than a list of may also be supplied, i.e. [0, 1, 2] kinematicsOnly (Boolean) – If set to true, no equations for forces and accelarations are generated, only position and velocities are available simplify (Boolean) – If set to true, simplification of expression is performed which can be very time consuming. Especially the simplifications done by PyMbs.Symbolics are not very efficient. graphOptimizations – If set to False, Graph simplification is skipped.
OrderN(diff=0, kinematicsOnly=False, simplify=False, graphOptimizations=True)

This function derives equations of motion for the given system. It should be run after the system has been assembled, i.e. all bodies, joints, load elements and sensors are defined.

The OrderN scheme is recommended for large systems with more than twenty degree of freedoms.

Parameters: diff (list of int) – With diff the user can specify how often the algebraic constraints (on position level) shall be differentiated with respect to time (if there are any kinematic loops present). Valid values are: * 0 - position level * 1 - velocity level * 2 - acceleration level If you need the constraints on more than one level, than a list of may also be supplied, i.e. [0, 1, 2] kinematicsOnly (Boolean) – If set to true, no equations for forces and accelarations are generated, only position and velocities are available simplify (Boolean) – If set to true, simplification of expression is performed which can be very time consuming. Especially the simplifications done by PyMbs.Symbolics are not very efficient. graphOptimizations – If set to False, Graph simplification is skipped.
Recursive(diff=0, kinematicsOnly=False, simplify=False, graphOptimizations=True)

This function derives equations of motion for the given system. It should be run after the system has been assembled, i.e. all bodies, joints, load elements and sensors are defined.

The recursive scheme is recommended for medium systems with more than three degree of freedoms.

Parameters: diff (list of int) – With diff the user can specify how often the algebraic constraints (on position level) shall be differentiated with respect to time (if there are any kinematic loops present). Valid values are: * 0 - position level * 1 - velocity level * 2 - acceleration level If you need the constraints on more than one level, than a list of may also be supplied, i.e. [0, 1, 2] kinematicsOnly (Boolean) – If set to true, no equations for forces and accelarations are generated, only position and velocities are available simplify (Boolean) – If set to true, simplification of expression is performed which can be very time consuming. Especially the simplifications done by PyMbs.Symbolics are not very efficient. graphOptimizations – If set to False, Graph simplification is skipped.