Skip to content
Permalink
Browse files

Merge pull request #13195 from andrsd/fp_int_fix

Updating fp_interrogator
  • Loading branch information...
permcody committed Apr 9, 2019
2 parents 5037db6 + 6264392 commit 917cb2d778c53f261250e453a505b10f2572b411
@@ -14,7 +14,6 @@

class FluidPropertiesInterrogator;
class FluidProperties;
class LiquidFluidPropertiesInterface;
class SinglePhaseFluidProperties;
class VaporMixtureFluidProperties;
class TwoPhaseFluidProperties;
@@ -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
*
@@ -9,7 +9,6 @@

#include "FluidPropertiesInterrogator.h"
#include "FluidProperties.h"
#include "LiquidFluidPropertiesInterface.h"
#include "SinglePhaseFluidProperties.h"
#include "VaporMixtureFluidProperties.h"
#include "TwoPhaseFluidProperties.h"
@@ -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"])
{
@@ -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"])
{
@@ -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,
@@ -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;
};

@@ -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
{
@@ -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."

0 comments on commit 917cb2d

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