Commit 067b057b authored by Felix Weinhardt's avatar Felix Weinhardt
Browse files

[exercis-coupling-ff-pm models]

removed TypeTag ending and and added suffix NC for Stokes and OnePNC for Darcy
parent 1451d0c3
......@@ -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::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; };
}
/*!
......
......@@ -52,19 +52,19 @@ namespace Properties
// Create new type tags
namespace TTag {
#if EXNUMBER >= 1
struct DarcyTypeTag { using InheritsFrom = std::tuple<TwoPNC, CCTpfaModel>; };
struct DarcyOnePNC { using InheritsFrom = std::tuple<TwoPNC, CCTpfaModel>; };
#else
struct DarcyTypeTag { using InheritsFrom = std::tuple<OnePNC, CCTpfaModel>; };
struct DarcyOnePNC { using InheritsFrom = std::tuple<OnePNC, CCTpfaModel>; };
#endif
} // 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>>;
#if EXNUMBER == 0
......@@ -76,34 +76,34 @@ 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>; };
#if EXNUMBER >= 1
//! Set the default formulation to pw-Sn: This can be over written in the problem.
template<class TypeTag>
struct Formulation<TypeTag, TTag::DarcyTypeTag>
struct Formulation<TypeTag, TTag::DarcyOnePNC>
{ static constexpr auto value = TwoPFormulation::p1s0; };
#endif
// Set the spatial paramaters type
#if EXNUMBER >= 1
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::DarcyTypeTag> { using type = TwoPSpatialParams<TypeTag>; };
struct SpatialParams<TypeTag, TTag::DarcyOnePNC> { using type = TwoPSpatialParams<TypeTag>; };
#else
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::DarcyTypeTag> { using type = OnePSpatialParams<TypeTag>; };
struct SpatialParams<TypeTag, TTag::DarcyOnePNC> { using type = OnePSpatialParams<TypeTag>; };
#endif
}
......
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