> ## Documentation Index
> Fetch the complete documentation index at: https://compflowlab.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Time Integration

Time integration advances the solution of the semi-discrete system obtained after spatial discretization of the governing equations. In finite volume form, the governing equations can be written as:

```math theme={null}
\frac{dq}{dt} = f(q)
```

where $q$ is the vector of conserved variables and $f(q)$ represents the spetial residual including non-linear terms such as convective fluxes, viscous fluxes, and source terms.

# Available Time Integration Schemes

In CompFlowLab, the time integration scheme can be specified by `time_scheme` in input file. Following are some of the available time integration schemes.

## `FDF`: Forward Difference Euler (Explicit)

A first-order explicit method:

```math theme={null}
q^{n} = q^{n-1} + \Delta t \, f(q^{n-1})
```

* First-order accurate
* Simple and inexpensive
* Strongly limited by CFL condition

## `SSPRK2`: Strong Stability Preserving Runge–Kutta 2 (Explicit)

A second-order explicit method:

```math theme={null}
q^{(1)} = q^{n-1} + \Delta t \, f(q^{n-1})
```

```math theme={null}
q^{n} = \frac{1}{2} q^{n-1} + \frac{1}{2} \left( q^{(1)} + \Delta t \, f(q^{(1)}) \right)
```

* Second-order accurate
* Improved stability over Forward Euler
* Suitable for moderate accuracy requirements

## `SSPRK3`: Strong Stability Preserving Runge–Kutta 3 (Explicit)

A second-order explicit method:

```math theme={null}
q^{(1)} = q^{n-1} + \Delta t \, f(q^{n-1})
```

```math theme={null}
q^{(2)} = \frac{3}{4} q^{n-1} + \frac{1}{4} \left( q^{(1)} + \Delta t \, f(q^{(1)}) \right)
```

```math theme={null}
q^{n} = \frac{1}{3} q^{n-1} + \frac{2}{3} \left( q^{(2)} + \Delta t \, f(q^{(2)}) \right)
```

* Third-order accurate
* Widely used in high-resolution CFD
* Good balance of accuracy and stability

## `BDF`: Backward Difference Euler (Implicit)

A first-order implicit method:

```math theme={null}
q^{n} = q^{n-1} + \Delta t \, f(q^{n})
```

* First-order accurate
* Unconditionally stable for many problems
* Requires solving a nonlinear system each time step

<Info>
  *The BDF method uses finite differences to compute the Jacobian in reacting flow cases, which might make it very stiff and hard to converge if the time step is too large.*
</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.