Permalink
Browse files

Merge pull request #12861 from MatthiasKunick/feature_12858

Adding a virtual function for derivatives of beta_from_p_T (SinglePhaseFluidProperties)
  • Loading branch information...
permcody committed Feb 7, 2019
2 parents 32b8b25 + 90664bb commit d810553c3d7e6de3849fab2d80c7dfbaf9718bae
@@ -46,6 +46,12 @@ class SimpleFluidProperties : public SinglePhaseFluidProperties
/// Thermal expansion coefficient (1/K)
virtual Real beta_from_p_T(Real pressure, Real temperature) const override;

virtual void beta_from_p_T(Real pressure,
Real temperature,
Real & beta,
Real & dbeta_dp,
Real & dbeta_dT) const override;

/// Isobaric specific heat capacity (J/kg/K)
virtual Real cp_from_p_T(Real pressure, Real temperature) const override;

@@ -468,6 +468,17 @@ class SinglePhaseFluidProperties : public FluidProperties
virtual Real beta_from_p_T(Real p, Real T) const;
virtual Real beta(Real pressure, Real temperature) const;

/**
* Thermal expansion coefficient and its derivatives from pressure and temperature
*
* @param[in] p pressure (Pa)
* @param[in] T temperature (K)
* @param[out] beta beta (1/K)
* @param[out] dbeta_dp derivative of the thermal expansion coefficient w.r.t. pressure
* @param[out] dbeta_dT derivative of the thermal expansion coefficient w.r.t. temperature
*/
virtual void beta_from_p_T(Real p, Real T, Real & beta, Real & dbeta_dp, Real & dbeta_dT) const;

/**
* Partial pressure at saturation in a gas mixture
*
@@ -74,6 +74,15 @@ Real SimpleFluidProperties::beta_from_p_T(Real /*pressure*/, Real /*temperature*
return _thermal_expansion;
}

void
SimpleFluidProperties::beta_from_p_T(
Real pressure, Real temperature, Real & beta, Real & dbeta_dp, Real & dbeta_dT) const
{
beta = beta_from_p_T(pressure, temperature);
dbeta_dp = 0.0;
dbeta_dT = 0.0;
}

Real SimpleFluidProperties::cp_from_p_T(Real /*pressure*/, Real /*temperature*/) const
{
return _cp;
@@ -188,6 +188,12 @@ SinglePhaseFluidProperties::beta_from_p_T(Real p, Real T) const
return -drho_dT / rho;
}

void
SinglePhaseFluidProperties::beta_from_p_T(Real, Real, Real &, Real &, Real &) const
{
mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
}

Real SinglePhaseFluidProperties::s_from_p_T(Real, Real) const
{
mooseError(name(), ": s_from_p_T is not implemented");

0 comments on commit d810553

Please sign in to comment.