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 Real sigma_from_T (Real T) const
 Computes surface tension sigma of saturated liquid in contact with saturated vapor. More...
 
virtual Real dsigma_dT_from_T (Real T) const
 Computes dsigma/dT along the saturation line. More...
 
virtual bool supportsPhaseChange () const =0
 Returns true if phase change is supported, otherwise false. 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...
 
const Real _T_c2k
 Conversion of temperature from Celsius to Kelvin. More...
 
const bool _allow_imperfect_jacobians
 Flag to set unimplemented Jacobian entries to zero. 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

◆ dsigma_dT_from_T()

Real TwoPhaseFluidProperties::dsigma_dT_from_T ( Real  T) const
virtual

Computes dsigma/dT along the saturation line.

Parameters
[in]Ttemperature (K)

Reimplemented in TestTwoPhaseFluidProperties.

Definition at line 69 of file TwoPhaseFluidProperties.C.

70 {
71  mooseError(name(), ": ", __PRETTY_FUNCTION__, " is not implemented.");
72 }
const std::string name
Definition: Setup.h:22

◆ 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, TwoPhaseFluidPropertiesIndependent, and TestTwoPhaseFluidProperties.

Referenced by TwoPhaseNCGFluidProperties::dT_sat_dp().

◆ execute()

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 35 of file FluidProperties.h.

35 {}

◆ finalize()

virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 37 of file FluidProperties.h.

37 {}

◆ 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 FluidPropertiesInterrogator::execute2Phase(), and 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.

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 36 of file FluidProperties.h.

36 {}

◆ p_critical()

virtual Real TwoPhaseFluidProperties::p_critical ( ) const
pure virtual

◆ 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, TwoPhaseFluidPropertiesIndependent, and TestTwoPhaseFluidProperties.

Referenced by FluidPropertiesInterrogator::execute2Phase(), and TwoPhaseNCGFluidProperties::p_sat().

◆ sigma_from_T()

Real TwoPhaseFluidProperties::sigma_from_T ( Real  T) const
virtual

Computes surface tension sigma of saturated liquid in contact with saturated vapor.

Parameters
Ttemperature

Reimplemented in TestTwoPhaseFluidProperties.

Definition at line 64 of file TwoPhaseFluidProperties.C.

Referenced by FluidPropertiesInterrogator::execute2Phase().

65 {
66  mooseError(name(), ": ", __PRETTY_FUNCTION__, " is not implemented.");
67 }
const std::string name
Definition: Setup.h:22

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 40 of file FluidProperties.h.

40 {}

◆ supportsPhaseChange()

virtual bool TwoPhaseFluidProperties::supportsPhaseChange ( ) const
pure virtual

Returns true if phase change is supported, otherwise false.

Implemented in TwoPhaseNCGFluidProperties, TestTwoPhaseFluidProperties, and TwoPhaseFluidPropertiesIndependent.

Referenced by TwoPhaseNCGFluidProperties::supportsPhaseChange().

◆ T_sat()

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

◆ threadJoin()

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

Definition at line 39 of file FluidProperties.h.

39 {}

Member Data Documentation

◆ _allow_imperfect_jacobians

const bool FluidProperties::_allow_imperfect_jacobians
protectedinherited

Flag to set unimplemented Jacobian entries to zero.

Definition at line 46 of file FluidProperties.h.

Referenced by SinglePhaseFluidProperties::fluidPropError().

◆ _fp_liquid

const SinglePhaseFluidProperties* TwoPhaseFluidProperties::_fp_liquid
protected

The user object that provides liquid phase fluid properties.

Definition at line 100 of file TwoPhaseFluidProperties.h.

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

◆ _fp_vapor

const SinglePhaseFluidProperties* TwoPhaseFluidProperties::_fp_vapor
protected

The user object that provides vapor phase fluid properties.

Definition at line 102 of file TwoPhaseFluidProperties.h.

Referenced by h_lat(), TestTwoPhaseFluidProperties::TestTwoPhaseFluidProperties(), 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 95 of file TwoPhaseFluidProperties.h.

Referenced by getLiquidName(), and TwoPhaseFluidProperties().

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ _vapor_name

const UserObjectName TwoPhaseFluidProperties::_vapor_name
protected

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

Definition at line 97 of file TwoPhaseFluidProperties.h.

Referenced by getVaporName(), and TwoPhaseFluidProperties().


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