12#ifndef DUMUX_FREEFLOW_NC_STAGGERED_LOCAL_RESIDUAL_HH 
   13#define DUMUX_FREEFLOW_NC_STAGGERED_LOCAL_RESIDUAL_HH 
   27template<
class TypeTag, 
class DiscretizationMethod>
 
   30template<
class TypeTag>
 
   39    using GridView = 
typename GridGeometry::GridView;
 
   40    using Element = 
typename GridView::template Codim<0>::Entity;
 
   42    using SubControlVolume = 
typename FVElementGeometry::SubControlVolume;
 
   46    static constexpr int numComponents = ModelTraits::numFluidComponents();
 
   49    using EnergyLocalResidual = 
typename ParentType::EnergyLocalResidual;
 
   52    using ParentType::ParentType;
 
   55    template<
class VolumeVariables>
 
   57                                                           const SubControlVolume& scv,
 
   58                                                           const VolumeVariables& volVars)
 const 
   60        CellCenterPrimaryVariables storage(0.0);
 
   62        const Scalar density = useMoles ? volVars.molarDensity() : volVars.density();
 
   65        for (
int compIdx = 0; compIdx < numComponents; ++compIdx)
 
   67            const int eqIdx = compIdx;
 
   69            const Scalar 
massOrMoleFraction = useMoles ? volVars.moleFraction(compIdx) : volVars.massFraction(compIdx);
 
   72            if (eqIdx != ModelTraits::replaceCompEqIdx())
 
   77        if(ModelTraits::replaceCompEqIdx() < numComponents)
 
   78            storage[ModelTraits::replaceCompEqIdx()] = volVars.density();
 
   80        EnergyLocalResidual::fluidPhaseStorage(storage, volVars);
 
 
 
CellCenterPrimaryVariables computeStorageForCellCenter(const Problem &problem, const SubControlVolume &scv, const VolumeVariables &volVars) const
Evaluate fluxes entering or leaving the cell center control volume.
Definition freeflow/compositional/staggered/localresidual.hh:56
Element-wise calculation of the multi-component free-flow residual for models using the staggered dis...
Definition freeflow/compositional/localresidual.hh:24
Defines all properties used in Dumux.
The local residual class for the Navier-Stokes model (balance equations). This is a convenience alias...
VolumeVariables::PrimaryVariables::value_type massOrMoleFraction(const VolumeVariables &volVars, ReferenceSystemFormulation referenceSys, const int phaseIdx, const int compIdx)
returns the mass or mole fraction to be used in Fick's law based on the reference system
Definition referencesystemformulation.hh:54
NavierStokesResidualImpl< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > NavierStokesResidual
The local residual class for the Navier-Stokes model (balance equations). This is a convenience alias...
Definition freeflow/navierstokes/localresidual.hh:33
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:310
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:296
The available discretization methods in Dumux.