From f7228d3de930467a7348eb2b8ebfa2e976d5886f Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Sat, 7 Apr 2018 12:40:33 +0200 Subject: [PATCH] [tabulated] Remove scalar template parameter from tabulated component --- dumux/material/components/brine.hh | 6 +- .../material/components/tabulatedcomponent.hh | 234 +++++++++--------- dumux/material/fluidsystems/brineair.hh | 2 +- dumux/material/fluidsystems/brineco2.hh | 4 +- dumux/material/fluidsystems/h2oair.hh | 2 +- .../material/fluidsystems/h2oairmesitylene.hh | 2 +- dumux/material/fluidsystems/h2oairxylene.hh | 2 +- .../fluidsystems/h2oheavyoilfluidsystem.hh | 2 +- dumux/material/fluidsystems/h2on2.hh | 2 +- dumux/material/fluidsystems/h2on2o2.hh | 2 +- dumux/material/fluidsystems/steamn2cao2h2.hh | 2 +- .../fluidsystems/test_fluidsystems.cc | 4 +- test/material/tabulation/test_tabulation.cc | 2 +- .../1p/implicit/compressible/problem.hh | 4 +- .../1pncmin/implicit/modifiedsteamn2cao2h2.hh | 2 +- .../2p1c/implicit/steaminjectionproblem.hh | 2 +- .../3p/implicit/infiltration3pproblem.hh | 2 +- tutorial/ex3/2pproblem.hh | 4 +- tutorial/ex3/README.md | 2 +- .../h2omycompressiblecomponent.hh | 2 +- .../ex3/h2omycompressiblecomponent.hh | 2 +- 21 files changed, 145 insertions(+), 141 deletions(-) diff --git a/dumux/material/components/brine.hh b/dumux/material/components/brine.hh index 9080d0cf1b..903c23dd46 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 85f4468579..eeabe9d4e4 100644 --- a/dumux/material/components/tabulatedcomponent.hh +++ b/dumux/material/components/tabulatedcomponent.hh @@ -55,11 +55,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 +617,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 +652,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 +678,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 +697,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 +712,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 +753,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 +862,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 +919,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/brineair.hh b/dumux/material/fluidsystems/brineair.hh index 0d85f38b3f..7472d5ce8e 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>> diff --git a/dumux/material/fluidsystems/brineco2.hh b/dumux/material/fluidsystems/brineco2.hh index 270e78549b..43b434d71e 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> > { diff --git a/dumux/material/fluidsystems/h2oair.hh b/dumux/material/fluidsystems/h2oair.hh index e7cf543b4d..51a3989b00 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> > diff --git a/dumux/material/fluidsystems/h2oairmesitylene.hh b/dumux/material/fluidsystems/h2oairmesitylene.hh index b612384774..cab6686f8b 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> > { diff --git a/dumux/material/fluidsystems/h2oairxylene.hh b/dumux/material/fluidsystems/h2oairxylene.hh index e3af8d5c63..dbcf45716f 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> > { diff --git a/dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh b/dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh index 1802321bc0..b8576fbfda 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> > { diff --git a/dumux/material/fluidsystems/h2on2.hh b/dumux/material/fluidsystems/h2on2.hh index 65ed85df03..f36c70cdc3 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: diff --git a/dumux/material/fluidsystems/h2on2o2.hh b/dumux/material/fluidsystems/h2on2o2.hh index cab2f9d61f..e038e1eaf5 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/steamn2cao2h2.hh b/dumux/material/fluidsystems/steamn2cao2h2.hh index 9f3be0772c..faf7b6e183 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> > diff --git a/test/material/fluidsystems/test_fluidsystems.cc b/test/material/fluidsystems/test_fluidsystems.cc index 4446f64f42..5a116a5d32 100644 --- a/test/material/fluidsystems/test_fluidsystems.cc +++ b/test/material/fluidsystems/test_fluidsystems.cc @@ -159,11 +159,11 @@ 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>(); } diff --git a/test/material/tabulation/test_tabulation.cc b/test/material/tabulation/test_tabulation.cc index 18d3e6b9da..d55fe4e44e 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/compressible/problem.hh b/test/porousmediumflow/1p/implicit/compressible/problem.hh index aae701e693..c19a961f36 100644 --- a/test/porousmediumflow/1p/implicit/compressible/problem.hh +++ b/test/porousmediumflow/1p/implicit/compressible/problem.hh @@ -65,7 +65,7 @@ SET_PROP(OnePCompressible, FluidSystem) private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); public: - using type = FluidSystems::OnePLiquid<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/1pncmin/implicit/modifiedsteamn2cao2h2.hh b/test/porousmediumflow/1pncmin/implicit/modifiedsteamn2cao2h2.hh index 68dcb33435..fc6e3db903 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/2p1c/implicit/steaminjectionproblem.hh b/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh index ef7278f414..2aa4d41b4a 100644 --- a/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh +++ b/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh @@ -59,7 +59,7 @@ 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::TwoPOneC<Scalar, H2OType >; }; diff --git a/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh b/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh index 4d7a23130a..a9dd8e5294 100644 --- a/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh +++ b/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh @@ -68,7 +68,7 @@ SET_PROP(InfiltrationThreePTypeTag, FluidSystem) { private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Water = Components::TabulatedComponent<Scalar, Components::H2O<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>>; diff --git a/tutorial/ex3/2pproblem.hh b/tutorial/ex3/2pproblem.hh index cb7bd00578..e2d685c6bb 100644 --- a/tutorial/ex3/2pproblem.hh +++ b/tutorial/ex3/2pproblem.hh @@ -76,7 +76,7 @@ SET_PROP(ExerciseThreeTwoPTypeTag, FluidSystem) { private: using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using TabulatedH2O = TabulatedComponent<Scalar, H2O<Scalar>>; + using TabulatedH2O = TabulatedComponent<H2O<Scalar>>; using WettingPhase = typename FluidSystems::OnePLiquid<Scalar, TabulatedH2O>; /*! * Uncomment first line and comment second line for using the incompressible component @@ -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 3c4829dec5..7abeabc8ab 100644 --- a/tutorial/ex3/README.md +++ b/tutorial/ex3/README.md @@ -84,7 +84,7 @@ SET_PROP(ExerciseThreeTypeTag, FluidSystem) { private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef TabulatedComponent<Scalar, H2O<Scalar>> TabulatedH2O; + typedef TabulatedComponent<H2O<Scalar>> TabulatedH2O; typedef typename FluidSystems::OnePLiquid<Scalar, TabulatedH2O> WettingPhase; /*! * Uncomment first line and comment second line for using the incompressible component diff --git a/tutorial/ex3/fluidsystems/h2omycompressiblecomponent.hh b/tutorial/ex3/fluidsystems/h2omycompressiblecomponent.hh index 783075d4b0..1dc673dce1 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 e1495370c8..de0de6c3a0 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> > { -- GitLab