Go to the documentation of this file.
12 #include "Conversion.h"
13 #include "MooseUtils.h"
22 params.addRequiredParam<UserObjectName>(
"water_fp",
"The name of the user object for water");
23 params.addClassDescription(
"Fluid state class for water and vapor");
30 _Mh2o(_water_fp.molarMass()),
31 _p_triple(_water_fp.triplePointPressure()),
32 _p_critical(_water_fp.criticalPressure()),
33 _T_triple(_water_fp.triplePointTemperature()),
34 _T_critical(_water_fp.criticalTemperature())
38 paramError(
"water_fp",
"A valid water FluidProperties UserObject must be provided in water_fp");
48 paramError(
"liquid_phase_number",
49 "This value is larger than the possible number of phases ",
54 paramError(
"liquid_fluid_component",
55 "This value is larger than the possible number of fluid components",
72 std::vector<FluidStateProperties> & fsp)
const
79 Moose::derivInsert(p.derivatives(),
_pidx, 1.0);
81 Moose::derivInsert(h.derivatives(),
_hidx, 1.0);
100 else if (h.value() >= hl && h.value() <= hv)
109 const DualReal T =
_water_fp.T_from_p_h(p, h);
143 const DualReal T =
_water_fp.T_from_p_h(p, h);
159 const DualReal hvl = hv - hl;
162 const DualReal X = (h - hl) / hvl;
166 const DualReal Tsatl = Tsat -
dT;
167 const DualReal Tsatv = Tsat +
dT;
170 const DualReal rhol =
_water_fp.rho_from_p_T(p, Tsatl);
171 const DualReal rhov =
_water_fp.rho_from_p_T(p, Tsatv);
174 const DualReal satv = X * rhol / (rhov + X * (rhol - rhov));
FluidStateProperties _empty_fsp
Empty FluidStateProperties object.
unsigned int _gas_phase_number
Phase number of the gas phase.
Common class for single phase fluid properties.
const PorousFlowCapillaryPressure & _pc
Capillary pressure UserObject.
InputParameters validParams< PorousFlowWaterVapor >()
FluidStatePhaseEnum
Phase state enum.
const Real _p_critical
Critical pressure of water (Pa)
PorousFlowWaterVapor(const InputParameters ¶meters)
void thermophysicalProperties(Real pressure, Real enthalpy, unsigned int qp, FluidStatePhaseEnum &phase_state, std::vector< FluidStateProperties > &fsp) const override
Determines the complete thermophysical state of the system for a given set of primary variables.
const Real _p_triple
Triple point pressure of water (Pa)
Base class for miscible multiphase flow classes with a single fluid component using a pressure and en...
const Real _T_critical
Critical temperature of water (K)
unsigned int _gas_fluid_component
Fluid component number of the gas phase.
Specialized class for water and vapor mixture using pressure and enthalpy.
const std::string enthalpy
const SinglePhaseFluidProperties & _water_fp
Fluid properties UserObject for water.
AD data structure to pass calculated thermophysical properties.
virtual Real capillaryPressure(Real saturation, unsigned qp=0) const
Capillary pressure is calculated as a function of true saturation.
const unsigned int _aqueous_phase_number
Phase number of the aqueous phase.
unsigned int _num_phases
Number of phases.
InputParameters validParams< PorousFlowFluidStateSingleComponentBase >()
virtual Real vaporTemperature(Real p) const
Vapor temperature.
registerMooseObject("PorousFlowApp", PorousFlowWaterVapor)
unsigned int _num_components
Number of components.
const unsigned int _aqueous_fluid_component
Fluid component number of the aqueous component.
virtual std::string fluidStateName() const override
Name of FluidState.
const unsigned int _hidx
Index of derivative wrt enthalpy.
const Real dT
Perturbation applied to saturation temperature to move to gas/liquid phase.
const unsigned int _pidx
Index of derivative wrt pressure.
const std::string pressure