|
METHOD
|
#include <fluxVectorSplitting.h>


Public Member Functions | |
| FVS (Data *data, WenoBase *weno, Model *model) | |
| virtual | ~FVS () |
| void | fluxReconstruction (double *cons, double *prims, double *aux, double *f, double *frecon, int dir, int vars=-1) |
| void | F (double *cons, double *prims, double *aux, double *f, double *fnet) |
Public Member Functions inherited from FluxMethod | |
| FluxMethod (Data *data, Model *model) | |
| virtual | ~FluxMethod () |
Public Attributes | |
| WenoBase * | weno |
Public Attributes inherited from FluxMethod | |
| Data * | data |
| Model * | model |
Flux vector splitting method
\begin{align} \partial_t U + \partial_x f(U) = 0. \end{align}
\begin{align} \partial_t U = \mathcal{F}(U) \end{align}
such that\begin{align} U^{n+1} =& U^n + \Delta t \mathcal{F}(U) \\ =& U^n + \Delta t \frac{f_{i+1/2} - f_{i-1/2}}{\Delta x} \end{align}
where we define \(f_{i+1/2}\) as the value of the flux vector at the righthand edge of the \(i^{th}\) cell, and each cell has width \(\Delta x\). To determine the value of the numerical flux function then, we need estimates of the values of the flux vector at the cell faces.\begin{align} f_i = f_i^- + f_i^+. \end{align}
Using the Lax-Friedrichs approximation of the flux, we can ensure that these contributions are entirely poitive/negative by using the following,\begin{align} f_i^{\pm} = \frac{1}{2}(f_i \pm \alpha U_i) \end{align}
where we have defined \(\alpha = max_p|\lambda_p|\) is the maximum wavespeed with \(\lambda_p\) as the \(p^th\) eigenvalue of the Jacobian of the system.\begin{align} f^+_{i, right} &= WENO(f_{i-2}, f_{i-1}, f_i) \\ f^-_{i, left} &= WENO(f_{i+1}, f_i, f_{i-1}) \end{align}
so that the reconstruction if \(f_{i+1/2} = f^+_{i, right} + f^-_{i, left}\). Note that this final equation is essentially a difference equation as the fluxes are moving in opposing directions.Definition at line 68 of file fluxVectorSplitting.h.
|
inlinevirtual |
Destructor.
Definition at line 84 of file fluxVectorSplitting.h.
|
virtual |
Numerical flux function.
For a given state described by cons prims and aux arrays, determines an approximation of the net flux of the conserved quantities through all cells by taking difference of the reconstructed values at the cell faces.
| [in] | *cons | pointer to conserved vector |
| [in] | *prims | pointer to primitive vector |
| [in] | *aux | pointer to auxiliary vector |
| [in] | *f | pointer to a flux work array to store the initial flux vector |
| [out] | *fnet | pointer to the array containing the net flux through every cell |
Implements FluxMethod.
|
virtual |
Flux reconstruction.
Reconstructs the fluxes at the center of the cells to the faces upwind and downwind and computes the difference, giving an approximation of the net flux (in the specified direction) at the cell faces. Method uses a second order WENO reconstruction.
| [in] | *cons | pointer to conserved vector |
| [in] | *prims | pointer to primitive vector |
| [in] | *aux | pointer to auxiliary vector |
| [in] | *f | pointer to a flux work array to store the initial flux vector |
| [out] | *frecon | pointer to the array containing the reconstructed values of the fluxes at the cell faces |
| [in] | dir | the direction in which to determine flux reconstruction with (0, 1, 2) = (x, y, z) |
| [in] | vars | size of the vector to reconstruct (saves time when using subgrid models). Default values is -1, which autos to Ncons. |
Implements FluxMethod.
| WenoBase* FVS::weno |
Definition at line 72 of file fluxVectorSplitting.h.