rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
Functions
fv_operators_conv_explicit_lax_friedrichs.m File Reference

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...
 

Detailed Description

computes convection contribution to finite volume time evolution matrices, or their Frechet derivative

Definition in file fv_operators_conv_explicit_lax_friedrichs.m.

Function Documentation

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.

The Lax-Friedrichs flux is used with fluxes

\[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|}\).
See also
fv_num_conv_flux_lax_friedrichs().
Parameters
modelmodel
model_datamodel data
UU
NU_indNU ind
Return values
L_E_convsparse matrix \(L_{\text{lf}}\) or \(DL_{\text{lf}}|_{u}\) if flux is non-linear.
bdir_E_convoffset vector \(b_{\text{lf}}\)
Required fields of model:
  • 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:
    • 0 (complete) : no affine parameter dependence or decomposition is performed.
    • 1 (components) : for each output argument a cell array of output matrices is returned representing the \(q\)-th component independent of the parameters given in mu_names.
    • 2 (coefficients) : returns a vector where each coordinate represents the \(q\)-the coefficient \(\sigma_{\cdot}^{q}(\mu)\) dependent on the parameters given in mu_names.
  • verbose —  flag indicating the verbosity level of informative output
Required fields of model_data:
  • grid —  a structure containing geometry information of a mesh used for discretizations
Optional fields of model:
  • conv_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.

Here is the call graph for this function:

Here is the caller graph for this function: