www.mooseframework.org
PorousFlowFluidStateMultiComponentBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<PorousFlowFluidStateFlash>();
17  params.addClassDescription("Base class for multiple component fluid state classes");
18  return params;
19 }
20 
22  const InputParameters & parameters)
23  : PorousFlowFluidStateFlash(parameters), _pidx(0), _Zidx(1), _Tidx(2), _Xidx(3)
24 {
25 }
26 
27 void
29  Real Xi,
30  Real Yi,
31  FluidStatePhaseEnum & phase_state) const
32 {
33  if (Zi <= Xi)
34  {
35  // In this case, there is not enough component i to form a gas phase,
36  // so only a liquid phase is present
37  phase_state = FluidStatePhaseEnum::LIQUID;
38  }
39  else if (Zi > Xi && Zi < Yi)
40  {
41  // Two phases are present
42  phase_state = FluidStatePhaseEnum::TWOPHASE;
43  }
44  else // (Zi >= Yi)
45  {
46  // In this case, there is not enough water to form a liquid
47  // phase, so only a gas phase is present
48  phase_state = FluidStatePhaseEnum::GAS;
49  }
50 }
validParams< PorousFlowFluidStateFlash >
InputParameters validParams< PorousFlowFluidStateFlash >()
Definition: PorousFlowFluidStateFlash.C:14
PorousFlowFluidStateMultiComponentBase::PorousFlowFluidStateMultiComponentBase
PorousFlowFluidStateMultiComponentBase(const InputParameters &parameters)
Definition: PorousFlowFluidStateMultiComponentBase.C:21
FluidStatePhaseEnum
FluidStatePhaseEnum
Phase state enum.
Definition: PorousFlowFluidStateBase.h:18
PorousFlowFluidStateFlash
Compositional flash routines for miscible multiphase flow classes with multiple fluid components.
Definition: PorousFlowFluidStateFlash.h:23
FluidStatePhaseEnum::LIQUID
PorousFlowFluidStateMultiComponentBase.h
validParams< PorousFlowFluidStateMultiComponentBase >
InputParameters validParams< PorousFlowFluidStateMultiComponentBase >()
Definition: PorousFlowFluidStateMultiComponentBase.C:14
FluidStatePhaseEnum::TWOPHASE
FluidStatePhaseEnum::GAS
PorousFlowFluidStateMultiComponentBase::phaseState
void phaseState(Real Zi, Real Xi, Real Yi, FluidStatePhaseEnum &phase_state) const
Determines the phase state gven the total mass fraction and equilibrium mass fractions.
Definition: PorousFlowFluidStateMultiComponentBase.C:28