# 7.2. Finite Volumes¶

## 7.2.1. Classes¶

class daeHRUpwindSchemeEquation(variable, domain, phi, r_epsilon=1e-10, reversedFlow=False)[source]

Bases: object

supported_flux_limiters = [<function daeHRUpwindSchemeEquation.Phi_HCUS>, <function daeHRUpwindSchemeEquation.Phi_HQUICK>, <function daeHRUpwindSchemeEquation.Phi_Koren>, <function daeHRUpwindSchemeEquation.Phi_monotinized_central>, <function daeHRUpwindSchemeEquation.Phi_minmod>, <function daeHRUpwindSchemeEquation.Phi_Osher>, <function daeHRUpwindSchemeEquation.Phi_ospre>, <function daeHRUpwindSchemeEquation.Phi_smart>, <function daeHRUpwindSchemeEquation.Phi_superbee>, <function daeHRUpwindSchemeEquation.Phi_Sweby>, <function daeHRUpwindSchemeEquation.Phi_UMIST>, <function daeHRUpwindSchemeEquation.Phi_vanAlbada1>, <function daeHRUpwindSchemeEquation.Phi_vanAlbada2>, <function daeHRUpwindSchemeEquation.Phi_vanLeer>, <function daeHRUpwindSchemeEquation.Phi_vanLeer_minmod>]
__init__(variable, domain, phi, r_epsilon=1e-10, reversedFlow=False)[source]
dc_dt(i, variable=None)[source]

Accumulation term in the cell-centered finite-volume discretisation:

$$\int_{\Omega_i} {\partial c_i \over \partial t} dx$$

dc_dx(i, S=None, variable=None)[source]

Convection term in the cell-centered finite-volume discretisation:

$$c_{i + {1 \over 2}} - c_{i - {1 \over 2}}$$.

Cell-face state $$c_{i+{1 \over 2}}$$ is given as:

$${c}_{i + {1 \over 2}} = c_i + \phi \left( r_{i + {1 \over 2}} \right) \left( c_i - c_{i-1} \right)$$

where $$\phi$$ is the flux limiter function and $$r_{i + {1 \over 2}}$$ the upwind ratio of consecutive solution gradients:

$$r_{i + {1 \over 2}} = {{c_{i+1} - c_{i} + \epsilon} \over {c_{i} - c_{i-1} + \epsilon}}$$.

If the source term integral $$S= {1 \over u} \int_{\Omega_i} s(x) dx$$ is not None then the convection term is given as: $$(c-S)_{i + {1 \over 2}} - (c-S)_{i - {1 \over 2}}$$.

d2c_dx2(i, variable=None)[source]

Diffusion term in the cell-centered finite-volume discretisation:

$$\left( \partial c_i \over \partial x \right)_{i + {1 \over 2}} - \left( \partial c_i \over \partial x \right)_{i - {1 \over 2}}$$

source(s, i)[source]

Source term in the cell-centered finite-volume discretisation:

$$\int_{\Omega_i} s(x) dx$$