|
|
TODO: update this Trac page for the Gitlab wiki.
|
|
|
Efficient transient simulations can be done with `TimeLoopAdaptive`. It varies the time step size according the local truncation error (LTE). Therefore a fine time resolution is only applied when needed in order to achieve an accurate result.
|
|
|
|
|
|
```
|
|
|
Efficient transient simulations can be done with TimeLoopAdaptive. It varies the time step size according the local truncation error (LTE). Therefore a fine time resolution is only applied when needed in order to achieve an accurate result.
|
|
|
|
|
|
Additionally TimeLoopAdaptive works with the so called predictor-corrector method. This means that before calculating the actual time step the result is predicted from the past solutions by polynomial extrapolation. This has the benefit of better convergence in case of non-linear problems because the initial guess for the iterative loop is already close to the result.
|
|
|
`TimeLoopAdaptive` works with the so-called predictor-corrector method. This means that before calculating the actual time step the result is predicted from the past solutions by polynomial extrapolation. This has the benefit of better convergence in case of non-linear problems because the initial guess for the iterative loop is already close to the result.
|
|
|
|
|
|
(Initially written by Michael Asam.)
|
|
|
|
|
|
|
|
|
== Local Truncation Error (LTE) ==
|
|
|
## Local Truncation Error (LTE)
|
|
|
|
|
|
The LTE is the error made in one time step by the numerical integration:
|
|
|
```math
|
|
|
\epsilon_{LTE} = ( y(t_{n+1}) - y(t_n) ) - ( y_{n+1} - y_n )
|
|
|
```
|
|
|
where $`y(t_{n+1})`$ is the true solution and $`y_{n+1}`$ is the calculated solution of the actual time step. The LTE is internally calculated and the time step size is adjusted to keep the LTE within defined limits. Those limits are specified by a relative and absolute tolerance (`reltol` $`\epsilon_{rel}`$ and `abstol` $`\epsilon_{abs}`$) for the quantities of interest (e.g. all DOFs of a system or results from a post-operation like temperature, current, etc.).
|
|
|
|
|
|
[[latex($\epsilon_{LTE} = ( y(t_{n+1}) - y(t_n) ) - ( y_{n+1} - y_n )$)]]
|
|
|
For each quantity of interest $`x_i`$ an error ratio $`q_i`$ is calculated:
|
|
|
```math
|
|
|
q_i = \frac{|LTE_i|}{\epsilon_{abs} + \epsilon_{rel}|x_i|}
|
|
|
```
|
|
|
|
|
|
[[latex($y(t_{n+1})$)]] is the true solution and [[latex($y_{n+1}$)]] is the calculated solution of the actual time step.
|
|
|
The LTE is internally calculated and the time step size is adjusted to keep the LTE within defined limits. Those limits are specified by a relative and absolute tolerance (reltol [[latex($\epsilon_{rel}$)]] and abstol [[latex($\epsilon_{abs})$)]] for the quantities of interest (e.g. all DOFs of a system or results from a post-operation like temperature, current, etc.).
|
|
|
## Error Norm
|
|
|
|
|
|
For each quantity of interest [[latex($x_i$)]] an error ratio [[latex($q_i$)]] is calculated:
|
|
|
As the error ratio is calculated for each quantity of interest (e.g. one q per DOF of a given system) we need a norm in order to assess the overall error ratio. There are several norm types available for TimeLoopAdaptive:
|
|
|
|
|
|
[[latex($q_i = \frac{|LTE_i|}{\epsilon_{abs} + \epsilon_{rel}|x_i|}$)]]
|
|
|
### L1 Norm
|
|
|
|
|
|
```math
|
|
|
\|q\|_{L1} = \sum_{i=1}^n |q_i|
|
|
|
```
|
|
|
|
|
|
== Error Norm ==
|
|
|
### Mean L1 Norm
|
|
|
|
|
|
As the error ratio is calculated for each quantity of interest (e.g. one q per DOF of a given system) we need a norm in order to assess the overall error ratio. There are several norm types available for TimeLoopAdaptive:
|
|
|
```math
|
|
|
\|q\|_{Mean L1} = \frac 1n \sum_{i=1}^n |q_i|
|
|
|
```
|
|
|
|
|
|
### L2 Norm
|
|
|
|
|
|
=== L1 Norm ===
|
|
|
[[latex($\|q\|_{L1} = \sum_{i=1}^n |q_i|$)]]
|
|
|
```math
|
|
|
\|q\|_{L2} = \sqrt{\sum_{i=1}^n \left( q_i \right)^2}
|
|
|
```
|
|
|
|
|
|
=== Mean L1 Norm ===
|
|
|
[[latex($\|q\|_{Mean L1} = \frac 1n \sum_{i=1}^n |q_i|$)]]
|
|
|
### Mean L2 Norm
|
|
|
|
|
|
=== L2 Norm ===
|
|
|
[[latex($\|q\|_{L2} = \sqrt{\sum_{i=1}^n \left( q_i \right)^2}$)]]
|
|
|
```math
|
|
|
\|q\|_{Mean L2} = \sqrt{\frac 1n \sum_{i=1}^n \left( q_i \right)^2}
|
|
|
```
|
|
|
|
|
|
=== Mean L2 Norm ===
|
|
|
[[latex($\|q\|_{Mean L2} = \sqrt{\frac 1n \sum_{i=1}^n \left( q_i \right)^2}$)]]
|
|
|
### Linfinity Norm
|
|
|
|
|
|
=== Linfinity Norm ===
|
|
|
[[latex($\|q\|_\infty = \max \left( |q_i| \right)$)]]
|
|
|
```math
|
|
|
\|q\|_\infty = \max \left( |q_i| \right)
|
|
|
```
|
|
|
|
|
|
```
|
|
|
|
|
|
If [[latex($\|q\| \le 1$)]] then the actual time step is valid. In the other case the calculated time step is rejected and must be calculated again with a reduced step size.
|
|
|
For the next step the step size is adjusted to aim for [[latex($\|q\| = 0.8$)]].
|
... | ... | |