Skip to content

Time Stepping

The semidiscrete system

A transient model adds a time-derivative term to its weak form. Discretizing in space only, and leaving time continuous, turns the problem into a system of ordinary differential equations for the time-dependent degrees of freedom \(\mathbf{x}(t)\):

\[ M\,\dot{\mathbf{x}}(t) + A\,\mathbf{x}(t) = \mathbf{b}(t) . \]
Symbol Meaning
\(M\) Mass matrix, assembled from the time-derivative term (for example the \(\sigma\,\partial_t\) term of an eddy-current problem or the \(\rho c_p\,\partial_t\) term of transient heat conduction)
\(A\) System (stiffness) matrix from the spatial part of the weak form
\(\dot{\mathbf{x}}\) Time derivative of the degrees of freedom
\(\mathbf{b}(t)\) Time-dependent right-hand side

This is the method of lines: space is discretized as usual, and what remains is to advance \(\mathbf{x}(t)\) in time.

Implicit time integration

The unsteady runner advances the solution in discrete time steps of size \(\Delta t\), from \(\mathbf{x}^n\) at time \(t^n\) to \(\mathbf{x}^{n+1}\). μfem uses implicit integration, which stays stable even for the stiff, diffusive systems typical of eddy-current and heat-conduction problems, where explicit schemes would demand impractically small steps.

μfem advances with the first-order backward Euler scheme, which approximates the time derivative with the new (unknown) state from the single stored previous step,

\[ \dot{\mathbf{x}} \approx \frac{\mathbf{x}^{n+1} - \mathbf{x}^n}{\Delta t} . \]

Substituting into the semidiscrete system and collecting the unknown \(\mathbf{x}^{n+1}\) gives

\[ \left( \frac{1}{\Delta t}\, M + A \right) \mathbf{x}^{n+1} = \mathbf{b}^{n+1} + \frac{1}{\Delta t}\, M\,\mathbf{x}^n . \]

Every time step is therefore an ordinary linear system of the same form as a stationary solve: an effective matrix \(\frac{1}{\Delta t} M + A\) on the left, and a right-hand side that carries the previous step \(\mathbf{x}^n\). It is assembled, constrained, and solved exactly like any other, and if the model is nonlinear the step is driven by the Newton iteration.

Explicit time integration

A few models also offer explicit integration, where the time derivative is evaluated at the known current state, so the new state follows without solving a system involving the stiffness matrix \(A\). Forward Euler, for example, gives

\[ \mathbf{x}^{n+1} = \mathbf{x}^n + \Delta t\, M^{-1}\!\left( \mathbf{b}^n - A\,\mathbf{x}^n \right) , \]

and the mass matrix \(M\) is usually lumped to a diagonal so that \(M^{-1}\) is trivial. Explicit steps are very cheap individually but are stable only below a critical step size (a CFL-type limit), which makes them a poor fit for the stiff, diffusive problems that dominate μfem. Only a small number of models support explicit integration, typically wave-like formulations; implicit backward Euler is the default.

Steps and inner iterations

The runner repeats this for each step, using the just-computed \(\mathbf{x}^{n+1}\) as the history for the next one. Within a single step it may take several inner iterations to resolve material nonlinearity or coupling between models before moving on. The choice of \(\Delta t\) trades accuracy against cost: smaller steps follow fast transients more faithfully, larger steps reach the final time sooner.