Time stepping
Module for solving differential algebraic systems and transient PDEs.
The ‘dae’ module includes time integration methods (Runge-Kutta and multistep methods) for solving coupled ordinary differential equations. The differential equations must be specified in implicit form. In principle, one can choose different integrators for different fields; however, the number and position of the stages must be compatible, as currently only a fully monolithic solution is implemented. Additionally, differential-algebraic systems can be solved. When algebraic equations are present, only integrators with exclusively implicit stages should be used.
Furthermore, by using the keyword ‘call pde’, it is possible to solve time-dependent PDEs (currently, only time integrators with a single stage). The mechanism works by endowing the nodal degrees of freedom with discrete values and derivatives as functions of time using the chosen time discretization rules. The spatial discretization can be carried out using the same ansatz (for example, isoparametric finite elements) as in time-independent problems. In the case of backward Euler and spatial FE ansatz functions, this would appear as follows:
\(\Theta = \sum_{I=1}^{N} \Theta_I\left(t\right) N_I\left(\boldsymbol{x}\right)\),
where \(N_I\left(\boldsymbol{x}\right)\) are the FE ansatz functions and \(\Theta_I\left(t\right)\) represent the nodal degrees of freedom. The given PDE is then solved at the step \(t_{n+1}\) , where the time derivative of the nodal degrees of freedom is defined by a custom_jvp rule as \(\frac{\partial\Theta_I}{\partial t}\vert_{t_{n+1}} = \frac{\Theta_I\left(t_{n+1}\right) - \Theta_I\left(t_n\right)}{\Delta t}\). In the ‘call pde’ mode, one should currently not use jacrev w.r.t. the time.
WARNING: This module is currently under development and lacks detailed documentation. However, some example notebooks are already available.
Central class
|
Manages the time stepping procedure for a simulation using multi-stage integration schemes. |
|
Executes the time stepping loop for the simulation. |
|
State for the TimeSteppingManager. |
Time integrators
|
Base class for time integrators. |
Backward Euler method. |
|
Forward Euler method. |
|
|
Newmark-beta method. |
|
Adams-Moulton method. |
|
Adams-Bashforth time integrator. |
|
Backward differentiation formula (BDF). |
|
Explicit Runge-Kutta method. |
|
Diagonally implicit Runge-Kutta method. |
|
Kvaerno method (explicit first stage diagonally implicit Runge-Kutta with embedded error estimation). |
|
Dormand-Prince method (explicit with embedded error estimation). |
|
Gauss-Legendre Runge-Kutta method (fully implicit). |
Helper functions
Evaluate the discrete state value with custom derivative propagation. |
|
Detects coupled structures (strongly connected components) in the Butcher matrix A and identifies explicit stages. |
|
Computes the blockwise linear mapping matrix |
Step size controllers
Abstract base class for adaptive step size controllers. |
|
Constant Step Size Controller. |
|
|
State for the Constant Step Size Controller. |
|
Proportional-Integral-Derivative (PID) Step Size Controller. |
|
State for the Proportional-Integral-Derivative Controller. |
|
Root Iteration Controller for adjusting step size based on number of root solver iterations. |
|
State for the Root Iteration Controller. |
Data saving policies
Abstract base class for save strategies. |
|
|
Container for storing the history state data. |
A policy that does not save any data. |
|
|
Saves data at (approximately) equidistant time points using pre-allocated arrays. |
|
State for the SaveAllPolicy. |
Saves data at every accepted time step. |
|
|
State for the SaveAllPolicy. |
Rootsolvers compatible with the DAE module
|
|
|
Newton-Raphson solver to find a root of F(x)=0. |