diff --git a/opm/material/binarycoefficients/henryiapws.hh b/opm/material/binarycoefficients/henryiapws.hh index bea46ba30..374b42056 100644 --- a/opm/material/binarycoefficients/henryiapws.hh +++ b/opm/material/binarycoefficients/henryiapws.hh @@ -52,15 +52,15 @@ inline Scalar henryIAPWS(Scalar E, Scalar Tr = temperature/H2O::criticalTemperature(); Scalar tau = 1 - Tr; - static constexpr Scalar c[6] = { + static const Scalar c[6] = { 1.99274064, 1.09965342, -0.510839303, -1.75493479,-45.5170352, -6.7469445e5 }; - static constexpr Scalar d[6] = { + static const Scalar d[6] = { 1/3.0, 2/3.0, 5/3.0, 16/3.0, 43/3.0, 110/3.0 }; - static constexpr Scalar q = -0.023767; + static const Scalar q = -0.023767; Scalar f = 0; for (int i = 0; i < 6; ++i) { diff --git a/opm/material/components/air.hh b/opm/material/components/air.hh index c97e6f44d..4705fa0e9 100644 --- a/opm/material/components/air.hh +++ b/opm/material/components/air.hh @@ -54,19 +54,19 @@ public: * * Taken from constrelair.hh. */ - static constexpr Scalar molarMass() + static Scalar molarMass() { return 0.02896; /* [kg/mol] */ } /*! * \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of \f$AIR\f$. */ - static constexpr Scalar criticalTemperature() + static Scalar criticalTemperature() { return 132.531 ; /* [K] */ } /*! * \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of \f$AIR\f$. */ - static constexpr Scalar criticalPressure() + static Scalar criticalPressure() { return 37.86e5; /* [Pa] */ } /*! @@ -84,13 +84,13 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be compressible */ - static constexpr bool gasIsCompressible() + static bool gasIsCompressible() { return true; } /*! * \brief Returns true iff the gas phase is assumed to be ideal */ - static constexpr bool gasIsIdeal() + static bool gasIsIdeal() { return true; } /*! diff --git a/opm/material/components/co2.hh b/opm/material/components/co2.hh index c6f66bf7c..9fb4cbbad 100644 --- a/opm/material/components/co2.hh +++ b/opm/material/components/co2.hh @@ -145,13 +145,13 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be compressible */ - static constexpr bool gasIsCompressible() + static const bool gasIsCompressible() { return true; } /*! * \brief Returns true iff the gas phase is assumed to be ideal */ - static constexpr bool gasIsIdeal() + static const bool gasIsIdeal() { return false; } /*! diff --git a/opm/material/components/dnapl.hh b/opm/material/components/dnapl.hh index 781443261..cdf943d97 100644 --- a/opm/material/components/dnapl.hh +++ b/opm/material/components/dnapl.hh @@ -52,7 +52,7 @@ public: /*! * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of TCE. */ - static constexpr Scalar molarMass() + static Scalar molarMass() { return 131.39e-3; /* [kg/mol] */ }; /*! @@ -67,13 +67,13 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be compressible */ - static constexpr bool gasIsCompressible() + static bool gasIsCompressible() { return true; } /*! * \brief Returns true iff the liquid phase is assumed to be compressible */ - static constexpr bool liquidIsCompressible() + static bool liquidIsCompressible() { return false; } /*! @@ -92,7 +92,7 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be ideal */ - static constexpr bool gasIsIdeal() + static bool gasIsIdeal() { return true; } /*! @@ -101,7 +101,7 @@ public: * \param temperature temperature of component in \f$\mathrm{[K]}\f$ * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ - static constexpr Scalar liquidDensity(Scalar temperature, Scalar pressure) + static Scalar liquidDensity(Scalar temperature, Scalar pressure) { return 1460.0; /* [kg/m^3] */ } /*! @@ -110,7 +110,7 @@ public: * \param temperature temperature of component in \f$\mathrm{[K]}\f$ * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ - static const Scalar liquidViscosity(Scalar temperature, Scalar pressure) + static Scalar liquidViscosity(Scalar temperature, Scalar pressure) { return 5.7e-4; /* [Pa s] */ }; /*! @@ -119,7 +119,7 @@ public: * \param temperature temperature of component in \f$\mathrm{[K]}\f$ * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ - static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure) + static Scalar liquidEnthalpy(Scalar temperature, Scalar pressure) { return 120.0/molarMass() * temperature; /* [J/kg] */ } /*! @@ -130,7 +130,7 @@ public: * \param temperature temperature of component in \f$\mathrm{[K]}\f$ * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ - static const Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure) + static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure) { return 0.3; } }; diff --git a/opm/material/components/h2o.hh b/opm/material/components/h2o.hh index 56323b557..71a58c4fe 100644 --- a/opm/material/components/h2o.hh +++ b/opm/material/components/h2o.hh @@ -73,43 +73,43 @@ public: /*! * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of water. */ - static constexpr Scalar molarMass() + static const Scalar molarMass() { return Common::molarMass; } /*! * \brief The acentric factor \f$\mathrm{[-]}\f$ of water. */ - static constexpr Scalar acentricFactor() + static const Scalar acentricFactor() { return Common::acentricFactor; } /*! * \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of water */ - static constexpr Scalar criticalTemperature() + static const Scalar criticalTemperature() { return Common::criticalTemperature; } /*! * \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of water. */ - static constexpr Scalar criticalPressure() + static const Scalar criticalPressure() { return Common::criticalPressure; } /*! * \brief Returns the molar volume \f$\mathrm{[m^3/mol]}\f$ of water at the critical point */ - static constexpr Scalar criticalMolarVolume() + static const Scalar criticalMolarVolume() { return Common::criticalMolarVolume; } /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at water's triple point. */ - static constexpr Scalar tripleTemperature() + static const Scalar tripleTemperature() { return Common::tripleTemperature; } /*! * \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at water's triple point. */ - static constexpr Scalar triplePressure() + static const Scalar triplePressure() { return Common::triplePressure; } /*! @@ -516,13 +516,13 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be compressible */ - static constexpr bool gasIsCompressible() + static const bool gasIsCompressible() { return true; } /*! * \brief Returns true iff the liquid phase is assumed to be compressible */ - static constexpr bool liquidIsCompressible() + static const bool liquidIsCompressible() { return true; } /*! @@ -600,7 +600,7 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be ideal */ - static constexpr bool gasIsIdeal() + static const bool gasIsIdeal() { return false; } /*! diff --git a/opm/material/components/iapws/common.hh b/opm/material/components/iapws/common.hh index 10a87171f..7b9103c34 100644 --- a/opm/material/components/iapws/common.hh +++ b/opm/material/components/iapws/common.hh @@ -153,29 +153,29 @@ public: */ static Scalar thermalConductivityIAPWS(Scalar T, Scalar rho) { - static constexpr Scalar thcond_tstar = 647.26 ; - static constexpr Scalar thcond_rhostar = 317.7 ; - /*static constexpr Scalar thcond_kstar = 1.0 ;*/ + static const Scalar thcond_tstar = 647.26 ; + static const Scalar thcond_rhostar = 317.7 ; + /*static const Scalar thcond_kstar = 1.0 ;*/ - static constexpr Scalar thcond_b0 = -0.397070 ; - static constexpr Scalar thcond_b1 = 0.400302 ; - static constexpr Scalar thcond_b2 = 1.060000 ; - static constexpr Scalar thcond_B1 = -0.171587 ; - static constexpr Scalar thcond_B2 = 2.392190 ; + static const Scalar thcond_b0 = -0.397070 ; + static const Scalar thcond_b1 = 0.400302 ; + static const Scalar thcond_b2 = 1.060000 ; + static const Scalar thcond_B1 = -0.171587 ; + static const Scalar thcond_B2 = 2.392190 ; - static constexpr Scalar thcond_c1 = 0.642857 ; - static constexpr Scalar thcond_c2 = -4.11717 ; - static constexpr Scalar thcond_c3 = -6.17937 ; - static constexpr Scalar thcond_c4 = 0.00308976 ; - static constexpr Scalar thcond_c5 = 0.0822994 ; - static constexpr Scalar thcond_c6 = 10.0932 ; + static const Scalar thcond_c1 = 0.642857 ; + static const Scalar thcond_c2 = -4.11717 ; + static const Scalar thcond_c3 = -6.17937 ; + static const Scalar thcond_c4 = 0.00308976 ; + static const Scalar thcond_c5 = 0.0822994 ; + static const Scalar thcond_c6 = 10.0932 ; - static constexpr Scalar thcond_d1 = 0.0701309 ; - static constexpr Scalar thcond_d2 = 0.0118520 ; - static constexpr Scalar thcond_d3 = 0.00169937 ; - static constexpr Scalar thcond_d4 = -1.0200 ; - static constexpr int thcond_a_count = 4; - static constexpr Scalar thcond_a[thcond_a_count] = { + static const Scalar thcond_d1 = 0.0701309 ; + static const Scalar thcond_d2 = 0.0118520 ; + static const Scalar thcond_d3 = 0.00169937 ; + static const Scalar thcond_d4 = -1.0200 ; + static const int thcond_a_count = 4; + static const Scalar thcond_a[thcond_a_count] = { 0.0102811 ,0.0299621 ,0.0156146 diff --git a/opm/material/components/iapws/region1.hh b/opm/material/components/iapws/region1.hh index 4f765b818..e1141b786 100644 --- a/opm/material/components/iapws/region1.hh +++ b/opm/material/components/iapws/region1.hh @@ -287,7 +287,7 @@ public: private: static Scalar n(int i) { - static constexpr Scalar n[34] = { + static const Scalar n[34] = { 0.14632971213167, -0.84548187169114, -0.37563603672040e1, 0.33855169168385e1, -0.95791963387872, 0.15772038513228, -0.16616417199501e-1, 0.81214629983568e-3, 0.28319080123804e-3, diff --git a/opm/material/components/iapws/region2.hh b/opm/material/components/iapws/region2.hh index a21c4c704..3f267fcc4 100644 --- a/opm/material/components/iapws/region2.hh +++ b/opm/material/components/iapws/region2.hh @@ -323,7 +323,7 @@ public: private: static Scalar n_g(int i) { - static constexpr Scalar n[9] = { + static const Scalar n[9] = { -0.96927686500217e1, 0.10086655968018e2, -0.56087911283020e-2, 0.71452738081455e-1, -0.40710498223928, 0.14240819171444e1, -0.43839511319450e1, -0.28408632460772, 0.21268463753307e-1 @@ -333,7 +333,7 @@ private: static Scalar n_r(int i) { - static constexpr Scalar n[43] = { + static const Scalar n[43] = { -0.17731742473213e-2, -0.17834862292358e-1, -0.45996013696365e-1, -0.57581259083432e-1, -0.50325278727930e-1, -0.33032641670203e-4, -0.18948987516315e-3, -0.39392777243355e-2, -0.43797295650573e-1, diff --git a/opm/material/components/iapws/region4.hh b/opm/material/components/iapws/region4.hh index 835065b3b..842fc0e2e 100644 --- a/opm/material/components/iapws/region4.hh +++ b/opm/material/components/iapws/region4.hh @@ -56,7 +56,7 @@ public: */ static Scalar saturationPressure(Scalar temperature) { - static constexpr Scalar n[10] = { + static const Scalar n[10] = { 0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2, 0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2, -0.48232657361591e4, 0.40511340542057e6, -0.23855557567849, diff --git a/opm/material/components/lnapl.hh b/opm/material/components/lnapl.hh index 3a3e9a90d..1135ae825 100644 --- a/opm/material/components/lnapl.hh +++ b/opm/material/components/lnapl.hh @@ -48,7 +48,7 @@ public: /*! * \brief Returns true iff the liquid phase is assumed to be compressible */ - static constexpr bool liquidIsCompressible() + static bool liquidIsCompressible() { return false; } /*! @@ -57,7 +57,7 @@ public: * \param temperature temperature of component in \f$\mathrm{[K]}\f$ * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ - static constexpr Scalar liquidDensity(Scalar temperature, Scalar pressure) + static Scalar liquidDensity(Scalar temperature, Scalar pressure) { return 890; } /*! @@ -66,7 +66,7 @@ public: * \param temperature temperature of component in \f$\mathrm{[K]}\f$ * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ - static constexpr Scalar liquidViscosity(Scalar temperature, Scalar pressure) + static Scalar liquidViscosity(Scalar temperature, Scalar pressure) { return 8e-3; }; }; diff --git a/opm/material/components/mesitylene.hh b/opm/material/components/mesitylene.hh index b23e16cbb..d148536be 100644 --- a/opm/material/components/mesitylene.hh +++ b/opm/material/components/mesitylene.hh @@ -52,25 +52,25 @@ public: /*! * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of mesitylene */ - constexpr static Scalar molarMass() + static Scalar molarMass() { return 0.120; } /*! * \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of mesitylene */ - constexpr static Scalar criticalTemperature() + static Scalar criticalTemperature() { return 637.3; } /*! * \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of mesitylene */ - constexpr static Scalar criticalPressure() + static Scalar criticalPressure() { return 31.3e5; } /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at mesitylene's boiling point (1 atm). */ - constexpr static Scalar boilingTemperature() + static Scalar boilingTemperature() { return 437.9; } /*! @@ -140,9 +140,9 @@ public: temperature = std::min(temperature, criticalTemperature()); // regularization temperature = std::max(temperature, 0.0); // regularization - constexpr Scalar T_crit = criticalTemperature(); - constexpr Scalar Tr1 = boilingTemperature()/criticalTemperature(); - constexpr Scalar p_crit = criticalPressure(); + const Scalar T_crit = criticalTemperature(); + const Scalar Tr1 = boilingTemperature()/criticalTemperature(); + const Scalar p_crit = criticalPressure(); // Chen method, eq. 7-11.4 (at boiling) const Scalar DH_v_boil = @@ -198,19 +198,19 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be compressible */ - static constexpr bool gasIsCompressible() + static bool gasIsCompressible() { return true; } /*! * \brief Returns true iff the gas phase is assumed to be ideal */ - static constexpr bool gasIsIdeal() + static bool gasIsIdeal() { return true; } /*! * \brief Returns true iff the liquid phase is assumed to be compressible */ - static constexpr bool liquidIsCompressible() + static bool liquidIsCompressible() { return false; } /*! diff --git a/opm/material/components/n2.hh b/opm/material/components/n2.hh index e207a82e2..8fbd6d0c0 100644 --- a/opm/material/components/n2.hh +++ b/opm/material/components/n2.hh @@ -56,31 +56,31 @@ public: /*! * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of molecular nitrogen. */ - static constexpr Scalar molarMass() + static Scalar molarMass() { return 28.0134e-3;} /*! * \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of molecular nitrogen */ - static constexpr Scalar criticalTemperature() + static Scalar criticalTemperature() { return 126.192; /* [K] */ } /*! * \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of molecular nitrogen. */ - static constexpr Scalar criticalPressure() + static Scalar criticalPressure() { return 3.39858e6; /* [N/m^2] */ } /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at molecular nitrogen's triple point. */ - static constexpr Scalar tripleTemperature() + static Scalar tripleTemperature() { return 63.151; /* [K] */ } /*! * \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at molecular nitrogen's triple point. */ - static constexpr Scalar triplePressure() + static Scalar triplePressure() { return 12.523e3; /* [N/m^2] */ } /*! @@ -136,13 +136,13 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be compressible */ - static constexpr bool gasIsCompressible() + static bool gasIsCompressible() { return true; } /*! * \brief Returns true iff the gas phase is assumed to be ideal */ - static constexpr bool gasIsIdeal() + static bool gasIsIdeal() { return true; } /*! diff --git a/opm/material/components/simpleco2.hh b/opm/material/components/simpleco2.hh index db97be569..071afdeb3 100644 --- a/opm/material/components/simpleco2.hh +++ b/opm/material/components/simpleco2.hh @@ -85,13 +85,13 @@ public: /*! * \copydoc Component::gasIsCompressible */ - static constexpr bool gasIsCompressible() + static bool gasIsCompressible() { return true; } /*! * \copydoc Component::gasIsIdeal */ - static constexpr bool gasIsIdeal() + static bool gasIsIdeal() { return true; } /*! diff --git a/opm/material/components/simpleh2o.hh b/opm/material/components/simpleh2o.hh index 8a016c58d..eca08b817 100644 --- a/opm/material/components/simpleh2o.hh +++ b/opm/material/components/simpleh2o.hh @@ -63,31 +63,31 @@ public: /*! * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of water. */ - static constexpr Scalar molarMass() + static Scalar molarMass() { return 18e-3; } /*! * \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of water. */ - static constexpr Scalar criticalTemperature() + static Scalar criticalTemperature() { return 647.096; /* [K] */ } /*! * \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of water. */ - static constexpr Scalar criticalPressure() + static Scalar criticalPressure() { return 22.064e6; /* [N/m^2] */ } /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at water's triple point. */ - static constexpr Scalar tripleTemperature() + static Scalar tripleTemperature() { return 273.16; /* [K] */ } /*! * \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at water's triple point. */ - static constexpr Scalar triplePressure() + static Scalar triplePressure() { return 611.657; /* [N/m^2] */ } /*! @@ -109,7 +109,7 @@ public: if (T < tripleTemperature()) return 0; // water is solid: We don't take sublimation into account - static constexpr Scalar n[10] = { + static const Scalar n[10] = { 0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2, 0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2, -0.48232657361591e4, 0.40511340542057e6, -0.23855557567849, @@ -207,13 +207,13 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be compressible */ - static constexpr bool gasIsCompressible() + static bool gasIsCompressible() { return true; } /*! * \brief Returns true iff the liquid phase is assumed to be compressible */ - static constexpr bool liquidIsCompressible() + static bool liquidIsCompressible() { return false; } /*! @@ -231,7 +231,7 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be ideal */ - static constexpr bool gasIsIdeal() + static bool gasIsIdeal() { return true; } /*! diff --git a/opm/material/components/tabulatedcomponent.hh b/opm/material/components/tabulatedcomponent.hh index 32beb9186..59c69d05e 100644 --- a/opm/material/components/tabulatedcomponent.hh +++ b/opm/material/components/tabulatedcomponent.hh @@ -230,31 +230,31 @@ public: /*! * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of the component. */ - static constexpr Scalar molarMass() + static Scalar molarMass() { return RawComponent::molarMass(); } /*! * \brief Returns the critical temperature in \f$\mathrm{[K]}\f$ of the component. */ - static constexpr Scalar criticalTemperature() + static Scalar criticalTemperature() { return RawComponent::criticalTemperature(); } /*! * \brief Returns the critical pressure in \f$\mathrm{[Pa]}\f$ of the component. */ - static constexpr Scalar criticalPressure() + static Scalar criticalPressure() { return RawComponent::criticalPressure(); } /*! * \brief Returns the temperature in \f$\mathrm{[K]}\f$ at the component's triple point. */ - static constexpr Scalar tripleTemperature() + static Scalar tripleTemperature() { return RawComponent::tripleTemperature(); } /*! * \brief Returns the pressure in \f$\mathrm{[Pa]}\f$ at the component's triple point. */ - static constexpr Scalar triplePressure() + static Scalar triplePressure() { return RawComponent::triplePressure(); } /*! @@ -411,7 +411,7 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be compressible */ - static constexpr bool gasIsCompressible() + static bool gasIsCompressible() { return RawComponent::gasIsCompressible(); } /*! @@ -423,7 +423,7 @@ public: /*! * \brief Returns true iff the gas phase is assumed to be ideal */ - static constexpr bool gasIsIdeal() + static bool gasIsIdeal() { return RawComponent::gasIsIdeal(); } diff --git a/opm/material/components/unit.hh b/opm/material/components/unit.hh index 7f4f1dcdd..6e17bc164 100644 --- a/opm/material/components/unit.hh +++ b/opm/material/components/unit.hh @@ -87,13 +87,13 @@ public: /*! * \copydoc Component::liquidIsCompressible */ - static constexpr bool liquidIsCompressible() + static bool liquidIsCompressible() { return false; } /*! * \copydoc Component::gasIsCompressible */ - static constexpr bool gasIsCompressible() + static bool gasIsCompressible() { return false; } /*! diff --git a/opm/material/components/xylene.hh b/opm/material/components/xylene.hh index ef782ec38..632c4db5d 100644 --- a/opm/material/components/xylene.hh +++ b/opm/material/components/xylene.hh @@ -54,27 +54,21 @@ public: /*! * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of xylene */ - constexpr static Scalar molarMass() + static Scalar molarMass() { return 0.106; } /*! * \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of xylene */ - constexpr static Scalar criticalTemperature() + static Scalar criticalTemperature() { return 617.1; } /*! * \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of xylene */ - constexpr static Scalar criticalPressure() + static Scalar criticalPressure() { return 35.4e5; } - /*! - * \brief Returns the temperature \f$\mathrm{[K]}\f$ at xylene's boiling point (1 atm). - */ - constexpr static Scalar boilingTemperature() - { return 412.3; } - /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at xylene's triple point. */ @@ -184,9 +178,9 @@ public: temperature = std::min(temperature, criticalTemperature()); // regularization temperature = std::max(temperature, 0.0); // regularization - constexpr Scalar T_crit = criticalTemperature(); - constexpr Scalar Tr1 = boilingTemperature()/criticalTemperature(); - constexpr Scalar p_crit = criticalPressure(); + const Scalar T_crit = criticalTemperature(); + const Scalar Tr1 = boilingTemperature()/criticalTemperature(); + const Scalar p_crit = criticalPressure(); // Chen method, eq. 7-11.4 (at boiling) const Scalar DH_v_boil = Consts::R * T_crit * Tr1 @@ -269,19 +263,19 @@ public: /*! * \copydoc Component::gasIsCompressible */ - static constexpr bool gasIsCompressible() + static bool gasIsCompressible() { return true; } /*! * \copydoc Component::gasIsIdeal */ - static constexpr bool gasIsIdeal() + static bool gasIsIdeal() { return true; } /*! * \copydoc Component::liquidIsCompressible */ - static constexpr bool liquidIsCompressible() + static bool liquidIsCompressible() { return false; } /*! diff --git a/opm/material/constraintsolvers/compositionfromfugacities.hh b/opm/material/constraintsolvers/compositionfromfugacities.hh index 685169ad7..61bac0d8b 100644 --- a/opm/material/constraintsolvers/compositionfromfugacities.hh +++ b/opm/material/constraintsolvers/compositionfromfugacities.hh @@ -231,7 +231,7 @@ protected: } // assemble jacobian matrix of the constraints for the composition - static constexpr Scalar eps = std::numeric_limits::epsilon()*1e6; + static const Scalar eps = std::numeric_limits::epsilon()*1e6; for (int i = 0; i < numComponents; ++ i) { //////// // approximately calculate partial derivatives of the diff --git a/opm/material/constraintsolvers/immiscibleflash.hh b/opm/material/constraintsolvers/immiscibleflash.hh index c5df21a52..c2e3b2d3c 100644 --- a/opm/material/constraintsolvers/immiscibleflash.hh +++ b/opm/material/constraintsolvers/immiscibleflash.hh @@ -63,15 +63,15 @@ namespace Opm { template class ImmiscibleFlash { - static constexpr int numPhases = FluidSystem::numPhases; - static constexpr int numComponents = FluidSystem::numComponents; + static const int numPhases = FluidSystem::numPhases; + static const int numComponents = FluidSystem::numComponents; static_assert(numPhases == numComponents, "Immiscibility assumes that the number of phases" " is equal to the number of components"); typedef typename FluidSystem::ParameterCache ParameterCache; - static constexpr int numEq = numPhases; + static const int numEq = numPhases; typedef Dune::FieldMatrix Matrix; typedef Dune::FieldVector Vector; diff --git a/opm/material/constraintsolvers/misciblemultiphasecomposition.hh b/opm/material/constraintsolvers/misciblemultiphasecomposition.hh index 3524cd88e..924256fe9 100644 --- a/opm/material/constraintsolvers/misciblemultiphasecomposition.hh +++ b/opm/material/constraintsolvers/misciblemultiphasecomposition.hh @@ -114,8 +114,8 @@ private: template class MiscibleMultiPhaseComposition { - static constexpr int numPhases = FluidSystem::numPhases; - static constexpr int numComponents = FluidSystem::numComponents; + static const int numPhases = FluidSystem::numPhases; + static const int numComponents = FluidSystem::numComponents; static_assert(numPhases <= numComponents, "This solver requires that the number fluid phases is smaller or equal " @@ -180,7 +180,7 @@ public: // create the linear system of equations which defines the // mole fractions - static constexpr int numEq = numComponents*numPhases; + static const int numEq = numComponents*numPhases; Dune::FieldMatrix M(0.0); Dune::FieldVector x(0.0); Dune::FieldVector b(0.0); diff --git a/opm/material/constraintsolvers/ncpflash.hh b/opm/material/constraintsolvers/ncpflash.hh index 059fdc590..50349d449 100644 --- a/opm/material/constraintsolvers/ncpflash.hh +++ b/opm/material/constraintsolvers/ncpflash.hh @@ -83,7 +83,7 @@ class NcpFlash typedef typename FluidSystem::ParameterCache ParameterCache; - static constexpr int numEq = numPhases*(numComponents + 1); + static const int numEq = numPhases*(numComponents + 1); typedef Dune::FieldMatrix Matrix; typedef Dune::FieldVector Vector; diff --git a/opm/material/fluidsystems/1pfluidsystem.hh b/opm/material/fluidsystems/1pfluidsystem.hh index c26ca02f8..59db3992f 100644 --- a/opm/material/fluidsystems/1pfluidsystem.hh +++ b/opm/material/fluidsystems/1pfluidsystem.hh @@ -66,7 +66,7 @@ public: ****************************************/ //! \copydoc BaseFluidSystem::numPhases - static constexpr int numPhases = 1; + static const int numPhases = 1; //! \copydoc BaseFluidSystem::phaseName static const char *phaseName(int phaseIdx) @@ -77,7 +77,7 @@ public: } //! \copydoc BaseFluidSystem::isLiquid - static constexpr bool isLiquid(int phaseIdx) + static bool isLiquid(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -85,7 +85,7 @@ public: } //! \copydoc BaseFluidSystem::isCompressible - static constexpr bool isCompressible(int phaseIdx) + static bool isCompressible(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -94,7 +94,7 @@ public: } //! \copydoc BaseFluidSystem::isIdealGas - static constexpr bool isIdealMixture(int phaseIdx) + static bool isIdealMixture(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -103,7 +103,7 @@ public: } //! \copydoc BaseFluidSystem::isIdealMixture - static constexpr bool isIdealGas(int phaseIdx) + static bool isIdealGas(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -116,7 +116,7 @@ public: ****************************************/ //! \copydoc BaseFluidSystem::numComponents - static constexpr int numComponents = 1; + static const int numComponents = 1; //! \copydoc BaseFluidSystem::componentName static const char *componentName(int compIdx) @@ -127,7 +127,7 @@ public: } //! \copydoc BaseFluidSystem::molarMass - static constexpr Scalar molarMass(int compIdx) + static const Scalar molarMass(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); @@ -139,7 +139,7 @@ public: * * \param compIdx The index of the component to consider */ - static constexpr Scalar criticalTemperature(int compIdx) + static const Scalar criticalTemperature(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); @@ -151,7 +151,7 @@ public: * * \param compIdx The index of the component to consider */ - static constexpr Scalar criticalPressure(int compIdx) + static const Scalar criticalPressure(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); @@ -163,7 +163,7 @@ public: * * \param compIdx The index of the component to consider */ - static constexpr Scalar acentricFactor(int compIdx) + static const Scalar acentricFactor(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); diff --git a/opm/material/fluidsystems/2pimmisciblefluidsystem.hh b/opm/material/fluidsystems/2pimmisciblefluidsystem.hh index ea21511d9..f7e6d1d25 100644 --- a/opm/material/fluidsystems/2pimmisciblefluidsystem.hh +++ b/opm/material/fluidsystems/2pimmisciblefluidsystem.hh @@ -72,12 +72,12 @@ public: ****************************************/ //! \copydoc BaseFluidSystem::numPhases - static constexpr int numPhases = 2; + static const int numPhases = 2; //! Index of the wetting phase - static constexpr int wPhaseIdx = 0; + static const int wPhaseIdx = 0; //! Index of the non-wetting phase - static constexpr int nPhaseIdx = 1; + static const int nPhaseIdx = 1; //! \copydoc BaseFluidSystem::phaseName static const char *phaseName(int phaseIdx) @@ -92,7 +92,7 @@ public: } //! \copydoc BaseFluidSystem::isLiquid - static constexpr bool isLiquid(int phaseIdx) + static bool isLiquid(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return @@ -102,7 +102,7 @@ public: } //! \copydoc BaseFluidSystem::isCompressible - static constexpr bool isCompressible(int phaseIdx) + static bool isCompressible(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -113,7 +113,7 @@ public: } //! \copydoc BaseFluidSystem::isIdealGas - static constexpr bool isIdealGas(int phaseIdx) + static bool isIdealGas(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -125,7 +125,7 @@ public: } //! \copydoc BaseFluidSystem::isIdealMixture - static constexpr bool isIdealMixture(int phaseIdx) + static bool isIdealMixture(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -138,12 +138,12 @@ public: ****************************************/ //! \copydoc BaseFluidSystem::numComponents - static constexpr int numComponents = 2; + static const int numComponents = 2; //! Index of the wetting phase's component - static constexpr int wCompIdx = 0; + static const int wCompIdx = 0; //! Index of the non-wetting phase's component - static constexpr int nCompIdx = 1; + static const int nCompIdx = 1; //! \copydoc BaseFluidSystem::componentName static const char *componentName(int compIdx) @@ -156,7 +156,7 @@ public: } //! \copydoc BaseFluidSystem::molarMass - static constexpr Scalar molarMass(int compIdx) + static Scalar molarMass(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); @@ -170,7 +170,7 @@ public: /*! * \brief Critical temperature of a component [K]. */ - static constexpr Scalar criticalTemperature(int compIdx) + static Scalar criticalTemperature(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); // let the fluids decide @@ -183,7 +183,7 @@ public: /*! * \brief Critical pressure of a component [Pa]. */ - static constexpr Scalar criticalPressure(int compIdx) + static Scalar criticalPressure(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); // let the fluids decide @@ -196,7 +196,7 @@ public: /*! * \brief The acentric factor of a component []. */ - static constexpr Scalar acentricFactor(int compIdx) + static Scalar acentricFactor(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); // let the fluids decide diff --git a/opm/material/fluidsystems/blackoilfluidsystem.hh b/opm/material/fluidsystems/blackoilfluidsystem.hh index 4e0b7951b..9a5d4ef46 100644 --- a/opm/material/fluidsystems/blackoilfluidsystem.hh +++ b/opm/material/fluidsystems/blackoilfluidsystem.hh @@ -286,7 +286,7 @@ public: } //! \copydoc BaseFluidSystem::isLiquid - static constexpr bool isLiquid(const int phaseIdx) + static bool isLiquid(const int phaseIdx) { // assert(0 <= phaseIdx && phaseIdx < numPhases); return phaseIdx != gPhaseIdx; @@ -320,7 +320,7 @@ public: { return molarMass_[compIdx]; } //! \copydoc BaseFluidSystem::isIdealMixture - static constexpr bool isIdealMixture(int phaseIdx) + static bool isIdealMixture(int phaseIdx) { // fugacity coefficients are only pressure dependent -> we // have an ideal mixture @@ -328,11 +328,11 @@ public: } //! \copydoc BaseFluidSystem::isCompressible - static constexpr bool isCompressible(int phaseIdx) + static bool isCompressible(int phaseIdx) { return true; /* all phases are compressible */ } //! \copydoc BaseFluidSystem::isIdealGas - static constexpr bool isIdealGas(int phaseIdx) + static bool isIdealGas(int phaseIdx) { return false; } /**************************************** diff --git a/opm/material/fluidsystems/gasphase.hh b/opm/material/fluidsystems/gasphase.hh index be009e17f..0e2798789 100644 --- a/opm/material/fluidsystems/gasphase.hh +++ b/opm/material/fluidsystems/gasphase.hh @@ -48,49 +48,49 @@ public: /*! * \brief Returs whether the fluid is a liquid */ - static constexpr bool isLiquid() + static bool isLiquid() { return false; } /*! * \brief Returns true iff the fluid is assumed to be compressible */ - static constexpr bool isCompressible() + static bool isCompressible() { return Component::gasIsCompressible(); } /*! * \brief Returns true iff the fluid is assumed to be an ideal gas */ - static constexpr bool isIdealGas() + static bool isIdealGas() { return Component::gasIsIdeal(); } /*! * \brief The mass in [kg] of one mole of the component. */ - static constexpr Scalar molarMass() + static Scalar molarMass() { return Component::molarMass(); } /*! * \brief Returns the critical temperature of the component */ - static constexpr Scalar criticalTemperature() + static Scalar criticalTemperature() { return Component::criticalTemperature(); } /*! * \brief Returns the critical pressure of the component */ - static constexpr Scalar criticalPressure() + static Scalar criticalPressure() { return Component::criticalPressure(); } /*! * \brief Returns the temperature at the component's triple point. */ - static constexpr Scalar tripleTemperature() + static Scalar tripleTemperature() { return Component::tripleTemperature(); } /*! * \brief Returns the pressure at the component's triple point. */ - static constexpr Scalar triplePressure() + static Scalar triplePressure() { return Component::triplePressure(); } /*! diff --git a/opm/material/fluidsystems/h2oairfluidsystem.hh b/opm/material/fluidsystems/h2oairfluidsystem.hh index 374375f0e..aac059f6e 100644 --- a/opm/material/fluidsystems/h2oairfluidsystem.hh +++ b/opm/material/fluidsystems/h2oairfluidsystem.hh @@ -71,12 +71,12 @@ public: typedef Opm::Air Air; //! \copydoc BaseFluidSystem::numPhases - static constexpr int numPhases = 2; + static const int numPhases = 2; //! The index of the liquid phase - static constexpr int lPhaseIdx = 0; + static const int lPhaseIdx = 0; //! The index of the gas phase - static constexpr int gPhaseIdx = 1; + static const int gPhaseIdx = 1; //! \copydoc BaseFluidSystem::phaseName static const char *phaseName(int phaseIdx) @@ -89,14 +89,14 @@ public: } //! \copydoc BaseFluidSystem::isLiquid - static constexpr bool isLiquid(int phaseIdx) + static bool isLiquid(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return phaseIdx != gPhaseIdx; } //! \copydoc BaseFluidSystem::isCompressible - static constexpr bool isCompressible(int phaseIdx) + static bool isCompressible(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return (phaseIdx == gPhaseIdx) @@ -108,7 +108,7 @@ public: } //! \copydoc BaseFluidSystem::isIdealGas - static constexpr bool isIdealGas(int phaseIdx) + static bool isIdealGas(int phaseIdx) { return (phaseIdx == gPhaseIdx) @@ -117,7 +117,7 @@ public: } //! \copydoc BaseFluidSystem::isIdealMixture - static constexpr bool isIdealMixture(int phaseIdx) + static bool isIdealMixture(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); // we assume Henry's and Rault's laws for the water phase and @@ -131,12 +131,12 @@ public: ****************************************/ //! \copydoc BaseFluidSystem::numComponents - static constexpr int numComponents = 2; + static const int numComponents = 2; //! The index of the water component - static constexpr int H2OIdx = 0; + static const int H2OIdx = 0; //! The index of the air component - static constexpr int AirIdx = 1; + static const int AirIdx = 1; //! \copydoc BaseFluidSystem::componentName static const char *componentName(int compIdx) @@ -150,7 +150,7 @@ public: } //! \copydoc BaseFluidSystem::molarMass - static constexpr Scalar molarMass(int compIdx) + static Scalar molarMass(int compIdx) { return (compIdx == H2OIdx) @@ -166,7 +166,7 @@ public: * * \param compIdx The index of the component to consider */ - static constexpr Scalar criticalTemperature(int compIdx) + static Scalar criticalTemperature(int compIdx) { return (compIdx == H2OIdx) @@ -181,7 +181,7 @@ public: * * \param compIdx The index of the component to consider */ - static constexpr Scalar criticalPressure(int compIdx) + static Scalar criticalPressure(int compIdx) { return (compIdx == H2OIdx) @@ -196,7 +196,7 @@ public: * * \param compIdx The index of the component to consider */ - static constexpr Scalar acentricFactor(int compIdx) + static Scalar acentricFactor(int compIdx) { return (compIdx == H2OIdx) diff --git a/opm/material/fluidsystems/h2oairmesitylenefluidsystem.hh b/opm/material/fluidsystems/h2oairmesitylenefluidsystem.hh index cfbcf5396..7f204465f 100644 --- a/opm/material/fluidsystems/h2oairmesitylenefluidsystem.hh +++ b/opm/material/fluidsystems/h2oairmesitylenefluidsystem.hh @@ -128,18 +128,18 @@ public: } //! \copydoc BaseFluidSystem::isLiquid - static constexpr bool isLiquid(int phaseIdx) + static bool isLiquid(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return phaseIdx != gPhaseIdx; } //! \copydoc BaseFluidSystem::isIdealGas - static constexpr bool isIdealGas(int phaseIdx) + static bool isIdealGas(int phaseIdx) { return phaseIdx == gPhaseIdx && H2O::gasIsIdeal() && Air::gasIsIdeal() && NAPL::gasIsIdeal(); } //! \copydoc BaseFluidSystem::isCompressible - static constexpr bool isCompressible(int phaseIdx) + static bool isCompressible(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); // gases are always compressible @@ -151,7 +151,7 @@ public: } //! \copydoc BaseFluidSystem::isIdealMixture - static constexpr bool isIdealMixture(int phaseIdx) + static bool isIdealMixture(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); // we assume Henry's and Rault's laws for the water phase and @@ -183,7 +183,7 @@ public: } //! \copydoc BaseFluidSystem::molarMass - static constexpr Scalar molarMass(int compIdx) + static Scalar molarMass(int compIdx) { return (compIdx == H2OIdx) diff --git a/opm/material/fluidsystems/h2oairxylenefluidsystem.hh b/opm/material/fluidsystems/h2oairxylenefluidsystem.hh index 6a5c6b35f..20f2edf85 100644 --- a/opm/material/fluidsystems/h2oairxylenefluidsystem.hh +++ b/opm/material/fluidsystems/h2oairxylenefluidsystem.hh @@ -87,18 +87,18 @@ public: { } //! \copydoc BaseFluidSystem::isLiquid - static constexpr bool isLiquid(int phaseIdx) + static bool isLiquid(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return phaseIdx != gPhaseIdx; } //! \copydoc BaseFluidSystem::isIdealGas - static constexpr bool isIdealGas(int phaseIdx) + static bool isIdealGas(int phaseIdx) { return phaseIdx == gPhaseIdx && H2O::gasIsIdeal() && Air::gasIsIdeal() && NAPL::gasIsIdeal(); } //! \copydoc BaseFluidSystem::isIdealMixture - static constexpr bool isIdealMixture(int phaseIdx) + static bool isIdealMixture(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -109,7 +109,7 @@ public: } //! \copydoc BaseFluidSystem::isCompressible - static constexpr bool isCompressible(int phaseIdx) + static bool isCompressible(int phaseIdx) { return (phaseIdx == gPhaseIdx) @@ -145,7 +145,7 @@ public: } //! \copydoc BaseFluidSystem::molarMass - static constexpr Scalar molarMass(int compIdx) + static Scalar molarMass(int compIdx) { return (compIdx == H2OIdx) diff --git a/opm/material/fluidsystems/h2on2fluidsystem.hh b/opm/material/fluidsystems/h2on2fluidsystem.hh index 93c98d35f..fb0a44a72 100644 --- a/opm/material/fluidsystems/h2on2fluidsystem.hh +++ b/opm/material/fluidsystems/h2on2fluidsystem.hh @@ -68,12 +68,12 @@ public: ****************************************/ //! \copydoc BaseFluidSystem::numPhases - static constexpr int numPhases = 2; + static const int numPhases = 2; //! Index of the liquid phase - static constexpr int lPhaseIdx = 0; + static const int lPhaseIdx = 0; //! Index of the gas phase - static constexpr int gPhaseIdx = 1; + static const int gPhaseIdx = 1; //! \copydoc BaseFluidSystem::phaseName static const char *phaseName(int phaseIdx) @@ -88,14 +88,14 @@ public: } //! \copydoc BaseFluidSystem::isLiquid - static constexpr bool isLiquid(int phaseIdx) + static bool isLiquid(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return phaseIdx != gPhaseIdx; } //! \copydoc BaseFluidSystem::isCompressible - static constexpr bool isCompressible(int phaseIdx) + static bool isCompressible(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); // gases are always compressible @@ -106,7 +106,7 @@ public: } //! \copydoc BaseFluidSystem::isIdealGas - static constexpr bool isIdealGas(int phaseIdx) + static bool isIdealGas(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); @@ -117,7 +117,7 @@ public: } //! \copydoc BaseFluidSystem::isIdealMixture - static constexpr bool isIdealMixture(int phaseIdx) + static bool isIdealMixture(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); // we assume Henry's and Rault's laws for the water phase and @@ -131,12 +131,12 @@ public: ****************************************/ //! \copydoc BaseFluidSystem::numComponents - static constexpr int numComponents = 2; + static const int numComponents = 2; //! The component index of water - static constexpr int H2OIdx = 0; + static const int H2OIdx = 0; //! The component index of molecular nitrogen - static constexpr int N2Idx = 1; + static const int N2Idx = 1; //! The component for pure water typedef TabulatedH2O H2O; @@ -159,7 +159,7 @@ public: } //! \copydoc BaseFluidSystem::molarMass - static constexpr Scalar molarMass(int compIdx) + static Scalar molarMass(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); return (compIdx == H2OIdx) @@ -174,7 +174,7 @@ public: * * \copydetails Doxygen::compIdxParam */ - static constexpr Scalar criticalTemperature(int compIdx) + static Scalar criticalTemperature(int compIdx) { return (compIdx == H2OIdx) ? H2O::criticalTemperature() @@ -188,7 +188,7 @@ public: * * \copydetails Doxygen::compIdxParam */ - static constexpr Scalar criticalPressure(int compIdx) + static Scalar criticalPressure(int compIdx) { return (compIdx == H2OIdx) ? H2O::criticalPressure() @@ -202,7 +202,7 @@ public: * * \copydetails Doxygen::compIdxParam */ - static constexpr Scalar acentricFactor(int compIdx) + static Scalar acentricFactor(int compIdx) { return (compIdx == H2OIdx) ? H2O::acentricFactor() diff --git a/opm/material/fluidsystems/h2on2liquidphasefluidsystem.hh b/opm/material/fluidsystems/h2on2liquidphasefluidsystem.hh index 0c84cc16d..3ab6108eb 100644 --- a/opm/material/fluidsystems/h2on2liquidphasefluidsystem.hh +++ b/opm/material/fluidsystems/h2on2liquidphasefluidsystem.hh @@ -69,10 +69,10 @@ public: ****************************************/ //! \copydoc BaseFluidSystem::numPhases - static constexpr int numPhases = 1; + static const int numPhases = 1; //! Index of the liquid phase - static constexpr int lPhaseIdx = 0; + static const int lPhaseIdx = 0; //! \copydoc BaseFluidSystem::phaseName static const char *phaseName(int phaseIdx) @@ -83,14 +83,14 @@ public: } //! \copydoc BaseFluidSystem::isLiquid - static constexpr bool isLiquid(int phaseIdx) + static bool isLiquid(int phaseIdx) { //assert(phaseIdx == lPhaseIdx); return true; //only water phase present } //! \copydoc BaseFluidSystem::isCompressible - static constexpr bool isCompressible(int phaseIdx) + static bool isCompressible(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); // the water component decides for the liquid phase... @@ -98,14 +98,14 @@ public: } //! \copydoc BaseFluidSystem::isIdealGas - static constexpr bool isIdealGas(int phaseIdx) + static bool isIdealGas(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return false; // not a gas (only liquid phase present) } //! \copydoc BaseFluidSystem::isIdealMixture - static constexpr bool isIdealMixture(int phaseIdx) + static bool isIdealMixture(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); // we assume Henry's and Rault's laws for the water phase and @@ -119,12 +119,12 @@ public: ****************************************/ //! \copydoc BaseFluidSystem::numComponents - static constexpr int numComponents = 2; + static const int numComponents = 2; //! The index of the water component - static constexpr int H2OIdx = 0; + static const int H2OIdx = 0; //! The index of the component for molecular nitrogen - static constexpr int N2Idx = 1; + static const int N2Idx = 1; //! The type of the component for pure water typedef TabulatedH2O H2O; @@ -147,7 +147,7 @@ public: } //! \copydoc BaseFluidSystem::molarMass - static constexpr Scalar molarMass(int compIdx) + static Scalar molarMass(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); return (compIdx == H2OIdx) @@ -162,7 +162,7 @@ public: * * \param compIdx The index of the component to consider */ - static constexpr Scalar criticalTemperature(int compIdx) + static Scalar criticalTemperature(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); return (compIdx == H2OIdx) @@ -177,7 +177,7 @@ public: * * \param compIdx The index of the component to consider */ - static constexpr Scalar criticalPressure(int compIdx) + static Scalar criticalPressure(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); return (compIdx == H2OIdx) @@ -192,7 +192,7 @@ public: * * \param compIdx The index of the component to consider */ - static constexpr Scalar acentricFactor(int compIdx) + static Scalar acentricFactor(int compIdx) { //assert(0 <= compIdx && compIdx < numComponents); return (compIdx == H2OIdx) diff --git a/opm/material/fluidsystems/liquidphase.hh b/opm/material/fluidsystems/liquidphase.hh index 24cace9d6..2cb2b7bf1 100644 --- a/opm/material/fluidsystems/liquidphase.hh +++ b/opm/material/fluidsystems/liquidphase.hh @@ -42,35 +42,35 @@ public: { return Component::name(); } //! \copydoc GasPhase::isLiquid - static constexpr bool isLiquid() + static bool isLiquid() { return true; } //! \copydoc GasPhase::isCompressible - static constexpr bool isCompressible() + static bool isCompressible() { return Component::liquidIsCompressible(); } //! \copydoc GasPhase::isIdealGas - static constexpr bool isIdealGas() + static bool isIdealGas() { return false; /* we're a liquid! */ } //! \copydoc GasPhase::molarMass - static constexpr Scalar molarMass() + static Scalar molarMass() { return Component::molarMass(); } //! \copydoc GasPhase::criticalTemperature - static constexpr Scalar criticalTemperature() + static Scalar criticalTemperature() { return Component::criticalTemperature(); } //! \copydoc GasPhase::criticalPressure - static constexpr Scalar criticalPressure() + static Scalar criticalPressure() { return Component::criticalPressure(); } //! \copydoc GasPhase::tripleTemperature - static constexpr Scalar tripleTemperature() + static Scalar tripleTemperature() { return Component::tripleTemperature(); } //! \copydoc GasPhase::triplePressure - static constexpr Scalar triplePressure() + static Scalar triplePressure() { return Component::triplePressure(); } //! \copydoc GasPhase::vaporPressure diff --git a/opm/material/fluidsystems/spe5fluidsystem.hh b/opm/material/fluidsystems/spe5fluidsystem.hh index babe29ab6..7d6762279 100644 --- a/opm/material/fluidsystems/spe5fluidsystem.hh +++ b/opm/material/fluidsystems/spe5fluidsystem.hh @@ -92,7 +92,7 @@ public: } //! \copydoc BaseFluidSystem::isLiquid - static constexpr bool isLiquid(int phaseIdx) + static bool isLiquid(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return phaseIdx != gPhaseIdx; @@ -103,21 +103,21 @@ public: * * In the SPE-5 problems all fluids are compressible... */ - static constexpr bool isCompressible(int phaseIdx) + static bool isCompressible(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return true; } //! \copydoc BaseFluidSystem::isIdealGas - static constexpr bool isIdealGas(int phaseIdx) + static bool isIdealGas(int phaseIdx) { //assert(0 <= phaseIdx && phaseIdx < numPhases); return false; // gas is not ideal here! } //! \copydoc BaseFluidSystem::isIdealMixture - static constexpr bool isIdealMixture(int phaseIdx) + static bool isIdealMixture(int phaseIdx) { // always use the reference oil for the fugacity coefficents, // so they cannot be dependent on composition and they the @@ -158,7 +158,7 @@ public: } //! \copydoc BaseFluidSystem::molarMass - static constexpr Scalar molarMass(int compIdx) + static Scalar molarMass(int compIdx) { return (compIdx == H2OIdx) @@ -181,7 +181,7 @@ public: /*! * \brief Critical temperature of a component [K]. */ - static constexpr Scalar criticalTemperature(int compIdx) + static Scalar criticalTemperature(int compIdx) { return (compIdx == H2OIdx) @@ -204,7 +204,7 @@ public: /*! * \brief Critical pressure of a component [Pa]. */ - static constexpr Scalar criticalPressure(int compIdx) + static Scalar criticalPressure(int compIdx) { return (compIdx == H2OIdx) @@ -250,7 +250,7 @@ public: /*! * \brief The acentric factor of a component []. */ - static constexpr Scalar acentricFactor(int compIdx) + static Scalar acentricFactor(int compIdx) { return (compIdx == H2OIdx) @@ -277,8 +277,6 @@ public: */ static Scalar interactionCoefficient(int comp1Idx, int comp2Idx) { - // TODO: make this a constexpr method !? - int i = std::min(comp1Idx, comp2Idx); int j = std::max(comp1Idx, comp2Idx); if (i == C1Idx && (j == C15Idx || j == C20Idx))