https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowWaterNCG.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
16
30{
31public:
33
35
36 virtual std::string fluidStateName() const override;
37
38 void thermophysicalProperties(Real pressure,
39 Real temperature,
40 Real Xnacl,
41 Real Z,
42 unsigned int qp,
43 std::vector<FluidStateProperties> & fsp) const override;
44
45 void thermophysicalProperties(const ADReal & pressure,
46 const ADReal & temperature,
47 const ADReal & Xnacl,
48 const ADReal & Z,
49 unsigned int qp,
50 std::vector<FluidStateProperties> & fsp) const override;
61 void equilibriumMassFractions(const ADReal & pressure,
62 const ADReal & temperature,
63 ADReal & Xncg,
64 ADReal & Yh2o) const;
65
76 void massFractions(const ADReal & pressure,
77 const ADReal & temperature,
78 const ADReal & Z,
79 FluidStatePhaseEnum & phase_state,
80 std::vector<FluidStateProperties> & fsp) const;
81
89 void gasProperties(const ADReal & pressure,
90 const ADReal & temperature,
91 std::vector<FluidStateProperties> & fsp) const;
105 void liquidProperties(const ADReal & pressure,
106 const ADReal & temperature,
107 std::vector<FluidStateProperties> & fsp) const;
108
121 ADReal liquidDensity(const ADReal & pressure, const ADReal & temperature) const;
122
130 ADReal gasDensity(const ADReal & pressure,
131 const ADReal & temperature,
132 std::vector<FluidStateProperties> & fsp) const;
133
143 ADReal saturation(const ADReal & pressure,
144 const ADReal & temperature,
145 const ADReal & Z,
146 std::vector<FluidStateProperties> & fsp) const;
147
157 void twoPhaseProperties(const ADReal & pressure,
158 const ADReal & temperature,
159 const ADReal & Z,
160 unsigned int qp,
161 std::vector<FluidStateProperties> & fsp) const;
162
171 ADReal enthalpyOfDissolution(const ADReal & temperature) const;
172
173 virtual Real totalMassFraction(
174 Real pressure, Real temperature, Real Xnacl, Real saturation, unsigned int qp) const override;
175
176protected:
182 ADReal moleFractionToMassFraction(const ADReal & xmol) const;
183
188 void checkVariables(Real temperature) const;
189
197 const Real _Mh2o;
199 const Real _Mncg;
205 const std::vector<Real> _ncg_henry;
206};
DualNumber< Real, DNDerivativeType, true > ADReal
FluidStatePhaseEnum
Phase state enum.
const InputParameters & parameters() const
Compositional flash routines for miscible multiphase flow classes with multiple fluid components.
Specialized class for water and a non-condensable gas (NCG) Includes dissolution of gas in liquid wat...
const Real _Mncg
Molar mass of non-condensable gas (kg/mol)
void checkVariables(Real temperature) const
Check that the temperature is between the triple and critical values.
static InputParameters validParams()
const Real _water_triple_temperature
Triple point temperature of water (K)
ADReal gasDensity(const ADReal &pressure, const ADReal &temperature, std::vector< FluidStateProperties > &fsp) const
Density of the gas phase.
ADReal saturation(const ADReal &pressure, const ADReal &temperature, const ADReal &Z, std::vector< FluidStateProperties > &fsp) const
Gas saturation in the two-phase region.
void massFractions(const ADReal &pressure, const ADReal &temperature, const ADReal &Z, FluidStatePhaseEnum &phase_state, std::vector< FluidStateProperties > &fsp) const
Mass fractions of NCG and H2O in both phases, as well as derivatives wrt PorousFlow variables.
ADReal enthalpyOfDissolution(const ADReal &temperature) const
Enthalpy of dissolution of NCG in water calculated using Henry's constant From Himmelblau,...
const Water97FluidProperties & _water97_fp
Fluid properties UserObject for water (used to access Henry's law)
void liquidProperties(const ADReal &pressure, const ADReal &temperature, std::vector< FluidStateProperties > &fsp) const
Liquid properties - density, viscosity and enthalpy Note: The pressure here is the liquid pressure.
const std::vector< Real > _ncg_henry
Henry's coefficients for the NCG.
ADReal liquidDensity(const ADReal &pressure, const ADReal &temperature) const
Density of the liquid phase Note: The pressure here is the gas pressure.
const Real _water_critical_temperature
Critical temperature of water (K)
const SinglePhaseFluidProperties & _ncg_fp
Fluid properties UserObject for the NCG.
void gasProperties(const ADReal &pressure, const ADReal &temperature, std::vector< FluidStateProperties > &fsp) const
Gas properties - density, viscosity and enthalpy.
void thermophysicalProperties(Real pressure, Real temperature, Real Xnacl, Real Z, unsigned int qp, std::vector< FluidStateProperties > &fsp) const override
Determines the complete thermophysical state of the system for a given set of primary variables.
ADReal moleFractionToMassFraction(const ADReal &xmol) const
Convert mole fraction to mass fraction.
virtual std::string fluidStateName() const override
Name of FluidState.
const SinglePhaseFluidProperties & _water_fp
Fluid properties UserObject for water.
virtual Real totalMassFraction(Real pressure, Real temperature, Real Xnacl, Real saturation, unsigned int qp) const override
Total mass fraction of fluid component summed over all phases in the two-phase state for a specified ...
const Real _Mh2o
Molar mass of water (kg/mol)
void twoPhaseProperties(const ADReal &pressure, const ADReal &temperature, const ADReal &Z, unsigned int qp, std::vector< FluidStateProperties > &fsp) const
Gas and liquid properties in the two-phase region.
void equilibriumMassFractions(const ADReal &pressure, const ADReal &temperature, ADReal &Xncg, ADReal &Yh2o) const
Mass fractions of NCG in liquid phase and H2O in gas phase at thermodynamic equilibrium.
Common class for single phase fluid properties.
Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revi...