Skip to content
Permalink
Browse files

Merge pull request #13172 from MatthiasKunick/feature_13167

Adds the derivatives of surface tension sigma.
  • Loading branch information...
moosebuild committed Apr 5, 2019
2 parents 5af1254 + 1897e00 commit 0b5fd3af1362d3b0b98587fa50f8970e153fe16d
@@ -70,6 +70,21 @@ class TwoPhaseFluidProperties : public FluidProperties
*/
virtual Real h_lat(Real p, Real T) const;

/**
* Computes surface tension sigma of
* saturated liquid in contact with saturated vapor
*
* @param T temperature
*/
virtual Real sigma_from_T(Real T) const;

/**
* Computes dsigma/dT along the saturation line
*
* @param[in] T temperature (K)
*/
virtual Real dsigma_dT_from_T(Real T) const;

/**
* Returns true if phase change is supported, otherwise false
*/
@@ -60,3 +60,13 @@ TwoPhaseFluidProperties::h_lat(Real p, Real T) const
{
return _fp_vapor->h_from_p_T(p, T) - _fp_liquid->h_from_p_T(p, T);
}

Real TwoPhaseFluidProperties::sigma_from_T(Real /*T*/) const
{
mooseError(name(), ": ", __PRETTY_FUNCTION__, " is not implemented.");
}

Real TwoPhaseFluidProperties::dsigma_dT_from_T(Real /*T*/) const
{
mooseError(name(), ": ", __PRETTY_FUNCTION__, " is not implemented.");
}
@@ -29,6 +29,15 @@
REL_TEST(df_db, df_db_fd, tol); \
}

// Macro for performing a derivative test (1d function)
#define DERIV_TEST_1D(f, dfda, a, tol) \
{ \
const Real da = REL_PERTURBATION * a; \
const Real df_da_fd = (f(a + da) - f(a - da)) / (2 * da); \
Real df_da = dfda(a); \
REL_TEST(df_da, df_da_fd, tol); \
}

// Macro for testing that a "not implemented" error message is thrown for f(a,b)
#define NOT_IMPLEMENTED_TEST_VALUE(f) \
{ \

0 comments on commit 0b5fd3a

Please sign in to comment.
You can’t perform that action at this time.