CoolProp
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CoolProp::JSONFluidLibrary Class Reference

Detailed Description

A container for the fluid parameters for the CoolProp fluids.

This container holds copies of all of the fluid instances for the fluids that are loaded in CoolProp. New fluids can be added by passing in a rapidjson::Value instance to the add_one function, or a rapidjson array of fluids to the add_many function.

#include <FluidLibrary.h>

Public Member Functions

bool is_empty (void)
 
void add_many (rapidjson::Value &listing)
 Add all the fluid entries in the rapidjson::Value instance passed in.
 
void add_one (rapidjson::Value &fluid_json)
 
std::string get_JSONstring (const std::string &key)
 
CoolPropFluid get (const std::string &key)
 Get a CoolPropFluid instance stored in this library. More...
 
CoolPropFluid get (std::size_t key)
 Get a CoolPropFluid instance stored in this library. More...
 
void set_fluid_enthalpy_entropy_offset (const std::string &fluid, double delta_a1, double delta_a2, const std::string &ref)
 
std::string get_fluid_list (void)
 Return a comma-separated list of fluid names.
 

Static Public Member Functions

static ResidualHelmholtzContainer parse_alphar (rapidjson::Value &jsonalphar)
 Parse the contributions to the residual Helmholtz energy.
 
static IdealHelmholtzContainer parse_alpha0 (rapidjson::Value &jsonalpha0)
 Parse the contributions to the ideal-gas Helmholtz energy.
 
static void add_many (const std::string &JSON_string)
 Add all the fluid entries in the JSON-encoded string passed in.
 

Protected Member Functions

void parse_environmental (rapidjson::Value &json, CoolPropFluid &fluid)
 Parse the environmental parameters (ODP, GWP, etc.)
 
void parse_EOS (rapidjson::Value &EOS_json, CoolPropFluid &fluid)
 Parse the Equation of state JSON entry. More...
 
void parse_EOS_listing (rapidjson::Value &EOS_array, CoolPropFluid &fluid)
 Parse the list of possible equations of state.
 
void parse_dilute_viscosity (rapidjson::Value &dilute, CoolPropFluid &fluid)
 Parse the transport properties.
 
void parse_initial_density_viscosity (rapidjson::Value &initial_density, CoolPropFluid &fluid)
 Parse the transport properties.
 
void parse_higher_order_viscosity (rapidjson::Value &higher, CoolPropFluid &fluid)
 Parse the transport properties.
 
void parse_ECS_conductivity (rapidjson::Value &conductivity, CoolPropFluid &fluid)
 
void parse_ECS_viscosity (rapidjson::Value &viscosity, CoolPropFluid &fluid)
 
void parse_Chung_viscosity (rapidjson::Value &viscosity, CoolPropFluid &fluid)
 
void parse_rhosr_viscosity (rapidjson::Value &viscosity, CoolPropFluid &fluid)
 
void parse_viscosity (rapidjson::Value &viscosity, CoolPropFluid &fluid)
 Parse the transport properties.
 
void parse_dilute_conductivity (rapidjson::Value &dilute, CoolPropFluid &fluid)
 Parse the transport properties.
 
void parse_residual_conductivity (rapidjson::Value &dilute, CoolPropFluid &fluid)
 Parse the transport properties.
 
void parse_critical_conductivity (rapidjson::Value &critical, CoolPropFluid &fluid)
 
void parse_thermal_conductivity (rapidjson::Value &conductivity, CoolPropFluid &fluid)
 Parse the thermal conductivity data.
 
void parse_transport (rapidjson::Value &transport, CoolPropFluid &fluid)
 Parse the transport properties.
 
void default_transport (CoolPropFluid &fluid)
 
void parse_melting_line (rapidjson::Value &melting_line, CoolPropFluid &fluid)
 
void parse_states (rapidjson::Value &states, CoolPropFluid &fluid)
 Parse the critical state for the given EOS.
 
void parse_ancillaries (rapidjson::Value &ancillaries, CoolPropFluid &fluid)
 Parse the critical state for the given EOS.
 
void parse_surface_tension (rapidjson::Value &surface_tension, CoolPropFluid &fluid)
 Parse the surface_tension.
 
void validate (CoolPropFluid &fluid)
 Validate the fluid file that was just constructed.
 

Member Function Documentation

§ get() [1/2]

CoolPropFluid CoolProp::JSONFluidLibrary::get ( const std::string &  key)
inline

Get a CoolPropFluid instance stored in this library.

Parameters
keyEither a CAS number or the name (CAS number should be preferred)

§ get() [2/2]

CoolPropFluid CoolProp::JSONFluidLibrary::get ( std::size_t  key)
inline

Get a CoolPropFluid instance stored in this library.

Parameters
keyThe index of the fluid in the map

§ parse_EOS()

void CoolProp::JSONFluidLibrary::parse_EOS ( rapidjson::Value &  EOS_json,
CoolPropFluid fluid 
)
inlineprotected

Parse the Equation of state JSON entry.

Todo:
: define limits of EOS better

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