CoolProp
4.2.5
An open-source fluid property and humid air property database
|
#include <Mixtures.h>
Public Member Functions | |
NewtonRaphsonVLE () | |
void | resize (unsigned int N) |
void | pre_call () |
double | call (double beta, double T, double p, double rhobar_liq, double rhobar_vap, const std::vector< double > &z, std::vector< double > &K, int spec_index, double spec_value) |
void | build_arrays (double beta, double T, double p, const std::vector< double > &z, std::vector< double > &K, int spec_index, double spec_value) |
Public Attributes | |
double | error_rms |
double | rhobar_liq |
double | rhobar_vap |
double | T |
double | p |
unsigned int | N |
bool | logging |
int | Nsteps |
int | Nsteps_max |
Mixture * | Mix |
STLMatrix | J |
std::vector< double > | K |
std::vector< double > | x |
std::vector< double > | y |
std::vector< double > | phi_ij_liq |
std::vector< double > | phi_ij_vap |
std::vector< double > | r |
std::vector< double > | dXdS |
std::vector< double > | neg_dFdS |
std::vector < SuccessiveSubstitutionStep > | step_logger |
A class to do newton raphson solver for VLE given guess values for vapor-liquid equilibria. This class will then be included in the Mixture class
A class is used rather than a function so that it is easier to store iteration histories, additional output values, etc.
Definition at line 331 of file Mixtures.h.
|
inline |
Definition at line 344 of file Mixtures.h.
void NewtonRaphsonVLE::build_arrays | ( | double | beta, |
double | T, | ||
double | p, | ||
const std::vector< double > & | z, | ||
std::vector< double > & | K, | ||
int | spec_index, | ||
double | spec_value | ||
) |
Build the arrays for the Newton-Raphson solve
This method builds the Jacobian matrix, the sensitivity matrix, etc.
beta | Void fraction [-] (0: bubble, 1: dew) |
T | Temperature [K] |
p | Pressure [Pa] |
z | Bulk mole fractions [-] |
K | Array of K-factors [-] |
Definition at line 2485 of file Mixtures.cpp.
double NewtonRaphsonVLE::call | ( | double | beta, |
double | T, | ||
double | p, | ||
double | rhobar_liq, | ||
double | rhobar_vap, | ||
const std::vector< double > & | z, | ||
std::vector< double > & | K, | ||
int | spec_index, | ||
double | spec_value | ||
) |
Call the Newton-Raphson VLE Solver
This solver must be passed reasonable guess values for the mole fractions, densities, etc. You may want to take a few steps of successive substitution before you start with Newton Raphson.
T | Temperature [K] |
p | Pressure [Pa] |
rhobar_liq | Current value of molar density of the liquid [mol/m^3] |
rhobar_vap | Current value of molar density of the vapor [mol/m^3] |
z | Bulk mole fractions [-] |
K | Array of K-factors [-] |
Definition at line 2424 of file Mixtures.cpp.
|
inline |
Definition at line 349 of file Mixtures.h.
void NewtonRaphsonVLE::resize | ( | unsigned int | N | ) |
Definition at line 2405 of file Mixtures.cpp.
std::vector<double> NewtonRaphsonVLE::dXdS |
Definition at line 341 of file Mixtures.h.
double NewtonRaphsonVLE::error_rms |
Definition at line 334 of file Mixtures.h.
STLMatrix NewtonRaphsonVLE::J |
Definition at line 340 of file Mixtures.h.
std::vector<double> NewtonRaphsonVLE::K |
Definition at line 341 of file Mixtures.h.
bool NewtonRaphsonVLE::logging |
Definition at line 336 of file Mixtures.h.
Mixture* NewtonRaphsonVLE::Mix |
Definition at line 339 of file Mixtures.h.
unsigned int NewtonRaphsonVLE::N |
Definition at line 335 of file Mixtures.h.
std::vector<double> NewtonRaphsonVLE::neg_dFdS |
Definition at line 341 of file Mixtures.h.
int NewtonRaphsonVLE::Nsteps |
Definition at line 337 of file Mixtures.h.
int NewtonRaphsonVLE::Nsteps_max |
Definition at line 338 of file Mixtures.h.
double NewtonRaphsonVLE::p |
Definition at line 334 of file Mixtures.h.
std::vector<double> NewtonRaphsonVLE::phi_ij_liq |
Definition at line 341 of file Mixtures.h.
std::vector<double> NewtonRaphsonVLE::phi_ij_vap |
Definition at line 341 of file Mixtures.h.
std::vector<double> NewtonRaphsonVLE::r |
Definition at line 341 of file Mixtures.h.
double NewtonRaphsonVLE::rhobar_liq |
Definition at line 334 of file Mixtures.h.
double NewtonRaphsonVLE::rhobar_vap |
Definition at line 334 of file Mixtures.h.
std::vector<SuccessiveSubstitutionStep> NewtonRaphsonVLE::step_logger |
Definition at line 342 of file Mixtures.h.
double NewtonRaphsonVLE::T |
Definition at line 334 of file Mixtures.h.
std::vector<double> NewtonRaphsonVLE::x |
Definition at line 341 of file Mixtures.h.
std::vector<double> NewtonRaphsonVLE::y |
Definition at line 341 of file Mixtures.h.