www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
TwoPhaseFluidProperties Class Referenceabstract

Base class for fluid properties used with two-phase flow. More...

#include <TwoPhaseFluidProperties.h>

Inheritance diagram for TwoPhaseFluidProperties:
[legend]

Public Member Functions

 TwoPhaseFluidProperties (const InputParameters &parameters)
 
virtual const UserObjectName & getLiquidName () const
 Returns the name of the liquid single-phase fluid properties object. More...
 
virtual const UserObjectName & getVaporName () const
 Returns the name of the vapor single-phase fluid properties object. More...
 
virtual Real p_critical () const =0
 Returns the critical pressure. More...
 
virtual Real T_sat (Real p) const =0
 Computes the saturation temperature at a pressure. More...
 
virtual Real p_sat (Real T) const =0
 Computes the saturation pressure at a temperature. More...
 
virtual Real dT_sat_dp (Real p) const =0
 Computes dT/dp along the saturation line. More...
 
virtual Real h_lat (Real p, Real T) const
 Computes latent heat of vaporization. More...
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 
virtual void threadJoin (const UserObject &) final
 
virtual void subdomainSetup () final
 

Protected Attributes

const UserObjectName _liquid_name
 The name of the user object that provides liquid phase fluid properties. More...
 
const UserObjectName _vapor_name
 The name of the user object that provides vapor phase fluid properties. More...
 
const SinglePhaseFluidProperties_fp_liquid
 The user object that provides liquid phase fluid properties. More...
 
const SinglePhaseFluidProperties_fp_vapor
 The user object that provides vapor phase fluid properties. More...
 

Detailed Description

Base class for fluid properties used with two-phase flow.

Definition at line 24 of file TwoPhaseFluidProperties.h.

Constructor & Destructor Documentation

◆ TwoPhaseFluidProperties()

TwoPhaseFluidProperties::TwoPhaseFluidProperties ( const InputParameters &  parameters)

Definition at line 27 of file TwoPhaseFluidProperties.C.

28  : FluidProperties(parameters),
29 
30  _liquid_name(isParamValid("fp_liquid") ? getParam<UserObjectName>("fp_liquid")
31  : UserObjectName(name() + ":liquid")),
32  _vapor_name(isParamValid("fp_vapor") ? getParam<UserObjectName>("fp_vapor")
33  : UserObjectName(name() + ":vapor"))
34 {
35  // If the single-phase fluid properties user object names are not provided, it
36  // is implied that these objects will be created by a derived class. In this
37  // case, we need to check that these user objects do not already exist.
38  if (!isParamValid("fp_liquid"))
39  if (_tid == 0 && _fe_problem.hasUserObject(_liquid_name))
40  paramError("fp_liquid",
41  "The two-phase fluid properties object '" + name() + "' is ",
42  "trying to create a single-phase fluid properties object with ",
43  "name '",
45  "', but a single-phase fluid properties ",
46  "object with this name already exists.");
47  if (!isParamValid("fp_vapor"))
48  if (_tid == 0 && _fe_problem.hasUserObject(_vapor_name))
49  paramError("fp_vapor",
50  "The two-phase fluid properties object '" + name() + "' is ",
51  "trying to create a single-phase fluid properties object with ",
52  "name '",
54  "', but a single-phase fluid properties ",
55  "object with this name already exists.");
56 }
const UserObjectName _vapor_name
The name of the user object that provides vapor phase fluid properties.
FluidProperties(const InputParameters &parameters)
const UserObjectName _liquid_name
The name of the user object that provides liquid phase fluid properties.
const std::string name
Definition: Setup.h:22

Member Function Documentation

◆ dT_sat_dp()

virtual Real TwoPhaseFluidProperties::dT_sat_dp ( Real  p) const
pure virtual

Computes dT/dp along the saturation line.

Parameters
[in]ppressure

Implemented in TwoPhaseNCGFluidProperties, and TwoPhaseFluidPropertiesIndependent.

Referenced by TwoPhaseNCGFluidProperties::dT_sat_dp().

◆ execute()

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 27 of file FluidProperties.h.

27 {}

◆ finalize()

virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 29 of file FluidProperties.h.

29 {}

◆ getLiquidName()

virtual const UserObjectName& TwoPhaseFluidProperties::getLiquidName ( ) const
inlinevirtual

Returns the name of the liquid single-phase fluid properties object.

Reimplemented in TwoPhaseNCGFluidProperties.

Definition at line 32 of file TwoPhaseFluidProperties.h.

Referenced by TwoPhaseNCGFluidProperties::getLiquidName().

32 { return _liquid_name; }
const UserObjectName _liquid_name
The name of the user object that provides liquid phase fluid properties.

◆ getVaporName()

virtual const UserObjectName& TwoPhaseFluidProperties::getVaporName ( ) const
inlinevirtual

Returns the name of the vapor single-phase fluid properties object.

Reimplemented in TwoPhaseNCGFluidProperties.

Definition at line 37 of file TwoPhaseFluidProperties.h.

Referenced by TwoPhaseNCGFluidProperties::getVaporName().

37 { return _vapor_name; }
const UserObjectName _vapor_name
The name of the user object that provides vapor phase fluid properties.

◆ h_lat()

Real TwoPhaseFluidProperties::h_lat ( Real  p,
Real  T 
) const
virtual

Computes latent heat of vaporization.

Parameters
ppressure
Ttemperature

Reimplemented in TwoPhaseNCGFluidProperties.

Definition at line 59 of file TwoPhaseFluidProperties.C.

Referenced by TwoPhaseNCGFluidProperties::h_lat().

60 {
61  return _fp_vapor->h_from_p_T(p, T) - _fp_liquid->h_from_p_T(p, T);
62 }
const SinglePhaseFluidProperties * _fp_vapor
The user object that provides vapor phase fluid properties.
const SinglePhaseFluidProperties * _fp_liquid
The user object that provides liquid phase fluid properties.
virtual Real h_from_p_T(Real p, Real T) const
Specific enthalpy from pressure and temperature.

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 28 of file FluidProperties.h.

28 {}

◆ p_critical()

virtual Real TwoPhaseFluidProperties::p_critical ( ) const
pure virtual

Returns the critical pressure.

Implemented in TwoPhaseNCGFluidProperties, and TwoPhaseFluidPropertiesIndependent.

Referenced by TwoPhaseNCGFluidProperties::p_critical().

◆ p_sat()

virtual Real TwoPhaseFluidProperties::p_sat ( Real  T) const
pure virtual

Computes the saturation pressure at a temperature.

Parameters
[in]Ttemperature

Implemented in TwoPhaseNCGFluidProperties, and TwoPhaseFluidPropertiesIndependent.

Referenced by TwoPhaseNCGFluidProperties::p_sat().

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 32 of file FluidProperties.h.

32 {}

◆ T_sat()

virtual Real TwoPhaseFluidProperties::T_sat ( Real  p) const
pure virtual

Computes the saturation temperature at a pressure.

Parameters
[in]ppressure

Implemented in TwoPhaseNCGFluidProperties, and TwoPhaseFluidPropertiesIndependent.

Referenced by SaturationTemperatureAux::computeValue(), and TwoPhaseNCGFluidProperties::T_sat().

◆ threadJoin()

virtual void FluidProperties::threadJoin ( const UserObject &  )
inlinefinalvirtualinherited

Definition at line 31 of file FluidProperties.h.

31 {}

Member Data Documentation

◆ _fp_liquid

const SinglePhaseFluidProperties* TwoPhaseFluidProperties::_fp_liquid
protected

The user object that provides liquid phase fluid properties.

Definition at line 80 of file TwoPhaseFluidProperties.h.

Referenced by h_lat(), and TwoPhaseFluidPropertiesIndependent::TwoPhaseFluidPropertiesIndependent().

◆ _fp_vapor

const SinglePhaseFluidProperties* TwoPhaseFluidProperties::_fp_vapor
protected

The user object that provides vapor phase fluid properties.

Definition at line 82 of file TwoPhaseFluidProperties.h.

Referenced by h_lat(), and TwoPhaseFluidPropertiesIndependent::TwoPhaseFluidPropertiesIndependent().

◆ _liquid_name

const UserObjectName TwoPhaseFluidProperties::_liquid_name
protected

The name of the user object that provides liquid phase fluid properties.

Definition at line 75 of file TwoPhaseFluidProperties.h.

Referenced by getLiquidName(), and TwoPhaseFluidProperties().

◆ _vapor_name

const UserObjectName TwoPhaseFluidProperties::_vapor_name
protected

The name of the user object that provides vapor phase fluid properties.

Definition at line 77 of file TwoPhaseFluidProperties.h.

Referenced by getVaporName(), and TwoPhaseFluidProperties().


The documentation for this class was generated from the following files: