Loading [MathJax]/extensions/tex2jax.js
www.mooseframework.org
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Static Public Attributes | 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
 

Static Public Attributes

static const Real _R = 8.3144598
 Universal gas constant (J/mol/K) More...
 

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>("molar_mass") = 0.030794295555555556;
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>("molar_mass") = 0.027714866;
46  params.set<Real>("T_c") = 100;
47  params.set<Real>("rho_c") = 300;
48  _fe_problem.addUserObject(class_name, "test_fp_vapor", params);
49  }
50  }
51 
52  // create 2-phase fluid properties
53  if (_tid == 0)
54  {
55  const std::string class_name = "TestTwoPhaseFluidProperties";
56  InputParameters params = _app.getFactory().getValidParams(class_name);
57  params.set<UserObjectName>("fp_liquid") = "test_fp_liquid";
58  params.set<UserObjectName>("fp_vapor") = "test_fp_vapor";
59  _fe_problem.addUserObject(class_name, _2phase_name, params);
60  }
61  _fp_2phase = &_fe_problem.getUserObjectTempl<TwoPhaseFluidProperties>(_2phase_name);
62 
63  // create vapor mixture fluid properties
64  if (_tid == 0)
65  {
66  const std::string class_name = "IdealRealGasMixtureFluidProperties";
67  InputParameters params = _app.getFactory().getValidParams(class_name);
68  params.set<UserObjectName>("fp_primary") = getVaporName();
69  params.set<std::vector<UserObjectName>>("fp_secondary") =
70  getParam<std::vector<UserObjectName>>("fp_ncgs");
71  _fe_problem.addUserObject(class_name, _vapor_mixture_name, params);
72  }
74  &_fe_problem.getUserObjectTempl<VaporMixtureFluidProperties>(_vapor_mixture_name);
75 }

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 70 of file TwoPhaseFluidProperties.C.

71 {
72  mooseError(name(), ": ", __PRETTY_FUNCTION__, " is not implemented.");
73 }

◆ 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); }

◆ 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(); }

◆ getNumberOfNCGs()

unsigned int TwoPhaseNCGFluidProperties::getNumberOfNCGs ( ) const
inlineinherited

Returns the number of non-condensable gases.

Definition at line 40 of file TwoPhaseNCGFluidProperties.h.

◆ 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; }

◆ 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.

30 { return _fp_2phase->getVaporName(); }

Referenced by TestTwoPhaseNCGFluidProperties().

◆ 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); }

◆ 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(); }

◆ 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); }

◆ 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 65 of file TwoPhaseFluidProperties.C.

66 {
67  mooseError(name(), ": ", __PRETTY_FUNCTION__, " is not implemented.");
68 }

Referenced by FluidPropertiesInterrogator::compute2Phase().

◆ 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(); }

◆ 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); }

◆ 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 48 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().

◆ _R

const Real FluidProperties::_R = 8.3144598
staticinherited

◆ _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:
TwoPhaseFluidProperties::getVaporName
virtual const UserObjectName & getVaporName() const
Returns the name of the vapor single-phase fluid properties object.
Definition: TwoPhaseFluidProperties.h:36
TwoPhaseNCGFluidProperties::TwoPhaseNCGFluidProperties
TwoPhaseNCGFluidProperties(const InputParameters &parameters)
Definition: TwoPhaseNCGFluidProperties.C:24
TwoPhaseFluidProperties::getLiquidName
virtual const UserObjectName & getLiquidName() const
Returns the name of the liquid single-phase fluid properties object.
Definition: TwoPhaseFluidProperties.h:31
VaporMixtureFluidProperties::getNumberOfSecondaryVapors
virtual unsigned int getNumberOfSecondaryVapors() const =0
Returns the number of secondary vapors.
TwoPhaseNCGFluidProperties::getVaporName
const UserObjectName & getVaporName() const override
Returns the name of the vapor single-phase fluid properties object.
Definition: TwoPhaseNCGFluidProperties.h:30
TwoPhaseNCGFluidProperties::_2phase_name
const UserObjectName _2phase_name
Two-phase fluid properties user object name.
Definition: TwoPhaseNCGFluidProperties.h:80
TwoPhaseFluidProperties::h_lat
virtual Real h_lat(Real p, Real T) const
Computes latent heat of vaporization.
Definition: TwoPhaseFluidProperties.C:60
TwoPhaseFluidProperties::p_critical
virtual Real p_critical() const =0
Returns the critical pressure.
name
const std::string name
Definition: Setup.h:21
TwoPhaseFluidProperties
Base class for fluid properties used with two-phase flow.
Definition: TwoPhaseFluidProperties.h:23
TwoPhaseFluidProperties::supportsPhaseChange
virtual bool supportsPhaseChange() const =0
Returns true if phase change is supported, otherwise false.
TwoPhaseFluidProperties::dT_sat_dp
virtual Real dT_sat_dp(Real p) const =0
Computes dT/dp along the saturation line.
TwoPhaseFluidProperties::p_sat
virtual Real p_sat(Real T) const =0
Computes the saturation pressure at a temperature.
TwoPhaseNCGFluidProperties::_vapor_mixture_name
const UserObjectName _vapor_mixture_name
Vapor mixture fluid properties user object name.
Definition: TwoPhaseNCGFluidProperties.h:82
TwoPhaseFluidProperties::T_sat
virtual Real T_sat(Real p) const =0
Computes the saturation temperature at a pressure.
TwoPhaseNCGFluidProperties::_fp_2phase
const TwoPhaseFluidProperties * _fp_2phase
Two-phase fluid properties user object.
Definition: TwoPhaseNCGFluidProperties.h:85
TwoPhaseNCGFluidProperties::_fp_vapor_mixture
const VaporMixtureFluidProperties * _fp_vapor_mixture
Vapor mixture fluid properties user object.
Definition: TwoPhaseNCGFluidProperties.h:87
VaporMixtureFluidProperties
Base class for fluid properties of vapor mixtures.
Definition: VaporMixtureFluidProperties.h:27