diff --git a/dumux/common/properties.hh b/dumux/common/properties.hh index 95c8dc539ec8ef1e99dbb7762932306b43403fc6..09834c0c15f955b70b71540ab8f3ec92be739d53 100644 --- a/dumux/common/properties.hh +++ b/dumux/common/properties.hh @@ -136,8 +136,6 @@ NEW_PROP_TAG(ThermalConductivityModel); //! Model to be used for the NEW_PROP_TAG(VelocityOutput); //! specifies the velocity calculation module to be used NEW_PROP_TAG(MaterialLaw); //! The material law which ought to be used (extracted from the spatial parameters) -NEW_PROP_TAG(WettingPhase); //! The wetting phase for two-phase models -NEW_PROP_TAG(NonwettingPhase); //! The non-wetting phase for two-phase models NEW_PROP_TAG(Formulation); //! The formulation of the model // TODO: is this useful? -> everything is a constraint solver just a different type NEW_PROP_TAG(UseConstraintSolver); //! Whether to use a contraint solver for computing the secondary variables diff --git a/dumux/material/fluidsystems/2pimmiscible.hh b/dumux/material/fluidsystems/2pimmiscible.hh index 657eb733d712019c8c1bcc013ca36d8dda53bd9d..42ea175aa365d2293f2b97ece66e2e70ecfb9d80 100644 --- a/dumux/material/fluidsystems/2pimmiscible.hh +++ b/dumux/material/fluidsystems/2pimmiscible.hh @@ -49,20 +49,15 @@ namespace FluidSystems { * The wetting and the non-wetting phase can be defined individually * via FluidSystem::LiquidPhase<Component> and * FluidSystem::GasPhase<Component>. These phases consist of one pure - * component. With the help of this adapter class, the phase - * properties can be accessed. This is suitable for pure two-phase - * systems without compositional effects. - * An adapter class using FluidSystem<TypeTag> is also provided - * at the end of this file. + * component. + * \tparam Scalar the scalar type + * \tparam WettingPhase the wetting phase fluid system (use FluidSystem::LiquidPhase<Component> / FluidSystem::GasPhase<Component>) + * \tparam NonwettingPhase the wetting phase fluid system (use FluidSystem::LiquidPhase<Component> / FluidSystem::GasPhase<Component>) */ template <class Scalar, class WettingPhase, class NonwettingPhase> class TwoPImmiscible : public BaseFluidSystem<Scalar, TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase> > { - // do not try to instantiate this class, it has only static members! - TwoPImmiscible() - {} - typedef TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase> ThisType; typedef BaseFluidSystem<Scalar, ThisType> Base; public: @@ -442,30 +437,6 @@ public: }; } // end namespace FluidSystems - -#ifdef DUMUX_PROPERTIES_HH -// forward definitions of the property tags -namespace Properties { -NEW_PROP_TAG(Scalar); -NEW_PROP_TAG(WettingPhase); -NEW_PROP_TAG(NonwettingPhase); -} -/*! - * \brief A non-compositional twophase fluid system. - * - * This is an adapter to use TwoPImmiscible<TypeTag>, as is - * done with most other classes in Dumux and all template parameters - * are usually defined in the property system anyhow. - */ -template<class TypeTag> -class DUNE_DEPRECATED_MSG("Use FluidSystems::TwoPImmiscible directly! Will be removed after release of dumux 3.0.") -TwoPImmiscibleFluidSystem -: public FluidSystems::TwoPImmiscible<typename GET_PROP_TYPE(TypeTag, Scalar), - typename GET_PROP_TYPE(TypeTag, WettingPhase), - typename GET_PROP_TYPE(TypeTag, NonwettingPhase)> -{}; -#endif - -} // end namespace +} // end namespace Dumux #endif diff --git a/dumux/porousmediumflow/2p/implicit/properties.hh b/dumux/porousmediumflow/2p/implicit/properties.hh index 0a98f9560cd418eb8ee3c2ca6fcfb5a63ffe97dc..e6c710e028e0966a15fced657cf79602a837e1dd 100644 --- a/dumux/porousmediumflow/2p/implicit/properties.hh +++ b/dumux/porousmediumflow/2p/implicit/properties.hh @@ -83,38 +83,6 @@ SET_TYPE_PROP(TwoP, Indices, TwoPIndices<TypeTag, GET_PROP_VALUE(TypeTag, Formulation), 0>); //! The indices required by the isothermal 2p model -//! By default, we set a null component as wetting phase -SET_PROP(TwoP, WettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, NullComponent<Scalar> > type; -}; - -//! By default, we set a null component as non-wetting phase -SET_PROP(TwoP, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, NullComponent<Scalar> > type; -}; - -//! The two-phase model uses the immiscible fluid system -SET_PROP(TwoP, FluidSystem) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase; - typedef typename GET_PROP_TYPE(TypeTag, NonwettingPhase) NonwettingPhase; - -public: - typedef FluidSystems::TwoPImmiscible<Scalar, - WettingPhase, - NonwettingPhase> type; -}; - //! The two-phase model uses the immiscible fluid state SET_PROP(TwoP, FluidState) { diff --git a/dumux/porousmediumflow/2p/sequential/properties.hh b/dumux/porousmediumflow/2p/sequential/properties.hh index 241a156dc8936b4d49295bd07ab8fcc936a1b338..8fd74b05d024bb3d7cb1ffb9f36060c331d5586a 100644 --- a/dumux/porousmediumflow/2p/sequential/properties.hh +++ b/dumux/porousmediumflow/2p/sequential/properties.hh @@ -65,8 +65,6 @@ NEW_PROP_TAG( PressureFormulation); //!< The formulation of the pressure model NEW_PROP_TAG( SaturationFormulation); //!< The formulation of the saturation model NEW_PROP_TAG( VelocityFormulation); //!< The type of velocity reconstructed for the transport model NEW_PROP_TAG( EnableCompressibility);//!< Returns whether compressibility is allowed -NEW_PROP_TAG( WettingPhase); //!< The wetting phase of a two-phase model -NEW_PROP_TAG( NonwettingPhase); //!< The non-wetting phase of a two-phase model NEW_PROP_TAG( FluidSystem ); //!< Defines the fluid system NEW_PROP_TAG( FluidState );//!< Defines the fluid state @@ -135,12 +133,6 @@ SET_TYPE_PROP(SequentialTwoP, Variables, VariableClass<TypeTag>); //! Set standart CellData of immiscible two-phase models as default SET_TYPE_PROP(SequentialTwoP, CellData, CellData2P<TypeTag, GET_PROP_VALUE(TypeTag, EnableCompressibility)>); -//! Set default fluid system -SET_TYPE_PROP(SequentialTwoP, FluidSystem, - FluidSystems::TwoPImmiscible<typename GET_PROP_TYPE(TypeTag, Scalar), - typename GET_PROP_TYPE(TypeTag, WettingPhase), - typename GET_PROP_TYPE(TypeTag, NonwettingPhase)>); - //! Set default fluid state SET_PROP(SequentialTwoP, FluidState) { diff --git a/test/mixeddimension/embedded/1p_richards/richardstestproblem.hh b/test/mixeddimension/embedded/1p_richards/richardstestproblem.hh index cf87613d1273639bcbdb9f5b11f7405f6121fbf6..925c53e698310edbf907d417e862e4b6cf5923f7 100644 --- a/test/mixeddimension/embedded/1p_richards/richardstestproblem.hh +++ b/test/mixeddimension/embedded/1p_richards/richardstestproblem.hh @@ -48,15 +48,6 @@ NEW_TYPE_TAG(RichardsTestProblem, INHERITS_FROM(Richards, RichardsTestSpatialPar NEW_TYPE_TAG(RichardsTestBoxProblem, INHERITS_FROM(BoxModel, RichardsTestProblem)); NEW_TYPE_TAG(RichardsTestCCProblem, INHERITS_FROM(CCTpfaModel, RichardsTestProblem)); -// Set the wetting phase -SET_PROP(RichardsTestProblem, WettingPhase) -{ -private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -public: - using type = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar>>; -}; - // Set the grid type SET_TYPE_PROP(RichardsTestProblem, Grid, Dune::YaspGrid<3, Dune::EquidistantOffsetCoordinates<double, 3> >); //SET_TYPE_PROP(RichardsTestProblem, Grid, Dune::UGGrid<3>); diff --git a/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh b/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh index 5ae9995fc1905dd28d6cfd3254e6f53cb91a5d63..ce58140c44e991dc3961e68336f70f0769cb549a 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh @@ -88,25 +88,15 @@ SET_TYPE_PROP(FVVelocity2PTestProblem, Grid, Dune::YaspGrid<2>); SET_TYPE_PROP(FVVelocity2PTestProblem, GridCreator, UnitCubeGridCreator<typename GET_PROP_TYPE(TypeTag, Grid)>); -// Set the wetting phase -SET_PROP(FVVelocity2PTestProblem, WettingPhase) +// Set the fluid system +SET_PROP(FVVelocity2PTestProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; -// Set the non-wetting phase -SET_PROP(FVVelocity2PTestProblem, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> > type; -}; - - // set the types for the MPFA-O FV method NEW_TYPE_TAG(FVMPFAOVelocity2PTestProblem, INHERITS_FROM(FvMpfaO2dPressureTwoP, TestDiffusionSpatialParams)); //SET_TYPE_PROP(FVMPFAOVelocity2PTestProblem, LinearSolver, ILUnBiCGSTABBackend<TypeTag>); @@ -118,25 +108,15 @@ SET_TYPE_PROP(FVMPFAOVelocity2PTestProblem, Grid, Dune::YaspGrid<2>); SET_TYPE_PROP(FVMPFAOVelocity2PTestProblem, GridCreator, UnitCubeGridCreator<typename GET_PROP_TYPE(TypeTag, Grid)>); -// Set the wetting phase -SET_PROP(FVMPFAOVelocity2PTestProblem, WettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> > type; -}; - -// Set the non-wetting phase -SET_PROP(FVMPFAOVelocity2PTestProblem, NonwettingPhase) +// Set the fluid system +SET_PROP(FVMPFAOVelocity2PTestProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; - // set the types for the mimetic FD method NEW_TYPE_TAG(MimeticPressure2PTestProblem, INHERITS_FROM(MimeticPressureTwoP, TestDiffusionSpatialParams)); SET_TYPE_PROP(MimeticPressure2PTestProblem, Problem, TestDiffusionProblem<TypeTag>); @@ -147,26 +127,16 @@ SET_TYPE_PROP(MimeticPressure2PTestProblem, Grid, Dune::YaspGrid<2>); SET_TYPE_PROP(MimeticPressure2PTestProblem, GridCreator, UnitCubeGridCreator<typename GET_PROP_TYPE(TypeTag, Grid)>); - -// Set the wetting phase -SET_PROP(MimeticPressure2PTestProblem, WettingPhase) +// Set the fluid system +SET_PROP(MimeticPressure2PTestProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> > type; -}; - -// Set the non-wetting phase -SET_PROP(MimeticPressure2PTestProblem, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; -} +} // end namespace Properties /*! * \ingroup SequentialProblems @@ -184,8 +154,7 @@ class TestDiffusionProblem: public DiffusionProblem2P<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase; - typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) NonwettingPhase; + using WettingPhase = typename GET_PROP(TypeTag, FluidSystem)::WettingPhase; typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; diff --git a/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh b/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh index dc145b3df1ae1c90fd92d28dc0cab7718a6dd0ce..19ec42c74c9e50c852187245288240c962083117 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh @@ -59,22 +59,13 @@ SET_TYPE_PROP(DiffusionTestProblem, Grid, Dune::YaspGrid<3>); SET_TYPE_PROP(DiffusionTestProblem, Problem, TestDiffusion3DProblem<TypeTag>); -// Set the wetting phase -SET_PROP(DiffusionTestProblem, WettingPhase) +// Set the fluid system +SET_PROP(DiffusionTestProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> > type; -}; - -// Set the non-wetting phase -SET_PROP(DiffusionTestProblem, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; #if HAVE_SUPERLU diff --git a/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh b/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh index 87315d80a3fd1d6c11860050c61b72bceac1ea6b..58bfb24dab91cc52ad842e35f676dcb75787a3ac 100644 --- a/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh +++ b/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh @@ -50,24 +50,15 @@ SET_TYPE_PROP(CC2PCornerPointProblem, Problem, CC2PCornerPointProblem<TypeTag>); // Set the grid creator SET_TYPE_PROP(CC2PCornerPointProblem, GridCreator, CpGridCreator<TypeTag>); -// Set the wetting phase -SET_PROP(CC2PCornerPointProblem, WettingPhase) +// Set the fluid system +SET_PROP(CC2PCornerPointProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; -}; - -// Set the non-wetting phase -SET_PROP(CC2PCornerPointProblem, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, DNAPL<Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, DNAPL<Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; -} +} // end namespace Properties template <class TypeTag > class CC2PCornerPointProblem : public ImplicitPorousMediaProblem<TypeTag> diff --git a/test/porousmediumflow/2p/implicit/fracture/problem.hh b/test/porousmediumflow/2p/implicit/fracture/problem.hh index 45d15c3dbb86d89147b915f842ead6c688dbc0e3..d249c5323f341d84da39bc754a0b6ab4e3b38c99 100644 --- a/test/porousmediumflow/2p/implicit/fracture/problem.hh +++ b/test/porousmediumflow/2p/implicit/fracture/problem.hh @@ -56,22 +56,13 @@ SET_TYPE_PROP(FractureProblem, Grid, Dune::FoamGrid<2, 3>); // Set the problem property SET_TYPE_PROP(FractureProblem, Problem, Dumux::FractureProblem<TypeTag>); -// Set the wetting phase -SET_PROP(FractureProblem, WettingPhase) +// Set the fluid system +SET_PROP(FractureProblem, FluidSystem) { -private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -public: - using type = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar>>; -}; - -// Set the non-wetting phase -SET_PROP(FractureProblem, NonwettingPhase) -{ -private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -public: - using type = FluidSystems::LiquidPhase<Scalar, DNAPL<Scalar>>; + using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, DNAPL<Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; // Use global caching diff --git a/test/porousmediumflow/2p/implicit/incompressible/problem.hh b/test/porousmediumflow/2p/implicit/incompressible/problem.hh index 6e058dc8cbcaaa46071ed837be0c396f3671ccc8..25030f51616406645395da2ee8f4bccd20fe7fc3 100644 --- a/test/porousmediumflow/2p/implicit/incompressible/problem.hh +++ b/test/porousmediumflow/2p/implicit/incompressible/problem.hh @@ -57,22 +57,13 @@ SET_TYPE_PROP(TwoPIncompressible, Problem, TwoPTestProblem<TypeTag>); // the local residual containing the analytic derivative methods SET_TYPE_PROP(TwoPIncompressible, LocalResidual, TwoPIncompressibleLocalResidual<TypeTag>); -// Set the wetting phase -SET_PROP(TwoPIncompressible, WettingPhase) +// Set the fluid system +SET_PROP(TwoPIncompressible, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; -}; - -// Set the non-wetting phase -SET_PROP(TwoPIncompressible, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, DNAPL<Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, DNAPL<Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; // Enable caching diff --git a/test/porousmediumflow/2p/implicit/nonisothermal/problem.hh b/test/porousmediumflow/2p/implicit/nonisothermal/problem.hh index dd318d3c7ed97a8038e55ca53717499b00cc25a9..3d14e7f260b8e712235ec52e7513e29fceffae17 100644 --- a/test/porousmediumflow/2p/implicit/nonisothermal/problem.hh +++ b/test/porousmediumflow/2p/implicit/nonisothermal/problem.hh @@ -58,20 +58,6 @@ SET_TYPE_PROP(InjectionProblem2PNI, Problem, InjectionProblem2PNI<TypeTag>); // Use the same fluid system as the 2p2c injection problem SET_TYPE_PROP(InjectionProblem2PNI, FluidSystem, FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), false>); -// Alternative: set phases separately -// Set the wetting phase -// SET_TYPE_PROP(InjectionProblem2PNI, -// WettingPhase, -// FluidSystems::LiquidPhase<GET_PROP_TYPE(TypeTag, Scalar) Scalar, -// SimpleH2O<GET_PROP_TYPE(TypeTag, Scalar) Scalar> >); - -// Set the non-wetting phase -// SET_TYPE_PROP(InjectionProblem2PNI, -// NonwettingPhase, -// FluidSystems::GasPhase<GET_PROP_TYPE(TypeTag, Scalar) Scalar, -// N2<GET_PROP_TYPE(TypeTag, Scalar) Scalar> >); -} - /*! * \ingroup TwoPModel * \ingroup ImplicitTestProblems diff --git a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh index 619b7833a408e5e5c0b77383afb23aafa70aa63c..43c613cd8566bfa5f5988cd20b598e408b0279e3 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh @@ -64,22 +64,13 @@ SET_TYPE_PROP(ThreeDTwoPTestProblem, Grid, Dune::ALUGrid<3, 3, Dune::cube, Dune: // Set the problem property SET_TYPE_PROP(ThreeDTwoPTestProblem, Problem, Test3D2PProblem<TypeTag>); -// Set the wetting phase -SET_PROP(ThreeDTwoPTestProblem, WettingPhase) +// Set the fluid system +SET_PROP(ThreeDTwoPTestProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; -}; - -// Set the non-wetting phase -SET_PROP(ThreeDTwoPTestProblem, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; #if PROBLEM == 1 @@ -356,7 +347,6 @@ void dirichletAtPos(PrimaryVariables &values, const GlobalPosition& globalPos) c if (globalPos[0] < eps_) { values[swIdx] = 0.8; - typedef typename GET_PROP_TYPE(TypeTag, NonwettingPhase) NonwettingPhase; values[pWIdx] = 1; } #elif PROBLEM == 1 diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh index 73589ab0382dc6f7be447295751aff150fc9de11..28b3ccd084953049978c030ba9f5ee5bac441d0b 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh @@ -64,28 +64,15 @@ SET_TYPE_PROP(TestIMPESAdaptiveRestartProblem, GridCreator, GridCreator<TypeTag> // Set the problem property SET_TYPE_PROP(TestIMPESAdaptiveProblem, Problem, TestIMPESAdaptiveProblem<TypeTag>); -// Set the wetting phase -SET_PROP(TestIMPESAdaptiveProblem, WettingPhase) +// Set the fluid system +SET_PROP(TestIMPESAdaptiveProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; -// Set the non-wetting phase -SET_PROP(TestIMPESAdaptiveProblem, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; -}; - -//SET_BOOL_PROP(TestIMPESAdaptiveProblem, EnableCompressibility, true); - -//SET_TYPE_PROP(TestIMPESAdaptiveProblem, EvalCflFluxFunction, EvalCflFluxCoats<TypeTag>); - SET_SCALAR_PROP(TestIMPESAdaptiveProblem, ImpetCFLFactor, 0.95); } @@ -111,7 +98,7 @@ class TestIMPESAdaptiveProblem: public IMPESProblem2P<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase; + using WettingPhase = typename GET_PROP(TypeTag, FluidSystem)::WettingPhase; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; diff --git a/test/porousmediumflow/2p/sequential/test_impesproblem.hh b/test/porousmediumflow/2p/sequential/test_impesproblem.hh index 62edc9bf1908942ff1bc4fe0ed9c00a5727b0029..6a81e75d49752ce2dfafd20fa50f4da22dafb5b4 100644 --- a/test/porousmediumflow/2p/sequential/test_impesproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesproblem.hh @@ -83,22 +83,13 @@ SET_TYPE_PROP(IMPESTestProblem, Problem, IMPESTestProblem<TypeTag>); // //////////////////////////////////////////////////////////////////////// -// Set the wetting phase -SET_PROP(IMPESTestProblem, WettingPhase) +// Set the fluid system +SET_PROP(IMPESTestProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; -}; - -// Set the non-wetting phase -SET_PROP(IMPESTestProblem, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; SET_TYPE_PROP(IMPESTestProblem, EvalCflFluxFunction, EvalCflFluxCoats<TypeTag>); @@ -134,7 +125,7 @@ typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; -typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase; +using WettingPhase = typename GET_PROP(TypeTag, FluidSystem)::WettingPhase; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh b/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh index 08022ba012574014cd29cc21f0dc5ca0c5cde6fd..ca59e642b7f21cf4d8e22d547a158721f65181fb 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh @@ -68,34 +68,18 @@ SET_TYPE_PROP(MPFATwoPTestProblem, Grid, Dune::YaspGrid<2>); // Set the problem property SET_TYPE_PROP(MPFATwoPTestProblem, Problem, MPFATwoPTestProblem<TypeTag>); -// Set the wetting phase -SET_PROP(MPFATwoPTestProblem, WettingPhase) +// Set the fluid system +SET_PROP(MPFATwoPTestProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; -}; - + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; #if PROBLEM == 2 -// Set the non-wetting phase -SET_PROP(MPFATwoPTestProblem, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, DNAPL<Scalar> > type; -}; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, DNAPL<Scalar> >; #else -// Set the non-wetting phase -SET_PROP(MPFATwoPTestProblem, NonwettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; -}; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; #endif + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; +}; #if PROBLEM == 1 SET_INT_PROP(MPFATwoPTestProblem, Formulation, SequentialTwoPCommonIndices::pnsw); @@ -145,7 +129,7 @@ typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; -typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase; +using WettingPhase = typename GET_PROP(TypeTag, FluidSystem)::WettingPhase; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; diff --git a/test/porousmediumflow/2p/sequential/test_transportproblem.hh b/test/porousmediumflow/2p/sequential/test_transportproblem.hh index 8f3a41fd4159789341296a5158db1190470ac2dd..b93176d3b6d7cb643c8f2fb94fa3780847971fa7 100644 --- a/test/porousmediumflow/2p/sequential/test_transportproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_transportproblem.hh @@ -27,7 +27,7 @@ #include <dune/grid/io/file/dgfparser/dgfyasp.hh> #include <dumux/material/fluidsystems/liquidphase.hh> -#include <dumux/material/components/unit.hh> +#include <dumux/material/components/constant.hh> #include <dumux/porousmediumflow/2p/sequential/transport/cellcentered/properties.hh> #include <dumux/porousmediumflow/2p/sequential/transport/problem.hh> @@ -47,29 +47,19 @@ namespace Properties { NEW_TYPE_TAG(TransportTestProblem, INHERITS_FROM(FVTransportTwoP, TestTransportSpatialParams)); - // Set the grid type SET_TYPE_PROP(TransportTestProblem, Grid, Dune::YaspGrid<2>); // Set the problem property SET_TYPE_PROP(TransportTestProblem, Problem, TestTransportProblem<TypeTag>); -// Set the wetting phase -SET_PROP(TransportTestProblem, WettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Unit<Scalar> > type; -}; - -// Set the non-wetting phase -SET_PROP(TransportTestProblem, NonwettingPhase) +// Set the fluid system +SET_PROP(TransportTestProblem, FluidSystem) { -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, Unit<Scalar> > type; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using WettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; SET_INT_PROP(TransportTestProblem, VelocityFormulation, SequentialTwoPCommonIndices::velocityTotal); diff --git a/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh b/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh index a370ef0f21ef9de85969595e53e60f75a663ce52..51eccc7f85afb47e0274aa20397aa5099dbe2870 100644 --- a/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh @@ -59,36 +59,8 @@ NEW_TYPE_TAG(RichardsAnalyticalCCProblem, INHERITS_FROM(CCTpfaModel, RichardsAna SET_TYPE_PROP(RichardsAnalyticalProblem, Grid, Dune::YaspGrid<2>); // Set the physical problem to be solved -SET_PROP(RichardsAnalyticalProblem, Problem) -{ typedef RichardsAnalyticalProblem<TypeTag> type; }; - -// Set the wetting phase -SET_PROP(RichardsAnalyticalProblem, WettingPhase) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> > type; -}; - -// // Enable partial reassembly of the Jacobian matrix -// SET_BOOL_PROP(RichardsAnalyticalProblem, ImplicitEnablePartialReassemble, true); -// -// // Enable re-use of the Jacobian matrix for the first iteration of a time step -// SET_BOOL_PROP(RichardsAnalyticalProblem, ImplicitEnableJacobianRecycling, true); -// -// // Use forward differences to approximate the Jacobian matrix -// SET_INT_PROP(RichardsAnalyticalProblem, ImplicitNumericDifferenceMethod, +1); -// -// // Set the maximum number of newton iterations of a time step -// SET_INT_PROP(RichardsAnalyticalProblem, NewtonMaxSteps, 28); -// -// // Set the "desireable" number of newton iterations of a time step -// SET_INT_PROP(RichardsAnalyticalProblem, NewtonTargetSteps, 18); -// -// // Do not write the intermediate results of the newton method -// SET_BOOL_PROP(RichardsAnalyticalProblem, NewtonWriteConvergence, false); -} +SET_TYPE_PROP(RichardsAnalyticalProblem, Problem, RichardsAnalyticalProblem<TypeTag>); +} // end namespace Dumux /*! * \ingroup RichardsModel diff --git a/test/porousmediumflow/richards/implicit/richardslensproblem.hh b/test/porousmediumflow/richards/implicit/richardslensproblem.hh index f7f518ba2d89e1f6b2a86196675346ffa2754338..b40c3d31bb37dabc8cf9ee75a38305e473303996 100644 --- a/test/porousmediumflow/richards/implicit/richardslensproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardslensproblem.hh @@ -55,16 +55,7 @@ SET_TYPE_PROP(RichardsLensProblem, Grid, Dune::YaspGrid<2>); // Set the physical problem to be solved SET_TYPE_PROP(RichardsLensProblem, Problem, RichardsLensProblem<TypeTag>); - -// Set the wetting phase -SET_PROP(RichardsLensProblem, WettingPhase) -{ -private: - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -public: - using type = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar>>; -}; -} +} // end namespace Dumux /*! * \ingroup RichardsModel