Permalink
Browse files

Merge pull request #12864 from cpgr/fp12862

Update fluid properties method names
  • Loading branch information...
andrsd committed Feb 7, 2019
2 parents 6ce9ec1 + 539bd46 commit 9e9ee327dc2efad5bb946fcd7a5cf6208518fc5e
Showing with 869 additions and 681 deletions.
  1. +21 −7 modules/fluid_properties/include/userobjects/CO2FluidProperties.h
  2. +0 −20 modules/fluid_properties/include/userobjects/HelmholtzFluidProperties.h
  3. +21 −7 modules/fluid_properties/include/userobjects/HydrogenFluidProperties.h
  4. +11 −10 modules/fluid_properties/include/userobjects/IdealGasFluidPropertiesPT.h
  5. +3 −1 modules/fluid_properties/include/userobjects/MethaneFluidProperties.h
  6. +0 −22 modules/fluid_properties/include/userobjects/NaClFluidProperties.h
  7. +21 −7 modules/fluid_properties/include/userobjects/NitrogenFluidProperties.h
  8. +1 −22 modules/fluid_properties/include/userobjects/SimpleFluidProperties.h
  9. +30 −2 modules/fluid_properties/include/userobjects/SinglePhaseFluidProperties.h
  10. +1 −21 modules/fluid_properties/include/userobjects/TabulatedFluidProperties.h
  11. +17 −25 modules/fluid_properties/include/userobjects/Water97FluidProperties.h
  12. +38 −9 modules/fluid_properties/src/userobjects/CO2FluidProperties.C
  13. +0 −44 modules/fluid_properties/src/userobjects/HelmholtzFluidProperties.C
  14. +41 −9 modules/fluid_properties/src/userobjects/HydrogenFluidProperties.C
  15. +13 −10 modules/fluid_properties/src/userobjects/IdealGasFluidPropertiesPT.C
  16. +8 −2 modules/fluid_properties/src/userobjects/MethaneFluidProperties.C
  17. +0 −41 modules/fluid_properties/src/userobjects/NaClFluidProperties.C
  18. +41 −9 modules/fluid_properties/src/userobjects/NitrogenFluidProperties.C
  19. +1 −45 modules/fluid_properties/src/userobjects/SimpleFluidProperties.C
  20. +169 −60 modules/fluid_properties/src/userobjects/SinglePhaseFluidProperties.C
  21. +2 −37 modules/fluid_properties/src/userobjects/TabulatedFluidProperties.C
  22. +24 −36 modules/fluid_properties/src/userobjects/Water97FluidProperties.C
  23. +0 −70 modules/fluid_properties/test/include/utils/SinglePhaseFluidPropertiesPTTestUtils.h
  24. +2 −1 modules/porous_flow/src/materials/PorousFlowSingleComponentFluid.C
  25. +9 −9 modules/porous_flow/src/userobjects/PorousFlowBrineCO2.C
  26. +29 −29 modules/porous_flow/src/userobjects/PorousFlowWaterNCG.C
  27. +0 −1 unit/include/Water97FluidPropertiesTest.h
  28. +40 −10 unit/src/CO2FluidPropertiesTest.C
  29. +60 −30 unit/src/HydrogenFluidPropertiesTest.C
  30. +38 −8 unit/src/IdealGasFluidPropertiesPTTest.C
  31. +39 −9 unit/src/MethaneFluidPropertiesTest.C
  32. +6 −6 unit/src/NaClFluidPropertiesTest.C
  33. +59 −29 unit/src/NitrogenFluidPropertiesTest.C
  34. +45 −15 unit/src/SimpleFluidPropertiesTest.C
  35. +32 −2 unit/src/TabulatedFluidPropertiesTest.C
  36. +47 −16 unit/src/Water97FluidPropertiesTest.C
@@ -58,12 +58,24 @@ class CO2FluidProperties : public HelmholtzFluidProperties

virtual Real mu_from_rho_T(Real density, Real temperature) const override;

virtual void mu_drhoT_from_rho_T(Real density,
Real temperature,
Real ddensity_dT,
Real & mu,
Real & dmu_drho,
Real & dmu_dT) const override;
virtual void mu_from_rho_T(Real density,
Real temperature,
Real ddensity_dT,
Real & mu,
Real & dmu_drho,
Real & dmu_dT) const override;

virtual void
rho_mu_from_p_T(Real pressure, Real temperature, Real & rho, Real & mu) const override;

virtual void rho_mu_from_p_T(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & mu,
Real & dmu_dp,
Real & dmu_dT) const override;

virtual std::string fluidName() const override;

@@ -103,6 +115,8 @@ class CO2FluidProperties : public HelmholtzFluidProperties

virtual Real vaporPressure(Real temperature) const override;

virtual void vaporPressure(Real temperature, Real & psat, Real & dpsat_dT) const override;

/**
* Saturated liquid density of CO2
* Valid for temperatures between the triple point temperature
@@ -131,7 +145,7 @@ class CO2FluidProperties : public HelmholtzFluidProperties

virtual Real henryConstant(Real temperature) const override;

virtual void henryConstant_dT(Real temperature, Real & Kh, Real & dKh_dT) const override;
virtual void henryConstant(Real temperature, Real & Kh, Real & dKh_dT) const override;

/**
* Partial density of dissolved CO2
@@ -42,15 +42,6 @@ class HelmholtzFluidProperties : public SinglePhaseFluidProperties
virtual Real e_from_p_T(Real pressure, Real temperature) const override;
virtual void e_from_p_T(Real p, Real T, Real & e, Real & de_dp, Real & de_dT) const override;

virtual void rho_e_dpT(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & e,
Real & de_dp,
Real & de_dT) const override;

virtual Real c_from_p_T(Real pressure, Real temperature) const override;

virtual Real cp_from_p_T(Real pressure, Real temperature) const override;
@@ -59,17 +50,6 @@ class HelmholtzFluidProperties : public SinglePhaseFluidProperties

virtual Real cv_from_p_T(Real pressure, Real temperature) const override;

virtual void rho_mu(Real pressure, Real temperature, Real & rho, Real & mu) const override;

virtual void rho_mu_dpT(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & mu,
Real & dmu_dp,
Real & dmu_dT) const override;

virtual Real s_from_p_T(Real pressure, Real temperature) const override;
virtual void s_from_p_T(Real p, Real T, Real & s, Real & ds_dp, Real & ds_dT) const override;

@@ -48,18 +48,30 @@ class HydrogenFluidProperties : public HelmholtzFluidProperties

virtual Real mu_from_rho_T(Real density, Real temperature) const override;

virtual void mu_drhoT_from_rho_T(Real density,
Real temperature,
Real ddensity_dT,
Real & mu,
Real & dmu_drho,
Real & dmu_dT) const override;
virtual void mu_from_rho_T(Real density,
Real temperature,
Real ddensity_dT,
Real & mu,
Real & dmu_drho,
Real & dmu_dT) const override;

virtual Real mu_from_p_T(Real pressure, Real temperature) const override;

virtual void mu_from_p_T(
Real pressure, Real temperature, Real & mu, Real & dmu_dp, Real & dmu_dT) const override;

virtual void
rho_mu_from_p_T(Real pressure, Real temperature, Real & rho, Real & mu) const override;

virtual void rho_mu_from_p_T(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & mu,
Real & dmu_dp,
Real & dmu_dT) const override;

virtual Real k_from_rho_T(Real density, Real temperature) const override;

virtual Real k_from_p_T(Real pressure, Real temperature) const override;
@@ -69,7 +81,7 @@ class HydrogenFluidProperties : public HelmholtzFluidProperties

virtual Real henryConstant(Real temperature) const override;

virtual void henryConstant_dT(Real temperature, Real & Kh, Real & dKh_dT) const override;
virtual void henryConstant(Real temperature, Real & Kh, Real & dKh_dT) const override;

virtual Real criticalPressure() const override;

@@ -83,6 +95,8 @@ class HydrogenFluidProperties : public HelmholtzFluidProperties

virtual Real vaporPressure(Real temperature) const override;

virtual void vaporPressure(Real temperature, Real & psat, Real & dpsat_dT) const override;

protected:
/**
* Helmholtz free energy for H2
@@ -71,16 +71,17 @@ class IdealGasFluidPropertiesPT : public SinglePhaseFluidProperties
virtual void mu_from_p_T(
Real pressure, Real temperature, Real & mu, Real & dmu_dp, Real & dmu_dT) const override;

virtual void rho_mu(Real pressure, Real temperature, Real & rho, Real & mu) const override;
virtual void
rho_mu_from_p_T(Real pressure, Real temperature, Real & rho, Real & mu) const override;

virtual void rho_mu_dpT(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & mu,
Real & dmu_dp,
Real & dmu_dT) const override;
virtual void rho_mu_from_p_T(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & mu,
Real & dmu_dp,
Real & dmu_dT) const override;

virtual Real h_from_p_T(Real p, Real T) const override;

@@ -89,7 +90,7 @@ class IdealGasFluidPropertiesPT : public SinglePhaseFluidProperties

virtual Real henryConstant(Real temperature) const override;

virtual void henryConstant_dT(Real temperature, Real & Kh, Real & dKh_dT) const override;
virtual void henryConstant(Real temperature, Real & Kh, Real & dKh_dT) const override;

protected:
/// molar mass
@@ -54,7 +54,7 @@ class MethaneFluidProperties : public HelmholtzFluidProperties

virtual Real henryConstant(Real temperature) const override;

virtual void henryConstant_dT(Real temperature, Real & Kh, Real & dKh_dT) const override;
virtual void henryConstant(Real temperature, Real & Kh, Real & dKh_dT) const override;

virtual Real criticalPressure() const override;

@@ -68,6 +68,8 @@ class MethaneFluidProperties : public HelmholtzFluidProperties

virtual Real vaporPressure(Real temperature) const override;

virtual void vaporPressure(Real temperature, Real & psat, Real & dpsat_dT) const override;

/**
* Saturated liquid density of CH4
* Valid for temperatures between the triple point temperature
@@ -68,34 +68,12 @@ class NaClFluidProperties : public SinglePhaseFluidProperties
virtual void
e_from_p_T(Real pressure, Real temperature, Real & e, Real & de_dp, Real & de_dT) const override;

virtual void rho_e_dpT(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & e,
Real & de_dp,
Real & de_dT) const override;

virtual Real c_from_p_T(Real pressure, Real temperature) const override;

virtual Real cp_from_p_T(Real pressure, Real temperature) const override;

using SinglePhaseFluidProperties::cp_from_p_T;

virtual Real cv_from_p_T(Real pressure, Real temperature) const override;

virtual void rho_mu(Real pressure, Real temperature, Real & rho, Real & mu) const override;

virtual void rho_mu_dpT(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & mu,
Real & dmu_dp,
Real & dmu_dT) const override;

virtual Real k_from_p_T(Real pressure, Real temperature) const override;

virtual void
@@ -44,18 +44,30 @@ class NitrogenFluidProperties : public HelmholtzFluidProperties

virtual Real mu_from_rho_T(Real density, Real temperature) const override;

virtual void mu_drhoT_from_rho_T(Real density,
Real temperature,
Real ddensity_dT,
Real & mu,
Real & dmu_drho,
Real & dmu_dT) const override;
virtual void mu_from_rho_T(Real density,
Real temperature,
Real ddensity_dT,
Real & mu,
Real & dmu_drho,
Real & dmu_dT) const override;

virtual Real mu_from_p_T(Real pressure, Real temperature) const override;

virtual void mu_from_p_T(
Real pressure, Real temperature, Real & mu, Real & dmu_dp, Real & dmu_dT) const override;

virtual void
rho_mu_from_p_T(Real pressure, Real temperature, Real & rho, Real & mu) const override;

virtual void rho_mu_from_p_T(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & mu,
Real & dmu_dp,
Real & dmu_dT) const override;

virtual Real k_from_rho_T(Real density, Real temperature) const override;

virtual Real k_from_p_T(Real pressure, Real temperature) const override;
@@ -65,7 +77,7 @@ class NitrogenFluidProperties : public HelmholtzFluidProperties

virtual Real henryConstant(Real temperature) const override;

virtual void henryConstant_dT(Real temperature, Real & Kh, Real & dKh_dT) const override;
virtual void henryConstant(Real temperature, Real & Kh, Real & dKh_dT) const override;

virtual Real criticalPressure() const override;

@@ -79,6 +91,8 @@ class NitrogenFluidProperties : public HelmholtzFluidProperties

virtual Real vaporPressure(Real temperature) const override;

virtual void vaporPressure(Real temperature, Real & psat, Real & dpsat_dT) const override;

/**
* Saturated liquid density of N2
* Valid for temperatures between the triple point temperature
@@ -83,32 +83,11 @@ class SimpleFluidProperties : public SinglePhaseFluidProperties
virtual void
e_from_p_T(Real pressure, Real temperature, Real & e, Real & de_dp, Real & de_dT) const override;

/// Density and internal energy from pressure and temperature and derivatives wrt pressure and temperature
virtual void rho_e_dpT(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & e,
Real & de_dp,
Real & de_dT) const override;

virtual Real mu_from_p_T(Real pressure, Real temperature) const override;

virtual void mu_from_p_T(
Real pressure, Real temperature, Real & mu, Real & dmu_dp, Real & dmu_dT) const override;

virtual void rho_mu(Real pressure, Real temperature, Real & rho, Real & mu) const override;

virtual void rho_mu_dpT(Real pressure,
Real temperature,
Real & rho,
Real & drho_dp,
Real & drho_dT,
Real & mu,
Real & dmu_dp,
Real & dmu_dT) const override;

/// Specific enthalpy (J/kg)
virtual Real h_from_p_T(Real p, Real T) const override;

@@ -120,7 +99,7 @@ class SimpleFluidProperties : public SinglePhaseFluidProperties
virtual Real henryConstant(Real temperature) const override;

/// Henry's law constant for dissolution in water and derivative wrt temperature
virtual void henryConstant_dT(Real temperature, Real & Kh, Real & dKh_dT) const override;
virtual void henryConstant(Real temperature, Real & Kh, Real & dKh_dT) const override;

protected:
/// molar mass
Oops, something went wrong.

0 comments on commit 9e9ee32

Please sign in to comment.