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 "TwoPhaseFluidProperties.h" 13 : #include "VaporMixtureFluidProperties.h" 14 : 15 : #pragma GCC diagnostic push 16 : #pragma GCC diagnostic ignored "-Woverloaded-virtual" 17 : 18 : /** 19 : * Base class for fluid properties used with 2-phase flow with non-condensable 20 : * gases (NCGs) present. 21 : */ 22 : class TwoPhaseNCGFluidProperties : public TwoPhaseFluidProperties 23 : { 24 : public: 25 : static InputParameters validParams(); 26 : 27 : TwoPhaseNCGFluidProperties(const InputParameters & parameters); 28 : 29 24 : const UserObjectName & getLiquidName() const override { return _fp_2phase->getLiquidName(); } 30 100 : const UserObjectName & getVaporName() const override { return _fp_2phase->getVaporName(); } 31 : 32 : /** 33 : * Returns the name of the vapor mixture fluid properties object 34 : */ 35 24 : const UserObjectName & getVaporMixtureName() const { return _vapor_mixture_name; } 36 : 37 : /** 38 : * Returns the number of non-condensable gases 39 : */ 40 : unsigned int getNumberOfNCGs() const { return _fp_vapor_mixture->getNumberOfSecondaryVapors(); } 41 : 42 : /** 43 : * Returns the critical pressure 44 : */ 45 24 : virtual Real p_critical() const override { return _fp_2phase->p_critical(); } 46 : 47 : /** 48 : * Computes the saturation temperature at a pressure 49 : * 50 : * @param[in] p pressure 51 : */ 52 0 : virtual Real T_sat(Real p) const override { return _fp_2phase->T_sat(p); } 53 0 : virtual ADReal T_sat(const ADReal & p) const override { return _fp_2phase->T_sat(p); } 54 : 55 : /** 56 : * Computes the saturation pressure at a temperature 57 : * 58 : * @param[in] T temperature 59 : */ 60 14 : virtual Real p_sat(Real T) const override { return _fp_2phase->p_sat(T); } 61 0 : virtual ADReal p_sat(const ADReal & T) const override { return _fp_2phase->p_sat(T); } 62 : 63 : /** 64 : * Computes dT/dp along the saturation line 65 : * 66 : * @param[in] p pressure 67 : */ 68 0 : virtual Real dT_sat_dp(Real p) const override { return _fp_2phase->dT_sat_dp(p); } 69 : 70 : /** 71 : * Computes latent heat of vaporization 72 : * 73 : * @param p pressure 74 : * @param T temperature 75 : */ 76 24 : virtual Real h_lat(Real p, Real T) const override { return _fp_2phase->h_lat(p, T); } 77 0 : virtual ADReal h_lat(const ADReal & p, const ADReal & T) const override 78 : { 79 0 : return _fp_2phase->h_lat(p, T); 80 : } 81 : 82 0 : virtual bool supportsPhaseChange() const override { return _fp_2phase->supportsPhaseChange(); } 83 : 84 : protected: 85 : /// Two-phase fluid properties user object name 86 : const UserObjectName _2phase_name; 87 : /// Vapor mixture fluid properties user object name 88 : const UserObjectName _vapor_mixture_name; 89 : 90 : /// Two-phase fluid properties user object 91 : const TwoPhaseFluidProperties * _fp_2phase; 92 : /// Vapor mixture fluid properties user object 93 : const VaporMixtureFluidProperties * _fp_vapor_mixture; 94 : }; 95 : 96 : #pragma GCC diagnostic pop