CoolProp  6.6.1dev
An open-source fluid property and humid air property database
Classes | Namespaces | Macros | Functions
CoolProp.cpp File Reference
#include "CoolProp.h"
#include "AbstractState.h"
#include <limits>
#include <memory>
#include <iostream>
#include <stdlib.h>
#include <vector>
#include <exception>
#include <stdio.h>
#include <string>
#include <locale>
#include "CoolPropTools.h"
#include "Solvers.h"
#include "MatrixMath.h"
#include "Backends/Helmholtz/Fluids/FluidLibrary.h"
#include "Backends/Incompressible/IncompressibleLibrary.h"
#include "Backends/Incompressible/IncompressibleBackend.h"
#include "Backends/Helmholtz/HelmholtzEOSBackend.h"
#include "Backends/Helmholtz/MixtureParameters.h"
#include "DataStructures.h"
#include "Backends/REFPROP/REFPROPMixtureBackend.h"
#include "Backends/Cubics/CubicsLibrary.h"
#include "Backends/PCSAFT/PCSAFTLibrary.h"
#include "gitrevision.h"
#include "cpversion.h"

Go to the source code of this file.

Classes

struct  CoolProp::delim
 
struct  CoolProp::output_parameter
 

Namespaces

 CoolProp
 Code for all the binary pairs in the mixture.
 

Macros

#define DBL_EPSILON   std::numeric_limits<double>::epsilon()
 

Functions

void CoolProp::set_debug_level (int level)
 
int CoolProp::get_debug_level ()
 
void CoolProp::set_warning_string (const std::string &warning)
 
void CoolProp::set_error_string (const std::string &error)
 
bool CoolProp::has_backend_in_string (const std::string &fluid_string, std::size_t &i)
 
void CoolProp::extract_backend (std::string fluid_string, std::string &backend, std::string &fluid)
 Extract the backend from a string - something like "HEOS::Water" would split to "HEOS" and "Water". If no backend is specified, the backend will be set to "?". More...
 
bool CoolProp::has_fractions_in_string (const std::string &fluid_string)
 
bool CoolProp::has_solution_concentration (const std::string &fluid_string)
 
std::string CoolProp::extract_fractions (const std::string &fluid_string, std::vector< double > &fractions)
 Extract fractions (molar, mass, etc.) encoded in the string if any. More...
 
void CoolProp::_PropsSI_initialize (const std::string &backend, const std::vector< std::string > &fluid_names, const std::vector< double > &z, shared_ptr< AbstractState > &State)
 
void CoolProp::_PropsSI_outputs (shared_ptr< AbstractState > &State, const std::vector< output_parameter > &output_parameters, CoolProp::input_pairs input_pair, const std::vector< double > &in1, const std::vector< double > &in2, std::vector< std::vector< double >> &IO)
 
bool CoolProp::StripPhase (std::string &Name, shared_ptr< AbstractState > &State)
 
void CoolProp::_PropsSImulti (const std::vector< std::string > &Outputs, const std::string &Name1, const std::vector< double > &Prop1, const std::string &Name2, const std::vector< double > &Prop2, const std::string &backend, const std::vector< std::string > &fluids, const std::vector< double > &fractions, std::vector< std::vector< double >> &IO)
 
std::vector< std::vector< double > > CoolProp::PropsSImulti (const std::vector< std::string > &Outputs, const std::string &Name1, const std::vector< double > &Prop1, const std::string &Name2, const std::vector< double > &Prop2, const std::string &backend, const std::vector< std::string > &fluids, const std::vector< double > &fractions)
 Get a matrix of outputs for a given input. Can handle both vector inputs as well as a vector of output strings. More...
 
double CoolProp::PropsSI (const std::string &Output, const std::string &Name1, double Prop1, const std::string &Name2, double Prop2, const std::string &Ref)
 
bool CoolProp::add_fluids_as_JSON (const std::string &backend, const std::string &fluidstring)
 Add fluids as a JSON-formatted string. More...
 
double CoolProp::Props1SI (std::string FluidName, std::string Output)
 
std::vector< std::vector< double > > CoolProp::Props1SImulti (const std::vector< std::string > &Outputs, const std::string &backend, const std::vector< std::string > &fluids, const std::vector< double > &fractions)
 Get a matrix of outputs that do not depend on the thermodynamic state - this is a convenience function that does the call PropsSImulti(Outputs, "", {0}, "", {0}, backend, fluids, fractions) More...
 
bool CoolProp::is_valid_fluid_string (const std::string &fluidstring)
 Check if the fluid name is valid. More...
 
double CoolProp::saturation_ancillary (const std::string &fluid_name, const std::string &output, int Q, const std::string &input, double value)
 
void CoolProp::set_reference_stateS (const std::string &FluidName, const std::string &reference_state)
 Set the reference state based on a string representation. More...
 
void CoolProp::set_reference_stateD (const std::string &Ref, double T, double rhomolar, double hmolar0, double smolar0)
 
std::string CoolProp::get_global_param_string (const std::string &ParamName)
 
std::string CoolProp::get_fluid_param_string (const std::string &FluidName, const std::string &ParamName)
 Get a string for a value from a fluid (numerical values for the fluid can be obtained from Props1SI function) More...
 
std::string CoolProp::phase_lookup_string (phases Phase)
 
std::string CoolProp::PhaseSI (const std::string &Name1, double Prop1, const std::string &Name2, double Prop2, const std::string &FluidName)
 

Macro Definition Documentation

◆ DBL_EPSILON

#define DBL_EPSILON   std::numeric_limits<double>::epsilon()

Definition at line 25 of file CoolProp.cpp.