https://mooseframework.inl.gov
IdealRealGasMixtureFluidProperties.h
Go to the documentation of this file.
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 
13 #include "NaNInterface.h"
14 
15 #pragma GCC diagnostic push
16 #pragma GCC diagnostic ignored "-Woverloaded-virtual"
17 
19 
23 #define override_property(want, prop1, prop2) \
24  virtual Real want##_from_##prop1##_##prop2(Real prop1, Real prop2, const std::vector<Real> & x) \
25  const override; \
26  virtual void want##_from_##prop1##_##prop2(Real prop1, \
27  Real prop2, \
28  const std::vector<Real> & x, \
29  Real & want, \
30  Real & d##want##_d##prop1, \
31  Real & d##want##_d##prop2, \
32  std::vector<Real> & dp_dx) const override
33 
37 #define declare_property(want, prop1, prop2) \
38  virtual Real want##_from_##prop1##_##prop2(Real prop1, Real prop2, const std::vector<Real> & x) \
39  const; \
40  virtual void want##_from_##prop1##_##prop2(Real prop1, \
41  Real prop2, \
42  const std::vector<Real> & x, \
43  Real & want, \
44  Real & d##want##_d##prop1, \
45  Real & d##want##_d##prop2, \
46  std::vector<Real> & dp_dx) const
47 
52 {
53 public:
55 
57 
59 
60  virtual const SinglePhaseFluidProperties & getPrimaryFluidProperties() const override;
61  virtual const SinglePhaseFluidProperties &
62  getSecondaryFluidProperties(unsigned int i = 0) const override;
63 
64  virtual unsigned int numberOfComponents() const override { return _n_secondary_vapors + 1; }
65 
66  override_property(p, v, e);
67  override_property(T, v, e);
68  override_property(c, v, e);
69  override_property(v, p, T);
70  override_property(rho, p, T);
71  override_property(e, p, T);
72  override_property(s, p, T);
73  override_property(c, p, T);
74  override_property(cp, p, T);
75  override_property(cv, p, T);
76  override_property(mu, p, T);
77  override_property(k, p, T);
78  override_property(e, p, rho);
79 
80  declare_property(T, p, v);
81  declare_property(p, T, v);
82  declare_property(e, T, v);
83  declare_property(s, T, v);
84  declare_property(c, T, v);
85  declare_property(cp, T, v);
86  declare_property(cv, T, v);
87  declare_property(mu, T, v);
88  declare_property(k, T, v);
89 
97  Real xs_prim_from_p_T(Real p, Real T, const std::vector<Real> & x) const;
98 
99 protected:
103  std::vector<const SinglePhaseFluidProperties *> _fp_secondary;
105  const std::vector<UserObjectName> _fp_secondary_names;
107  const unsigned int _n_secondary_vapors;
109  constexpr static const Real R_molar = 8.3144598;
112 };
113 
114 #pragma GCC diagnostic pop
virtual const SinglePhaseFluidProperties & getSecondaryFluidProperties(unsigned int i=0) const override
Gets a secondary component single-phase fluid properties.
Base class for fluid properties of vapor mixtures.
static const std::string cv
Definition: NS.h:122
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.
const SinglePhaseFluidProperties *const _fp_primary
Primary vapor fluid properties.
static InputParameters validParams()
const Real _T_mix_max
maximum temperature of all components
virtual const SinglePhaseFluidProperties & getPrimaryFluidProperties() const override
Gets the primary component single-phase fluid properties.
static const std::string cp
Definition: NS.h:121
const std::vector< double > x
static const std::string mu
Definition: NS.h:123
Common class for single phase fluid properties.
static constexpr const Real R_molar
molar (or universal) gas constant
const std::vector< UserObjectName > _fp_secondary_names
Names of secondary vapor fluid properties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Class for fluid properties of an arbitrary vapor mixture.
const InputParameters & parameters() const
const unsigned int _n_secondary_vapors
Number of secondary vapors.
IdealRealGasMixtureFluidProperties(const InputParameters &parameters)
Interface class for producing errors, warnings, or just quiet NaNs.
Definition: NaNInterface.h:22
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.
virtual unsigned int numberOfComponents() const override
Returns the number of components in the mixture.
static const std::string k
Definition: NS.h:130