www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
TestTwoPhaseNCGFluidProperties Class Reference

Test 2-phase NCG fluid properties. More...

#include <TestTwoPhaseNCGFluidProperties.h>

Inheritance diagram for TestTwoPhaseNCGFluidProperties:
[legend]

Public Member Functions

 TestTwoPhaseNCGFluidProperties (const InputParameters &parameters)
 
const UserObjectName & getLiquidName () const override
 Returns the name of the liquid single-phase fluid properties object. More...
 
const UserObjectName & getVaporName () const override
 Returns the name of the vapor single-phase fluid properties object. More...
 
const UserObjectName & getVaporMixtureName () const
 Returns the name of the vapor mixture fluid properties object. More...
 
unsigned int getNumberOfNCGs () const
 Returns the number of non-condensable gases. More...
 
virtual Real p_critical () const override
 Returns the critical pressure. More...
 
virtual Real T_sat (Real p) const override
 Computes the saturation temperature at a pressure. More...
 
virtual Real p_sat (Real T) const override
 Computes the saturation pressure at a temperature. More...
 
virtual Real dT_sat_dp (Real p) const override
 Computes dT/dp along the saturation line. More...
 
virtual Real h_lat (Real p, Real T) const override
 Computes latent heat of vaporization. More...
 
virtual bool supportsPhaseChange () const override
 Returns true if phase change is supported, otherwise false. 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 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 _2phase_name
 Two-phase fluid properties user object name. More...
 
const UserObjectName _vapor_mixture_name
 Vapor mixture fluid properties user object name. More...
 
const TwoPhaseFluidProperties_fp_2phase
 Two-phase fluid properties user object. More...
 
const VaporMixtureFluidProperties_fp_vapor_mixture
 Vapor mixture fluid properties user object. More...
 
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

Test 2-phase NCG fluid properties.

This uses arbitrary functions for the two-phase interfaces.

Definition at line 24 of file TestTwoPhaseNCGFluidProperties.h.

Constructor & Destructor Documentation

◆ TestTwoPhaseNCGFluidProperties()

TestTwoPhaseNCGFluidProperties::TestTwoPhaseNCGFluidProperties ( const InputParameters &  parameters)

Definition at line 28 of file TestTwoPhaseNCGFluidProperties.C.

29  : TwoPhaseNCGFluidProperties(parameters)
30 {
31  // create liquid and vapor fluid properties
32  if (_tid == 0)
33  {
34  {
35  const std::string class_name = "IdealGasFluidProperties";
36  InputParameters params = _app.getFactory().getValidParams(class_name);
37  params.set<Real>("gamma") = 1.4;
38  params.set<Real>("R") = 270;
39  _fe_problem.addUserObject(class_name, "test_fp_liquid", params);
40  }
41  {
42  const std::string class_name = "IdealGasFluidProperties";
43  InputParameters params = _app.getFactory().getValidParams(class_name);
44  params.set<Real>("gamma") = 1.1;
45  params.set<Real>("R") = 300;
46  _fe_problem.addUserObject(class_name, "test_fp_vapor", params);
47  }
48  }
49 
50  // create 2-phase fluid properties
51  if (_tid == 0)
52  {
53  const std::string class_name = "TestTwoPhaseFluidProperties";
54  InputParameters params = _app.getFactory().getValidParams(class_name);
55  params.set<UserObjectName>("fp_liquid") = "test_fp_liquid";
56  params.set<UserObjectName>("fp_vapor") = "test_fp_vapor";
57  _fe_problem.addUserObject(class_name, _2phase_name, params);
58  }
59  _fp_2phase = &_fe_problem.getUserObject<TwoPhaseFluidProperties>(_2phase_name);
60 
61  // create vapor mixture fluid properties
62  if (_tid == 0)
63  {
64  const std::string class_name = "GeneralVaporMixtureFluidProperties";
65  InputParameters params = _app.getFactory().getValidParams(class_name);
66  params.set<UserObjectName>("fp_primary") = getVaporName();
67  params.set<std::vector<UserObjectName>>("fp_secondary") =
68  getParam<std::vector<UserObjectName>>("fp_ncgs");
69  _fe_problem.addUserObject(class_name, _vapor_mixture_name, params);
70  }
72 }
Base class for fluid properties of vapor mixtures.
const UserObjectName _2phase_name
Two-phase fluid properties user object name.
TwoPhaseNCGFluidProperties(const InputParameters &parameters)
const UserObjectName & getVaporName() const override
Returns the name of the vapor single-phase fluid properties object.
Base class for fluid properties used with two-phase flow.
const VaporMixtureFluidProperties * _fp_vapor_mixture
Vapor mixture fluid properties user object.
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.
const UserObjectName _vapor_mixture_name
Vapor mixture fluid properties user object name.

Member Function Documentation

◆ dsigma_dT_from_T()

Real TwoPhaseFluidProperties::dsigma_dT_from_T ( Real  T) const
virtualinherited

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:21

◆ dT_sat_dp()

virtual Real TwoPhaseNCGFluidProperties::dT_sat_dp ( Real  p) const
inlineoverridevirtualinherited

Computes dT/dp along the saturation line.

Parameters
[in]ppressure

Implements TwoPhaseFluidProperties.

Definition at line 66 of file TwoPhaseNCGFluidProperties.h.

66 { return _fp_2phase->dT_sat_dp(p); }
virtual Real dT_sat_dp(Real p) const =0
Computes dT/dp along the saturation line.
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.

◆ execute()

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 34 of file FluidProperties.h.

34 {}

◆ finalize()

virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 36 of file FluidProperties.h.

36 {}

◆ getLiquidName()

const UserObjectName& TwoPhaseNCGFluidProperties::getLiquidName ( ) const
inlineoverridevirtualinherited

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

Reimplemented from TwoPhaseFluidProperties.

Definition at line 29 of file TwoPhaseNCGFluidProperties.h.

29 { return _fp_2phase->getLiquidName(); }
virtual const UserObjectName & getLiquidName() const
Returns the name of the liquid single-phase fluid properties object.
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.

◆ getNumberOfNCGs()

unsigned int TwoPhaseNCGFluidProperties::getNumberOfNCGs ( ) const
inlineinherited

Returns the number of non-condensable gases.

Definition at line 40 of file TwoPhaseNCGFluidProperties.h.

virtual unsigned int getNumberOfSecondaryVapors() const =0
Returns the number of secondary vapors.
const VaporMixtureFluidProperties * _fp_vapor_mixture
Vapor mixture fluid properties user object.

◆ getVaporMixtureName()

const UserObjectName& TwoPhaseNCGFluidProperties::getVaporMixtureName ( ) const
inlineinherited

Returns the name of the vapor mixture fluid properties object.

Definition at line 35 of file TwoPhaseNCGFluidProperties.h.

35 { return _vapor_mixture_name; }
const UserObjectName _vapor_mixture_name
Vapor mixture fluid properties user object name.

◆ getVaporName()

const UserObjectName& TwoPhaseNCGFluidProperties::getVaporName ( ) const
inlineoverridevirtualinherited

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

Reimplemented from TwoPhaseFluidProperties.

Definition at line 30 of file TwoPhaseNCGFluidProperties.h.

Referenced by TestTwoPhaseNCGFluidProperties().

30 { return _fp_2phase->getVaporName(); }
virtual const UserObjectName & getVaporName() const
Returns the name of the vapor single-phase fluid properties object.
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.

◆ h_lat()

virtual Real TwoPhaseNCGFluidProperties::h_lat ( Real  p,
Real  T 
) const
inlineoverridevirtualinherited

Computes latent heat of vaporization.

Parameters
ppressure
Ttemperature

Reimplemented from TwoPhaseFluidProperties.

Definition at line 74 of file TwoPhaseNCGFluidProperties.h.

74 { return _fp_2phase->h_lat(p, T); }
virtual Real h_lat(Real p, Real T) const
Computes latent heat of vaporization.
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 35 of file FluidProperties.h.

35 {}

◆ p_critical()

virtual Real TwoPhaseNCGFluidProperties::p_critical ( ) const
inlineoverridevirtualinherited

Returns the critical pressure.

Implements TwoPhaseFluidProperties.

Definition at line 45 of file TwoPhaseNCGFluidProperties.h.

45 { return _fp_2phase->p_critical(); }
virtual Real p_critical() const =0
Returns the critical pressure.
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.

◆ p_sat()

virtual Real TwoPhaseNCGFluidProperties::p_sat ( Real  T) const
inlineoverridevirtualinherited

Computes the saturation pressure at a temperature.

Parameters
[in]Ttemperature

Implements TwoPhaseFluidProperties.

Definition at line 59 of file TwoPhaseNCGFluidProperties.h.

59 { return _fp_2phase->p_sat(T); }
virtual Real p_sat(Real T) const =0
Computes the saturation pressure at a temperature.
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.

◆ sigma_from_T()

Real TwoPhaseFluidProperties::sigma_from_T ( Real  T) const
virtualinherited

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:21

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 39 of file FluidProperties.h.

39 {}

◆ supportsPhaseChange()

virtual bool TwoPhaseNCGFluidProperties::supportsPhaseChange ( ) const
inlineoverridevirtualinherited

Returns true if phase change is supported, otherwise false.

Implements TwoPhaseFluidProperties.

Definition at line 76 of file TwoPhaseNCGFluidProperties.h.

76 { return _fp_2phase->supportsPhaseChange(); }
virtual bool supportsPhaseChange() const =0
Returns true if phase change is supported, otherwise false.
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.

◆ T_sat()

virtual Real TwoPhaseNCGFluidProperties::T_sat ( Real  p) const
inlineoverridevirtualinherited

Computes the saturation temperature at a pressure.

Parameters
[in]ppressure

Implements TwoPhaseFluidProperties.

Definition at line 52 of file TwoPhaseNCGFluidProperties.h.

52 { return _fp_2phase->T_sat(p); }
virtual Real T_sat(Real p) const =0
Computes the saturation temperature at a pressure.
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.

◆ threadJoin()

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

Definition at line 38 of file FluidProperties.h.

38 {}

Member Data Documentation

◆ _2phase_name

const UserObjectName TwoPhaseNCGFluidProperties::_2phase_name
protectedinherited

Two-phase fluid properties user object name.

Definition at line 80 of file TwoPhaseNCGFluidProperties.h.

Referenced by TestTwoPhaseNCGFluidProperties().

◆ _allow_imperfect_jacobians

const bool FluidProperties::_allow_imperfect_jacobians
protectedinherited

Flag to set unimplemented Jacobian entries to zero.

Definition at line 45 of file FluidProperties.h.

Referenced by SinglePhaseFluidProperties::fluidPropError().

◆ _fp_2phase

const TwoPhaseFluidProperties* TwoPhaseNCGFluidProperties::_fp_2phase
protectedinherited

◆ _fp_liquid

const SinglePhaseFluidProperties* TwoPhaseFluidProperties::_fp_liquid
protectedinherited

◆ _fp_vapor

const SinglePhaseFluidProperties* TwoPhaseFluidProperties::_fp_vapor
protectedinherited

◆ _fp_vapor_mixture

const VaporMixtureFluidProperties* TwoPhaseNCGFluidProperties::_fp_vapor_mixture
protectedinherited

Vapor mixture fluid properties user object.

Definition at line 87 of file TwoPhaseNCGFluidProperties.h.

Referenced by TwoPhaseNCGFluidProperties::getNumberOfNCGs(), and TestTwoPhaseNCGFluidProperties().

◆ _liquid_name

const UserObjectName TwoPhaseFluidProperties::_liquid_name
protectedinherited

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

Definition at line 94 of file TwoPhaseFluidProperties.h.

Referenced by TwoPhaseFluidProperties::getLiquidName(), and TwoPhaseFluidProperties::TwoPhaseFluidProperties().

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ _vapor_mixture_name

const UserObjectName TwoPhaseNCGFluidProperties::_vapor_mixture_name
protectedinherited

◆ _vapor_name

const UserObjectName TwoPhaseFluidProperties::_vapor_name
protectedinherited

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

Definition at line 96 of file TwoPhaseFluidProperties.h.

Referenced by TwoPhaseFluidProperties::getVaporName(), and TwoPhaseFluidProperties::TwoPhaseFluidProperties().


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