Commit 93860b3e authored by Theresa Schollenberger's avatar Theresa Schollenberger Committed by Kilian Weishaupt
Browse files

[ModelTraits] Rename numComponents to numFluidComponents and numPhases to numFluidPhases

parent 605091be
......@@ -63,8 +63,8 @@ class FicksLawImplementation<TypeTag, DiscretizationMethod::box>
enum { dimWorld = GridView::dimensionworld} ;
enum
{
numPhases = ModelTraits::numPhases(),
numComponents = ModelTraits::numComponents()
numPhases = ModelTraits::numFluidPhases(),
numComponents = ModelTraits::numFluidComponents()
};
using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
using ComponentFluxVector = Dune::FieldVector<Scalar, numComponents>;
......
......@@ -43,27 +43,15 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethod::box>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
using FluidState = GetPropType<TypeTag, Properties::FluidState>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using ThermalConductivityModel = GetPropType<TypeTag, Properties::ThermalConductivityModel>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using IndexType = typename GridView::IndexSet::IndexType;
using Element = typename GridView::template Codim<0>::Entity;
enum { dim = GridView::dimension} ;
enum { dimWorld = GridView::dimensionworld} ;
enum { numPhases = GetPropType<TypeTag, Properties::ModelTraits>::numPhases()} ;
using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
public:
static Scalar flux(const Problem& problem,
const Element& element,
......@@ -93,7 +81,7 @@ public:
const auto& fluxVarsCache = elemFluxVarsCache[scvf];
// compute the temperature gradient with the shape functions
Dune::FieldVector<Scalar, dimWorld> gradTemp(0.0);
Dune::FieldVector<Scalar, GridView::dimensionworld> gradTemp(0.0);
for (auto&& scv : scvs(fvGeometry))
gradTemp.axpy(elemVolVars[scv].temperature(), fluxVarsCache.gradN(scv.indexInElement()));
......
......@@ -55,13 +55,8 @@ class FouriersLawNonEquilibriumImplementation<TypeTag, DiscretizationMethod::box
using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>;
using Element = typename GridView::template Codim<0>::Entity;
enum { dim = GridView::dimension} ;
enum { dimWorld = GridView::dimensionworld} ;
enum { numEnergyEqFluid = getPropValue<TypeTag, Properties::NumEnergyEqFluid>() };
enum { sPhaseIdx = ModelTraits::numPhases() };
using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
static constexpr auto numEnergyEqFluid = getPropValue<TypeTag, Properties::NumEnergyEqFluid>();
static constexpr auto sPhaseIdx = ModelTraits::numFluidPhases();
public:
static Scalar flux(const Problem& problem,
......@@ -83,7 +78,7 @@ public:
if (phaseIdx != sPhaseIdx)
{
//when number of energyEq for the fluid are smaller than numPhases that means that we need an effecitve law
if (numEnergyEqFluid < ModelTraits::numPhases())
if (numEnergyEqFluid < ModelTraits::numFluidPhases())
{
insideLambda += ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
outsideLambda += ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
......@@ -111,7 +106,7 @@ public:
// evaluate gradTemp at integration point
const auto& fluxVarsCache = elemFluxVarsCache[scvf];
Dune::FieldVector<Scalar, dimWorld> gradTemp(0.0);
Dune::FieldVector<Scalar, GridView::dimensionworld> gradTemp(0.0);
for (auto&& scv : scvs(fvGeometry))
{
// compute the temperature gradient with the shape functions
......
......@@ -52,23 +52,14 @@ class MaxwellStefansLawImplementation<TypeTag, DiscretizationMethod::box >
using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using IndexType = typename GridView::IndexSet::IndexType;
using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
enum { dim = GridView::dimension} ;
enum { dimWorld = GridView::dimensionworld} ;
enum
{
numPhases = GetPropType<TypeTag, Properties::ModelTraits>::numPhases(),
numComponents = GetPropType<TypeTag, Properties::ModelTraits>::numComponents()
};
using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
static constexpr auto numFluidPhases = GetPropType<TypeTag, Properties::ModelTraits>::numFluidPhases();
static constexpr auto numComponents = GetPropType<TypeTag, Properties::ModelTraits>::numFluidComponents();
using ComponentFluxVector = Dune::FieldVector<Scalar, numComponents>;
using ReducedComponentVector = Dune::FieldVector<Scalar, numComponents-1>;
using ReducedComponentMatrix = Dune::FieldMatrix<Scalar, numComponents-1, numComponents-1>;
......@@ -113,7 +104,7 @@ public:
for (int compIdx = 0; compIdx < numComponents-1; compIdx++)
{
Dune::FieldVector<Scalar, dimWorld> gradX(0.0);
Dune::FieldVector<Scalar, GridView::dimensionworld> gradX(0.0);
for (auto&& scv : scvs(fvGeometry))
{
const auto& volVars = elemVolVars[scv];
......
......@@ -58,7 +58,7 @@ class FicksLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
using FluxVariablesCache = GetPropType<TypeTag, Properties::FluxVariablesCache>;
using BalanceEqOpts = GetPropType<TypeTag, Properties::BalanceEqOpts>;
static constexpr int numComponents = GetPropType<TypeTag, Properties::ModelTraits>::numComponents();
static constexpr int numComponents = GetPropType<TypeTag, Properties::ModelTraits>::numFluidComponents();
using ComponentFluxVector = Dune::FieldVector<Scalar, numComponents>;
//! Class that fills the cache corresponding to mpfa Fick's Law
......@@ -97,7 +97,7 @@ class FicksLawImplementation<TypeTag, DiscretizationMethod::ccmpfa>
using DualGridNodalIndexSet = GetPropType<TypeTag, Properties::DualGridNodalIndexSet>;
using Stencil = typename DualGridNodalIndexSet::NodalGridStencilType;
static constexpr int numPhases = GetPropType<TypeTag, Properties::ModelTraits>::numPhases();
static constexpr int numPhases = GetPropType<TypeTag, Properties::ModelTraits>::numFluidPhases();
static constexpr bool considerSecondaryIVs = FVGridGeometry::MpfaHelper::considerSecondaryIVs();
using PrimaryDataHandle = typename ElementFluxVariablesCache::PrimaryIvDataHandle::DiffusionHandle;
using SecondaryDataHandle = typename ElementFluxVariablesCache::SecondaryIvDataHandle::DiffusionHandle;
......
......@@ -312,8 +312,8 @@ private:
using DiffusionType = GetPropType<TypeTag, Properties::MolecularDiffusionType>;
using DiffusionFiller = typename DiffusionType::Cache::Filler;
static constexpr int numPhases = ModelTraits::numPhases();
static constexpr int numComponents = ModelTraits::numComponents();
static constexpr int numPhases = ModelTraits::numFluidPhases();
static constexpr int numComponents = ModelTraits::numFluidComponents();
for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
{
......@@ -446,7 +446,7 @@ private:
localAssembler.assembleMatrices(handle.advectionHandle(), iv, LambdaFactory::getAdvectionLambda());
// assemble pressure vectors
for (unsigned int pIdx = 0; pIdx < ModelTraits::numPhases(); ++pIdx)
for (unsigned int pIdx = 0; pIdx < ModelTraits::numFluidPhases(); ++pIdx)
{
// set context in handle
handle.advectionHandle().setPhaseIndex(pIdx);
......
......@@ -41,8 +41,8 @@ struct IvDataHandlePhysicsTraits
static constexpr bool enableMolecularDiffusion = ModelTraits::enableMolecularDiffusion();
static constexpr bool enableHeatConduction = ModelTraits::enableEnergyBalance();
static constexpr int numPhases = ModelTraits::numPhases();
static constexpr int numComponents = ModelTraits::numComponents();
static constexpr int numPhases = ModelTraits::numFluidPhases();
static constexpr int numComponents = ModelTraits::numFluidComponents();
};
/*!
......
......@@ -64,8 +64,8 @@ class FicksLawImplementation<TypeTag, DiscretizationMethod::cctpfa>
static const int dim = GridView::dimension;
static const int dimWorld = GridView::dimensionworld;
static const int numPhases = ModelTraits::numPhases();
static const int numComponents = ModelTraits::numComponents();
static const int numPhases = ModelTraits::numFluidPhases();
static const int numComponents = ModelTraits::numFluidComponents();
using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
using ComponentFluxVector = Dune::FieldVector<Scalar, numComponents>;
......
......@@ -145,8 +145,8 @@ private:
using DiffusionFiller = typename DiffusionType::Cache::Filler;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
static constexpr int numPhases = ModelTraits::numPhases();
static constexpr int numComponents = ModelTraits::numComponents();
static constexpr int numPhases = ModelTraits::numFluidPhases();
static constexpr int numComponents = ModelTraits::numFluidComponents();
// forward to the filler of the diffusive quantities
for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
......
......@@ -58,8 +58,8 @@ class FouriersLawNonEquilibriumImplementation<TypeTag, DiscretizationMethod::cct
using ThermalConductivityModel = GetPropType<TypeTag, Properties::ThermalConductivityModel>;
using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>;
enum { numEnergyEqFluid = ModelTraits::numEnergyEqFluid() };
enum { sPhaseIdx = ModelTraits::numPhases() };
static constexpr auto numEnergyEqFluid = getPropValue<TypeTag, Properties::NumEnergyEqFluid>();
static constexpr auto sPhaseIdx = ModelTraits::numFluidPhases();
public:
//! state the discretization method this implementation belongs to
......@@ -114,7 +114,7 @@ public:
if (phaseIdx != sPhaseIdx)
{
//when number of energyEq for the fluid are smaller than numPhases that means that we need an effecitve law
if (numEnergyEqFluid < ModelTraits::numPhases())
if (numEnergyEqFluid < ModelTraits::numFluidPhases())
{
insideLambda += ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
}
......@@ -147,7 +147,7 @@ public:
if (phaseIdx != sPhaseIdx)
{
//when number of energyEq for the fluid are smaller than numPhases that means that we need an effecitve law
if (numEnergyEqFluid < ModelTraits::numPhases())
if (numEnergyEqFluid < ModelTraits::numFluidPhases())
{
outsideLambda += ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
}
......
......@@ -52,21 +52,18 @@ class MaxwellStefansLawImplementation<TypeTag, DiscretizationMethod::cctpfa >
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using IndexType = typename GridView::IndexSet::IndexType;
using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using Element = typename GridView::template Codim<0>::Entity;
using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
using FluxVariablesCache = GetPropType<TypeTag, Properties::FluxVariablesCache>;
using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
static const int dim = GridView::dimension;
static const int dimWorld = GridView::dimensionworld;
static const int numPhases = GetPropType<TypeTag, Properties::ModelTraits>::numPhases();
static const int numComponents = GetPropType<TypeTag, Properties::ModelTraits>::numComponents();
static const int numPhases = GetPropType<TypeTag, Properties::ModelTraits>::numFluidPhases();
static const int numComponents = GetPropType<TypeTag, Properties::ModelTraits>::numFluidComponents();
using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
using ComponentFluxVector = Dune::FieldVector<Scalar, numComponents>;
using ReducedComponentVector = Dune::FieldVector<Scalar, numComponents-1>;
using ReducedComponentMatrix = Dune::FieldMatrix<Scalar, numComponents-1, numComponents-1>;
......
......@@ -58,10 +58,10 @@ class FicksLawImplementation<TypeTag, DiscretizationMethod::staggered >
using Indices = typename ModelTraits::Indices;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
static constexpr int numComponents = ModelTraits::numComponents();
static constexpr int numComponents = ModelTraits::numFluidComponents();
using NumEqVector = Dune::FieldVector<Scalar, numComponents>;
static_assert(ModelTraits::numPhases() == 1, "Only one phase supported!");
static_assert(ModelTraits::numFluidPhases() == 1, "Only one phase supported!");
public:
// state the discretization method this implementation belongs to
......
......@@ -112,8 +112,8 @@ struct StaggeredGridDefaultGridVolumeVariablesTraits
}
// make sure that a potential outflow condition is set for all components
std::array<bool, VolumeVariables::numComponents() - 1> isComponentOutflow;
for(int compIdx = 1; compIdx < VolumeVariables::numComponents(); ++compIdx)
std::array<bool, VolumeVariables::numFluidComponents() - 1> isComponentOutflow;
for(int compIdx = 1; compIdx < VolumeVariables::numFluidComponents(); ++compIdx)
{
const auto eqIdx = VolumeVariables::Indices::conti0EqIdx + compIdx;
isComponentOutflow[compIdx -1] = bcTypes.isOutflow(eqIdx);
......
......@@ -49,7 +49,6 @@ class MaxwellStefansLawImplementation<TypeTag, DiscretizationMethod::staggered >
using Problem = GetPropType<TypeTag, Properties::Problem>;
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using GridView = typename FVGridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
......@@ -59,22 +58,15 @@ class MaxwellStefansLawImplementation<TypeTag, DiscretizationMethod::staggered >
using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
static const int dim = GridView::dimension;
static const int dimWorld = GridView::dimensionworld;
using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>;
static const int numComponents = ModelTraits::numComponents();
static const int numComponents = ModelTraits::numFluidComponents();
static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
using ReducedComponentVector = Dune::FieldVector<Scalar, numComponents-1>;
using ReducedComponentMatrix = Dune::FieldMatrix<Scalar, numComponents-1, numComponents-1>;
static_assert(ModelTraits::numPhases() == 1, "Only one phase allowed supported!");
enum {
conti0EqIdx = Indices::conti0EqIdx,
};
static_assert(ModelTraits::numFluidPhases() == 1, "Only one phase allowed supported!");
public:
// state the discretization method this implementation belongs to
......@@ -113,7 +105,7 @@ public:
continue;
// get equation index
const auto eqIdx = conti0EqIdx + compIdx;
const auto eqIdx = Indices::conti0EqIdx + compIdx;
if(scvf.boundary())
{
const auto bcTypes = problem.boundaryTypes(element, scvf);
......
......@@ -76,7 +76,7 @@ public:
std::string phaseName(int phaseIdx) const override { return FluidSystem::phaseName(phaseIdx); }
//! returns the number of phases
int numPhases() const override { return VolumeVariables::numPhases(); }
int numFluidPhases() const override { return VolumeVariables::numFluidPhases(); }
//! Calculate the velocities for the scvs in the element
//! We assume the local containers to be bound to the complete stencil
......
......@@ -78,7 +78,7 @@ struct FreeflowNCIOFields
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{
// priVars: v_0, ..., v_dim-1, p, x_0, ..., x_numComp-1, otherPv ..., T
if (pvIdx > ModelTraits::dim() && pvIdx < ModelTraits::dim() + ModelTraits::numComponents())
if (pvIdx > ModelTraits::dim() && pvIdx < ModelTraits::dim() + ModelTraits::numFluidComponents())
return ModelTraits::useMoles() ? IOName::moleFraction<FluidSystem>(0, pvIdx - ModelTraits::dim())
: IOName::massFraction<FluidSystem>(0, pvIdx - ModelTraits::dim());
else
......
......@@ -99,10 +99,10 @@ private:
using FST = GetPropType<TypeTag, Properties::FluidState>;
using MT = GetPropType<TypeTag, Properties::ModelTraits>;
static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state");
static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>;
using NCVolVars = FreeflowNCVolumeVariables<Traits>;
......@@ -170,10 +170,10 @@ private:
using FST = GetPropType<TypeTag, Properties::FluidState>;
using MT = GetPropType<TypeTag, Properties::ModelTraits>;
static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state");
static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>;
using NCVolVars = FreeflowNCVolumeVariables<Traits>;
......
......@@ -104,10 +104,10 @@ private:
using FST = GetPropType<TypeTag, Properties::FluidState>;
using MT = GetPropType<TypeTag, Properties::ModelTraits>;
static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state");
static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>;
using NCVolVars = FreeflowNCVolumeVariables<Traits>;
......@@ -175,10 +175,10 @@ private:
using FST = GetPropType<TypeTag, Properties::FluidState>;
using MT = GetPropType<TypeTag, Properties::ModelTraits>;
static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state");
static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>;
using NCVolVars = FreeflowNCVolumeVariables<Traits>;
......
......@@ -104,10 +104,10 @@ private:
using FST = GetPropType<TypeTag, Properties::FluidState>;
using MT = GetPropType<TypeTag, Properties::ModelTraits>;
static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state");
static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>;
using NCVolVars = FreeflowNCVolumeVariables<Traits>;
......@@ -175,10 +175,10 @@ private:
using FST = GetPropType<TypeTag, Properties::FluidState>;
using MT = GetPropType<TypeTag, Properties::ModelTraits>;
static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state");
static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>;
using NCVolVars = FreeflowNCVolumeVariables<Traits>;
......
......@@ -89,7 +89,7 @@ struct NavierStokesNCModelTraits : NavierStokesModelTraits<dimension>
static constexpr int numEq() { return dimension+nComp; }
//! The number of components
static constexpr int numComponents() { return nComp; }
static constexpr int numFluidComponents() { return nComp; }
//! Use moles or not
static constexpr bool useMoles() { return useM; }
......@@ -163,10 +163,10 @@ private:
using FST = GetPropType<TypeTag, Properties::FluidState>;
using MT = GetPropType<TypeTag, Properties::ModelTraits>;
static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state");
static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>;
public:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment