CoolProp  4.2.5
An open-source fluid property and humid air property database
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
TTSETwoPhaseTableClass Class Reference

#include <TTSE.h>

Public Member Functions

 TTSETwoPhaseTableClass ()
 Default Instantiator. More...
 
 TTSETwoPhaseTableClass (Fluid *pFluid, double Q)
 
 ~TTSETwoPhaseTableClass ()
 Destructor. More...
 
void set_size (unsigned int N)
 
double build (double pmin, double pmax, TTSETwoPhaseTableClass *other=NULL)
 
double evaluate (long iParam, double p)
 
double evaluate_T (double T)
 
double evaluate_sat_derivative (long iParam, double p)
 
double evaluate_randomly (long iParam, unsigned int N)
 
double check_randomly (long iParam, unsigned int N, std::vector< double > *p, std::vector< double > *EOSv, std::vector< double > *TTSE)
 

Public Attributes

double pmin
 
double pmax
 
double Q
 
double logpmin
 
double logpmax
 
std::vector< double > T
 
std::vector< double > dTdp
 
std::vector< double > d2Tdp2
 
std::vector< double > rho
 
std::vector< double > drhodp
 
std::vector< double > d2rhodp2
 
std::vector< double > logrho
 
std::vector< double > s
 
std::vector< double > dsdp
 
std::vector< double > d2sdp2
 
std::vector< double > h
 
std::vector< double > dhdp
 
std::vector< double > d2hdp2
 
std::vector< double > p
 
std::vector< double > logp
 

Protected Attributes

unsigned int N
 
FluidpFluid
 
double dh
 
double dp
 
double pratio
 
double logpratio
 

Detailed Description

Definition at line 24 of file TTSE.h.

Constructor & Destructor Documentation

TTSETwoPhaseTableClass::TTSETwoPhaseTableClass ( )
inline

Default Instantiator.

Definition at line 33 of file TTSE.h.

TTSETwoPhaseTableClass::TTSETwoPhaseTableClass ( Fluid pFluid,
double  Q 
)

Instantiator

Parameters
pFluidPointer to an instance of a Fluid class
QQuality [kg/kg], in [0,1]

Definition at line 2559 of file TTSE.cpp.

TTSETwoPhaseTableClass::~TTSETwoPhaseTableClass ( )
inline

Destructor.

Definition at line 39 of file TTSE.h.

Member Function Documentation

double TTSETwoPhaseTableClass::build ( double  pmin,
double  pmax,
TTSETwoPhaseTableClass other = NULL 
)

Build the tables along the saturation curves

Parameters
pminMinimum pressure [kJ/kg]
pmaxMaximum pressure [kJ/kg]
otherTTSETwoPhaseTableClass for the other phase boundary (liquid for the vapor, or vice versa)

Definition at line 2590 of file TTSE.cpp.

double TTSETwoPhaseTableClass::check_randomly ( long  iParam,
unsigned int  N,
std::vector< double > *  p,
std::vector< double > *  EOSv,
std::vector< double > *  TTSE 
)

Randomly select points within the range, and evaluate the property using TTSE and the EOS

Parameters
iParamIndex of desired output
NNumber of runs to do
pstd::vector of pressures
EOSstd::vector of values from Equation of State
TTSEstd::vector of values from TTSE

Note: p,EOS, TTSE should be empty std::vector passed by reference

Definition at line 2906 of file TTSE.cpp.

double TTSETwoPhaseTableClass::evaluate ( long  iParam,
double  p 
)

Evaluate a property in the two-phase region using the TTSE method with p as input

Parameters
iParamIndex of desired output
pPressure (absolute) [kPa]

log(p) v. log(rho) gives close to a line for most of the curve d(log(p))/d(log(p)) = 1/rho*d(rho)/d(log(p)) = p/rho*drho/dp

Definition at line 2699 of file TTSE.cpp.

double TTSETwoPhaseTableClass::evaluate_randomly ( long  iParam,
unsigned int  N 
)

Randomly evaluate a property in the two-phase region using the TTSE method

Parameters
iParamIndex of desired output
NNumber of runs to do

Definition at line 2890 of file TTSE.cpp.

double TTSETwoPhaseTableClass::evaluate_sat_derivative ( long  iParam,
double  p 
)

Evaluate the derivative of a property along the saturation curve using the TTSE method

Parameters
iParamIndex of desired output
pPressure (absolute) [kPa]

First order expansion of dTdp around point of interest

First order expansion of dhdp around point of interest

First order expansion of dsdp around point of interest

First order expansion of drhodp around point of interest

Definition at line 2847 of file TTSE.cpp.

double TTSETwoPhaseTableClass::evaluate_T ( double  T)

Evaluate a property in the two-phase region using the TTSE method with T as input

Parameters
TTemperature [K]
Returns
Pressure [kPa]

Definition at line 2786 of file TTSE.cpp.

void TTSETwoPhaseTableClass::set_size ( unsigned int  N)

Set the size of the Two-Phase table

Parameters
NNumber of elements in arrays

Definition at line 2564 of file TTSE.cpp.

Member Data Documentation

std::vector<double> TTSETwoPhaseTableClass::d2hdp2

Definition at line 51 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::d2rhodp2

Definition at line 49 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::d2sdp2

Definition at line 50 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::d2Tdp2

Definition at line 48 of file TTSE.h.

double TTSETwoPhaseTableClass::dh
protected

Definition at line 29 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::dhdp

Definition at line 51 of file TTSE.h.

double TTSETwoPhaseTableClass::dp
protected

Definition at line 29 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::drhodp

Definition at line 49 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::dsdp

Definition at line 50 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::dTdp

Definition at line 48 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::h

Definition at line 51 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::logp

Definition at line 52 of file TTSE.h.

double TTSETwoPhaseTableClass::logpmax

Definition at line 45 of file TTSE.h.

double TTSETwoPhaseTableClass::logpmin

Definition at line 45 of file TTSE.h.

double TTSETwoPhaseTableClass::logpratio
protected

Definition at line 30 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::logrho

Definition at line 49 of file TTSE.h.

unsigned int TTSETwoPhaseTableClass::N
protected

Definition at line 27 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::p

Definition at line 52 of file TTSE.h.

Fluid* TTSETwoPhaseTableClass::pFluid
protected

Definition at line 28 of file TTSE.h.

double TTSETwoPhaseTableClass::pmax

Definition at line 45 of file TTSE.h.

double TTSETwoPhaseTableClass::pmin

Definition at line 45 of file TTSE.h.

double TTSETwoPhaseTableClass::pratio
protected

Definition at line 30 of file TTSE.h.

double TTSETwoPhaseTableClass::Q

Definition at line 45 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::rho

Definition at line 49 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::s

Definition at line 50 of file TTSE.h.

std::vector<double> TTSETwoPhaseTableClass::T

Definition at line 48 of file TTSE.h.


The documentation for this class was generated from the following files: