File fv_ops.hxx#
-
namespace FV#
Functions
-
Field3D Div_a_Grad_perp(const Field3D &a, const Field3D &f)#
Vorticity:
\[ \nabla (a \cdot \nabla_\perp(f)) \]
-
const Field3D Div_par_K_Grad_par(const Field3D &k, const Field3D &f, bool bndry_flux = true)#
Divergence of a parallel diffusion
\[ \nabla_\parallel(k \cdot \nabla_\parallel(f) ) \]
-
const Field3D D4DY4(const Field3D &d, const Field3D &f)#
4th-order derivative in Y, using derivatives on cell boundaries.
A one-sided 3rd-order derivative, given a value at a boundary is:
\[ \frac{d^3f}{dx^3} \simeq \tfrac{16}{5} f_b - 6 f_0 + 4 f_1 - \tfrac{6}{5} f_2 \]where:
\(f_b\) is the value on the boundary,
\(f_0\) is the cell to the left of the boundary,
\(f_1\) to the left of \(f_0\), and
\(f_2\) to the left of f_1:
.. code:: text f_2 | f_1 | f_0 | f_b
NB: Uses to/from FieldAligned coordinates
No fluxes through domain boundaries
-
const Field3D D4DY4_Index(const Field3D &f, bool bndry_flux = true)#
4th-order dissipation term
\[ \frac{d^3f}{dx^3} \simeq \tfrac{16}{5} f_b - 6 f_0 + 4 f_1 - \tfrac{6}{5} f_2 \]where:
\(f_b\) is the value on the boundary,
\(f_0\) is the cell to the left of the boundary,
\(f_1\) to the left of \(f_0\), and
\(f_2\) to the left of f_1:
.. code:: text f_2 | f_1 | f_0 | f_b
-
void communicateFluxes(Field3D &f)#
Communicate fluxes between processors Takes values in guard cells, and adds them to cells
-
template<typename CellEdges = MC>
const Field3D Div_par(const Field3D &f_in, const Field3D &v_in, const Field3D &wave_speed_in, bool fixflux = true)# Finite volume parallel divergence
Preserves the sum of f*J*dx*dy*dz over the domain
NB: Uses to/from FieldAligned coordinates
- Parameters:
f_in – [in] The field being advected. This will be reconstructed at cell faces using the given CellEdges method
v_in – [in] The advection velocity. This will be interpolated to cell boundaries using linear interpolation
wave_speed_in – [in] Local maximum speed of all waves in the system at each
fixflux – [in] Fix the flux at the boundary to be the value at the midpoint (for boundary conditions)
-
struct Stencil1D#
Stencil used for Finite Volume calculations which includes cell face values L and R
-
struct Upwind#
First order upwind for testing
-
struct MinMod#
Second order slope limiter method
Limits slope to minimum absolute value of left and right gradients. If at a maximum or minimum slope set to zero, i.e. reverts to first order upwinding
-
Field3D Div_a_Grad_perp(const Field3D &a, const Field3D &f)#