Commit d14b47ed authored by Timo Koch's avatar Timo Koch

Merge branch 'cleanup/remove-TypeTag-ending' into 'master'

Cleanup/remove type tag ending

See merge request !59
parents 7b05d402 3b33f594
Pipeline #747 passed with stage
in 56 seconds
......@@ -53,29 +53,29 @@ namespace Properties
//! Create new type tag for the problem
// Create new type tags
namespace TTag {
struct ExerciseFourBioMinTypeTag { using InheritsFrom = std::tuple<BioMinSpatialparams, TwoPNCMin>; };
struct ExerciseFourBioMinCCTpfaTypeTag { using InheritsFrom = std::tuple<ExerciseFourBioMinTypeTag, CCTpfaModel>; };
struct ExerciseFourBioMin { using InheritsFrom = std::tuple<BioMinSpatialparams, TwoPNCMin>; };
struct ExerciseFourBioMinCCTpfa { using InheritsFrom = std::tuple<ExerciseFourBioMin, CCTpfaModel>; };
} // end namespace TTag
//! Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::ExerciseFourBioMinTypeTag> { using type = ExerciseFourBioMinProblem<TypeTag>; };
struct Problem<TypeTag, TTag::ExerciseFourBioMin> { using type = ExerciseFourBioMinProblem<TypeTag>; };
//! Set grid and the grid creator to be used
#if HAVE_DUNE_ALUGRID
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFourBioMinTypeTag> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; };
struct Grid<TypeTag, TTag::ExerciseFourBioMin> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; };
#elif HAVE_UG
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFourBioMinTypeTag> { using type = Dune::UGGrid<2>; };
struct Grid<TypeTag, TTag::ExerciseFourBioMin> { using type = Dune::UGGrid<2>; };
#else
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFourBioMinTypeTag> { using type = Dune::YaspGrid<2>; };
struct Grid<TypeTag, TTag::ExerciseFourBioMin> { using type = Dune::YaspGrid<2>; };
#endif // HAVE_DUNE_ALUGRID
//! Set the fluid system type
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFourBioMinTypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFourBioMin>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......@@ -86,7 +86,7 @@ public:
};
template<class TypeTag>
struct SolidSystem<TypeTag, TTag::ExerciseFourBioMinTypeTag>
struct SolidSystem<TypeTag, TTag::ExerciseFourBioMin>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = SolidSystems::BiominSolidPhase<Scalar>;
......@@ -94,11 +94,11 @@ struct SolidSystem<TypeTag, TTag::ExerciseFourBioMinTypeTag>
template<class TypeTag>
struct EnableFVGridGeometryCache<TypeTag, TTag::ExerciseFourBioMinTypeTag> { static constexpr bool value = false; };
struct EnableFVGridGeometryCache<TypeTag, TTag::ExerciseFourBioMin> { static constexpr bool value = false; };
template<class TypeTag>
struct EnableGridVolumeVariablesCache<TypeTag, TTag::ExerciseFourBioMinTypeTag> { static constexpr bool value = false; };
struct EnableGridVolumeVariablesCache<TypeTag, TTag::ExerciseFourBioMin> { static constexpr bool value = false; };
template<class TypeTag>
struct EnableGridFluxVariablesCache<TypeTag, TTag::ExerciseFourBioMinTypeTag> { static constexpr bool value = false; };
struct EnableGridFluxVariablesCache<TypeTag, TTag::ExerciseFourBioMin> { static constexpr bool value = false; };
} // end namespace properties
/*!
......
......@@ -59,7 +59,7 @@ int main(int argc, char** argv) try
using namespace Dumux;
// define the type tag for this problem
using TypeTag = Properties::TTag::ExerciseFourBioMinCCTpfaTypeTag;
using TypeTag = Properties::TTag::ExerciseFourBioMinCCTpfa;
// initialize MPI, finalize is done automatically on exit
const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv);
......
......@@ -333,7 +333,6 @@ public:
if (phaseIdx == liquidPhaseIdx)
{
// assume brine with viscosity effect of Ca for the liquid phase.
//F Scalar salinity = fluidState.massFraction(liquidPhaseIdx, CaIdx);
Scalar result = Brine::liquidViscosity(temperature, pressure);
Valgrind::CheckDefined(result);
......
......@@ -229,7 +229,7 @@ liquid saturation as primary variables (p_g-S_l -> `p1s0`) or vice versa.
```
template<class TypeTag>
struct Formulation<TypeTag, TTag::DarcyTypeTag>
struct Formulation<TypeTag, TTag::DarcyOnePNC>
{ static constexpr auto value = TwoPFormulation::p1s0; };
```
in the Properties section in the problem file.
......@@ -323,7 +323,7 @@ For using the compositional zero equation turbulence model, the following header
The includes for the NavierStokesNC model and the NavierStokesProblem are no longer needed and can be removed.
Make sure your free flow problem inherits from the correct parent type:
* Change the entry in the `ZeroEqTypeTag` definition accordingly (non-isothermal zero equation model)
* Change the entry in the `StokesZeroEq` definition accordingly (non-isothermal zero equation model)
* Adapt the inheritance of the problem class (hint: two occurrences)
Take a look into the two headers included above to see how the correct TypeTag and the Problem class the inherit from are called.
......
......@@ -53,16 +53,16 @@ namespace Dumux {
namespace Properties {
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::StokesOnePTypeTag>
struct CouplingManager<TypeTag, TTag::StokesOneP>
{
using Traits = StaggeredMultiDomainTraits<TypeTag, TypeTag, Properties::TTag::DarcyOnePTypeTag>;
using Traits = StaggeredMultiDomainTraits<TypeTag, TypeTag, Properties::TTag::DarcyOneP>;
using type = Dumux::StokesDarcyCouplingManager<Traits>;
};
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::DarcyOnePTypeTag>
struct CouplingManager<TypeTag, TTag::DarcyOneP>
{
using Traits = StaggeredMultiDomainTraits<Properties::TTag::StokesOnePTypeTag, Properties::TTag::StokesOnePTypeTag, TypeTag>;
using Traits = StaggeredMultiDomainTraits<Properties::TTag::StokesOneP, Properties::TTag::StokesOneP, TypeTag>;
using type = Dumux::StokesDarcyCouplingManager<Traits>;
};
......@@ -84,8 +84,8 @@ int main(int argc, char** argv) try
Parameters::init(argc, argv);
// Define the sub problem type tags
using StokesTypeTag = Properties::TTag::StokesOnePTypeTag;
using DarcyTypeTag = Properties::TTag::DarcyOnePTypeTag;
using StokesTypeTag = Properties::TTag::StokesOneP;
using DarcyTypeTag = Properties::TTag::DarcyOneP;
......
......@@ -44,12 +44,12 @@ namespace Properties
{
// Create new type tags
namespace TTag {
struct StokesOnePTypeTag { using InheritsFrom = std::tuple<NavierStokes, StaggeredFreeFlowModel>; };
struct StokesOneP { using InheritsFrom = std::tuple<NavierStokes, StaggeredFreeFlowModel>; };
} // end namespace TTag
// the fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::StokesOnePTypeTag>
struct FluidSystem<TypeTag, TTag::StokesOneP>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = FluidSystems::OnePLiquid<Scalar, Dumux::Components::SimpleH2O<Scalar> > ;
......@@ -57,7 +57,7 @@ struct FluidSystem<TypeTag, TTag::StokesOnePTypeTag>
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::StokesOnePTypeTag>
struct Grid<TypeTag, TTag::StokesOneP>
{
static constexpr auto dim = 2;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......@@ -73,14 +73,14 @@ struct Grid<TypeTag, TTag::StokesOnePTypeTag>
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::StokesOnePTypeTag> { using type = Dumux::StokesSubProblem<TypeTag> ; };
struct Problem<TypeTag, TTag::StokesOneP> { using type = Dumux::StokesSubProblem<TypeTag> ; };
template<class TypeTag>
struct EnableFVGridGeometryCache<TypeTag, TTag::StokesOnePTypeTag> { static constexpr bool value = true; };
struct EnableFVGridGeometryCache<TypeTag, TTag::StokesOneP> { static constexpr bool value = true; };
template<class TypeTag>
struct EnableGridFluxVariablesCache<TypeTag, TTag::StokesOnePTypeTag> { static constexpr bool value = true; };
struct EnableGridFluxVariablesCache<TypeTag, TTag::StokesOneP> { static constexpr bool value = true; };
template<class TypeTag>
struct EnableGridVolumeVariablesCache<TypeTag, TTag::StokesOnePTypeTag> { static constexpr bool value = true; };
struct EnableGridVolumeVariablesCache<TypeTag, TTag::StokesOneP> { static constexpr bool value = true; };
}
/*!
......
......@@ -48,16 +48,16 @@ namespace Properties
{
// Create new type tags
namespace TTag {
struct DarcyOnePTypeTag { using InheritsFrom = std::tuple<OneP, CCTpfaModel>; };
struct DarcyOneP { using InheritsFrom = std::tuple<OneP, CCTpfaModel>; };
} // end namespace TTag
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::DarcyOnePTypeTag> { using type = Dumux::DarcySubProblem<TypeTag>; };
struct Problem<TypeTag, TTag::DarcyOneP> { using type = Dumux::DarcySubProblem<TypeTag>; };
// the fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::DarcyOnePTypeTag>
struct FluidSystem<TypeTag, TTag::DarcyOneP>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = FluidSystems::OnePLiquid<Scalar, Dumux::Components::SimpleH2O<Scalar> > ;
......@@ -65,7 +65,7 @@ struct FluidSystem<TypeTag, TTag::DarcyOnePTypeTag>
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::DarcyOnePTypeTag>
struct Grid<TypeTag, TTag::DarcyOneP>
{
static constexpr auto dim = 2;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......@@ -80,7 +80,7 @@ struct Grid<TypeTag, TTag::DarcyOnePTypeTag>
};
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::DarcyOnePTypeTag> { using type = OnePSpatialParams<TypeTag>; };
struct SpatialParams<TypeTag, TTag::DarcyOneP> { using type = OnePSpatialParams<TypeTag>; };
}
/*!
......
......@@ -56,16 +56,16 @@ namespace Dumux {
namespace Properties {
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::StokesTypeTag>
struct CouplingManager<TypeTag, TTag::StokesNC>
{
using Traits = StaggeredMultiDomainTraits<TypeTag, TypeTag, Properties::TTag::DarcyTypeTag>;
using Traits = StaggeredMultiDomainTraits<TypeTag, TypeTag, Properties::TTag::DarcyOnePNC>;
using type = Dumux::StokesDarcyCouplingManager<Traits>;
};
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::DarcyTypeTag>
struct CouplingManager<TypeTag, TTag::DarcyOnePNC>
{
using Traits = StaggeredMultiDomainTraits<Properties::TTag::StokesTypeTag, Properties::TTag::StokesTypeTag, TypeTag>;
using Traits = StaggeredMultiDomainTraits<Properties::TTag::StokesNC, Properties::TTag::StokesNC, TypeTag>;
using type = Dumux::StokesDarcyCouplingManager<Traits>;
};
......@@ -87,8 +87,8 @@ int main(int argc, char** argv) try
Parameters::init(argc, argv);
// Define the sub problem type tags
using StokesTypeTag = Properties::TTag::StokesTypeTag;
using DarcyTypeTag = Properties::TTag::DarcyTypeTag;
using StokesTypeTag = Properties::TTag::StokesNC;
using DarcyTypeTag = Properties::TTag::DarcyOnePNC;
// try to create a grid (from the given grid file or the input file)
// for both sub-domains
......
......@@ -42,16 +42,16 @@ namespace Properties
{
// Create new type tags
namespace TTag {
struct StokesTypeTag { using InheritsFrom = std::tuple<NavierStokesNC, StaggeredFreeFlowModel>; };
struct StokesNC { using InheritsFrom = std::tuple<NavierStokesNC, StaggeredFreeFlowModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::StokesTypeTag> { using type = Dune::YaspGrid<2, Dune::EquidistantOffsetCoordinates<GetPropType<TypeTag, Properties::Scalar>, 2> >; };
struct Grid<TypeTag, TTag::StokesNC> { using type = Dune::YaspGrid<2, Dune::EquidistantOffsetCoordinates<GetPropType<TypeTag, Properties::Scalar>, 2> >; };
// The fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::StokesTypeTag>
struct FluidSystem<TypeTag, TTag::StokesNC>
{
using H2OAir = FluidSystems::H2OAir<GetPropType<TypeTag, Properties::Scalar>>;
using type = FluidSystems::OnePAdapter<H2OAir, H2OAir::gasPhaseIdx>;
......@@ -59,22 +59,22 @@ struct FluidSystem<TypeTag, TTag::StokesTypeTag>
// Do not replace one equation with a total mass balance
template<class TypeTag>
struct ReplaceCompEqIdx<TypeTag, TTag::StokesTypeTag> { static constexpr int value = 3; };
struct ReplaceCompEqIdx<TypeTag, TTag::StokesNC> { static constexpr int value = 3; };
// Use formulation based on mass fractions
template<class TypeTag>
struct UseMoles<TypeTag, TTag::StokesTypeTag> { static constexpr bool value = true; };
struct UseMoles<TypeTag, TTag::StokesNC> { static constexpr bool value = true; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::StokesTypeTag> { using type = Dumux::StokesSubProblem<TypeTag> ; };
struct Problem<TypeTag, TTag::StokesNC> { using type = Dumux::StokesSubProblem<TypeTag> ; };
template<class TypeTag>
struct EnableFVGridGeometryCache<TypeTag, TTag::StokesTypeTag> { static constexpr bool value = true; };
struct EnableFVGridGeometryCache<TypeTag, TTag::StokesNC> { static constexpr bool value = true; };
template<class TypeTag>
struct EnableGridFluxVariablesCache<TypeTag, TTag::StokesTypeTag> { static constexpr bool value = true; };
struct EnableGridFluxVariablesCache<TypeTag, TTag::StokesNC> { static constexpr bool value = true; };
template<class TypeTag>
struct EnableGridVolumeVariablesCache<TypeTag, TTag::StokesTypeTag> { static constexpr bool value = true; };
struct EnableGridVolumeVariablesCache<TypeTag, TTag::StokesNC> { static constexpr bool value = true; };
}
/*!
......
......@@ -46,16 +46,16 @@ namespace Properties
{
// Create new type tags
namespace TTag {
struct DarcyTypeTag { using InheritsFrom = std::tuple<OnePNC, CCTpfaModel>; };
struct DarcyOnePNC { using InheritsFrom = std::tuple<OnePNC, CCTpfaModel>; };
} // end namespace TTag
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::DarcyTypeTag> { using type = Dumux::DarcySubProblem<TypeTag>; };
struct Problem<TypeTag, TTag::DarcyOnePNC> { using type = Dumux::DarcySubProblem<TypeTag>; };
// The fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::DarcyTypeTag>
struct FluidSystem<TypeTag, TTag::DarcyOnePNC>
{
using H2OAir = FluidSystems::H2OAir<GetPropType<TypeTag, Properties::Scalar>>;
using type = FluidSystems::OnePAdapter<H2OAir, H2OAir::gasPhaseIdx>;
......@@ -63,23 +63,23 @@ struct FluidSystem<TypeTag, TTag::DarcyTypeTag>
// Use moles
template<class TypeTag>
struct UseMoles<TypeTag, TTag::DarcyTypeTag> { static constexpr bool value = true; };
struct UseMoles<TypeTag, TTag::DarcyOnePNC> { static constexpr bool value = true; };
// Do not replace one equation with a total mass balance
template<class TypeTag>
struct ReplaceCompEqIdx<TypeTag, TTag::DarcyTypeTag> { static constexpr int value = 3; };
struct ReplaceCompEqIdx<TypeTag, TTag::DarcyOnePNC> { static constexpr int value = 3; };
//! Use a model with constant tortuosity for the effective diffusivity
SET_TYPE_PROP(DarcyTypeTag, EffectiveDiffusivityModel,
SET_TYPE_PROP(DarcyOnePNC, EffectiveDiffusivityModel,
DiffusivityConstantTortuosity<GetPropType<TypeTag, Properties::Scalar>>);
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::DarcyTypeTag> { using type = Dune::YaspGrid<2>; };
struct Grid<TypeTag, TTag::DarcyOnePNC> { using type = Dune::YaspGrid<2>; };
// Set the spatial paramaters type
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::DarcyTypeTag> { using type = OnePSpatialParams<TypeTag>; };
struct SpatialParams<TypeTag, TTag::DarcyOnePNC> { using type = OnePSpatialParams<TypeTag>; };
}
template <class TypeTag>
......
......@@ -56,16 +56,16 @@ namespace Dumux {
namespace Properties {
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::ZeroEqTypeTag>
struct CouplingManager<TypeTag, TTag::StokesZeroEq>
{
using Traits = StaggeredMultiDomainTraits<TypeTag, TypeTag, Properties::TTag::DarcyTwoPTwoCTypeTag>;
using Traits = StaggeredMultiDomainTraits<TypeTag, TypeTag, Properties::TTag::DarcyTwoPTwoCNI>;
using type = Dumux::StokesDarcyCouplingManager<Traits>;
};
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::DarcyTwoPTwoCTypeTag>
struct CouplingManager<TypeTag, TTag::DarcyTwoPTwoCNI>
{
using Traits = StaggeredMultiDomainTraits<Properties::TTag::ZeroEqTypeTag, Properties::TTag::ZeroEqTypeTag, TypeTag>;
using Traits = StaggeredMultiDomainTraits<Properties::TTag::StokesZeroEq, Properties::TTag::StokesZeroEq, TypeTag>;
using type = Dumux::StokesDarcyCouplingManager<Traits>;
};
......@@ -87,8 +87,8 @@ int main(int argc, char** argv) try
Parameters::init(argc, argv);
// Define the sub problem type tags
using StokesTypeTag = Properties::TTag::ZeroEqTypeTag;
using DarcyTypeTag = Properties::TTag::DarcyTwoPTwoCTypeTag;
using StokesTypeTag = Properties::TTag::StokesZeroEq;
using DarcyTypeTag = Properties::TTag::DarcyTwoPTwoCNI;
// try to create a grid (from the given grid file or the input file)
// for both sub-domains
......
......@@ -41,16 +41,16 @@ namespace Properties
{
// Create new type tags
namespace TTag {
struct ZeroEqTypeTag { using InheritsFrom = std::tuple<NavierStokesNCNI, StaggeredFreeFlowModel>; };
struct StokesZeroEq { using InheritsFrom = std::tuple<NavierStokesNCNI, StaggeredFreeFlowModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::ZeroEqTypeTag> { using type = Dune::YaspGrid<2, Dune::TensorProductCoordinates<GetPropType<TypeTag, Properties::Scalar>, 2> >; };
struct Grid<TypeTag, TTag::StokesZeroEq> { using type = Dune::YaspGrid<2, Dune::TensorProductCoordinates<GetPropType<TypeTag, Properties::Scalar>, 2> >; };
// The fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::ZeroEqTypeTag>
struct FluidSystem<TypeTag, TTag::StokesZeroEq>
{
using H2OAir = FluidSystems::H2OAir<GetPropType<TypeTag, Properties::Scalar>>;
static constexpr auto phaseIdx = H2OAir::gasPhaseIdx; // simulate the air phase
......@@ -58,22 +58,22 @@ struct FluidSystem<TypeTag, TTag::ZeroEqTypeTag>
};
template<class TypeTag>
struct ReplaceCompEqIdx<TypeTag, TTag::ZeroEqTypeTag> { static constexpr int value = 3; };
struct ReplaceCompEqIdx<TypeTag, TTag::StokesZeroEq> { static constexpr int value = 3; };
// Use formulation based on mass fractions
template<class TypeTag>
struct UseMoles<TypeTag, TTag::ZeroEqTypeTag> { static constexpr bool value = true; };
struct UseMoles<TypeTag, TTag::StokesZeroEq> { static constexpr bool value = true; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::ZeroEqTypeTag> { using type = Dumux::FreeFlowSubProblem<TypeTag> ; };
struct Problem<TypeTag, TTag::StokesZeroEq> { using type = Dumux::FreeFlowSubProblem<TypeTag> ; };
template<class TypeTag>
struct EnableFVGridGeometryCache<TypeTag, TTag::ZeroEqTypeTag> { static constexpr bool value = true; };
struct EnableFVGridGeometryCache<TypeTag, TTag::StokesZeroEq> { static constexpr bool value = true; };
template<class TypeTag>
struct EnableGridFluxVariablesCache<TypeTag, TTag::ZeroEqTypeTag> { static constexpr bool value = true; };
struct EnableGridFluxVariablesCache<TypeTag, TTag::StokesZeroEq> { static constexpr bool value = true; };
template<class TypeTag>
struct EnableGridVolumeVariablesCache<TypeTag, TTag::ZeroEqTypeTag> { static constexpr bool value = true; };
struct EnableGridVolumeVariablesCache<TypeTag, TTag::StokesZeroEq> { static constexpr bool value = true; };
}
/*!
......
......@@ -44,35 +44,35 @@ namespace Properties
{
// Create new type tags
namespace TTag {
struct DarcyTwoPTwoCTypeTag { using InheritsFrom = std::tuple<TwoPTwoCNI, CCTpfaModel>; };
struct DarcyTwoPTwoCNI { using InheritsFrom = std::tuple<TwoPTwoCNI, CCTpfaModel>; };
} // end namespace TTag
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::DarcyTwoPTwoCTypeTag> { using type = Dumux::DarcySubProblem<TypeTag>; };
struct Problem<TypeTag, TTag::DarcyTwoPTwoCNI> { using type = Dumux::DarcySubProblem<TypeTag>; };
// the fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::DarcyTwoPTwoCTypeTag> { using type = FluidSystems::H2OAir<GetPropType<TypeTag, Properties::Scalar>>; };
struct FluidSystem<TypeTag, TTag::DarcyTwoPTwoCNI> { using type = FluidSystems::H2OAir<GetPropType<TypeTag, Properties::Scalar>>; };
//! Set the default formulation to pw-Sn: This can be over written in the problem.
template<class TypeTag>
struct Formulation<TypeTag, TTag::DarcyTwoPTwoCTypeTag>
struct Formulation<TypeTag, TTag::DarcyTwoPTwoCNI>
{ static constexpr auto value = TwoPFormulation::p1s0; };
// The gas component balance (air) is replaced by the total mass balance
template<class TypeTag>
struct ReplaceCompEqIdx<TypeTag, TTag::DarcyTwoPTwoCTypeTag> { static constexpr int value = 3; };
struct ReplaceCompEqIdx<TypeTag, TTag::DarcyTwoPTwoCNI> { static constexpr int value = 3; };
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::DarcyTwoPTwoCTypeTag> { using type = Dune::YaspGrid<2, Dune::TensorProductCoordinates<GetPropType<TypeTag, Properties::Scalar>, 2> >; };
struct Grid<TypeTag, TTag::DarcyTwoPTwoCNI> { using type = Dune::YaspGrid<2, Dune::TensorProductCoordinates<GetPropType<TypeTag, Properties::Scalar>, 2> >; };
template<class TypeTag>
struct UseMoles<TypeTag, TTag::DarcyTwoPTwoCTypeTag> { static constexpr bool value = true; };
struct UseMoles<TypeTag, TTag::DarcyTwoPTwoCNI> { static constexpr bool value = true; };
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::DarcyTwoPTwoCTypeTag> { using type = TwoPSpatialParams<TypeTag>; };
struct SpatialParams<TypeTag, TTag::DarcyTwoPTwoCNI> { using type = TwoPSpatialParams<TypeTag>; };
}
/*!
......
......@@ -47,33 +47,33 @@ namespace Properties {
// Create a new type tag for the problem
// Create new type tags
namespace TTag {
struct ExerciseFluidsystemTwoPTwoCTypeTag { using InheritsFrom = std::tuple<BoxModel, TwoPTwoC>; };
struct ExerciseFluidsystemTwoPTwoC { using InheritsFrom = std::tuple<BoxModel, TwoPTwoC>; };
} // end namespace TTag
// Set the "Problem" property
template<class TypeTag>
struct Problem<TypeTag, TTag::ExerciseFluidsystemTwoPTwoCTypeTag> { using type = ExerciseFluidsystemProblemTwoPTwoC<TypeTag>; };
struct Problem<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = ExerciseFluidsystemProblemTwoPTwoC<TypeTag>; };
// Set the spatial parameters
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, SpatialParams,
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoC, SpatialParams,
ExerciseFluidsystemSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>,
GetPropType<TypeTag, Properties::Scalar>>);
// Set grid and the grid creator to be used
#if HAVE_DUNE_ALUGRID
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoCTypeTag> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; };
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; };
#elif HAVE_UG
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoCTypeTag> { using type = Dune::UGGrid<2>; };
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = Dune::UGGrid<2>; };
#else
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoCTypeTag> { using type = Dune::YaspGrid<2>; };
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = Dune::YaspGrid<2>; };
#endif // HAVE_DUNE_ALUGRID
// The fluid system property
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFluidsystemTwoPTwoCTypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......
......@@ -70,33 +70,33 @@ namespace Properties {
// Create a new type tag for the problem
// Create new type tags
namespace TTag {
struct ExerciseFluidsystemTwoPTypeTag { using InheritsFrom = std::tuple<BoxModel, TwoP>; };
struct ExerciseFluidsystemTwoP { using InheritsFrom = std::tuple<BoxModel, TwoP>; };
} // end namespace TTag
// Set the "Problem" property
template<class TypeTag>
struct Problem<TypeTag, TTag::ExerciseFluidsystemTwoPTypeTag> { using type = ExerciseFluidsystemProblemTwoP<TypeTag>; };
struct Problem<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = ExerciseFluidsystemProblemTwoP<TypeTag>; };
// Set the spatial parameters
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, SpatialParams,
SET_TYPE_PROP(ExerciseFluidsystemTwoP, SpatialParams,
ExerciseFluidsystemSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>,
GetPropType<TypeTag, Properties::Scalar>>);
// Set grid to be used
#if HAVE_DUNE_ALUGRID
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTypeTag> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; };
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; };
#elif HAVE_UG
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTypeTag> { using type = Dune::UGGrid<2>; };
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = Dune::UGGrid<2>; };
#else
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTypeTag> { using type = Dune::YaspGrid<2>; };
struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = Dune::YaspGrid<2>; };
#endif // HAVE_DUNE_ALUGRID
// we use the immiscible fluid system here
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFluidsystemTwoPTypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFluidsystemTwoP>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......
......@@ -2,14 +2,14 @@
#part a: 2pproblem
dune_add_test(NAME exercise-fluidsystem_a
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemTwoPTypeTag
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemTwoP
COMPILE_ONLY # for testing purposes, ignore for the exercise
CMD_ARGS exercise-fluidsystem_a.input)
#part b: 2p2cproblem
dune_add_test(NAME exercise-fluidsystem_b
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemTwoPTwoCTypeTag
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemTwoPTwoC
COMPILE_ONLY # for testing purposes, ignore for the exercise
CMD_ARGS exercise-fluidsystem_b.input)
......
......@@ -35,13 +35,13 @@ To see more components, fluidsystems and binarycoefficients implementations, hav
In the following, the basic steps required to set the desired fluid system are outlined. Here, this is done in the __problem file__, i.e. for this part of the exercise the code shown below is taken from the `2pproblem.hh` file.
In this part of the exercise we will consider a system consisting of two immiscible phases. Therefore, the _TypeTag_ for this problem (`ExerciseFluidsystemTwoPTypeTag`) derives from
In this part of the exercise we will consider a system consisting of two immiscible phases. Therefore, the _TypeTag_ for this problem (`ExerciseFluidsystemTwoP`) derives from
the `TwoP` _TypeTag_ (immiscible two-phase model properties) and the `BoxModel` _TypeTag_ (specifies properties of the discretization scheme).
```c++
// Create new type tags
namespace TTag {
struct ExerciseFluidsystemTwoPTypeTag { using InheritsFrom = std::tuple<BoxModel, TwoP>; };
struct ExerciseFluidsystemTwoP { using InheritsFrom = std::tuple<BoxModel, TwoP>; };
} // end namespace TTag
```
......@@ -99,7 +99,7 @@ the other phase is liquid as well and consists of the incompressible fictitious
```c++
// we use the immiscible fluid system here
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFluidsystemTwoPTypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFluidsystemTwoP>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......@@ -175,7 +175,7 @@ Compare the gnuplot output to the following plot of the density function from ab
### 3. Implement a new fluid system
The problem file for this part of the exercise is `2p2cproblem.hh`. We now want to implement a new fluid system consisting of two liquid phases, which are water and the previously implemented compressible component. We will consider compositional effects, which is why we now have to derive our _TypeTag_ (`ExerciseFluidsystemTwoPTwoCTypeTag`) from a _TypeTag_ (`TwoPTwoC`) that holds the miscible two-phase
The problem file for this part of the exercise is `2p2cproblem.hh`. We now want to implement a new fluid system consisting of two liquid phases, which are water and the previously implemented compressible component. We will consider compositional effects, which is why we now have to derive our _TypeTag_ (`ExerciseFluidsystemTwoPTwoC`) from a _TypeTag_ (`TwoPTwoC`) that holds the miscible two-phase
two-component model properties:
```c++
......@@ -185,7 +185,7 @@ two-component model properties:
```c++
// Create a new type tag for the problem
struct ExerciseFluidsystemTwoPTwoCTypeTag { using InheritsFrom = std::tuple<BoxModel, TwoPTwoC>; };
struct ExerciseFluidsystemTwoPTwoC { using InheritsFrom = std::tuple<BoxModel, TwoPTwoC>; };
} // end namespace TTag
```
......@@ -199,7 +199,7 @@ The new fluid system is to be implemented in the file `fluidsystems/h2omycompres
```c++
// The fluid system property
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFluidsystemTwoPTwoCTypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......
......@@ -62,8 +62,8 @@ int main(int argc, char** argv) try
// define the type tag for this problem
// TYPETAG is set in CMakeLists.txt as compile time definition
// alternatively you could write `using TypeTag = Properties::TTag::ExerciseFluidsystemBoxTwoPTypeTag;`
// then, for the 2p2c problem you have to change this line to `using TypeTag = Properties::TTag::ExerciseFluidsystemBoxTwoPTypeTag;`
// alternatively you could write `using TypeTag = Properties::TTag::ExerciseFluidsystemBoxTwoP;`
// then, for the 2p2c problem you have to change this line to `using TypeTag = Properties::TTag::ExerciseFluidsystemBoxTwoP;`
// and recompile the executable
using TypeTag = Properties::TTag::TYPETAG;
......
......@@ -69,7 +69,7 @@ From the matrix side, the coupling works a bit different. Since the fracture dom
// create the type tag node for the matrix sub-problem
// Create new type tags
namespace TTag {
struct MatrixProblemTypeTag { using InheritsFrom = std::tuple<CCTpfaFacetCouplingModel, TwoP>; };
struct MatrixProblem { using InheritsFrom = std::tuple<CCTpfaFacetCouplingModel, TwoP>; };
} // end namespace TTag
```
......
......@@ -50,8 +50,8 @@
// Define some types for this test so that we can set them as properties below and
// reuse them again in the main function with only one single definition of them here
using MatrixTypeTag = Dumux::Properties::TTag::MatrixProblemTypeTag;
using FractureTypeTag = Dumux::Properties::TTag::FractureProblemTypeTag;
using MatrixTypeTag = Dumux::Properties::TTag::MatrixProblem;
using FractureTypeTag = Dumux::Properties::TTag::FractureProblem;
using MatrixFVGridGeometry = Dumux::GetPropType<MatrixTypeTag, Dumux::Properties::FVGridGeometry>;