https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowFluidStateFlash.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
19{
20public:
22
24
49 Real rachfordRice(Real vf, std::vector<Real> & Zi, std::vector<Real> & Ki) const;
50
60 Real rachfordRiceDeriv(Real vf, std::vector<Real> & Zi, std::vector<Real> & Ki) const;
61
71 Real vaporMassFraction(Real Z0, Real K0, Real K1) const;
72 ADReal vaporMassFraction(const ADReal & Z0, const ADReal & K0, const ADReal & K1) const;
73 Real vaporMassFraction(std::vector<Real> & Zi, std::vector<Real> & Ki) const;
74
75protected:
77 const Real _nr_max_its;
79 const Real _nr_tol;
80};
DualNumber< Real, DNDerivativeType, true > ADReal
const InputParameters & parameters() const
Base class for fluid states for miscible multiphase flow in porous media.
Compositional flash routines for miscible multiphase flow classes with multiple fluid components.
Real rachfordRice(Real vf, std::vector< Real > &Zi, std::vector< Real > &Ki) const
Rachford-Rice equation for vapor fraction.
Real rachfordRiceDeriv(Real vf, std::vector< Real > &Zi, std::vector< Real > &Ki) const
Derivative of Rachford-Rice equation wrt vapor fraction.
static InputParameters validParams()
const Real _nr_max_its
Maximum number of iterations for the Newton-Raphson routine.
const Real _nr_tol
Tolerance for Newton-Raphson iterations.
Real vaporMassFraction(Real Z0, Real K0, Real K1) const
Solves Rachford-Rice equation to provide vapor mass fraction.