Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 : 10 : #pragma once 11 : 12 : #include "FluidProperties.h" 13 : 14 : class SinglePhaseFluidProperties; 15 : 16 : #pragma GCC diagnostic push 17 : #pragma GCC diagnostic ignored "-Woverloaded-virtual" 18 : 19 : /** 20 : * Base class for fluid properties used with two-phase flow 21 : */ 22 : class TwoPhaseFluidProperties : public FluidProperties 23 : { 24 : public: 25 : static InputParameters validParams(); 26 : 27 : TwoPhaseFluidProperties(const InputParameters & parameters); 28 : 29 : /** 30 : * Returns the name of the liquid single-phase fluid properties object 31 : */ 32 165 : virtual const UserObjectName & getLiquidName() const { return _liquid_name; } 33 : 34 : /** 35 : * Returns the name of the vapor single-phase fluid properties object 36 : */ 37 241 : virtual const UserObjectName & getVaporName() const { return _vapor_name; } 38 : 39 : /** 40 : * Returns the critical pressure 41 : */ 42 : virtual Real p_critical() const = 0; 43 : 44 : /** 45 : * Returns the triple-point temperature 46 : */ 47 : virtual Real T_triple() const; 48 : 49 : /** 50 : * Computes the saturation temperature at a pressure 51 : * 52 : * @param[in] p pressure 53 : */ 54 : virtual Real T_sat(Real p) const = 0; 55 : virtual ADReal T_sat(const ADReal & p) const; 56 : 57 : /** 58 : * Computes the saturation pressure at a temperature 59 : * 60 : * @param[in] T temperature 61 : */ 62 : virtual Real p_sat(Real T) const = 0; 63 : virtual ADReal p_sat(const ADReal & T) const; 64 : 65 : /** 66 : * Computes dT/dp along the saturation line 67 : * 68 : * @param[in] p pressure 69 : */ 70 : virtual Real dT_sat_dp(Real p) const = 0; 71 : 72 : /** 73 : * Computes latent heat of vaporization 74 : * 75 : * @param p pressure 76 : * @param T temperature 77 : */ 78 : virtual Real h_lat(Real p, Real T) const; 79 : virtual ADReal h_lat(const ADReal & p, const ADReal & T) const; 80 : 81 : /** 82 : * Returns the latent heat of fusion 83 : */ 84 : virtual Real L_fusion() const; 85 : 86 : /** 87 : * Computes surface tension sigma of 88 : * saturated liquid in contact with saturated vapor 89 : * 90 : * @param T temperature 91 : */ 92 : virtual Real sigma_from_T(Real T) const; 93 : virtual ADReal sigma_from_T(const ADReal & T) const; 94 : 95 : /** 96 : * Computes dsigma/dT along the saturation line 97 : * 98 : * @param[in] T temperature (K) 99 : */ 100 : virtual Real dsigma_dT_from_T(Real T) const; 101 : 102 : /** 103 : * Returns true if phase change is supported, otherwise false 104 : */ 105 : virtual bool supportsPhaseChange() const = 0; 106 : 107 : protected: 108 : /// The name of the user object that provides liquid phase fluid properties 109 : const UserObjectName _liquid_name; 110 : /// The name of the user object that provides vapor phase fluid properties 111 : const UserObjectName _vapor_name; 112 : 113 : /// The user object that provides liquid phase fluid properties 114 : const SinglePhaseFluidProperties * _fp_liquid; 115 : /// The user object that provides vapor phase fluid properties 116 : const SinglePhaseFluidProperties * _fp_vapor; 117 : }; 118 : 119 : #pragma GCC diagnostic pop