3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
advectiveflux.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
25#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_ADVECTIVE_FLUX_HH
26#define DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_ADVECTIVE_FLUX_HH
27
28namespace Dumux {
29
30#ifndef DOXYGEN
31// forward declare
32struct NavierStokesMassOnePModelTraits;
33
34template<class IsothermalTraits>
35struct NavierStokesEnergyModelTraits;
36
37template<class ModelTraits, class T = ModelTraits>
38struct AdvectiveFlux;
39#endif
40
46template<class T>
47struct AdvectiveFlux<NavierStokesMassOnePModelTraits, T>
48{
49 template<class NumEqVector, class UpwindFunction>
50 static void addAdvectiveFlux(NumEqVector& flux,
51 const UpwindFunction& upwind)
52 {
53 using ModelTraits = T;
54
55 // get equation index
56 const auto eqIdx = ModelTraits::Indices::conti0EqIdx;
57 flux[eqIdx] += upwind([](const auto& volVars) { return volVars.density(); });
58 }
59};
60
61// use the same mass flux for the non-isothermal model (heat fluxes are added separately)
62template<>
64: public AdvectiveFlux<NavierStokesMassOnePModelTraits>
65{};
66
67} // end namespace Dumux
68
69#endif
typename NumEqVectorTraits< PrimaryVariables >::type NumEqVector
A vector with the same size as numbers of equations This is the default implementation and has to be ...
Definition: numeqvector.hh:46
Definition: adapt.hh:29
Specifies a number properties of non-isothermal free-flow flow models based on the specifics of a giv...
Definition: freeflow/navierstokes/energy/model.hh:59
static void addAdvectiveFlux(NumEqVector &flux, const UpwindFunction &upwind)
Definition: advectiveflux.hh:50
Traits for the single-phase flow Navier-Stokes mass model.
Definition: freeflow/navierstokes/mass/1p/model.hh:74