computes convection contribution to finite volume time evolution matrices, or their Frechet derivative More...
Go to the source code of this file.
Functions | |
function [
L_E_conv , bdir_E_conv ] = | fv_operators_conv_explicit_lax_friedrichs (model, model_data, U, NU_ind) |
computes convection contribution to finite volume time evolution matrices, or their Frechet derivative More... | |
computes convection contribution to finite volume time evolution matrices, or their Frechet derivative
Definition in file fv_operators_conv_explicit_lax_friedrichs.m.
function [ L_E_conv , bdir_E_conv ] = fv_operators_conv_explicit_lax_friedrichs | ( | model, | |
model_data, | |||
U, | |||
NU_ind | |||
) |
computes convection contribution to finite volume time evolution matrices, or their Frechet derivative
This function computes a convection operator \(L_{\text{lf}}\) and a corresponding offset vector \(b_{\text{lf}}\) that can be used by fv_operators_implicit_explicit() to build evolution matrices for a finite volume time step \(L_I U^{k+1} = L_E U^k + b_E + b_I\).
The analytical term inspiring this operator looks like
\[ v \cdot \nabla u \]
or in the non-linear case, where the Frechet derivative is computed
\[ \nabla f(u). \]
Here, \(v\) is a space dependent velocity field and \(f\) some smooth function in \(C^2(\mathbb{R}^d, \mathbb{R})\). The fluxes can be controlled with the model.conv_flux_ptr
fields. The first case is default usage of this operator with the field params.conv_flux_ptr
pointing to conv_flux_linear() where the velocity field \(v\) is given through velocity_ptr
.
\[g_{jl}(u,v) = \frac12 (f(u,x_{jl}) + f(v,x_{jl})) \cdot \nu_{jl} - \frac{|S_{jl}|}{2 \lambda_{jl}} (v-u)\]
with \(\lambda_{jl} := \frac{\Delta t}{|m_j - m_l|}\).model | model |
model_data | model data |
U | U |
NU_ind | NU ind |
L_E_conv | sparse matrix \(L_{\text{lf}}\) or \(DL_{\text{lf}}|_{u}\) if flux is non-linear. |
bdir_E_conv | offset vector \(b_{\text{lf}}\) |
lxf_lambda —
scalar \(\lambda = \sup \lambda_{jl}\) controlling the artificial diffusion added to the flux. dirichlet_values_ptr —
function pointer for dirichlet function \(u_{\text{dir}}\) flux_linear —
flag indicating wether the flux function \(f\) is linear. If this flag is set to false
and the decomp mode is set to complete
the Frechet derivative \(DL_{\text{lf}}|_{u}\) is returned. conv_flux_ptr —
function pointer specifying the function \(f\). decomp_mode —
flag indicating the operation mode of the function:mu_names
.mu_names
. verbose —
flag indicating the verbosity level of informative outputgrid —
a structure containing geometry information of a mesh used for discretizationsconv_flux_derivative_ptr —
function pointer specifying the derivative of the convection function \(f\). This is only needed in case we want to compute the Frechet derivative. Definition at line 17 of file fv_operators_conv_explicit_lax_friedrichs.m.