version 3.8
1p/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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
13#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_ADVECTIVE_FLUX_HH
14#define DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_ADVECTIVE_FLUX_HH
15
16namespace Dumux {
17
18#ifndef DOXYGEN
19// forward declare
20struct NavierStokesMassOnePModelTraits;
21
22template<class IsothermalTraits>
23struct NavierStokesEnergyModelTraits;
24
25template<class ModelTraits, class T = ModelTraits>
26struct AdvectiveFlux;
27#endif
28
34template<class T>
35struct AdvectiveFlux<NavierStokesMassOnePModelTraits, T>
36{
37 template<class NumEqVector, class UpwindFunction>
38 static void addAdvectiveFlux(NumEqVector& flux,
39 const UpwindFunction& upwind)
40 {
41 using ModelTraits = T;
42
43 // get equation index
44 const auto eqIdx = ModelTraits::Indices::conti0EqIdx;
45 flux[eqIdx] += upwind([](const auto& volVars) { return volVars.density(); });
46 }
47};
48
49// use the same mass flux for the non-isothermal model (heat fluxes are added separately)
50template<>
52: public AdvectiveFlux<NavierStokesMassOnePModelTraits>
53{};
54
55} // end namespace Dumux
56
57#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:34
Definition: adapt.hh:17
static void addAdvectiveFlux(NumEqVector &flux, const UpwindFunction &upwind)
Definition: 1p/advectiveflux.hh:38
Specifies a number properties of non-isothermal free-flow flow models based on the specifics of a giv...
Definition: freeflow/navierstokes/energy/model.hh:47
Traits for the single-phase flow Navier-Stokes mass model.
Definition: freeflow/navierstokes/mass/1p/model.hh:62