Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating fp_interrogator #13195

Merged
merged 1 commit into from Apr 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -14,7 +14,6 @@

class FluidPropertiesInterrogator;
class FluidProperties;
class LiquidFluidPropertiesInterface;
class SinglePhaseFluidProperties;
class VaporMixtureFluidProperties;
class TwoPhaseFluidProperties;
Expand Down Expand Up @@ -119,17 +118,6 @@ class FluidPropertiesInterrogator : public GeneralUserObject
const Real & T,
const Real & vel);

/**
* Outputs liquid-specific properties
*
* @param[in] liquid_fp Liquid fluid properties
* @param[in] p Pressure
* @param[in] T Temperature
*/
void outputLiquidSpecificProperties(const LiquidFluidPropertiesInterface * const liquid_fp,
const Real & p,
const Real & T);

/**
* Outputs static properties for a vapor mixture fluid properties object
*
Expand Down
Expand Up @@ -9,7 +9,6 @@

#include "FluidPropertiesInterrogator.h"
#include "FluidProperties.h"
#include "LiquidFluidPropertiesInterface.h"
#include "SinglePhaseFluidProperties.h"
#include "VaporMixtureFluidProperties.h"
#include "TwoPhaseFluidProperties.h"
Expand Down Expand Up @@ -177,12 +176,6 @@ FluidPropertiesInterrogator::execute1Phase(const SinglePhaseFluidProperties * co
outputHeader(description + " STATIC properties");
outputStaticProperties(fp_1phase, rho, e, p, T);

// output liquid-only property values
const LiquidFluidPropertiesInterface * const liquid_fp =
dynamic_cast<const LiquidFluidPropertiesInterface * const>(fp_1phase);
if (liquid_fp)
outputLiquidSpecificProperties(liquid_fp, p, T);

// output stagnation property values
if (isParamValid("vel") || specified["rho,rhou,rhoE"])
{
Expand Down Expand Up @@ -313,8 +306,10 @@ FluidPropertiesInterrogator::execute2Phase()
const Real T = getParam<Real>("T");
const Real p_sat = _fp_2phase->p_sat(T);
const Real h_lat = _fp_2phase->h_lat(p_sat, T);
const Real sigma = _fp_2phase->sigma_from_T(T);
outputProperty("Saturation pressure", p_sat, "Pa");
outputProperty("Latent heat of vaporization", h_lat, "J/kg");
outputProperty("Surface tension", sigma, "N/m");
}
if (specified["p,T"])
{
Expand Down Expand Up @@ -485,15 +480,6 @@ FluidPropertiesInterrogator::outputStaticProperties(const SinglePhaseFluidProper
_console << std::endl;
}

void
FluidPropertiesInterrogator::outputLiquidSpecificProperties(
const LiquidFluidPropertiesInterface * const liquid_fp, const Real & p, const Real & T)
{
const Real sigma = liquid_fp->sigma_from_p_T(p, T);
outputProperty("Surface tension", sigma, "N/m");
_console << std::endl;
}

void
FluidPropertiesInterrogator::outputStagnationProperties(const SinglePhaseFluidProperties * const fp,
const Real & rho,
Expand Down
Expand Up @@ -31,6 +31,8 @@ class TestTwoPhaseFluidProperties : public TwoPhaseFluidProperties
virtual Real T_sat(Real p) const override;
virtual Real p_sat(Real T) const override;
virtual Real dT_sat_dp(Real p) const override;
virtual Real sigma_from_T(Real T) const override;
virtual Real dsigma_dT_from_T(Real T) const override;
virtual bool supportsPhaseChange() const override;
};

Expand Down
Expand Up @@ -53,6 +53,18 @@ TestTwoPhaseFluidProperties::p_sat(Real T) const

Real TestTwoPhaseFluidProperties::dT_sat_dp(Real /*p*/) const { return 2; }

Real
TestTwoPhaseFluidProperties::sigma_from_T(Real T) const
{
return 5 * T;
}

Real
TestTwoPhaseFluidProperties::dsigma_dT_from_T(Real /*T*/) const
{
return 5;
}

bool
TestTwoPhaseFluidProperties::supportsPhaseChange() const
{
Expand Down
3 changes: 2 additions & 1 deletion modules/fluid_properties/test/tests/fp_interrogator/tests
Expand Up @@ -302,7 +302,8 @@ Latent heat of vaporization: 4.5931000000e\+08 J/kg'
--------------------------------------------------------------------------------
Critical pressure: 25 Pa
Saturation pressure: 900 Pa
Latent heat of vaporization: 6.8896500000e\+05 J/kg'
Latent heat of vaporization: 6.8896500000e\+05 J/kg
Surface tension: 1500 N/m'

requirement = "The fluid properties interrogator shall output two-phase "
"fluid properties for (T) input with a two-phase fluid properties object."
Expand Down