https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
53public:
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
79
89
97 Real xs_prim_from_p_T(Real p, Real T, const std::vector<Real> & x) const;
98
99protected:
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;
111 const Real _T_mix_max;
112};
113
114#pragma GCC diagnostic pop
const std::vector< double > x
const double mu
const double rho
const double T
Class for fluid properties of an arbitrary vapor mixture.
static constexpr const Real R_molar
molar (or universal) gas constant
virtual const SinglePhaseFluidProperties & getSecondaryFluidProperties(unsigned int i=0) const override
Gets a secondary component single-phase fluid properties.
const Real _T_mix_max
maximum temperature of all components
virtual unsigned int numberOfComponents() const override
Returns the number of components in the mixture.
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 unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.
const SinglePhaseFluidProperties *const _fp_primary
Primary vapor fluid properties.
virtual const SinglePhaseFluidProperties & getPrimaryFluidProperties() const override
Gets the primary component single-phase fluid properties.
static InputParameters validParams()
const std::vector< UserObjectName > _fp_secondary_names
Names of secondary vapor fluid properties.
const InputParameters & parameters() const
Interface class for producing errors, warnings, or just quiet NaNs.
Common class for single phase fluid properties.
Base class for fluid properties of vapor mixtures.