www.mooseframework.org
IdealRealGasMixtureFluidProperties.h
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 
10 #pragma once
11 
13 #include "NaNInterface.h"
14 
17 
18 template <>
20 
27 {
28 public:
29  IdealRealGasMixtureFluidProperties(const InputParameters & parameters);
30 
36  virtual unsigned int getNumberOfSecondaryVapors() const override { return _n_secondary_vapors; }
37 
46  virtual Real p_from_v_e(Real v, Real e, const std::vector<Real> & x) const override;
47 
59  virtual void p_from_v_e(Real v,
60  Real e,
61  const std::vector<Real> & x,
62  Real & p,
63  Real & dp_dv,
64  Real & dp_de,
65  std::vector<Real> & dp_dx) const override;
66 
75  virtual Real T_from_v_e(Real v, Real e, const std::vector<Real> & x) const override;
76 
88  virtual void T_from_v_e(Real v,
89  Real e,
90  const std::vector<Real> & x,
91  Real & T,
92  Real & dT_dv,
93  Real & dT_de,
94  std::vector<Real> & dT_dx) const override;
95 
104  virtual Real c_from_v_e(Real v, Real e, const std::vector<Real> & x) const override;
105 
117  virtual void c_from_v_e(Real v,
118  Real e,
119  const std::vector<Real> & x,
120  Real & c,
121  Real & dc_dv,
122  Real & dc_de,
123  std::vector<Real> & dc_dx) const override;
124 
133  virtual Real rho_from_p_T(Real p, Real T, const std::vector<Real> & x) const override;
134 
146  virtual void rho_from_p_T(Real p,
147  Real T,
148  const std::vector<Real> & x,
149  Real & rho,
150  Real & drho_dp,
151  Real & drho_dT,
152  std::vector<Real> & drho_dx) const override;
153 
162  virtual Real e_from_p_T(Real p, Real T, const std::vector<Real> & x) const override;
163 
175  virtual void e_from_p_T(Real p,
176  Real T,
177  const std::vector<Real> & x,
178  Real & e,
179  Real & de_dp,
180  Real & de_dT,
181  std::vector<Real> & de_dx) const override;
182 
191  virtual Real c_from_p_T(Real p, Real T, const std::vector<Real> & x) const override;
192 
204  virtual void c_from_p_T(Real p,
205  Real T,
206  const std::vector<Real> & x,
207  Real & c,
208  Real & dc_dp,
209  Real & dc_dT,
210  std::vector<Real> & dc_dx) const override;
211 
220  virtual Real cp_from_p_T(Real p, Real T, const std::vector<Real> & x) const override;
221 
230  virtual Real cv_from_p_T(Real p, Real T, const std::vector<Real> & x) const override;
231 
240  virtual Real mu_from_p_T(Real p, Real T, const std::vector<Real> & x) const override;
241 
250  virtual Real k_from_p_T(Real p, Real T, const std::vector<Real> & x) const override;
251 
260  virtual Real v_from_p_T(Real p, Real T, const std::vector<Real> & x) const;
261 
273  virtual void v_from_p_T(Real p,
274  Real T,
275  const std::vector<Real> & x,
276  Real & v,
277  Real & dv_dp,
278  Real & dv_dT,
279  std::vector<Real> & dv_dx) const;
280 
289  virtual Real e_from_p_rho(Real p, Real rho, const std::vector<Real> & x) const override;
290 
302  virtual void e_from_p_rho(Real p,
303  Real rho,
304  const std::vector<Real> & x,
305  Real & e,
306  Real & de_dp,
307  Real & de_drho,
308  std::vector<Real> & de_dx) const override;
309 
319  void p_T_from_v_e(Real v, Real e, const std::vector<Real> & x, Real & p, Real & T) const;
320 
336  void p_T_from_v_e(Real v,
337  Real e,
338  const std::vector<Real> & x,
339  Real & p,
340  Real & dp_dv,
341  Real & dp_de,
342  std::vector<Real> & dp_dx,
343  Real & T,
344  Real & dT_dv,
345  Real & dT_de,
346  std::vector<Real> & dT_dx) const;
347 
356  Real T_from_p_v(Real p, Real v, const std::vector<Real> & x) const;
357 
369  void T_from_p_v(Real p,
370  Real v,
371  const std::vector<Real> & x,
372  Real & T,
373  Real & dT_dp,
374  Real & dT_dv,
375  std::vector<Real> & dT_dx) const;
376 
385  Real p_from_T_v(Real T, Real v, const std::vector<Real> & x) const;
386 
397  void p_from_T_v(
398  Real T, Real v, const std::vector<Real> & x, Real & p, Real & dp_dT, Real & dp_dv) const;
399 
411  void p_from_T_v(Real T,
412  Real v,
413  const std::vector<Real> & x,
414  Real & p,
415  Real & dp_dT,
416  Real & dp_dv,
417  std::vector<Real> & dp_dx) const;
418 
427  Real e_from_T_v(Real T, Real v, const std::vector<Real> & x) const;
428 
440  void e_from_T_v(Real T,
441  Real v,
442  const std::vector<Real> & x,
443  Real & e,
444  Real & de_dT,
445  Real & de_dv,
446  std::vector<Real> & de_dx) const;
447 
459  void s_from_T_v(
460  Real T, Real v, const std::vector<Real> & x, Real & s, Real & ds_dT, Real & ds_dv) const;
461 
470  Real c_from_T_v(Real T, Real v, const std::vector<Real> & x) const;
471 
483  void c_from_T_v(Real T,
484  Real v,
485  const std::vector<Real> & x,
486  Real & c,
487  Real & dc_dT,
488  Real & dc_dv,
489  std::vector<Real> & dc_dx) const;
490 
499  Real cp_from_T_v(Real T, Real v, const std::vector<Real> & x) const;
500 
509  Real cv_from_T_v(Real T, Real v, const std::vector<Real> & x) const;
510 
519  Real mu_from_T_v(Real T, Real v, const std::vector<Real> & x) const;
520 
529  Real k_from_T_v(Real T, Real v, const std::vector<Real> & x) const;
530 
538  Real xs_prim_from_p_T(Real p, Real T, const std::vector<Real> & x) const;
539 
540 protected:
544  std::vector<const SinglePhaseFluidProperties *> _fp_secondary;
546  const std::vector<UserObjectName> _fp_secondary_names;
548  const unsigned int _n_secondary_vapors;
550  constexpr static const Real R_molar = 8.3144598;
552  const Real _T_mix_max;
553 };
IdealRealGasMixtureFluidProperties::c_from_p_T
virtual Real c_from_p_T(Real p, Real T, const std::vector< Real > &x) const override
Speed of sound from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:265
IdealRealGasMixtureFluidProperties::v_from_p_T
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:170
IdealRealGasMixtureFluidProperties::_T_mix_max
const Real _T_mix_max
maximum temperature of all components
Definition: IdealRealGasMixtureFluidProperties.h:552
IdealRealGasMixtureFluidProperties::T_from_p_v
Real T_from_p_v(Real p, Real v, const std::vector< Real > &x) const
Temperature from pressure and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:525
SinglePhaseFluidProperties
Common class for single phase fluid properties.
Definition: SinglePhaseFluidProperties.h:89
IdealRealGasMixtureFluidProperties::mu_from_p_T
virtual Real mu_from_p_T(Real p, Real T, const std::vector< Real > &x) const override
Dynamic viscosity from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:362
IdealRealGasMixtureFluidProperties::mu_from_T_v
Real mu_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Dynamic viscosity from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:848
IdealRealGasMixtureFluidProperties::k_from_p_T
virtual Real k_from_p_T(Real p, Real T, const std::vector< Real > &x) const override
Thermal conductivity from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:390
IdealRealGasMixtureFluidProperties::cp_from_T_v
Real cp_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Isobaric heat capacity from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:814
IdealRealGasMixtureFluidProperties::_fp_primary
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Definition: IdealRealGasMixtureFluidProperties.h:542
IdealRealGasMixtureFluidProperties::c_from_v_e
virtual Real c_from_v_e(Real v, Real e, const std::vector< Real > &x) const override
Speed of sound from specific volume and specific internal energy.
Definition: IdealRealGasMixtureFluidProperties.C:101
IdealRealGasMixtureFluidProperties
Class for fluid properties of an arbitrary vapor mixture.
Definition: IdealRealGasMixtureFluidProperties.h:26
IdealRealGasMixtureFluidProperties::p_from_v_e
virtual Real p_from_v_e(Real v, Real e, const std::vector< Real > &x) const override
Pressure from specific volume and specific internal energy.
Definition: IdealRealGasMixtureFluidProperties.C:55
validParams< IdealRealGasMixtureFluidProperties >
InputParameters validParams< IdealRealGasMixtureFluidProperties >()
Definition: IdealRealGasMixtureFluidProperties.C:19
IdealRealGasMixtureFluidProperties::p_from_T_v
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:580
IdealRealGasMixtureFluidProperties::k_from_T_v
Real k_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Thermal conductivity from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:874
IdealRealGasMixtureFluidProperties::cp_from_p_T
virtual Real cp_from_p_T(Real p, Real T, const std::vector< Real > &x) const override
Isobaric heat capacity from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:325
IdealRealGasMixtureFluidProperties::xs_prim_from_p_T
Real xs_prim_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Mass fraction of primary (condensable) component at saturation from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:900
IdealRealGasMixtureFluidProperties::e_from_p_T
virtual Real e_from_p_T(Real p, Real T, const std::vector< Real > &x) const override
Specific internal energy from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:232
IdealRealGasMixtureFluidProperties::_fp_secondary_names
const std::vector< UserObjectName > _fp_secondary_names
Names of secondary vapor fluid properties.
Definition: IdealRealGasMixtureFluidProperties.h:546
IdealRealGasMixtureFluidProperties::s_from_T_v
void s_from_T_v(Real T, Real v, const std::vector< Real > &x, Real &s, Real &ds_dT, Real &ds_dv) const
Specific entropy and its derivatives from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:732
IdealRealGasMixtureFluidProperties::cv_from_p_T
virtual Real cv_from_p_T(Real p, Real T, const std::vector< Real > &x) const override
Isochoric heat capacity from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:348
IdealRealGasMixtureFluidProperties::_fp_secondary
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.
Definition: IdealRealGasMixtureFluidProperties.h:544
IdealRealGasMixtureFluidProperties::_n_secondary_vapors
const unsigned int _n_secondary_vapors
Number of secondary vapors.
Definition: IdealRealGasMixtureFluidProperties.h:548
IdealRealGasMixtureFluidProperties::e_from_T_v
Real e_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Specific internal energy from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:666
IdealRealGasMixtureFluidProperties::getNumberOfSecondaryVapors
virtual unsigned int getNumberOfSecondaryVapors() const override
Number of secondary vapors (non-condensable components)
Definition: IdealRealGasMixtureFluidProperties.h:36
VaporMixtureFluidProperties.h
IdealRealGasMixtureFluidProperties::e_from_p_rho
virtual Real e_from_p_rho(Real p, Real rho, const std::vector< Real > &x) const override
Specific internal energy from pressure and density.
Definition: IdealRealGasMixtureFluidProperties.C:418
IdealRealGasMixtureFluidProperties::IdealRealGasMixtureFluidProperties
IdealRealGasMixtureFluidProperties(const InputParameters &parameters)
Definition: IdealRealGasMixtureFluidProperties.C:39
NaNInterface
Interface class for producing errors, warnings, or just quiet NaNs.
Definition: NaNInterface.h:27
NaNInterface.h
IdealRealGasMixtureFluidProperties::c_from_T_v
Real c_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Speed of sound from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:756
IdealRealGasMixtureFluidProperties::rho_from_p_T
virtual Real rho_from_p_T(Real p, Real T, const std::vector< Real > &x) const override
Density from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:142
VaporMixtureFluidProperties
Base class for fluid properties of vapor mixtures.
Definition: VaporMixtureFluidProperties.h:27
IdealRealGasMixtureFluidProperties::p_T_from_v_e
void p_T_from_v_e(Real v, Real e, const std::vector< Real > &x, Real &p, Real &T) const
Pressure and temperature from specific volume and specific internal energy.
Definition: IdealRealGasMixtureFluidProperties.C:457
IdealRealGasMixtureFluidProperties::R_molar
constexpr static const Real R_molar
molar (or universal) gas constant
Definition: IdealRealGasMixtureFluidProperties.h:550
IdealRealGasMixtureFluidProperties::T_from_v_e
virtual Real T_from_v_e(Real v, Real e, const std::vector< Real > &x) const override
Temperature from specific volume and specific internal energy.
Definition: IdealRealGasMixtureFluidProperties.C:78
IdealRealGasMixtureFluidProperties::cv_from_T_v
Real cv_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Isochoric heat capacity from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:836