LCOV - code coverage report
Current view: top level - include/fluidproperties - IdealRealGasMixtureFluidProperties.h (source / functions) Hit Total Coverage
Test: idaholab/moose fluid_properties: #31405 (292dce) with base fef103 Lines: 0 1 0.0 %
Date: 2025-09-04 07:53:14 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          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 "VaporMixtureFluidProperties.h"
      13             : #include "NaNInterface.h"
      14             : 
      15             : #pragma GCC diagnostic push
      16             : #pragma GCC diagnostic ignored "-Woverloaded-virtual"
      17             : 
      18             : class SinglePhaseFluidProperties;
      19             : 
      20             : /**
      21             :  * Overrides the value and derivative methods for a property from some arguments
      22             :  */
      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             : 
      34             : /**
      35             :  * Declares the value and derivative methods for a property from some arguments
      36             :  */
      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             : 
      48             : /**
      49             :  * Class for fluid properties of an arbitrary vapor mixture
      50             :  */
      51             : class IdealRealGasMixtureFluidProperties : public VaporMixtureFluidProperties, public NaNInterface
      52             : {
      53             : public:
      54             :   static InputParameters validParams();
      55             : 
      56             :   IdealRealGasMixtureFluidProperties(const InputParameters & parameters);
      57             : 
      58             :   usingVaporMixtureFluidPropertiesMembers;
      59             : 
      60             :   virtual const SinglePhaseFluidProperties & getPrimaryFluidProperties() const override;
      61             :   virtual const SinglePhaseFluidProperties &
      62             :   getSecondaryFluidProperties(unsigned int i = 0) const override;
      63             : 
      64           0 :   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             : 
      90             :   /**
      91             :    * Mass fraction of primary (condensable) component at saturation from pressure and temperature
      92             :    *
      93             :    * @param[in] T   temperature
      94             :    * @param[in] p   pressure
      95             :    * @return        mass fraction of primary (condensable) component at saturation
      96             :    */
      97             :   Real xs_prim_from_p_T(Real p, Real T, const std::vector<Real> & x) const;
      98             : 
      99             : protected:
     100             :   /// Primary vapor fluid properties
     101             :   const SinglePhaseFluidProperties * const _fp_primary;
     102             :   /// Secondary vapor fluid properties
     103             :   std::vector<const SinglePhaseFluidProperties *> _fp_secondary;
     104             :   /// Names of secondary vapor fluid properties
     105             :   const std::vector<UserObjectName> _fp_secondary_names;
     106             :   /// Number of secondary vapors
     107             :   const unsigned int _n_secondary_vapors;
     108             :   /// molar (or universal) gas constant
     109             :   constexpr static const Real R_molar = 8.3144598;
     110             :   /// maximum temperature of all components
     111             :   const Real _T_mix_max;
     112             : };
     113             : 
     114             : #pragma GCC diagnostic pop

Generated by: LCOV version 1.14