LCOV - code coverage report
Current view: top level - include/userobjects - PorousFlowFluidStateSingleComponentBase.h (source / functions) Hit Total Coverage
Test: idaholab/moose porous_flow: #31405 (292dce) with base fef103 Lines: 2 2 100.0 %
Date: 2025-09-04 07:55:56 Functions: 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 "PorousFlowFluidStateBase.h"
      13             : 
      14             : /**
      15             :  * Base class for miscible multiphase flow classes with a single fluid component using
      16             :  * a pressure and enthalpy formulation (eg, water and steam)
      17             :  */
      18             : class PorousFlowFluidStateSingleComponentBase : public PorousFlowFluidStateBase
      19             : {
      20             : public:
      21             :   static InputParameters validParams();
      22             : 
      23             :   PorousFlowFluidStateSingleComponentBase(const InputParameters & parameters);
      24             : 
      25             :   /**
      26             :    * The index of the aqueous fluid component
      27             :    * @return aqueous fluid component number
      28             :    */
      29             :   unsigned int aqueousComponentIndex() const { return _fluid_component; };
      30             : 
      31             :   /**
      32             :    * The index of the gas fluid component
      33             :    * @return gas fluid component number
      34             :    */
      35             :   unsigned int gasComponentIndex() const { return _fluid_component; };
      36             : 
      37             :   /**
      38             :    * Determines the complete thermophysical state of the system for a given set of
      39             :    * primary variables
      40             :    *
      41             :    * @param pressure gas phase pressure (Pa)
      42             :    * @param enthalpy fluid enthalpy (J/kg)
      43             :    * @param qp quadpoint index
      44             :    * @param[out] fsp the FluidStateProperties struct containing all properties
      45             :    */
      46             :   virtual void thermophysicalProperties(Real pressure,
      47             :                                         Real enthalpy,
      48             :                                         unsigned int qp,
      49             :                                         std::vector<FluidStateProperties> & fsp) const = 0;
      50             : 
      51             :   virtual void thermophysicalProperties(const ADReal & pressure,
      52             :                                         const ADReal & enthalpy,
      53             :                                         unsigned int qp,
      54             :                                         std::vector<FluidStateProperties> & fsp) const = 0;
      55             : 
      56         924 :   unsigned int getPressureIndex() const { return _pidx; };
      57         924 :   unsigned int getEnthalpyIndex() const { return _hidx; };
      58             : 
      59             : protected:
      60             :   /// Fluid component number (only one fluid component in all phases)
      61             :   const unsigned int _fluid_component;
      62             :   /// Index of derivative wrt pressure
      63             :   const unsigned int _pidx;
      64             :   /// Index of derivative wrt enthalpy
      65             :   const unsigned int _hidx;
      66             :   /// Perturbation applied to saturation temperature to move to gas/liquid phase
      67             :   const Real _dT;
      68             : };

Generated by: LCOV version 1.14