6. Examples of the Finite Volume Method with Numerical Methods¶
6.1. 2D Diffusion Equation¶
For example - 2D diffusion equation:
Diffusive Flux:
Balance of fluxes:
To express the balance of fluxes, we use
We can’t evaluate \(f_{AB}\) perpendicular to the face, because we’d need values at the midpoints. The gradient evaluation is on the basis of Gauss’ Divergence Theorem, which requires a line integral over a 4 neighbour surfaces, where the corners are points we know the values of.
To get \(f_A\) and \(f_B\) we need to evalutate \(\partial u / \partial x\):
6.2. Lax-Wendroff Method in FVM¶
Recall for the model equation:
We used the Taylor Expansion:
And we use:
where:
\(a = {\partial f \over \partial u}\) is the Jacobian
2D version:
\(A = {\partial f \over \partial u}\) and \(B = {\partial g \over \partial u}\)
(1) and (2) can be discretised using the FDM to get one step LW
Note that they have the form of a flux balance - in theory can use FVM - however the fluxes contain derivatives
For this reason, one-step LW is not used with the finite volume.
Instead, we can use MacCormack
6.3. MacCormack Method in FVM¶
Write (1) in MacCormack:
Predictor:
Corrector:
FV formulation: mimic “forward-backward” predictor-corrector approach in flux evaluation
6.3.1. Cell-Centered Formulation¶
Possible variants for the predictor step. Invert bias for the corrector step. 4 choices:
6.3.2. Boundaries¶
- Inflow/outflow - extrapolation formulas are used
- Solid boundaries - convective fluxes are set to zero