Solvers in Exudyn

The user has a couple of basic solvers available in Exudyn , see Fig. 30:

  • exudyn.SolveStatic(...): compute static solution for given problem (may also be used to compute kinematic behavior by prescribing joint motion)

  • exudyn.SolveDynamic(...): time integration of equations of motion

  • exudyn.ComputeLinearizedSystem(...): computes the linearized system of equations and returns mass, stiffness, damping matrices

  • exudyn.ComputeODE2Eigenvalues(...): computes the eigenvalues of the linearized system of equations; only possible if no algebraic constraints in system; uses scipy to compute eigenvalues

../../_images/solversAvailableSolvers.png

Fig. 30 Basic and advanced solvers in Exudyn ; advanced solvers build upon any basic solver to perform more sophisticated operations

There are advanced solvers, like in exudyn.processing:

  • Optimization:

  • GeneticOptimization(...): find optimum for given set of parameter ranges using genetic optimization; works in parallel

  • Minimize(...): find optimum with scipy.optimize.minimize(...)

  • ParameterVariation(...): compute a series of simulations for given set(s) of parameters; works in parallel

  • ComputeSensitivities(...): compute sensitivities for certain parameters; works in parallel

The advanced methods are build upon the basic solvers and essentially run single simulations in the background, see the according examples.

The basic solvers need a MainSystem, usually denoted as mbs, to be solved. Furthermore, a couple of options are usually to be given, which are explained shortly:

  • simulationSettings: This is a big structure, containing all solver options; note that only the according options for staticSolver or timeIntegration are used. Look at the detailed description of these options in Section sec-settingsstructures. These settings influence the output rate and output quantity of the solution, solver reporting, accuracy, solver type, etc. Specifically, the verboseMode may be increased (2-4) to see the behavior of the solver and intermediate quantities.

  • solverType: Only for exudyn.SolveDynamic(...): This is a simpler access to the solverType given in the internal structure of

    timeIntegration.generalizedAlpha and simulationSettings.timeIntegration.explicitIntegration.dynamicSolverType.

The function exudyn.SolveDynamic(...) sets the according variables internally. For available solver types, see the description of exudyn.DynamicSolverType in Section DynamicSolverType.

  • storeSolver: if True, the solver is stored in mbs.sys['staticSolver'] or mbs.sys['dynamicSolver'] and also solver settings are stored in mbs.sys['simulationSettings']. After the solver has finished, mbs.sys['staticSolver'] can be used to retrieve additional information on convergence, system matrices, etc. (see the solver structure).

  • showHints: This shows a lot of possible solutions in case of no convergence

  • showCausingItems: This shows a potential causing item if the linear solver failed; the item number is computed from the coordinate number that caused problems (e.g., a row that became zero during factorization); note that this item may not be the real cause in your problem

System equations of motion

The system equations of motion in Exudyn follow the notations of Section Nomenclature for system equations of motion and solvers and are represented as

(33)\[\begin{split}{\mathbf{M}} \ddot {\mathbf{q}} + \frac{\partial {\mathbf{g}}}{\partial {\mathbf{q}}^\mathrm{T}} \tlambda & = &{\mathbf{f}}_\SO({\mathbf{q}}, \dot {\mathbf{q}}, t) \\ \dot {\mathbf{y}} + \frac{\partial {\mathbf{g}}}{\partial {\mathbf{y}}^\mathrm{T}} \tlambda & = &{\mathbf{f}}_\FO({\mathbf{y}}, t) \\ {\mathbf{g}}({\mathbf{q}}, \dot {\mathbf{q}}, {\mathbf{y}}, \tlambda, t) &=& 0\end{split}\]

It is important to note, that for linear mechanical the term \({\mathbf{f}}_\SO\) becomes

\[{\mathbf{f}}^{lin}_\SO = {\mathbf{f}}_a - {\mathbf{K}} {\mathbf{q}} - {\mathbf{D}} \dot {\mathbf{q}}\]

in which \({\mathbf{f}}^a\) represents applied forces and stiffness matrix \({\mathbf{K}}\) and damping matrix \({\mathbf{D}}\) become part of the system Jacobian for time integration.