www.mooseframework.org
TwoPhaseFluidPropertiesIndependent.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
12 
14 
17 {
19 
20  params.addClassDescription(
21  "2-phase fluid properties for 2 independent single-phase fluid properties");
22 
23  params.makeParamRequired<UserObjectName>("fp_liquid");
24  params.makeParamRequired<UserObjectName>("fp_vapor");
25  params.addParam<bool>(
26  "error_on_unimplemented",
27  true,
28  "If true, throw an error when a 2-phase interface is called. Else, return a zero value.");
29 
30  return params;
31 }
32 
34  const InputParameters & parameters)
35  : TwoPhaseFluidProperties(parameters),
36 
37  _error_on_unimplemented(getParam<bool>("error_on_unimplemented"))
38 {
39  _fp_liquid = &getUserObject<SinglePhaseFluidProperties>("fp_liquid");
40  _fp_vapor = &getUserObject<SinglePhaseFluidProperties>("fp_vapor");
41 }
42 
43 Real
45 {
47  mooseError(
48  "The 2-phase fluid properties class 'TwoPhaseFluidPropertiesIndependent' does not allow "
49  "calling any 2-phase property interfaces.");
50  else
51  return 0;
52 }
53 
54 Real
56 {
58 }
59 
60 Real
62 {
64 }
65 
67 {
69 }
70 
73 {
75 }
76 
78 {
80 }
81 
84 {
86 }
87 
89 {
91 }
92 
93 Real
95 {
97 }
98 
100 {
102 }
103 
104 DualReal
106 {
108 }
109 
111 {
113 }
virtual Real p_sat(Real T) const override
Computes the saturation pressure at a temperature.
const SinglePhaseFluidProperties * _fp_vapor
The user object that provides vapor phase fluid properties.
TwoPhaseFluidPropertiesIndependent(const InputParameters &parameters)
virtual Real dsigma_dT_from_T(Real T) const override
Computes dsigma/dT along the saturation line.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
virtual Real dT_sat_dp(Real p) const override
Computes dT/dp along the saturation line.
DualNumber< Real, DNDerivativeType, true > DualReal
const SinglePhaseFluidProperties * _fp_liquid
The user object that provides liquid phase fluid properties.
2-phase fluid properties for 2 independent single-phase fluid properties.
virtual Real sigma_from_T(Real T) const override
Computes surface tension sigma of saturated liquid in contact with saturated vapor.
virtual Real L_fusion() const override
Returns the latent heat of fusion.
Base class for fluid properties used with two-phase flow.
const bool _error_on_unimplemented
If true, throw an error when a 2-phase interface is called. Else, return a zero value.
virtual Real T_sat(Real p) const override
Computes the saturation temperature at a pressure.
virtual Real T_triple() const override
Returns the triple-point temperature.
static InputParameters validParams()
Real getTwoPhaseInterfaceDummyValue() const
Returns a dummy zero value or throws a mooseError.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real p_critical() const override
Returns the critical pressure.
void makeParamRequired(const std::string &name)
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
registerMooseObject("FluidPropertiesApp", TwoPhaseFluidPropertiesIndependent)