diff --git a/dumux/freeflow/navierstokesnc/model.hh b/dumux/freeflow/navierstokesnc/model.hh index b5badbcf3a5becf1b1f85b9fbb5675059d6d0d5f..0677dd38915ba870b04ad6d38e8e0c8c4c1ff0bc 100644 --- a/dumux/freeflow/navierstokesnc/model.hh +++ b/dumux/freeflow/navierstokesnc/model.hh @@ -63,8 +63,8 @@ #include "vtkoutputfields.hh" #include <dumux/assembly/staggeredlocalresidual.hh> -#include <dumux/material/fluidsystems/gasphase.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pgas.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/fluidstates/compositional.hh> diff --git a/dumux/material/components/brine.hh b/dumux/material/components/brine.hh index 9080d0cf1b56c4f593588415b1b394d499f3874d..903c23dd46ccf9863af6f55c3d53106d97064322 100644 --- a/dumux/material/components/brine.hh +++ b/dumux/material/components/brine.hh @@ -45,11 +45,11 @@ namespace Components { * \tparam H2O Static polymorphism: the Brine class can access all properties of the H2O class */ template <class Scalar, - class H2O_Tabulated = TabulatedComponent<Scalar, H2O<Scalar>>> + class H2O_Tabulated = TabulatedComponent<H2O<Scalar>>> class Brine : public Component<Scalar, Brine<Scalar, H2O_Tabulated> > { public: - using H2O = TabulatedComponent<Scalar, Dumux::H2O<Scalar>>; + using H2O = TabulatedComponent<Dumux::H2O<Scalar>>; //HACK: If salinity is a pseudo-component, a constat value is used static Scalar constantSalinity; @@ -396,7 +396,7 @@ Scalar Brine<Scalar, H2O>::constantSalinity = 0.1; } // end namespace Components -template <class Scalar, class H2O = TabulatedComponent<Scalar, H2O<Scalar>>> +template <class Scalar, class H2O = TabulatedComponent<H2O<Scalar>>> using Brine DUNE_DEPRECATED_MSG("Now in the namespace: Components") = Dumux::Components::Brine<Scalar, H2O>; } // end namespace Dumux diff --git a/dumux/material/components/tabulatedcomponent.hh b/dumux/material/components/tabulatedcomponent.hh index 85f4468579441ff90dbd40dc0e7b04f041406093..d4d04ae850c3c04445059c5364879059ca72a7c7 100644 --- a/dumux/material/components/tabulatedcomponent.hh +++ b/dumux/material/components/tabulatedcomponent.hh @@ -34,11 +34,33 @@ #include <vector> #include <iostream> -#include <dumux/common/exceptions.hh> - #include <dune/common/deprecated.hh> +#include <dumux/common/exceptions.hh> +#include <dumux/material/components/componenttraits.hh> namespace Dumux { +namespace Components { +// forward declaration +template<class RawComponent, bool useVaporPressure> +class TabulatedComponent; +} // end namespace Components + +//! component traits for tabulated component +template<class RawComponent, bool useVaporPressure> +struct ComponentTraits<Components::TabulatedComponent<RawComponent, useVaporPressure>> +{ + using Scalar = typename RawComponent::Scalar; + + //! if the component implements a solid state + static constexpr bool hasSolidState = std::is_base_of<Components::Solid<Scalar, RawComponent>, RawComponent>::value; + + //! if the component implements a liquid state + static constexpr bool hasLiquidState = std::is_base_of<Components::Liquid<Scalar, RawComponent>, RawComponent>::value; + + //! if the component implements a gaseous state + static constexpr bool hasGasState = std::is_base_of<Components::Gas<Scalar, RawComponent>, RawComponent>::value; +}; + namespace Components { /*! @@ -55,11 +77,15 @@ namespace Components { * values for gas&liquid phase will be set * depending on the vapor pressure. */ -template <class Scalar, class RawComponent, bool useVaporPressure=true> +template <class RawComponent, bool useVaporPressure = true> class TabulatedComponent { public: - static const bool isTabulated = true; + //! export scalar type + using Scalar = typename RawComponent::Scalar; + + //! state that we are tabulated + static constexpr bool isTabulated = true; /*! * \brief Initialize the tables. @@ -613,7 +639,7 @@ private: * \param values container to store property values */ template<class PropFunc, class MinPFunc, class MaxPFunc> - static void initTPArray_(PropFunc&& f, MinPFunc&& minP, MaxPFunc&& maxP, std::vector<Scalar>& values) + static void initTPArray_(PropFunc&& f, MinPFunc&& minP, MaxPFunc&& maxP, std::vector<typename RawComponent::Scalar>& values) { for (unsigned iT = 0; iT < nTemp_; ++ iT) { @@ -648,8 +674,8 @@ private: static void initMinMaxRhoArray_(RhoFunc&& rho, MinPFunc&& minP, MaxPFunc&& maxP, - std::vector<Scalar>& rhoMin, - std::vector<Scalar>& rhoMax) + std::vector<typename RawComponent::Scalar>& rhoMin, + std::vector<typename RawComponent::Scalar>& rhoMax) { for (unsigned iT = 0; iT < nTemp_; ++ iT) { @@ -674,9 +700,9 @@ private: * \param rhoMax container with maximum density values */ template<class PFunc> - static void initPressureArray_(std::vector<Scalar>& pressure, PFunc&& p, - const std::vector<Scalar>& rhoMin, - const std::vector<Scalar>& rhoMax) + static void initPressureArray_(std::vector<typename RawComponent::Scalar>& pressure, PFunc&& p, + const std::vector<typename RawComponent::Scalar>& rhoMin, + const std::vector<typename RawComponent::Scalar>& rhoMax) { for (unsigned iT = 0; iT < nTemp_; ++ iT) { @@ -693,7 +719,7 @@ private: } //! returns an interpolated value depending on temperature - static Scalar interpolateT_(const std::vector<Scalar>& values, Scalar T) + static Scalar interpolateT_(const std::vector<typename RawComponent::Scalar>& values, Scalar T) { Scalar alphaT = tempIdx_(T); if (alphaT < 0 || alphaT >= nTemp_ - 1) @@ -708,7 +734,7 @@ private: //! returns an interpolated value depending on temperature and pressure template<class GetPIdx, class MinPFunc, class MaxPFunc> - static Scalar interpolateTP_(const std::vector<Scalar>& values, Scalar T, Scalar p, + static Scalar interpolateTP_(const std::vector<typename RawComponent::Scalar>& values, Scalar T, Scalar p, GetPIdx&& getPIdx, MinPFunc&& minP, MaxPFunc&& maxP, const std::string& phaseName) { @@ -749,7 +775,7 @@ private: //! returns an interpolated value for gas depending on temperature and density template<class GetRhoIdx> - static Scalar interpolateTRho_(const std::vector<Scalar>& values, Scalar T, Scalar rho, GetRhoIdx&& rhoIdx) + static Scalar interpolateTRho_(const std::vector<typename RawComponent::Scalar>& values, Scalar T, Scalar rho, GetRhoIdx&& rhoIdx) { using std::min; using std::max; @@ -858,45 +884,45 @@ private: #endif // 1D fields with the temperature as degree of freedom - static std::vector<Scalar> vaporPressure_; + static std::vector<typename RawComponent::Scalar> vaporPressure_; - static std::vector<Scalar> minLiquidDensity_; - static std::vector<Scalar> maxLiquidDensity_; + static std::vector<typename RawComponent::Scalar> minLiquidDensity_; + static std::vector<typename RawComponent::Scalar> maxLiquidDensity_; static bool minMaxLiquidDensityInitialized_; - static std::vector<Scalar> minGasDensity_; - static std::vector<Scalar> maxGasDensity_; + static std::vector<typename RawComponent::Scalar> minGasDensity_; + static std::vector<typename RawComponent::Scalar> maxGasDensity_; static bool minMaxGasDensityInitialized_; // 2D fields with the temperature and pressure as degrees of freedom - static std::vector<Scalar> gasEnthalpy_; - static std::vector<Scalar> liquidEnthalpy_; + static std::vector<typename RawComponent::Scalar> gasEnthalpy_; + static std::vector<typename RawComponent::Scalar> liquidEnthalpy_; static bool gasEnthalpyInitialized_; static bool liquidEnthalpyInitialized_; - static std::vector<Scalar> gasHeatCapacity_; - static std::vector<Scalar> liquidHeatCapacity_; + static std::vector<typename RawComponent::Scalar> gasHeatCapacity_; + static std::vector<typename RawComponent::Scalar> liquidHeatCapacity_; static bool gasHeatCapacityInitialized_; static bool liquidHeatCapacityInitialized_; - static std::vector<Scalar> gasDensity_; - static std::vector<Scalar> liquidDensity_; + static std::vector<typename RawComponent::Scalar> gasDensity_; + static std::vector<typename RawComponent::Scalar> liquidDensity_; static bool gasDensityInitialized_; static bool liquidDensityInitialized_; - static std::vector<Scalar> gasViscosity_; - static std::vector<Scalar> liquidViscosity_; + static std::vector<typename RawComponent::Scalar> gasViscosity_; + static std::vector<typename RawComponent::Scalar> liquidViscosity_; static bool gasViscosityInitialized_; static bool liquidViscosityInitialized_; - static std::vector<Scalar> gasThermalConductivity_; - static std::vector<Scalar> liquidThermalConductivity_; + static std::vector<typename RawComponent::Scalar> gasThermalConductivity_; + static std::vector<typename RawComponent::Scalar> liquidThermalConductivity_; static bool gasThermalConductivityInitialized_; static bool liquidThermalConductivityInitialized_; // 2D fields with the temperature and density as degrees of freedom - static std::vector<Scalar> gasPressure_; - static std::vector<Scalar> liquidPressure_; + static std::vector<typename RawComponent::Scalar> gasPressure_; + static std::vector<typename RawComponent::Scalar> liquidPressure_; static bool gasPressureInitialized_; static bool liquidPressureInitialized_; @@ -915,99 +941,99 @@ private: }; #ifndef NDEBUG -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::initialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::initialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::warningPrinted_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::warningPrinted_ = false; #endif -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::minMaxLiquidDensityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::minMaxGasDensityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasEnthalpyInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidEnthalpyInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasHeatCapacityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidHeatCapacityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasDensityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidDensityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasViscosityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidViscosityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasThermalConductivityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidThermalConductivityInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasPressureInitialized_ = false; -template <class Scalar, class RawComponent, bool useVaporPressure> -bool TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidPressureInitialized_ = false; - -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::vaporPressure_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::minLiquidDensity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::maxLiquidDensity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::minGasDensity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::maxGasDensity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasEnthalpy_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidEnthalpy_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasHeatCapacity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidHeatCapacity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasDensity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidDensity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasViscosity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidViscosity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasThermalConductivity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidThermalConductivity_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasPressure_; -template <class Scalar, class RawComponent, bool useVaporPressure> -std::vector<Scalar> TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidPressure_; -template <class Scalar, class RawComponent, bool useVaporPressure> -Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::tempMin_; -template <class Scalar, class RawComponent, bool useVaporPressure> -Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::tempMax_; -template <class Scalar, class RawComponent, bool useVaporPressure> -unsigned TabulatedComponent<Scalar, RawComponent, useVaporPressure>::nTemp_; -template <class Scalar, class RawComponent, bool useVaporPressure> -Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::pressMin_; -template <class Scalar, class RawComponent, bool useVaporPressure> -Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::pressMax_; -template <class Scalar, class RawComponent, bool useVaporPressure> -unsigned TabulatedComponent<Scalar, RawComponent, useVaporPressure>::nPress_; -template <class Scalar, class RawComponent, bool useVaporPressure> -Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::densityMin_; -template <class Scalar, class RawComponent, bool useVaporPressure> -Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::densityMax_; -template <class Scalar, class RawComponent, bool useVaporPressure> -unsigned TabulatedComponent<Scalar, RawComponent, useVaporPressure>::nDensity_; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::minMaxLiquidDensityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::minMaxGasDensityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::gasEnthalpyInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::liquidEnthalpyInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::gasHeatCapacityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::liquidHeatCapacityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::gasDensityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::liquidDensityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::gasViscosityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::liquidViscosityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::gasThermalConductivityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::liquidThermalConductivityInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::gasPressureInitialized_ = false; +template <class RawComponent, bool useVaporPressure> +bool TabulatedComponent<RawComponent, useVaporPressure>::liquidPressureInitialized_ = false; + +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::vaporPressure_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::minLiquidDensity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::maxLiquidDensity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::minGasDensity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::maxGasDensity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::gasEnthalpy_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::liquidEnthalpy_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::gasHeatCapacity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::liquidHeatCapacity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::gasDensity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::liquidDensity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::gasViscosity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::liquidViscosity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::gasThermalConductivity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::liquidThermalConductivity_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::gasPressure_; +template <class RawComponent, bool useVaporPressure> +std::vector<typename RawComponent::Scalar> TabulatedComponent<RawComponent, useVaporPressure>::liquidPressure_; +template <class RawComponent, bool useVaporPressure> +typename RawComponent::Scalar TabulatedComponent<RawComponent, useVaporPressure>::tempMin_; +template <class RawComponent, bool useVaporPressure> +typename RawComponent::Scalar TabulatedComponent<RawComponent, useVaporPressure>::tempMax_; +template <class RawComponent, bool useVaporPressure> +unsigned TabulatedComponent<RawComponent, useVaporPressure>::nTemp_; +template <class RawComponent, bool useVaporPressure> +typename RawComponent::Scalar TabulatedComponent<RawComponent, useVaporPressure>::pressMin_; +template <class RawComponent, bool useVaporPressure> +typename RawComponent::Scalar TabulatedComponent<RawComponent, useVaporPressure>::pressMax_; +template <class RawComponent, bool useVaporPressure> +unsigned TabulatedComponent<RawComponent, useVaporPressure>::nPress_; +template <class RawComponent, bool useVaporPressure> +typename RawComponent::Scalar TabulatedComponent<RawComponent, useVaporPressure>::densityMin_; +template <class RawComponent, bool useVaporPressure> +typename RawComponent::Scalar TabulatedComponent<RawComponent, useVaporPressure>::densityMax_; +template <class RawComponent, bool useVaporPressure> +unsigned TabulatedComponent<RawComponent, useVaporPressure>::nDensity_; } // end namespace Components -template <class Scalar, class RawComponent, bool useVaporPressure=true> -using TabulatedComponent DUNE_DEPRECATED_MSG("Now in the namespace: Components") = Dumux::Components::TabulatedComponent<Scalar, RawComponent, useVaporPressure>; +template <class RawComponent, bool useVaporPressure=true> +using TabulatedComponent DUNE_DEPRECATED_MSG("Now in the namespace: Components") = Dumux::Components::TabulatedComponent<RawComponent, useVaporPressure>; } // end namespace Dumux diff --git a/dumux/material/fluidsystems/gasphase.hh b/dumux/material/fluidsystems/1pgas.hh similarity index 96% rename from dumux/material/fluidsystems/gasphase.hh rename to dumux/material/fluidsystems/1pgas.hh index a7d41e98333bf8e9d395de9891918f230ee4f82e..57425a911109529f4653a1d5cae0bd48182a7cdd 100644 --- a/dumux/material/fluidsystems/gasphase.hh +++ b/dumux/material/fluidsystems/1pgas.hh @@ -19,7 +19,7 @@ /*! * \file * \ingroup Fluidsystems - * \brief @copybrief Dumux::FluidSystems::GasPhase + * \brief @copybrief Dumux::FluidSystems::OnePGas */ #ifndef DUMUX_GAS_PHASE_HH #define DUMUX_GAS_PHASE_HH @@ -30,6 +30,7 @@ #include <dune/common/exceptions.hh> #include <dumux/material/fluidsystems/base.hh> +#include <dumux/material/components/componenttraits.hh> namespace Dumux { @@ -42,12 +43,14 @@ namespace FluidSystems * \brief A gaseous phase consisting of a single component */ template <class Scalar, class ComponentT> -class GasPhase -: public BaseFluidSystem<Scalar, GasPhase<Scalar, ComponentT> > +class OnePGas +: public BaseFluidSystem<Scalar, OnePGas<Scalar, ComponentT> > { - using ThisType = GasPhase<Scalar, ComponentT>; + using ThisType = OnePGas<Scalar, ComponentT>; using Base = BaseFluidSystem<Scalar, ThisType>; + static_assert(ComponentTraits<ComponentT>::hasGasState, "The component does not implement a gas state!"); + public: using Component = ComponentT; using ParameterCache = NullParameterCache; @@ -86,6 +89,12 @@ public: static std::string name() { return Component::name(); } + /*! + * \brief There is only one phase, so not mass transfer between phases can occur + */ + static constexpr bool isMiscible() + { return false; } + /*! * \brief Returns whether the fluid is a liquid */ diff --git a/dumux/material/fluidsystems/liquidphase.hh b/dumux/material/fluidsystems/1pliquid.hh similarity index 95% rename from dumux/material/fluidsystems/liquidphase.hh rename to dumux/material/fluidsystems/1pliquid.hh index 6d3d99b17b70be2aabc0307461b3475f9ff52688..96fa18d53ddaaa353246360143bd0b369b17930b 100644 --- a/dumux/material/fluidsystems/liquidphase.hh +++ b/dumux/material/fluidsystems/1pliquid.hh @@ -19,7 +19,7 @@ /*! * \file * \ingroup Fluidsystems - * \brief @copybrief Dumux::FluidSystems::LiquidPhase + * \brief @copybrief Dumux::FluidSystems::OnePLiquid */ #ifndef DUMUX_LIQUID_PHASE_HH #define DUMUX_LIQUID_PHASE_HH @@ -30,6 +30,7 @@ #include <dune/common/exceptions.hh> #include <dumux/material/fluidsystems/base.hh> +#include <dumux/material/components/componenttraits.hh> namespace Dumux { @@ -41,12 +42,14 @@ namespace FluidSystems * \brief A liquid phase consisting of a single component */ template <class Scalar, class ComponentT> -class LiquidPhase -: public BaseFluidSystem<Scalar, LiquidPhase<Scalar, ComponentT> > +class OnePLiquid +: public BaseFluidSystem<Scalar, OnePLiquid<Scalar, ComponentT> > { - using ThisType = LiquidPhase<Scalar, ComponentT>; + using ThisType = OnePLiquid<Scalar, ComponentT>; using Base = BaseFluidSystem<Scalar, ThisType>; + static_assert(ComponentTraits<ComponentT>::hasLiquidState, "The component does not implement a liquid state!"); + public: using Component = ComponentT; using ParameterCache = NullParameterCache; @@ -85,6 +88,12 @@ public: static std::string name() { return Component::name(); } + /*! + * \brief There is only one phase, so not mass transfer between phases can occur + */ + static constexpr bool isMiscible() + { return false; } + /*! * \brief Returns whether the fluid is a liquid */ diff --git a/dumux/material/fluidsystems/2pliquidvapor.hh b/dumux/material/fluidsystems/2p1c.hh similarity index 93% rename from dumux/material/fluidsystems/2pliquidvapor.hh rename to dumux/material/fluidsystems/2p1c.hh index d386fc542ff1faf579654be5a04dff099a6e8a6c..2dbda768b069ea59c9599a6799ad804e9a9be3a0 100644 --- a/dumux/material/fluidsystems/2pliquidvapor.hh +++ b/dumux/material/fluidsystems/2p1c.hh @@ -19,10 +19,10 @@ /*! * \file * \ingroup Fluidsystems - * \brief @copybrief Dumux::FluidSystems::TwoPLiquidVaporFluidsystem + * \brief @copybrief Dumux::FluidSystems::TwoPOneC */ -#ifndef DUMUX_2P_LIQUID_VAPOR_FLUID_SYSTEM_HH -#define DUMUX_2P_LIQUID_VAPOR_FLUID_SYSTEM_HH +#ifndef DUMUX_2P_1C_FLUID_SYSTEM_HH +#define DUMUX_2P_1C_FLUID_SYSTEM_HH #include <limits> #include <cassert> @@ -30,8 +30,8 @@ #include <dune/common/exceptions.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> -#include <dumux/material/fluidsystems/gasphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> +#include <dumux/material/fluidsystems/1pgas.hh> #include <dumux/material/fluidstates/compositional.hh> #include "base.hh" @@ -43,10 +43,10 @@ namespace FluidSystems { * \brief A two-phase fluid system with only one component. */ template <class Scalar, class ComponentType> -class TwoPLiquidVaporFluidsystem - : public BaseFluidSystem<Scalar, TwoPLiquidVaporFluidsystem<Scalar, ComponentType> > +class TwoPOneC + : public BaseFluidSystem<Scalar, TwoPOneC<Scalar, ComponentType> > { - using ThisType = TwoPLiquidVaporFluidsystem<Scalar, ComponentType>; + using ThisType = TwoPOneC<Scalar, ComponentType>; using Base = BaseFluidSystem<Scalar, ThisType>; using Component = ComponentType; @@ -78,6 +78,12 @@ public: return name[phaseIdx]; } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return false; } + /*! * \brief Return whether a phase is liquid * @@ -86,7 +92,7 @@ public: static bool isLiquid(int phaseIdx) { assert(0 <= phaseIdx && phaseIdx < numPhases); - return phaseIdx != nPhaseIdx; + return phaseIdx == wPhaseIdx; } /*! @@ -157,7 +163,6 @@ public: static constexpr int ComponentIdx = 0; - /*! * \brief Return the human readable name of a component * @@ -165,12 +170,8 @@ public: */ static std::string componentName(int compIdx) { - static std::string name[] = { - Component::name() - }; - assert(0 <= compIdx && compIdx < numComponents); - return name[compIdx]; + return Component::name(); } /*! @@ -180,12 +181,8 @@ public: */ static Scalar molarMass(int compIdx) { - static const Scalar M[] = { - Component::molarMass() - }; - assert(0 <= compIdx && compIdx < numComponents); - return M[compIdx]; + return Component::molarMass(); } /*! @@ -195,12 +192,8 @@ public: */ static Scalar criticalTemperature(int compIdx) { - static const Scalar Tcrit[] = { - Component::criticalTemperature() - }; - assert(0 <= compIdx && compIdx < numComponents); - return Tcrit[compIdx]; + return Component::criticalTemperature(); } /*! @@ -210,12 +203,8 @@ public: */ static Scalar criticalPressure(int compIdx) { - static const Scalar pcrit[] = { - Component::criticalPressure() - }; - assert(0 <= compIdx && compIdx < numComponents); - return pcrit[compIdx]; + return Component::criticalPressure(); } /*! @@ -226,7 +215,7 @@ public: static Scalar criticalMolarVolume(int compIdx) { DUNE_THROW(Dune::NotImplemented, - "TwoPLiquidVaporFluidsystem::criticalMolarVolume()"); + "TwoPOneC::criticalMolarVolume()"); return 0; } @@ -237,12 +226,8 @@ public: */ static Scalar acentricFactor(int compIdx) { - static const Scalar accFac[] = { - Component::acentricFactor(), // H2O (from Reid, et al.) - }; - assert(0 <= compIdx && compIdx < numComponents); - return accFac[compIdx]; + return Component::acentricFactor(); } /**************************************** @@ -358,7 +343,7 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); Scalar pressure = fluidState.pressure(nPhaseIdx) ; - return Component::vaporTemperature( pressure ) ; + return Component::vaporTemperature(pressure) ; } /*! @@ -402,17 +387,12 @@ public: // liquid phase if (phaseIdx == wPhaseIdx) - { return Component::vaporPressure(T)/p; - } // for the gas phase, assume an ideal gas when it comes to // fugacity (-> fugacity == partial pressure) else - { return 1.0; - - } } diff --git a/dumux/material/fluidsystems/2pimmiscible.hh b/dumux/material/fluidsystems/2pimmiscible.hh index 9673242e13e371fcf0df6d397026fd6e0061a2bc..c6e1f7501a197fca187ab26eb857f880eac88de2 100644 --- a/dumux/material/fluidsystems/2pimmiscible.hh +++ b/dumux/material/fluidsystems/2pimmiscible.hh @@ -29,8 +29,8 @@ #include <dune/common/exceptions.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> -#include <dumux/material/fluidsystems/gasphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> +#include <dumux/material/fluidsystems/1pgas.hh> #include <dumux/material/fluidstates/immiscible.hh> #include "base.hh" @@ -45,19 +45,24 @@ namespace FluidSystems { * * The fluid phases are completely specified by means of their * constituting components. - * 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 + * The wetting and the non-wetting fluids can be defined individually + * via FluidSystem::OnePLiquid<Scalar, Component> and + * FluidSystem::OnePGas<Scalar, Component>. These fluids consist of one pure * 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>) + * \tparam WettingFluid the wetting phase fluid system (use FluidSystem::OnePLiquid<Scalar, Component> / FluidSystem::OnePGas<Scalar, Component>) + * \tparam NonwettingFluid the wetting phase fluid system (use FluidSystem::OnePLiquid<Scalar, Component> / FluidSystem::OnePGas<Scalar, Component>) */ -template <class Scalar, class WettingPhase, class NonwettingPhase> +template <class Scalar, class WettingFluid, class NonwettingFluid> class TwoPImmiscible -: public BaseFluidSystem<Scalar, TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase> > +: public BaseFluidSystem<Scalar, TwoPImmiscible<Scalar, WettingFluid, NonwettingFluid> > { - using ThisType = TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; + static_assert((WettingFluid::numPhases == 1), "WettingFluid has more than one phase"); + static_assert((NonwettingFluid::numPhases == 1), "NonwettingFluid has more than one phase"); + static_assert((WettingFluid::numComponents == 1), "WettingFluid has more than one component"); + static_assert((NonwettingFluid::numComponents == 1), "NonwettingFluid has more than one component"); + + using ThisType = TwoPImmiscible<Scalar, WettingFluid, NonwettingFluid>; using Base = BaseFluidSystem<Scalar, ThisType>; public: /**************************************** @@ -87,6 +92,12 @@ public: return name[phaseIdx]; } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return false; } + /*! * \brief Return whether a phase is liquid * \param phaseIdx The index of the fluid phase to consider @@ -96,8 +107,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); if (phaseIdx == wPhaseIdx) - return WettingPhase::isLiquid(); - return NonwettingPhase::isLiquid(); + return WettingFluid::isLiquid(); + return NonwettingFluid::isLiquid(); } /*! @@ -136,8 +147,8 @@ public: // let the fluids decide if (phaseIdx == wPhaseIdx) - return WettingPhase::isCompressible(); - return NonwettingPhase::isCompressible(); + return WettingFluid::isCompressible(); + return NonwettingFluid::isCompressible(); } /*! @@ -152,8 +163,8 @@ public: // let the fluids decide if (phaseIdx == wPhaseIdx) - return WettingPhase::isIdealGas(); - return NonwettingPhase::isIdealGas(); + return WettingFluid::isIdealGas(); + return NonwettingFluid::isIdealGas(); } /**************************************** @@ -178,8 +189,8 @@ public: assert(0 <= compIdx && compIdx < numComponents); if (compIdx == wCompIdx) - return WettingPhase::name(); - return NonwettingPhase::name(); + return WettingFluid::name(); + return NonwettingFluid::name(); } /*! @@ -191,8 +202,8 @@ public: assert(0 <= compIdx && compIdx < numComponents); if (compIdx == wCompIdx) - return WettingPhase::molarMass(); - return NonwettingPhase::molarMass(); + return WettingFluid::molarMass(); + return NonwettingFluid::molarMass(); } /*! @@ -204,8 +215,8 @@ public: assert(0 <= compIdx && compIdx < numComponents); if (compIdx == wCompIdx) - return WettingPhase::criticalTemperature(); - return NonwettingPhase::criticalTemperature(); + return WettingFluid::criticalTemperature(); + return NonwettingFluid::criticalTemperature(); } /*! @@ -217,8 +228,8 @@ public: assert(0 <= compIdx && compIdx < numComponents); if (compIdx == wCompIdx) - return WettingPhase::criticalPressure(); - return NonwettingPhase::criticalPressure(); + return WettingFluid::criticalPressure(); + return NonwettingFluid::criticalPressure(); } /*! @@ -230,8 +241,8 @@ public: assert(0 <= compIdx && compIdx < numComponents); if (compIdx == wCompIdx) - return WettingPhase::acentricFactor(); - return NonwettingPhase::acentricFactor(); + return WettingFluid::acentricFactor(); + return NonwettingFluid::acentricFactor(); } /**************************************** @@ -245,7 +256,7 @@ public: { // two gaseous phases at once do not make sense physically! // (But two liquids are fine) - assert(WettingPhase::isLiquid() || NonwettingPhase::isLiquid()); + assert(WettingFluid::isLiquid() || NonwettingFluid::isLiquid()); } using Base::density; @@ -262,8 +273,8 @@ public: Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) - return WettingPhase::density(temperature, pressure); - return NonwettingPhase::density(temperature, pressure); + return WettingFluid::density(temperature, pressure); + return NonwettingFluid::density(temperature, pressure); } using Base::viscosity; @@ -281,8 +292,8 @@ public: Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) - return WettingPhase::viscosity(temperature, pressure); - return NonwettingPhase::viscosity(temperature, pressure); + return WettingFluid::viscosity(temperature, pressure); + return NonwettingFluid::viscosity(temperature, pressure); } using Base::fugacityCoefficient; @@ -389,8 +400,8 @@ public: Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) - return WettingPhase::enthalpy(temperature, pressure); - return NonwettingPhase::enthalpy(temperature, pressure); + return WettingFluid::enthalpy(temperature, pressure); + return NonwettingFluid::enthalpy(temperature, pressure); } using Base::thermalConductivity; @@ -408,8 +419,8 @@ public: Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) - return WettingPhase::thermalConductivity(temperature, pressure); - return NonwettingPhase::thermalConductivity(temperature, pressure); + return WettingFluid::thermalConductivity(temperature, pressure); + return NonwettingFluid::thermalConductivity(temperature, pressure); } using Base::heatCapacity; @@ -433,8 +444,8 @@ public: Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) - return WettingPhase::heatCapacity(temperature, pressure); - return NonwettingPhase::heatCapacity(temperature, pressure); + return WettingFluid::heatCapacity(temperature, pressure); + return NonwettingFluid::heatCapacity(temperature, pressure); } }; diff --git a/dumux/material/fluidsystems/3pimmiscible.hh b/dumux/material/fluidsystems/3pimmiscible.hh new file mode 100644 index 0000000000000000000000000000000000000000..9a66695f16595f3134f8bd88d0bfbc2a602915f1 --- /dev/null +++ b/dumux/material/fluidsystems/3pimmiscible.hh @@ -0,0 +1,570 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * \ingroup Fluidsystems + * \brief @copybrief Dumux::FluidSystems::ThreePImmiscible + */ +#ifndef DUMUX_3P_IMMISCIBLE_FLUID_SYSTEM_HH +#define DUMUX_3P_IMMISCIBLE_FLUID_SYSTEM_HH + +#include <limits> +#include <cassert> + +#include <dune/common/exceptions.hh> + +#include <dumux/material/fluidsystems/1pliquid.hh> +#include <dumux/material/fluidsystems/1pgas.hh> +#include <dumux/material/fluidstates/immiscible.hh> + +namespace Dumux { +namespace FluidSystems { + +/*! + * \ingroup Fluidsystems + * \brief A fluid system for three-phase models assuming immiscibility and + * thermodynamic equilibrium + * + * The fluid phases are completely specified by means of their + * constituting components. + * The wetting and the non-wetting phase can be defined individually + * via FluidSystem::OnePLiquid<Scalar, Component>. The gas phase can be defined via + * FluidSystems::OnePGas<Scalar, Component> + * These phases consist of one pure component. + * + * \tparam Scalar the scalar type + * \tparam WettingFluid the wetting phase fluid system (use FluidSystem::OnePLiquid<Scalar, Component>) + * \tparam NonwettingFluid the wetting phase fluid system (use FluidSystem::OnePLiquid<Scalar, Component>) + * \tparam Gas the gas phase fluid system (use FluidSystem::OnePGas<Scalar, Component>) + */ +template <class Scalar, class WettingFluid, class NonwettingFluid, class Gas> +class ThreePImmiscible +: public BaseFluidSystem<Scalar, ThreePImmiscible<Scalar, WettingFluid, NonwettingFluid, Gas> > +{ + static_assert((WettingFluid::numPhases == 1), "WettingFluid has more than one phase"); + static_assert((NonwettingFluid::numPhases == 1), "NonwettingFluid has more than one phase"); + static_assert((Gas::numPhases == 1), "Gas has more than one phase"); + static_assert((WettingFluid::numComponents == 1), "WettingFluid has more than one component"); + static_assert((NonwettingFluid::numComponents == 1), "NonwettingFluid has more than one component"); + static_assert((Gas::numComponents == 1), "Gas has more than one component"); + + using ThisType = ThreePImmiscible<Scalar, WettingFluid, NonwettingFluid, Gas>; + using Base = BaseFluidSystem<Scalar, ThisType>; +public: + /**************************************** + * Fluid phase related static parameters + ****************************************/ + + //! Number of phases in the fluid system + static constexpr int numPhases = 3; + + //! Index of the wetting phase + static constexpr int wPhaseIdx = 0; + //! Index of the non-wetting phase + static constexpr int nPhaseIdx = 1; + //! Index of the gas phase + static constexpr int gPhaseIdx = 2; + + /*! + * \brief Return the human readable name of a fluid phase + * \param phaseIdx The index of the fluid phase to consider + */ + static std::string phaseName(int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + static std::string name[] = { + std::string("w"), + std::string("n"), + std::string("g") + }; + return name[phaseIdx]; + } + + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return false; } + + /*! + * \brief Return whether a phase is liquid + * \param phaseIdx The index of the fluid phase to consider + */ + static bool isLiquid(int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + switch(phaseIdx) + { + case wPhaseIdx: return WettingFluid::isLiquid(); break; + case nPhaseIdx: return NonwettingFluid::isLiquid(); break; + case gPhaseIdx: return Gas::isLiquid(); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index"); + } + } + + /*! + * \brief Returns true if and only if a fluid phase is assumed to + * be an ideal mixture. + * \param phaseIdx The index of the fluid phase to consider + * + * We define an ideal mixture as a fluid phase where the fugacity + * coefficients of all components times the pressure of the phase + * are independent on the fluid composition. This assumption is true + * if immiscibility is assumed. If you are unsure what + * this function should return, it is safe to return false. The + * only damage done will be (slightly) increased computation times + * in some cases. + */ + static bool isIdealMixture(int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + // we assume immisibility + return true; + } + + /*! + * \brief Returns true if and only if a fluid phase is assumed to + * be compressible. + * + * Compressible means. that the partial derivative of the density + * to the fluid pressure is always larger than zero. + * + * \param phaseIdx The index of the fluid phase to consider + */ + static constexpr bool isCompressible(int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + // let the fluids decide + switch(phaseIdx) + { + case wPhaseIdx: return WettingFluid::isCompressible(); break; + case nPhaseIdx: return NonwettingFluid::isCompressible(); break; + case gPhaseIdx: return Gas::isCompressible(); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index"); + } + } + + /*! + * \brief Returns true if and only if a fluid phase is assumed to + * be an ideal gas. + * + * \param phaseIdx The index of the fluid phase to consider + */ + static bool isIdealGas(int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + // let the fluids decide + switch(phaseIdx) + { + case wPhaseIdx: return WettingFluid::isIdealGas(); break; + case nPhaseIdx: return NonwettingFluid::isIdealGas(); break; + case gPhaseIdx: return Gas::isIdealGas(); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index"); + } + } + + /**************************************** + * Component related static parameters + ****************************************/ + + //! Number of components in the fluid system + static constexpr int numComponents = 3;//WettingFluid::numComponents + NonwettingFluid::numComponents + Gas::numComponents; // TODO: 3?? + + //! Index of the wetting phase's component + static constexpr int wCompIdx = 0; + //! Index of the non-wetting phase's component + static constexpr int nCompIdx = 1; + //! Index of the gas phase's component + static constexpr int gCompIdx = 2; // TODO: correct?? + + /*! + * \brief Return the human readable name of a component + * + * \param compIdx index of the component + */ + static std::string componentName(int compIdx) + { + assert(0 <= compIdx && compIdx < numComponents); + + switch(compIdx) + { + case wCompIdx: return WettingFluid::name(); break; + case nCompIdx: return NonwettingFluid::name(); break; + case gCompIdx: return Gas::name(); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid component index"); + } + } + + /*! + * \brief Return the molar mass of a component in \f$\mathrm{[kg/mol]}\f$. + * \param compIdx index of the component + */ + static Scalar molarMass(int compIdx) + { + assert(0 <= compIdx && compIdx < numComponents); + + switch(compIdx) + { + case wCompIdx: return WettingFluid::molarMass(); break; + case nCompIdx: return NonwettingFluid::molarMass(); break; + case gCompIdx: return Gas::molarMass(); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid component index"); + } + } + + /*! + * \brief Critical temperature of a component \f$\mathrm{[K]}\f$. + * \param compIdx index of the component + */ + static Scalar criticalTemperature(int compIdx) + { + assert(0 <= compIdx && compIdx < numComponents); + + switch(compIdx) + { + case wCompIdx: return WettingFluid::criticalTemperature(); break; + case nCompIdx: return NonwettingFluid::criticalTemperature(); break; + case gCompIdx: return Gas::criticalTemperature(); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid component index"); + } + } + + /*! + * \brief Critical pressure of a component \f$\mathrm{[Pa]}\f$. + * \param compIdx index of the component + */ + static Scalar criticalPressure(int compIdx) + { + assert(0 <= compIdx && compIdx < numComponents); + + switch(compIdx) + { + case wCompIdx: return WettingFluid::criticalPressure(); break; + case nCompIdx: return NonwettingFluid::criticalPressure(); break; + case gCompIdx: return Gas::criticalPressure(); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid component index"); + } + } + + /*! + * \brief The acentric factor of a component \f$\mathrm{[-]}\f$. + * \param compIdx index of the component + */ + static Scalar acentricFactor(int compIdx) + { + assert(0 <= compIdx && compIdx < numComponents); + + switch(compIdx) + { + case wCompIdx: return WettingFluid::Component::acentricFactor(); break; + case nCompIdx: return NonwettingFluid::Component::acentricFactor(); break; + case gCompIdx: return Gas::Component::acentricFactor(); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid component index"); + } + } + + /**************************************** + * thermodynamic relations + ****************************************/ + + /*! + * \brief Initialize the fluid system's static parameters + */ + static void init() + { + // two gaseous phases at once do not make sense physically! + // (But two liquids are fine) + assert(WettingFluid::isLiquid() && NonwettingFluid::isLiquid() && !Gas::isLiquid()); + } + + /*! + * \brief Initialize the fluid system's static parameters using + * problem specific temperature and pressure ranges + * + * \param tempMin The minimum temperature used for tabulation of water \f$\mathrm{[K]}\f$ + * \param tempMax The maximum temperature used for tabulation of water \f$\mathrm{[K]}\f$ + * \param nTemp The number of ticks on the temperature axis of the table of water + * \param pressMin The minimum pressure used for tabulation of water \f$\mathrm{[Pa]}\f$ + * \param pressMax The maximum pressure used for tabulation of water \f$\mathrm{[Pa]}\f$ + * \param nPress The number of ticks on the pressure axis of the table of water + */ + static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp, + Scalar pressMin, Scalar pressMax, unsigned nPress) + { + // two gaseous phases at once do not make sense physically! + assert(WettingFluid::isLiquid() && NonwettingFluid::isLiquid() && !Gas::isLiquid()); + + if(WettingFluid::Component::isTabulated) + { + std::cout << "Initializing tables for the wetting fluid properties (" + << nTemp*nPress + << " entries).\n"; + + WettingFluid::Component::init(tempMin, tempMax, nTemp, + pressMin, pressMax, nPress); + + } + + if(NonwettingFluid::Component::isTabulated) + { + std::cout << "Initializing tables for the non-wetting fluid properties (" + << nTemp*nPress + << " entries).\n"; + + NonwettingFluid::Component::init(tempMin, tempMax, nTemp, + pressMin, pressMax, nPress); + + } + + if(Gas::Component::isTabulated) + { + std::cout << "Initializing tables for the gas fluid properties (" + << nTemp*nPress + << " entries).\n"; + + Gas::Component::init(tempMin, tempMax, nTemp, + pressMin, pressMax, nPress); + + } + } + + using Base::density; + /*! + * \brief Calculate the density \f$\mathrm{[kg/m^3]}\f$ of a fluid phase + * + */ + template <class FluidState> + static Scalar density(const FluidState &fluidState, + int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + Scalar temperature = fluidState.temperature(phaseIdx); + Scalar pressure = fluidState.pressure(phaseIdx); + + switch(phaseIdx) + { + case wPhaseIdx: return WettingFluid::density(temperature, pressure); break; + case nPhaseIdx: return NonwettingFluid::density(temperature, pressure); break; + case gPhaseIdx: return Gas::density(temperature, pressure); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index"); + } + } + + using Base::viscosity; + /*! + * \brief Return the viscosity of a phase \f$\mathrm{[Pa*s]}\f$. + * \param fluidState The fluid state of the two-phase model + * \param phaseIdx Index of the fluid phase + */ + template <class FluidState> + static Scalar viscosity(const FluidState &fluidState, + int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + Scalar temperature = fluidState.temperature(phaseIdx); + Scalar pressure = fluidState.pressure(phaseIdx); + + switch(phaseIdx) + { + case wPhaseIdx: return WettingFluid::viscosity(temperature, pressure); break; + case nPhaseIdx: return NonwettingFluid::viscosity(temperature, pressure); break; + case gPhaseIdx: return Gas::viscosity(temperature, pressure); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index"); + } + } + + using Base::fugacityCoefficient; + /*! + * \brief Calculate the fugacity coefficient \f$\mathrm{[-]}\f$ of an individual + * component in a fluid phase + * + * The fugacity coefficient \f$\mathrm{\phi^\kappa_\alpha}\f$ is connected to the + * fugacity \f$\mathrm{f^\kappa_\alpha}\f$ and the component's mole + * fraction \f$\mathrm{x^\kappa_\alpha}\f$ by means of the relation + * + * \f[ + f^\kappa_\alpha = \phi^\kappa_\alpha\;x^\kappa_\alpha\;p_\alpha + * \f] + * + * \param fluidState The fluid state of the two-phase model + * \param phaseIdx Index of the fluid phase + * \param compIdx index of the component + */ + template <class FluidState> + static Scalar fugacityCoefficient(const FluidState &fluidState, + int phaseIdx, + int compIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + assert(0 <= compIdx && compIdx < numComponents); + + if (phaseIdx == compIdx) + // We could calculate the real fugacity coefficient of + // the component in the fluid. Probably that's not worth + // the effort, since the fugacity coefficient of the other + // component is infinite anyway... + return 1.0; + return std::numeric_limits<Scalar>::infinity(); + } + + // using Base::diffusionCoefficient; + /*! + * \brief Calculate the binary molecular diffusion coefficient for + * a component in a fluid phase \f$\mathrm{[mol^2 * s / (kg*m^3)]}\f$ + * \param fluidState The fluid state of the two-phase model + * \param phaseIdx Index of the fluid phase + * \param compIdx index of the component + * + * Molecular diffusion of a compoent \f$\mathrm{\kappa}\f$ is caused by a + * gradient of the chemical potential and follows the law + * + * \f[ J = - D \mathbf{grad} \mu_\kappa \f] + * + * where \f$\mathrm{\mu_\kappa]}\f$ is the component's chemical potential, + * \f$\mathrm{D}\f$ is the diffusion coefficient and \f$\mathrm{J}\f$ is the + * diffusive flux. \f$\mathrm{\mu_\kappa}\f$ is connected to the component's + * fugacity \f$\mathrm{f_\kappa}\f$ by the relation + * + * \f[ \mu_\kappa = R T_\alpha \mathrm{ln} \frac{f_\kappa}{p_\alpha} \f] + * + * where \f$\mathrm{p_\alpha}\f$ and \f$\mathrm{T_\alpha}\f$ are the fluid phase' + * pressure and temperature. + */ + template <class FluidState> + static Scalar diffusionCoefficient(const FluidState &fluidState, + int phaseIdx, + int compIdx) + { + DUNE_THROW(Dune::InvalidStateException, + "Diffusion coefficients of components are meaningless if" + " immiscibility is assumed"); + } + + using Base::binaryDiffusionCoefficient; + /*! + * \brief Given a phase's composition, temperature and pressure, + * return the binary diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for components + * \f$\mathrm{i}\f$ and \f$\mathrm{j}\f$ in this phase. + * \param fluidState The fluid state of the two-phase model + * \param phaseIdx Index of the fluid phase + * \param compIIdx index of the component i + * \param compJIdx index of the component j + */ + template <class FluidState> + static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, + int phaseIdx, + int compIIdx, + int compJIdx) + + { + DUNE_THROW(Dune::InvalidStateException, + "Binary diffusion coefficients of components are meaningless if" + " immiscibility is assumed"); + } + + using Base::enthalpy; + /*! + * \brief Return the specific enthalpy of a fluid phase \f$\mathrm{[J/kg]}\f$. + * \param fluidState The fluid state of the two-phase model + * \param phaseIdx Index of the fluid phase + */ + template <class FluidState> + static Scalar enthalpy(const FluidState &fluidState, + int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + Scalar temperature = fluidState.temperature(phaseIdx); + Scalar pressure = fluidState.pressure(phaseIdx); + + switch(phaseIdx) + { + case wPhaseIdx: return WettingFluid::enthalpy(temperature, pressure); break; + case nPhaseIdx: return NonwettingFluid::enthalpy(temperature, pressure); break; + case gPhaseIdx: return Gas::enthalpy(temperature, pressure); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index"); + } + } + + using Base::thermalConductivity; + /*! + * \brief Thermal conductivity of a fluid phase \f$\mathrm{[W/(m K)]}\f$. + * \param fluidState The fluid state of the two-phase model + * \param phaseIdx Index of the fluid phase + */ + template <class FluidState> + static Scalar thermalConductivity(const FluidState &fluidState, + int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + Scalar temperature = fluidState.temperature(phaseIdx); + Scalar pressure = fluidState.pressure(phaseIdx); + + switch(phaseIdx) + { + case wPhaseIdx: return WettingFluid::thermalConductivity(temperature, pressure); break; + case nPhaseIdx: return NonwettingFluid::thermalConductivity(temperature, pressure); break; + case gPhaseIdx: return Gas::thermalConductivity(temperature, pressure); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index"); + } + } + + using Base::heatCapacity; + /*! + * @copybrief Base::thermalConductivity + * + * Additional comments: + * + * Specific isobaric heat capacity of a fluid phase. + * \f$\mathrm{[J/(kg*K)]}\f$. + * + * \param fluidState The fluid state of the two-phase model + * \param phaseIdx for which phase to give back the heat capacity + */ + template <class FluidState> + static Scalar heatCapacity(const FluidState &fluidState, + int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + + Scalar temperature = fluidState.temperature(phaseIdx); + Scalar pressure = fluidState.pressure(phaseIdx); + + switch(phaseIdx) + { + case wPhaseIdx: return WettingFluid::heatCapacity(temperature, pressure); break; + case nPhaseIdx: return NonwettingFluid::heatCapacity(temperature, pressure); break; + case gPhaseIdx: return Gas::heatCapacity(temperature, pressure); break; + default: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index"); + } + } +}; + +} // end namespace FluidSystems +} // end namespace Dumux + +#endif diff --git a/dumux/material/fluidsystems/CMakeLists.txt b/dumux/material/fluidsystems/CMakeLists.txt index ec102c893cecfe3dbc39ca62abbec50d556b980e..9226fb7542864a7507a4b80af333f1b8ad387482 100644 --- a/dumux/material/fluidsystems/CMakeLists.txt +++ b/dumux/material/fluidsystems/CMakeLists.txt @@ -4,7 +4,7 @@ install(FILES base.hh brineair.hh brineco2.hh - gasphase.hh + 1pgas.hh h2oair.hh h2oairmesitylene.hh h2oairxylene.hh @@ -12,7 +12,7 @@ install(FILES h2on2.hh h2on2kinetic.hh h2on2o2.hh - liquidphase.hh + 1pliquid.hh liquidphase2c.hh nullparametercache.hh parametercachebase.hh diff --git a/dumux/material/fluidsystems/base.hh b/dumux/material/fluidsystems/base.hh index fbd4b070ebc947fe5aa1caf884c43d2dfd96da7f..f119dd5d53947943aa5ca6449173837509cc146c 100644 --- a/dumux/material/fluidsystems/base.hh +++ b/dumux/material/fluidsystems/base.hh @@ -79,6 +79,12 @@ public: static constexpr bool isCompressible(int phaseIdx) { return Implementation::isCompressible(phaseIdx); } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return Implementation::isMiscible(); } + /*! * \brief Returns true if and only if a fluid phase is assumed to * have a constant viscosity. diff --git a/dumux/material/fluidsystems/brineair.hh b/dumux/material/fluidsystems/brineair.hh index bd97efffc51df42a20c14c1a6ddadd6aba85160a..7472d5ce8ea04fec82eff20ddf4dae2b7494273c 100644 --- a/dumux/material/fluidsystems/brineair.hh +++ b/dumux/material/fluidsystems/brineair.hh @@ -50,7 +50,7 @@ namespace FluidSystems { * water of the IAPWS-formulation. */ template <class Scalar, - class H2Otype = TabulatedComponent<Scalar, H2O<Scalar>>, + class H2Otype = TabulatedComponent<H2O<Scalar>>, bool useComplexRelations=true> class BrineAir : public BaseFluidSystem<Scalar, BrineAir<Scalar, H2Otype, useComplexRelations>> @@ -104,6 +104,12 @@ public: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx); } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } + /*! * \brief Return whether a phase is liquid * diff --git a/dumux/material/fluidsystems/brineco2.hh b/dumux/material/fluidsystems/brineco2.hh index d3fe6a792776b3506875f8cdc1ebc27dcb28d98d..43b434d71e05e2e2c9308d1677be2bc867805328 100644 --- a/dumux/material/fluidsystems/brineco2.hh +++ b/dumux/material/fluidsystems/brineco2.hh @@ -48,9 +48,9 @@ namespace FluidSystems */ template<class Scalar, class CO2Table, - class H2Otype = TabulatedComponent<Scalar, H2O<Scalar> >, + class H2Otype = TabulatedComponent<H2O<Scalar> >, class BrineRawComponent = Brine<Scalar, H2O<Scalar> >, - class Brinetype = TabulatedComponent<Scalar, BrineRawComponent> > + class Brinetype = TabulatedComponent<BrineRawComponent> > class BrineCO2 : public BaseFluidSystem<Scalar, BrineCO2<Scalar, CO2Table, H2Otype, BrineRawComponent, Brinetype> > { @@ -94,6 +94,12 @@ public: return name[phaseIdx]; } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } + /*! * \brief Return whether a phase is liquid * diff --git a/dumux/material/fluidsystems/h2oair.hh b/dumux/material/fluidsystems/h2oair.hh index 20da042645a9abe7abe6b3bcb694c142691ceb13..51a3989b00bf090349635135fb4c0d94d854a9b8 100644 --- a/dumux/material/fluidsystems/h2oair.hh +++ b/dumux/material/fluidsystems/h2oair.hh @@ -53,7 +53,7 @@ namespace FluidSystems { * default with the tabulated version of water of the IAPWS-formulation. */ template <class Scalar, - class H2Otype = TabulatedComponent<Scalar, H2O<Scalar> >, + class H2Otype = TabulatedComponent<H2O<Scalar> >, bool useComplexRelations = true> class H2OAir : public BaseFluidSystem<Scalar, H2OAir<Scalar, H2Otype, useComplexRelations> > @@ -91,6 +91,12 @@ public: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx); } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } + /*! * \brief Return whether a phase is liquid * diff --git a/dumux/material/fluidsystems/h2oairmesitylene.hh b/dumux/material/fluidsystems/h2oairmesitylene.hh index c350d1f287fd67ba2f277884a7464d660b1a63cd..cab6686f8bc0133d4b465fad5c9e5d33db33aea0 100644 --- a/dumux/material/fluidsystems/h2oairmesitylene.hh +++ b/dumux/material/fluidsystems/h2oairmesitylene.hh @@ -49,7 +49,7 @@ namespace FluidSystems { * It assumes all phases to be ideal mixtures. */ template <class Scalar, - class H2OType = TabulatedComponent<Scalar, H2O<Scalar> > > + class H2OType = TabulatedComponent<H2O<Scalar> > > class H2OAirMesitylene : public BaseFluidSystem<Scalar, H2OAirMesitylene<Scalar, H2OType> > { @@ -120,6 +120,11 @@ public: } } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } /*! * \brief Return whether a phase is liquid diff --git a/dumux/material/fluidsystems/h2oairxylene.hh b/dumux/material/fluidsystems/h2oairxylene.hh index 62e12f5a9b696dcddbf547cb4cf00c3180486f0f..dbcf45716f0c53afb1b760b2053562b8a9a64d97 100644 --- a/dumux/material/fluidsystems/h2oairxylene.hh +++ b/dumux/material/fluidsystems/h2oairxylene.hh @@ -50,7 +50,7 @@ namespace FluidSystems * \note This fluid system assumes all phases to be ideal mixtures. */ template <class Scalar, - class H2OType = TabulatedComponent<Scalar, H2O<Scalar> > > + class H2OType = TabulatedComponent<H2O<Scalar> > > class H2OAirXylene : public BaseFluidSystem<Scalar, H2OAirXylene<Scalar, H2OType> > { @@ -120,6 +120,12 @@ public: } } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } + /*! * \brief Return whether a phase is liquid * diff --git a/dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh b/dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh index 42b02d3abf547a84fcc60c21b6d4f3c5cc21b4c3..b8576fbfda84e945e6670c344cc13cd68639ae4c 100644 --- a/dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh +++ b/dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh @@ -41,7 +41,7 @@ namespace FluidSystems { * components in both, the liquid and the gas phase. */ template <class Scalar, - class H2OType = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar> > > + class H2OType = Dumux::TabulatedComponent<Dumux::H2O<Scalar> > > class H2OHeavyOil : public BaseFluidSystem<Scalar, H2OHeavyOil<Scalar, H2OType> > { @@ -109,6 +109,11 @@ public: } } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } /*! * \brief Return whether a phase is liquid diff --git a/dumux/material/fluidsystems/h2on2.hh b/dumux/material/fluidsystems/h2on2.hh index a365db12833b9f859053715af985e1afeb6bbfeb..f36c70cdc398c553b738e2abb4798a9838f84051 100644 --- a/dumux/material/fluidsystems/h2on2.hh +++ b/dumux/material/fluidsystems/h2on2.hh @@ -58,7 +58,7 @@ class H2ON2 // convenience using declarations using IdealGas = Dumux::IdealGas<Scalar>; - using TabulatedH2O = TabulatedComponent<Scalar, Dumux::H2O<Scalar> >; + using TabulatedH2O = TabulatedComponent<Dumux::H2O<Scalar> >; using SimpleN2 = Dumux::N2<Scalar>; public: @@ -90,6 +90,12 @@ public: return name[phaseIdx]; } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } + /*! * \brief Return whether a phase is liquid * diff --git a/dumux/material/fluidsystems/h2on2o2.hh b/dumux/material/fluidsystems/h2on2o2.hh index cab2f9d61f403f4792664e709b933f1d824b7d6d..e038e1eaf54ac26627691e1bfb6c8972425dafe3 100644 --- a/dumux/material/fluidsystems/h2on2o2.hh +++ b/dumux/material/fluidsystems/h2on2o2.hh @@ -67,7 +67,7 @@ class H2ON2O2 using IdealGas = Dumux::IdealGas<Scalar>; using Constants = Dumux::Constants<Scalar>; - using TabulatedH2O = TabulatedComponent<Scalar, Dumux::H2O<Scalar> >; + using TabulatedH2O = TabulatedComponent<Dumux::H2O<Scalar> >; using SimpleN2 = Dumux::N2<Scalar>; using O2 = Dumux::O2<Scalar>; diff --git a/dumux/material/fluidsystems/liquidphase2c.hh b/dumux/material/fluidsystems/liquidphase2c.hh index e114f3d267ca91bd364340fd9755ae22c275d766..259dc2c2f48082452501036359add78d877da33b 100644 --- a/dumux/material/fluidsystems/liquidphase2c.hh +++ b/dumux/material/fluidsystems/liquidphase2c.hh @@ -75,6 +75,12 @@ public: static std::string phaseName(int phaseIdx = 0) { return MainComponent::name(); } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } + /*! * \brief A human readable name for the component. * diff --git a/dumux/material/fluidsystems/spe5.hh b/dumux/material/fluidsystems/spe5.hh index 25fc09b7e3379468e925dbe704b5aacaf4437a5e..b825718d3584d1a8b68beaddee89e37edc240f78 100644 --- a/dumux/material/fluidsystems/spe5.hh +++ b/dumux/material/fluidsystems/spe5.hh @@ -96,6 +96,12 @@ public: return name[phaseIdx]; } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } + /*! * \brief Return whether a phase is liquid * \param phaseIdx The index of the fluid phase to consider diff --git a/dumux/material/fluidsystems/steamn2cao2h2.hh b/dumux/material/fluidsystems/steamn2cao2h2.hh index 5b17b97a03ead1786bbbdfe0c21480776372f0a6..faf7b6e1838df05936bd0659aa3df29f649d2728 100644 --- a/dumux/material/fluidsystems/steamn2cao2h2.hh +++ b/dumux/material/fluidsystems/steamn2cao2h2.hh @@ -56,7 +56,7 @@ namespace FluidSystems */ template <class Scalar, - class H2Otype = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar>>, + class H2Otype = Dumux::TabulatedComponent<Dumux::H2O<Scalar>>, bool useComplexRelations=true> class SteamN2CaO2H2 : public BaseFluidSystem<Scalar, SteamN2CaO2H2<Scalar, H2Otype, useComplexRelations> > @@ -107,6 +107,12 @@ public: DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx); } + /*! + * \brief Returns whether the fluids are miscible + */ + static constexpr bool isMiscible() + { return true; } + /*! * \brief Return whether a phase is liquid * diff --git a/test/freeflow/navierstokes/angelitestproblem.hh b/test/freeflow/navierstokes/angelitestproblem.hh index 69c8a21a9c372fb8edbab8688348177cb1d7cb3c..e448c1817869bd30c9d9db407fc220e4dc495819 100644 --- a/test/freeflow/navierstokes/angelitestproblem.hh +++ b/test/freeflow/navierstokes/angelitestproblem.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_ANGELI_TEST_PROBLEM_HH #define DUMUX_ANGELI_TEST_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/constant.hh> #include <dumux/freeflow/navierstokes/problem.hh> @@ -46,7 +46,7 @@ SET_PROP(AngeliTestTypeTag, FluidSystem) private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); public: - using type = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; }; // Set the grid type diff --git a/test/freeflow/navierstokes/channeltestproblem.hh b/test/freeflow/navierstokes/channeltestproblem.hh index e20fffcb65d25bda01e7f857a553ab512a509ce4..d70bb3aab5e7ddd596a8ebb139403ab5740583b4 100644 --- a/test/freeflow/navierstokes/channeltestproblem.hh +++ b/test/freeflow/navierstokes/channeltestproblem.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_CHANNEL_TEST_PROBLEM_HH #define DUMUX_CHANNEL_TEST_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/components/constant.hh> @@ -50,9 +50,9 @@ SET_PROP(ChannelTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); #if NONISOTHERMAL - using type = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; #else - using type = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; #endif }; diff --git a/test/freeflow/navierstokes/closedsystemtestproblem.hh b/test/freeflow/navierstokes/closedsystemtestproblem.hh index 364892c859eda96903bbb97c45c119fd143a5246..0d642001a8600215e7581adbfe9424aeef3580cd 100644 --- a/test/freeflow/navierstokes/closedsystemtestproblem.hh +++ b/test/freeflow/navierstokes/closedsystemtestproblem.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_CLOSEDSYSTEM_TEST_PROBLEM_HH #define DUMUX_CLOSEDSYSTEM_TEST_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/constant.hh> #include <dumux/freeflow/navierstokes/problem.hh> @@ -44,7 +44,7 @@ NEW_TYPE_TAG(ClosedSystemTestTypeTag, INHERITS_FROM(StaggeredFreeFlowModel, Navi SET_PROP(ClosedSystemTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; }; // Set the grid type diff --git a/test/freeflow/navierstokes/doneatestproblem.hh b/test/freeflow/navierstokes/doneatestproblem.hh index bcced08b37db337d0d384e5cbb196d22e5d7ae3b..b7e6243ac560cdedcead5f20aec9785bc2cbf1b1 100644 --- a/test/freeflow/navierstokes/doneatestproblem.hh +++ b/test/freeflow/navierstokes/doneatestproblem.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_DONEA_TEST_PROBLEM_HH #define DUMUX_DONEA_TEST_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/constant.hh> #include <dumux/freeflow/navierstokes/problem.hh> @@ -45,7 +45,7 @@ NEW_TYPE_TAG(DoneaTestTypeTag, INHERITS_FROM(StaggeredFreeFlowModel, NavierStoke SET_PROP(DoneaTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; }; // Set the grid type diff --git a/test/freeflow/navierstokes/kovasznaytestproblem.hh b/test/freeflow/navierstokes/kovasznaytestproblem.hh index 42e39273408323b0db3dd1014df6bde84325ffd5..14f45d8dd9ecb30aedc285477914494f2a70a325 100644 --- a/test/freeflow/navierstokes/kovasznaytestproblem.hh +++ b/test/freeflow/navierstokes/kovasznaytestproblem.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_KOVASZNAY_TEST_PROBLEM_HH #define DUMUX_KOVASZNAY_TEST_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/constant.hh> #include <dumux/freeflow/navierstokes/problem.hh> @@ -44,7 +44,7 @@ NEW_TYPE_TAG(KovasznayTestTypeTag, INHERITS_FROM(StaggeredFreeFlowModel, NavierS SET_PROP(KovasznayTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; }; // Set the grid type diff --git a/test/freeflow/navierstokesnc/channeltestproblem.hh b/test/freeflow/navierstokesnc/channeltestproblem.hh index aee1aeed92a7d6014b00ead030fec168c6ef0ac1..2880eedfa312e7dc43dd7a7a09d12c88f423e07d 100644 --- a/test/freeflow/navierstokesnc/channeltestproblem.hh +++ b/test/freeflow/navierstokesnc/channeltestproblem.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_CHANNEL_NC_TEST_PROBLEM_HH #define DUMUX_CHANNEL_NC_TEST_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/components/constant.hh> #include <dumux/material/fluidsystems/h2oair.hh> diff --git a/test/freeflow/navierstokesnc/densityflowproblem.hh b/test/freeflow/navierstokesnc/densityflowproblem.hh index 0ac4876df51cef89b06b669a822f3d21e6b18a53..071e1d24b3e32b6edc2a345983e5b018fb345442 100644 --- a/test/freeflow/navierstokesnc/densityflowproblem.hh +++ b/test/freeflow/navierstokesnc/densityflowproblem.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_DENSITY_FLOW_NC_TEST_PROBLEM_HH #define DUMUX_DENSITY_FLOW_NC_TEST_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/components/constant.hh> #include <dumux/material/fluidsystems/h2oair.hh> diff --git a/test/freeflow/rans/pipelauferproblem.hh b/test/freeflow/rans/pipelauferproblem.hh index 55da37fa2320f0fb653a17873d7a59a0849dd28f..9db008aba9c7ce8cab50bd90c246b1eef33e78ed 100644 --- a/test/freeflow/rans/pipelauferproblem.hh +++ b/test/freeflow/rans/pipelauferproblem.hh @@ -27,7 +27,7 @@ #ifndef DUMUX_PIPE_LAUFER_PROBLEM_HH #define DUMUX_PIPE_LAUFER_PROBLEM_HH -#include <dumux/material/fluidsystems/gasphase.hh> +#include <dumux/material/fluidsystems/1pgas.hh> #include <dumux/material/components/air.hh> #include <dumux/freeflow/rans/zeroeq/model.hh> @@ -51,7 +51,7 @@ NEW_TYPE_TAG(PipeLauferProblem, INHERITS_FROM(StaggeredFreeFlowModel, ZeroEq)); SET_PROP(PipeLauferProblem, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::GasPhase<Scalar, Air<Scalar> >; + using type = FluidSystems::OnePGas<Scalar, Air<Scalar> >; }; // Set the grid type diff --git a/test/material/fluidsystems/checkfluidsystem.hh b/test/material/fluidsystems/checkfluidsystem.hh index 96f214112c6844ce93460bc2aea928b17bbfb35e..2914a7b75e46de3f06189f38d5cdc130bfaecd12 100644 --- a/test/material/fluidsystems/checkfluidsystem.hh +++ b/test/material/fluidsystems/checkfluidsystem.hh @@ -35,14 +35,14 @@ #include <dumux/material/fluidsystems/base.hh> #include <dumux/material/fluidsystems/brineair.hh> #include <dumux/material/fluidsystems/brineco2.hh> -#include <dumux/material/fluidsystems/gasphase.hh> +#include <dumux/material/fluidsystems/1pgas.hh> #include <dumux/material/fluidsystems/h2oair.hh> #include <dumux/material/fluidsystems/h2oairmesitylene.hh> #include <dumux/material/fluidsystems/h2oairxylene.hh> #include <dumux/material/fluidsystems/h2on2.hh> #include <dumux/material/fluidsystems/h2on2kinetic.hh> #include <dumux/material/fluidsystems/h2on2o2.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/fluidsystems/spe5.hh> // include all fluid states diff --git a/test/material/fluidsystems/test_fluidsystems.cc b/test/material/fluidsystems/test_fluidsystems.cc index 26a1ac90ef35c0dcbbeefd4e68eed253f76a5e26..5a116a5d32ae8cb9368b03148c010ce27aeb4d22 100644 --- a/test/material/fluidsystems/test_fluidsystems.cc +++ b/test/material/fluidsystems/test_fluidsystems.cc @@ -31,14 +31,14 @@ #include <dumux/material/fluidsystems/base.hh> #include <dumux/material/fluidsystems/brineair.hh> #include <dumux/material/fluidsystems/brineco2.hh> -#include <dumux/material/fluidsystems/gasphase.hh> +#include <dumux/material/fluidsystems/1pgas.hh> #include <dumux/material/fluidsystems/h2oair.hh> #include <dumux/material/fluidsystems/h2oairmesitylene.hh> #include <dumux/material/fluidsystems/h2oairxylene.hh> #include <dumux/material/fluidsystems/h2on2.hh> #include <dumux/material/fluidsystems/h2on2kinetic.hh> #include <dumux/material/fluidsystems/h2on2o2.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/fluidsystems/spe5.hh> // include all fluid states @@ -62,8 +62,8 @@ int main() using H2O = Components::H2O<Scalar>; using N2 = Components::N2<Scalar>; - using Liquid = FluidSystems::LiquidPhase<Scalar, H2O>; - using Gas = FluidSystems::GasPhase<Scalar, N2>; + using Liquid = FluidSystems::OnePLiquid<Scalar, H2O>; + using Gas = FluidSystems::OnePGas<Scalar, N2>; int success = 0; std::vector<std::string> collectedExceptions; @@ -159,17 +159,17 @@ int main() const bool enableComplexRelations=true; using FluidSystem = FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations>; success += checkFluidSystem<Scalar, FluidSystem>(); } - { using H2OType = Components::TabulatedComponent<Scalar, Components::H2O<Scalar>>; + { using H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>; const bool enableComplexRelations=false; using FluidSystem = FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations>; success += checkFluidSystem<Scalar, FluidSystem>(); } - { using H2OType = Components::TabulatedComponent<Scalar, Components::H2O<Scalar>>; + { using H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>; const bool enableComplexRelations=true; using FluidSystem = FluidSystems::H2OAir<Scalar, H2OType, enableComplexRelations>; success += checkFluidSystem<Scalar, FluidSystem>(); } // gas phase - { using FluidSystem = FluidSystems::GasPhase<Scalar, H2O>; + { using FluidSystem = FluidSystems::OnePGas<Scalar, H2O>; success += checkFluidSystem<Scalar, FluidSystem>(); } // H2O -- Air -- Mesitylene @@ -199,7 +199,7 @@ int main() success += checkFluidSystem<Scalar, FluidSystem>(); } // liquid phase - { using FluidSystem = FluidSystems::LiquidPhase<Scalar, H2O>; + { using FluidSystem = FluidSystems::OnePLiquid<Scalar, H2O>; success += checkFluidSystem<Scalar, FluidSystem>(); } // spe5 diff --git a/test/material/tabulation/test_tabulation.cc b/test/material/tabulation/test_tabulation.cc index 18d3e6b9da334cff0e7e4d29b4de693164e681db..d55fe4e44edfbc205ea79e27ccbfd6968b588004 100644 --- a/test/material/tabulation/test_tabulation.cc +++ b/test/material/tabulation/test_tabulation.cc @@ -47,7 +47,7 @@ int main() { using Scalar = double; using IapwsH2O = Dumux::H2O<Scalar>; - using TabulatedH2O = Dumux::TabulatedComponent<Scalar, IapwsH2O>; + using TabulatedH2O = Dumux::TabulatedComponent<IapwsH2O>; Scalar tempMin = 274.15; Scalar tempMax = 622.15; diff --git a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh index 4fed1505c433ad7fdf82486d40f1d752871c1f0c..c0d773cea4829353e78668ffc68d65357300fbec 100644 --- a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh +++ b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh @@ -35,7 +35,7 @@ #include <dumux/porousmediumflow/1p/model.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/material/components/h2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> #include "1pnispatialparams.hh" @@ -62,7 +62,7 @@ SET_TYPE_PROP(OnePNIConductionTypeTag, Problem, // Set the fluid system SET_TYPE_PROP(OnePNIConductionTypeTag, FluidSystem, - FluidSystems::LiquidPhase<typename GET_PROP_TYPE(TypeTag, Scalar), + FluidSystems::OnePLiquid<typename GET_PROP_TYPE(TypeTag, Scalar), H2O<typename GET_PROP_TYPE(TypeTag, Scalar)> >); // Set the spatial parameters SET_TYPE_PROP(OnePNIConductionTypeTag, diff --git a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh index e7b2f33d601dee11af466b50b657e26b88d93519..acfaba9d4970541ae76965c4b9250330959a0ee9 100644 --- a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh +++ b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh @@ -35,7 +35,7 @@ #include <dumux/porousmediumflow/1p/model.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/material/components/h2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> #include "1pnispatialparams.hh" @@ -61,7 +61,7 @@ SET_TYPE_PROP(OnePNIConvectionTypeTag, Problem, OnePNIConvectionProblem<TypeTag> // Set the fluid system SET_TYPE_PROP(OnePNIConvectionTypeTag, FluidSystem, - FluidSystems::LiquidPhase<typename GET_PROP_TYPE(TypeTag, Scalar), + FluidSystems::OnePLiquid<typename GET_PROP_TYPE(TypeTag, Scalar), H2O<typename GET_PROP_TYPE(TypeTag, Scalar)> >); // Set the spatial parameters diff --git a/test/porousmediumflow/1p/implicit/1ptestproblem.hh b/test/porousmediumflow/1p/implicit/1ptestproblem.hh index d8d017ba65e4316b9d35da362dec57685d4f7332..e1245f64c321fe5c0d94181b7f881edb009eb36d 100644 --- a/test/porousmediumflow/1p/implicit/1ptestproblem.hh +++ b/test/porousmediumflow/1p/implicit/1ptestproblem.hh @@ -31,7 +31,7 @@ #include <dumux/porousmediumflow/1p/model.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include "1ptestspatialparams.hh" @@ -51,7 +51,7 @@ NEW_TYPE_TAG(OnePTestCCMpfaTypeTag, INHERITS_FROM(CCMpfaModel, OnePTestTypeTag)) SET_PROP(OnePTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; }; // Set the grid type diff --git a/test/porousmediumflow/1p/implicit/compressible/problem.hh b/test/porousmediumflow/1p/implicit/compressible/problem.hh index 6297acc5229e7cb74fdef006b8992c7391cc91be..c19a961f36d80ce88b601e244a34a168ea78ba08 100644 --- a/test/porousmediumflow/1p/implicit/compressible/problem.hh +++ b/test/porousmediumflow/1p/implicit/compressible/problem.hh @@ -26,7 +26,7 @@ #include <dumux/material/components/h2o.hh> #include <dumux/material/components/tabulatedcomponent.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/discretization/cellcentered/tpfa/properties.hh> #include <dumux/discretization/cellcentered/mpfa/properties.hh> @@ -65,7 +65,7 @@ SET_PROP(OnePCompressible, FluidSystem) private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); public: - using type = FluidSystems::LiquidPhase<Scalar, TabulatedComponent<Scalar, H2O<Scalar>>>; + using type = FluidSystems::OnePLiquid<Scalar, TabulatedComponent<H2O<Scalar>>>; }; // Disable caching (for testing purposes) @@ -98,7 +98,7 @@ public: OnePTestProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) : ParentType(fvGridGeometry) { - TabulatedComponent<Scalar, H2O<Scalar>>::init(272.15, 294.15, 10, + TabulatedComponent<H2O<Scalar>>::init(272.15, 294.15, 10, 1.0e4, 1.0e6, 200); } diff --git a/test/porousmediumflow/1p/implicit/fractureproblem.hh b/test/porousmediumflow/1p/implicit/fractureproblem.hh index 1d7a2631335ccf6841204a853c4de0aba67f0a2c..4ab317b9d4793f62dfc4d0fa04f32f41b398de33 100644 --- a/test/porousmediumflow/1p/implicit/fractureproblem.hh +++ b/test/porousmediumflow/1p/implicit/fractureproblem.hh @@ -27,7 +27,7 @@ #define DUMUX_ONEP_FRACTURE_TEST_PROBLEM_HH #include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/porousmediumflow/1p/model.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/discretization/box/properties.hh> @@ -64,7 +64,7 @@ SET_TYPE_PROP(FractureTypeTag, Problem, Dumux::FractureProblem<TypeTag>); SET_PROP(FractureTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; }; } // end namespace Properties diff --git a/test/porousmediumflow/1p/implicit/incompressible/problem.hh b/test/porousmediumflow/1p/implicit/incompressible/problem.hh index e1cf6d40414b442e0847419a872c81a4a722be64..714f8ef2f9015c4e11e162c30469b7c8cc4e3946 100644 --- a/test/porousmediumflow/1p/implicit/incompressible/problem.hh +++ b/test/porousmediumflow/1p/implicit/incompressible/problem.hh @@ -33,7 +33,7 @@ #include <dumux/porousmediumflow/1p/incompressiblelocalresidual.hh> #include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include "spatialparams.hh" @@ -66,7 +66,7 @@ SET_TYPE_PROP(OnePIncompressible, LocalResidual, OnePIncompressibleLocalResidual SET_PROP(OnePIncompressible, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; }; // Enable caching diff --git a/test/porousmediumflow/1p/implicit/pointsources/1psingularityproblem.hh b/test/porousmediumflow/1p/implicit/pointsources/1psingularityproblem.hh index 569f4f9e5c7e02216859d9d5c8147de23b8d89bf..a6f59077a2237e75f42843ca16aead2ad1dce1b3 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/1psingularityproblem.hh +++ b/test/porousmediumflow/1p/implicit/pointsources/1psingularityproblem.hh @@ -30,7 +30,7 @@ #include <dumux/porousmediumflow/1p/model.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include "1psingularityspatialparams.hh" @@ -49,7 +49,7 @@ NEW_TYPE_TAG(OnePSingularityCCTpfaTypeTag, INHERITS_FROM(CCTpfaModel, OnePSingul SET_PROP(OnePSingularityTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; }; // Set the grid type diff --git a/test/porousmediumflow/1p/implicit/tubesproblem.hh b/test/porousmediumflow/1p/implicit/tubesproblem.hh index 71ee8eb5a8545c1204e468dadb69a054331c0bd9..c9f7de4b49707c50b4792344514aa20ce3a1a1b2 100644 --- a/test/porousmediumflow/1p/implicit/tubesproblem.hh +++ b/test/porousmediumflow/1p/implicit/tubesproblem.hh @@ -35,7 +35,7 @@ #include <dumux/porousmediumflow/1p/model.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/material/components/constant.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include "tubesspatialparams.hh" @@ -63,7 +63,7 @@ SET_TYPE_PROP(TubesTestTypeTag, SpatialParams, TubesTestSpatialParams<TypeTag>); SET_PROP(TubesTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; }; } // end namespace Properties diff --git a/test/porousmediumflow/1p/sequential/test_1pproblem.hh b/test/porousmediumflow/1p/sequential/test_1pproblem.hh index 49de281104e203350e9ff101682acb92c33e1333..fae20b6a264d20515d1260b34b0d9b732c2d4dc1 100644 --- a/test/porousmediumflow/1p/sequential/test_1pproblem.hh +++ b/test/porousmediumflow/1p/sequential/test_1pproblem.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_TEST_1P_PROBLEM_HH #define DUMUX_TEST_1P_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/constant.hh> #include <dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressureproperties.hh> @@ -53,7 +53,7 @@ SET_TYPE_PROP(TestOnePTypeTag, Grid, Dune::YaspGrid<2>); SET_PROP(TestOnePTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, Components::Constant<1, Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; }; // Set the spatial parameters diff --git a/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh b/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh index c7ab75b3b079874fc2524be2b29685304b36e03d..231ba182d3619c9cdf522edfeb6c5b38cf69da80 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionproblem.hh @@ -61,8 +61,8 @@ SET_TYPE_PROP(FVVelocity2PTestTypeTag, Grid, Dune::YaspGrid<2>); SET_PROP(FVVelocity2PTestTypeTag, FluidSystem) { 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 WettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; @@ -78,8 +78,8 @@ SET_TYPE_PROP(FVMPFAOVelocity2PTestTypeTag, Grid, Dune::YaspGrid<2>); SET_PROP(FVMPFAOVelocity2PTestTypeTag, FluidSystem) { 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 WettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; @@ -94,8 +94,8 @@ SET_TYPE_PROP(MimeticPressure2PTestTypeTag, Grid, Dune::YaspGrid<2>); SET_PROP(MimeticPressure2PTestTypeTag, FluidSystem) { 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 WettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; diff --git a/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh b/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh index 3e8873b7e0ad718df54200d6dae6a1bcdf7575a9..b9792630726199a0d526c8c5619571aa90d63f1c 100644 --- a/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh +++ b/test/porousmediumflow/1p/sequential/test_diffusionproblem3d.hh @@ -63,8 +63,8 @@ SET_TYPE_PROP(DiffusionTestTypeTag, Problem, TestDiffusion3DProblem<TypeTag>); SET_PROP(DiffusionTestTypeTag, FluidSystem) { 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 WettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; diff --git a/test/porousmediumflow/1pncmin/implicit/modifiedsteamn2cao2h2.hh b/test/porousmediumflow/1pncmin/implicit/modifiedsteamn2cao2h2.hh index 68dcb33435773aa4f7e88a1cde7d6bec027c5d34..fc6e3db903b568e579516ab6f69c0c5de768afbe 100644 --- a/test/porousmediumflow/1pncmin/implicit/modifiedsteamn2cao2h2.hh +++ b/test/porousmediumflow/1pncmin/implicit/modifiedsteamn2cao2h2.hh @@ -59,7 +59,7 @@ namespace FluidSystems */ template <class Scalar, - class H2Otype = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar>>, + class H2Otype = Dumux::TabulatedComponent<Dumux::H2O<Scalar>>, bool useComplexRelations=true> class ModifiedSteamN2CaO2H2 : public BaseFluidSystem<Scalar, ModifiedSteamN2CaO2H2<Scalar, H2Otype, useComplexRelations> > diff --git a/test/porousmediumflow/2p/implicit/fracture/problem.hh b/test/porousmediumflow/2p/implicit/fracture/problem.hh index e9508444b3486b4dc5675da4bc3ab2b7427a17f6..5a7a1a388901d7c9bff7ad223cf2a3e1dfd71a72 100644 --- a/test/porousmediumflow/2p/implicit/fracture/problem.hh +++ b/test/porousmediumflow/2p/implicit/fracture/problem.hh @@ -28,7 +28,7 @@ #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/components/trichloroethene.hh> #include <dumux/material/fluidsystems/2pimmiscible.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/porousmediumflow/2p/model.hh> #include <dumux/porousmediumflow/problem.hh> @@ -62,8 +62,8 @@ SET_TYPE_PROP(FractureTypeTag, Problem, Dumux::FractureProblem<TypeTag>); SET_PROP(FractureTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; - using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, Trichloroethene<Scalar> >; + using WettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, Trichloroethene<Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; diff --git a/test/porousmediumflow/2p/implicit/incompressible/problem.hh b/test/porousmediumflow/2p/implicit/incompressible/problem.hh index e780a4e64caf7286c245bcc2c1bd261cff94e30e..b9566b03642646108b3b6e12b5b9b5b82bd7c4ef 100644 --- a/test/porousmediumflow/2p/implicit/incompressible/problem.hh +++ b/test/porousmediumflow/2p/implicit/incompressible/problem.hh @@ -29,7 +29,7 @@ #include <dumux/material/components/trichloroethene.hh> #include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/fluidsystems/2pimmiscible.hh> #include <dumux/porousmediumflow/problem.hh> @@ -63,8 +63,8 @@ SET_TYPE_PROP(TwoPIncompressible, LocalResidual, TwoPIncompressibleLocalResidual SET_PROP(TwoPIncompressible, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; - using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, Trichloroethene<Scalar> >; + using WettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, Trichloroethene<Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; diff --git a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh index 5653132448b9c88e9adf41af0456dc8de9883087..89d66ba9aded104450a2be495cd147b37d38e38f 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh @@ -25,8 +25,8 @@ #define DUMUX_TEST_3D2P_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> -#include <dumux/material/fluidsystems/gasphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> +#include <dumux/material/fluidsystems/1pgas.hh> #include <dumux/material/components/simpleh2o.hh> #include <dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressureproperties.hh> @@ -72,8 +72,8 @@ SET_TYPE_PROP(ThreeDTwoPTestTypeTag, Problem, Test3D2PProblem<TypeTag>); SET_PROP(ThreeDTwoPTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; - using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using WettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh index d4920a2bdc00acde295c17408df8eda62a214d7c..47169be6bea12fc260011b64f1e80c79cf0a55b6 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh @@ -25,7 +25,7 @@ #define DUMUX_TEST_IMPES_ADAPTIVE_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/simpleh2o.hh> #include <dumux/porousmediumflow/2p/sequential/impes/problem.hh> @@ -62,8 +62,8 @@ SET_TYPE_PROP(TestIMPESAdaptiveTypeTag, Problem, TestIMPESAdaptiveProblem<TypeTa SET_PROP(TestIMPESAdaptiveTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; - using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using WettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; } diff --git a/test/porousmediumflow/2p/sequential/test_impesproblem.hh b/test/porousmediumflow/2p/sequential/test_impesproblem.hh index 37e3e67eb87975d164d9e2e2e9587ea9b260aa0e..1351e4a08a3c8f14df72160e43c90ec82c22d7fd 100644 --- a/test/porousmediumflow/2p/sequential/test_impesproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesproblem.hh @@ -24,7 +24,7 @@ #ifndef DUMUX_TEST_IMPES_PROBLEM_HH #define DUMUX_TEST_IMPES_PROBLEM_HH -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/simpleh2o.hh> #include <dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressureproperties.hh> @@ -85,8 +85,8 @@ SET_TYPE_PROP(IMPESTestTypeTag, Problem, IMPESTestProblem<TypeTag>); SET_PROP(IMPESTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; - using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using WettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh b/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh index fe2c820142a8ad93664226b1fcc013c5b4f3569e..f1e3b1dc84836ce2b7f127670a8e71bcac2fe65a 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh @@ -25,7 +25,7 @@ #define DUMUX_TEST_MPFA2P_PROBLEM_HH #include <dumux/material/fluidsystems/2pimmiscible.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/components/trichloroethene.hh> @@ -73,11 +73,11 @@ SET_TYPE_PROP(MPFATwoPTestTypeTag, Problem, MPFATwoPTestProblem<TypeTag>); SET_PROP(MPFATwoPTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using WettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using WettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; #if PROBLEM == 2 - using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, Trichloroethene<Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, Trichloroethene<Scalar> >; #else - using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; #endif using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; diff --git a/test/porousmediumflow/2p/sequential/test_transportproblem.hh b/test/porousmediumflow/2p/sequential/test_transportproblem.hh index 6c992f29a3feef8f14a010344dbb340a6e09720e..e325d5211be4daed75f15b25c282fa81f20ab474 100644 --- a/test/porousmediumflow/2p/sequential/test_transportproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_transportproblem.hh @@ -26,7 +26,7 @@ #include <dune/grid/io/file/dgfparser/dgfyasp.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/constant.hh> #include <dumux/porousmediumflow/2p/sequential/transport/cellcentered/properties.hh> @@ -60,8 +60,8 @@ SET_TYPE_PROP(TransportTestTypeTag, Problem, TestTransportProblem<TypeTag>); SET_PROP(TransportTestTypeTag, FluidSystem) { 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 WettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; + using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, Components::Constant<1, Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; diff --git a/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh b/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh index f6780bf4e4405dd277efe54824c2ffcee779f936..2aa4d41b4a74172648bead007792d5caa332834c 100644 --- a/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh +++ b/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh @@ -30,7 +30,7 @@ #include <dumux/porousmediumflow/2p1c/model.hh> #include <dumux/porousmediumflow/problem.hh> -#include <dumux/material/fluidsystems/2pliquidvapor.hh> +#include <dumux/material/fluidsystems/2p1c.hh> #include <dumux/material/components/tabulatedcomponent.hh> #include <dumux/material/components/h2o.hh> @@ -59,9 +59,9 @@ SET_PROP(InjectionProblemTypeTag, FluidSystem) { private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using H2OType = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar> >; + using H2OType = Dumux::TabulatedComponent<Dumux::H2O<Scalar> >; public: - using type = Dumux::FluidSystems::TwoPLiquidVaporFluidsystem<Scalar, H2OType >; + using type = Dumux::FluidSystems::TwoPOneC<Scalar, H2OType >; }; diff --git a/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh b/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh index 86e8ad3d56a6eb7e1ef084902e011ef97a2d230b..a9dd8e52944ed36627ac12d870570c75e177fd2f 100644 --- a/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh +++ b/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh @@ -30,8 +30,14 @@ #include <dumux/discretization/methods.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/porousmediumflow/3p/model.hh> -#include <dumux/material/fluidsystems/h2oairmesitylene.hh> -#include <dumux/linear/seqsolverbackend.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> +#include <dumux/material/fluidsystems/1pgas.hh> +#include <dumux/material/fluidsystems/3pimmiscible.hh> +#include <dumux/material/components/tabulatedcomponent.hh> +#include <dumux/material/components/air.hh> +#include <dumux/material/components/mesitylene.hh> +#include <dumux/material/components/h2o.hh> +// #include <dumux/material/fluidsystems/h2oairmesitylene.hh> #include "infiltration3pspatialparams.hh" @@ -58,9 +64,21 @@ SET_TYPE_PROP(InfiltrationThreePTypeTag, Grid, Dune::YaspGrid<2>); SET_TYPE_PROP(InfiltrationThreePTypeTag, Problem, InfiltrationThreePProblem<TypeTag>); // Set the fluid system -SET_TYPE_PROP(InfiltrationThreePTypeTag, - FluidSystem, - FluidSystems::H2OAirMesitylene<typename GET_PROP_TYPE(TypeTag, Scalar)>); +SET_PROP(InfiltrationThreePTypeTag, FluidSystem) +{ +private: + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using Water = Components::TabulatedComponent<Components::H2O<Scalar>>; + using WettingFluid = FluidSystems::OnePLiquid<Scalar, Water>; + using NonwettingFluid = FluidSystems::OnePLiquid<Scalar, Components::Mesitylene<Scalar>>; + using Gas = FluidSystems::OnePGas<Scalar, Components::Air<Scalar>>; +public: + using type = FluidSystems::ThreePImmiscible<Scalar, WettingFluid, NonwettingFluid, Gas>; +}; + +// SET_TYPE_PROP(InfiltrationThreePTypeTag, +// FluidSystem, +// FluidSystems::ThreePImmiscible<typename GET_PROP_TYPE(TypeTag, Scalar)>); }// end namespace Properties diff --git a/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh b/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh index 40ab15c70acaf13629c41df9d286f12159b02b7a..017c3858ea9adcb8874bc1594c1db0bf26c7bdc7 100644 --- a/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh @@ -36,7 +36,7 @@ #include <dumux/porousmediumflow/richards/model.hh> #include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include "richardsanalyticalspatialparams.hh" diff --git a/test/porousmediumflow/richards/implicit/richardslensproblem.hh b/test/porousmediumflow/richards/implicit/richardslensproblem.hh index 64079c5b034d5dae59f94b4696d04aced33e8ddb..057c4460b0ccd37eb8b44ba5f345cff6750e987e 100644 --- a/test/porousmediumflow/richards/implicit/richardslensproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardslensproblem.hh @@ -32,7 +32,7 @@ #include <dumux/porousmediumflow/richards/model.hh> #include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include "richardslensspatialparams.hh" diff --git a/test/porousmediumflow/tracer/1ptracer/1ptestproblem.hh b/test/porousmediumflow/tracer/1ptracer/1ptestproblem.hh index 0813e395811fc7950e1bfc5908049dcc41200fb4..f892098f73164cb1deb96873ce78236eff2de420 100644 --- a/test/porousmediumflow/tracer/1ptracer/1ptestproblem.hh +++ b/test/porousmediumflow/tracer/1ptracer/1ptestproblem.hh @@ -28,7 +28,7 @@ #include <dumux/porousmediumflow/1p/model.hh> #include <dumux/porousmediumflow/problem.hh> #include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/porousmediumflow/1p/incompressiblelocalresidual.hh> #include "1ptestspatialparams.hh" @@ -59,7 +59,7 @@ SET_TYPE_PROP(IncompressibleTestTypeTag, LocalResidual, OnePIncompressibleLocalR SET_PROP(IncompressibleTestTypeTag, FluidSystem) { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using type = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; + using type = FluidSystems::OnePLiquid<Scalar, SimpleH2O<Scalar> >; }; // Enable caching diff --git a/tutorial/ex3/2pproblem.hh b/tutorial/ex3/2pproblem.hh index bce958cfba62933b0b94d41acc60c2b4b7a75096..e2d685c6bb086ffb30f03d2fdae8d5d3a2805b2b 100644 --- a/tutorial/ex3/2pproblem.hh +++ b/tutorial/ex3/2pproblem.hh @@ -45,7 +45,7 @@ // #include "components/mycompressiblecomponent.hh" // We will only have liquid phases Here -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> // The two-phase immiscible fluid system #include <dumux/material/fluidsystems/2pimmiscible.hh> @@ -76,14 +76,14 @@ SET_PROP(ExerciseThreeTwoPTypeTag, FluidSystem) { private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using TabulatedH2O = TabulatedComponent<Scalar, H2O<Scalar>>; - using WettingPhase = typename FluidSystems::LiquidPhase<Scalar, TabulatedH2O>; + using TabulatedH2O = TabulatedComponent<H2O<Scalar>>; + using WettingPhase = typename FluidSystems::OnePLiquid<Scalar, TabulatedH2O>; /*! * Uncomment first line and comment second line for using the incompressible component * Uncomment second line and comment first line for using the compressible component */ - using NonWettingPhase = typename FluidSystems::LiquidPhase<Scalar, MyIncompressibleComponent<Scalar> >; - // using NonWettingPhase = typename FluidSystems::LiquidPhase<Scalar, MyCompressibleComponent<Scalar> >; + using NonWettingPhase = typename FluidSystems::OnePLiquid<Scalar, MyIncompressibleComponent<Scalar> >; + // using NonWettingPhase = typename FluidSystems::OnePLiquid<Scalar, MyCompressibleComponent<Scalar> >; public: using type = typename FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonWettingPhase>; @@ -128,7 +128,7 @@ public: // initialize the tables for the water properties std::cout << "Initializing the tables for the water properties" << std::endl; - TabulatedComponent<Scalar, H2O<Scalar>>::init(/*tempMin=*/273.15, + TabulatedComponent<H2O<Scalar>>::init(/*tempMin=*/273.15, /*tempMax=*/623.15, /*numTemp=*/100, /*pMin=*/0.0, diff --git a/tutorial/ex3/README.md b/tutorial/ex3/README.md index f8e88b1cc89282775bf20c8908271bd43db75fec..7abeabc8abaed5b4d7a72e4a72e11f7df164fdf1 100644 --- a/tutorial/ex3/README.md +++ b/tutorial/ex3/README.md @@ -72,7 +72,7 @@ This fluid system expects __phases__ as input and so far we have only included t ```c++ // We will only have liquid phases Here -#include <dumux/material/fluidsystems/liquidphase.hh> +#include <dumux/material/fluidsystems/1pliquid.hh> ``` which creates a _liquid phase_ from a given component. Finally, using all of the included classes we set the the fluid system property by choosing a liquid phase consisting of the incompressible fictitious component as non-wetting phase and tabulated water as the wetting phase in the immiscible fluid system: @@ -84,14 +84,14 @@ SET_PROP(ExerciseThreeTypeTag, FluidSystem) { private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef TabulatedComponent<Scalar, H2O<Scalar>> TabulatedH2O; - typedef typename FluidSystems::LiquidPhase<Scalar, TabulatedH2O> WettingPhase; + typedef TabulatedComponent<H2O<Scalar>> TabulatedH2O; + typedef typename FluidSystems::OnePLiquid<Scalar, TabulatedH2O> WettingPhase; /*! * Uncomment first line and comment second line for using the incompressible component * Uncomment second line and comment first line for using the compressible component */ - typedef typename FluidSystems::LiquidPhase<Scalar, MyIncompressibleComponent<Scalar> > NonWettingPhase; - // typedef typename FluidSystems::LiquidPhase<Scalar, MyCompressibleComponent<Scalar> > NonWettingPhase; + typedef typename FluidSystems::OnePLiquid<Scalar, MyIncompressibleComponent<Scalar> > NonWettingPhase; + // typedef typename FluidSystems::OnePLiquid<Scalar, MyCompressibleComponent<Scalar> > NonWettingPhase; public: typedef typename FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonWettingPhase> type; diff --git a/tutorial/ex3/fluidsystems/h2omycompressiblecomponent.hh b/tutorial/ex3/fluidsystems/h2omycompressiblecomponent.hh index 783075d4b062f6c1d9a830b6ca489ff072a7c27c..1dc673dce182037aa0a4c864b6cc1e9ec791a090 100644 --- a/tutorial/ex3/fluidsystems/h2omycompressiblecomponent.hh +++ b/tutorial/ex3/fluidsystems/h2omycompressiblecomponent.hh @@ -47,7 +47,7 @@ namespace FluidSystems * which are water and a ficitious component from tutorial exercise 3a. */ template <class Scalar, - class H2OType = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar> > > + class H2OType = Dumux::TabulatedComponent<Dumux::H2O<Scalar> > > class H2OMyCompressibleComponent : public BaseFluidSystem< Scalar, H2OMyCompressibleComponent<Scalar, H2OType> > { diff --git a/tutorial/solution/ex3/h2omycompressiblecomponent.hh b/tutorial/solution/ex3/h2omycompressiblecomponent.hh index e1495370c8c1192d069fea79f42f003abbb19358..de0de6c3a0d4d8794c6db01ed659cb7befb4ec9e 100644 --- a/tutorial/solution/ex3/h2omycompressiblecomponent.hh +++ b/tutorial/solution/ex3/h2omycompressiblecomponent.hh @@ -47,7 +47,7 @@ namespace FluidSystems * which are water and a ficitious component from tutorial exercise 3a. */ template <class TypeTag, class Scalar, - class H2OType = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar> > > + class H2OType = Dumux::TabulatedComponent<Dumux::H2O<Scalar> > > class H2OMyCompressibleComponent : public BaseFluidSystem< Scalar, H2OMyCompressibleComponent<TypeTag, Scalar, H2OType> > {