|
CoolProp 8.0.0
An open-source fluid property and humid air property database
|
This file contains flash routines in which the state is unknown, and a solver of some kind must be used to obtain temperature and density, the two state variables upon which the equation of state is based.
This file contains derivatives needed in the mixture model. The derivatives are quite nasty, and there are a lot of them, so they are put in this file for cleanness. The MixtureDerivatives class is a friend class of the HelmholtzEOSMixtureBackend, so it can access all the private members of the HelmholtzEOSMixtureBackend class
Out-of-line, JSON-consuming construction for SuperAncillary.
The installed header include/CoolProp/superancillary/superancillary.h keeps all templated, perf-critical evaluation inline but carries NO nlohmann::json type, so consumers do not need nlohmann to compile against CoolProp's public headers. The string-blob constructor's definition lives here (where nlohmann is available) and is explicitly instantiated for the one ArrayType used across the codebase.
Namespaces | |
| namespace | CubicLibrary |
| namespace | CubicSuperAncillary |
| namespace | detail |
| namespace | PCSAFTLibrary |
| namespace | Plot |
| namespace | region |
| namespace | SaturationSolvers |
| namespace | sbtl |
| namespace | StabilityRoutines |
| namespace | superancillary |
| namespace | svd |
| namespace | tests |
Classes | |
| class | AbstractCubicBackend |
| class | AbstractState |
| The mother of all state classes. More... | |
| class | AbstractStateGenerator |
| struct | Ancillaries |
| struct | backend_family_info |
| struct | backend_info |
| class | BackendInformation |
| class | BackendLibrary |
| class | BaseHelmholtzContainer |
| class | BaseHelmholtzTerm |
| The base class class for the Helmholtz energy terms. More... | |
| struct | BibTeXKeysStruct |
| class | BicubicBackend |
| class | BoyleCurveTracer |
| class | CacheArray |
| class | CacheArrayElement |
| class | CachedElement |
| class | CellCoeffs |
| struct | ConductivityCriticalSimplifiedOlchowySengersData |
| struct | ConductivityCriticalVariables |
| struct | ConductivityDiluteEta0AndPolyData |
| struct | ConductivityDiluteRatioPolynomialsData |
| struct | ConductivityDiluteVariables |
| struct | ConductivityECSVariables |
| struct | ConductivityResidualPolynomialAndExponentialData |
| struct | ConductivityResidualPolynomialData |
| struct | ConductivityResidualVariables |
| class | Configuration |
| class | ConfigurationItem |
| class | ConstantReducingFunction |
| A constant reducing function that does not vary with composition. Think for instance the reducing function for the cubic EOS. More... | |
| class | CoolPropBaseError |
| class | CoolPropError |
| class | CoolPropFluid |
| A thermophysical property provider for critical and reducing values as well as derivatives of Helmholtz energy. More... | |
| class | CorrespondingStatesTerm |
| struct | CriticalRegionSplines |
| struct | CriticalState |
| class | CubicResidualHelmholtz |
| class | CurveTracer |
| struct | delim |
| class | DepartureFunction |
| The abstract base class for departure functions used in the excess part of the Helmholtz energy. More... | |
| class | DQ_flash_residual |
| struct | EnvironmentalFactorsStruct |
| struct | EOSLimits |
| A set of limits for the eos parameters. More... | |
| class | EquationOfState |
| The core class for an equation of state. More... | |
| class | ExcessTerm |
| class | ExponentialDepartureFunction |
| A polynomial/exponential departure function. More... | |
| struct | FactoryOptionsParseResult |
| class | FlashRoutines |
| class | fpu_guard |
| class | FuncWrapper1D |
| class | FuncWrapper1DWithDeriv |
| class | FuncWrapper1DWithThreeDerivs |
| class | FuncWrapper1DWithTwoDerivs |
| class | FuncWrapperND |
| class | GaussianExponentialDepartureFunction |
| A hybrid gaussian with temperature and density dependence along with. More... | |
| class | GeneratorInitializer |
| class | GERG2008DepartureFunction |
| The departure function used by the GERG-2008 formulation. More... | |
| class | GERG2008ReducingFunction |
| The reducing function model of GERG-2008. More... | |
| class | GuessesStructure |
| struct | HelmholtzDerivatives |
| class | HelmholtzEOSBackend |
| class | HelmholtzEOSMixtureBackend |
| class | HEOSGenerator |
| class | IdealCurveTracer |
| class | IdealHelmholtzContainer |
| class | IdealHelmholtzCP0Constant |
| class | IdealHelmholtzCP0PolyT |
| class | IdealHelmholtzEnthalpyEntropyOffset |
| The term in the EOS used to shift the reference state of the fluid. More... | |
| class | IdealHelmholtzGERG2004Cosh |
| class | IdealHelmholtzGERG2004Sinh |
| class | IdealHelmholtzLead |
| The leading term in the EOS used to set the desired reference state. More... | |
| class | IdealHelmholtzLogTau |
| class | IdealHelmholtzPlanckEinsteinGeneralized |
| class | IdealHelmholtzPower |
| class | IF97Backend |
| class | IF97BackendGenerator |
| class | IncompressibleBackend |
| class | IncompressibleBackendGenerator |
| struct | IncompressibleData |
| class | IncompressibleFluid |
| A property provider for incompressible solutions and pure fluids. More... | |
| struct | input_pair_info |
| class | InputPairInformation |
| class | JouleInversionCurveTracer |
| class | JouleThomsonCurveTracer |
| class | JSONFluidLibrary |
| A container for the fluid parameters for the CoolProp fluids. More... | |
| class | JSONIncompressibleLibrary |
| A container for the fluid parameters for the incompressible fluids. More... | |
| class | L0CurveTracer |
| class | LemmonAirHFCReducingFunction |
| Reducing function converter for dry air and HFC blends. More... | |
| class | LogPHTable |
| This class holds the single-phase data for a log(p)-h gridded table. More... | |
| class | LogPTTable |
| This class holds the single-phase data for a log(p)-T gridded table. More... | |
| class | MeltingCaloric |
| struct | MeltingLinePiecewisePolynomialInThetaData |
| class | MeltingLinePiecewisePolynomialInThetaSegment |
| The evaluator class for a melting curve formed of segments in the form. More... | |
| struct | MeltingLinePiecewisePolynomialInTrData |
| class | MeltingLinePiecewisePolynomialInTrSegment |
| The evaluator class for a melting curve formed of segments in the form. More... | |
| struct | MeltingLinePiecewiseSimonData |
| struct | MeltingLinePiecewiseSimonSegment |
| class | MeltingLineVariables |
| class | MixtureBinaryPairLibrary |
| A library of binary pair parameters for the mixture. More... | |
| class | MixtureDepartureFunctionsLibrary |
| A container for the departure functions for CoolProp mixtures. More... | |
| class | MixtureDerivatives |
| class | MixtureParameters |
| class | MoleFractions |
| class | OneDimObjective |
| This class is the objective function for the one-dimensional solver used to find the first intersection with the L1*=0 contour. More... | |
| struct | output_parameter |
| class | PackablePhaseEnvelopeData |
| struct | parameter_info |
| class | ParameterInformation |
| class | PCSAFTBackend |
| class | PCSAFTFluid |
| class | PCSAFTGenerator |
| struct | PCSAFTValues |
| class | PengRobinsonBackend |
| struct | phase_info |
| class | PhaseEnvelopeData |
| A data structure to hold the data for a phase envelope. More... | |
| class | PhaseEnvelopeRoutines |
| class | PhaseInformation |
| class | Poly2DFracIntResidual |
| class | Poly2DFracResidual |
| class | Poly2DResidual |
| class | Polynomial2D |
| The base class for all Polynomials. More... | |
| class | Polynomial2DFrac |
| A class for polynomials starting at an arbitrary degree. More... | |
| class | PredefinedMixturesLibrary |
| A library of predefined mixtures. More... | |
| class | PRGenerator |
| class | PureFluidSaturationTableData |
| This class holds the data for a two-phase table that is log spaced in p. More... | |
| class | PY_singlephase_flash_resid |
| class | RachfordRiceResidual |
| class | ReducingFunction |
| Abstract base class for reducing function An abstract base class for the reducing function to allow for Lemmon-Jacobsen, GERG, or other reducing function to yield the reducing parameters \(\rho_r\) and \(T_r\). More... | |
| struct | REFPROP_binary_element |
| A Data structure for holding BIP coming from REFPROP. More... | |
| struct | REFPROP_departure_function |
| A data structure for holding departure functions coming from REFPROP. More... | |
| class | REFPROPBackend |
| class | REFPROPGenerator |
| class | REFPROPMixtureBackend |
| class | ResidualHelmholtz |
| class | ResidualHelmholtzContainer |
| class | ResidualHelmholtzGaoB |
| class | ResidualHelmholtzGeneralizedCubic |
| class | ResidualHelmholtzGeneralizedExponential |
| A generalized residual helmholtz energy container that can deal with a wide range of terms which can be converted to this general form. More... | |
| struct | ResidualHelmholtzGeneralizedExponentialElement |
| class | ResidualHelmholtzNonAnalytic |
| struct | ResidualHelmholtzNonAnalyticElement |
| class | ResidualHelmholtzSAFTAssociating |
| class | ResidualHelmholtzXiangDeiters |
| The generalized Lee-Kesler formulation of Xiang & Deiters: doi:10.1016/j.ces.2007.11.029. More... | |
| class | SaturationAncillaryFunction |
| struct | scheme_info |
| class | SchemeInformation |
| struct | SimpleState |
| class | SinglePhaseGriddedTableData |
| This class holds the data for a single-phase interpolation table that is regularly spaced. More... | |
| class | solver_DP_resid |
| class | solver_TP_resid |
| class | SolverTPResid |
| class | SpinodalData |
| class | SRKBackend |
| class | SRKGenerator |
| struct | SsatSimpleState |
| A modified class for the state point at the maximum saturation entropy on the vapor curve. More... | |
| class | SurfaceTensionCorrelation |
| class | SVDSBTLBackend |
| class | TabularBackend |
| This class contains the general code for tabular backends (TTSE, bicubic, etc.) More... | |
| class | TabularDataLibrary |
| class | TabularDataSet |
| This class contains the data for one set of Tabular data including single-phase and two-phase data. More... | |
| struct | THERM0dllOutputs |
| class | TransportPropertyData |
| class | TransportRoutines |
| class | TTSEBackend |
| class | ValueErrorSpec |
| struct | ViscosityChungData |
| struct | ViscosityDiluteCollisionIntegralPowersOfTstarData |
| struct | ViscosityDiluteGasCollisionIntegralData |
| Variables for the dilute gas part. More... | |
| struct | ViscosityDiluteGasPowersOfT |
| struct | ViscosityDiluteGasPowersOfTr |
| struct | ViscosityDiluteVariables |
| struct | ViscosityECSVariables |
| struct | ViscosityFrictionTheoryData |
| struct | ViscosityHigherOrderVariables |
| struct | ViscosityInitialDensityEmpiricalData |
| struct | ViscosityInitialDensityVariables |
| struct | ViscosityModifiedBatschinskiHildebrandData |
| struct | ViscosityRainWaterFriendData |
| struct | ViscosityRhoSrVariables |
| class | VTPRBackend |
| class | VTPRGenerator |
Functions | |
| BackendLibrary & | get_backend_library () |
| void | register_backend (const backend_families &bf, const shared_ptr< AbstractStateGenerator > &gen) |
| void | get_dT_drho (AbstractState &AS, parameters index, CoolPropDbl &dT, CoolPropDbl &drho) |
| void | get_dT_drho_second_derivatives (AbstractState &AS, int index, CoolPropDbl &dT2, CoolPropDbl &drho_dT, CoolPropDbl &drho2) |
| void | get_Henrys_coeffs_FP (const std::string &CAS, double &A, double &B, double &C, double &Tmin, double &Tmax) |
| void | load () |
| JSONFluidLibrary & | get_library () |
| Get a reference to the library instance. More... | |
| CoolPropFluid | get_fluid (const std::string &fluid_string) |
| Get the fluid structure. More... | |
| std::string | get_fluid_as_JSONstring (const std::string &indentifier) |
| Get the fluid as a JSON string, suitable for modification and reloading. More... | |
| std::string | get_fluid_list () |
| Get a comma-separated-list of fluids that are included. More... | |
| void | set_fluid_enthalpy_entropy_offset (const std::string &fluid, double delta_a1, double delta_a2, const std::string &ref) |
| Set the internal enthalpy and entropy offset variables. More... | |
| int | get_debug_level () |
| std::string | vecstring_to_string (const std::vector< std::string > &a) |
| Templates for turning vectors (1D-matrices) into strings. More... | |
| void | get_dT_drho (HelmholtzEOSMixtureBackend *HEOS, parameters index, CoolPropDbl &dT, CoolPropDbl &drho) |
| std::shared_ptr< MeltingCaloric > | get_melting_caloric_cached (HelmholtzEOSMixtureBackend &H) |
| std::string | get_csv_predefined_mixtures () |
| Get a comma-separated list of predefined mixtures in CoolProp. More... | |
| bool | is_predefined_mixture (const std::string &name, Dictionary &dict) |
| Get the parameters for a predefined mixture - R410A, R404A, etc. if the mixture is predefined. More... | |
| void | set_predefined_mixtures (const std::string &string_data) |
| Set predefined mixtures at runtime. More... | |
| void | apply_simple_mixing_rule (const std::string &identifier1, const std::string &identifier2, const std::string &rule) |
| Add a simple mixing rule. More... | |
| std::string | get_csv_mixture_binary_pairs () |
| Get a comma-separated list of CAS code pairs. More... | |
| std::string | get_mixture_binary_pair_data (const std::string &CAS1, const std::string &CAS2, const std::string ¶m) |
| Get a string for the given binary pair. More... | |
| void | set_mixture_binary_pair_data (const std::string &CAS1, const std::string &CAS2, const std::string ¶m, const double val) |
| Set a parameter for the given binary pair. More... | |
| std::string | get_reducing_function_name (const std::string &CAS1, const std::string &CAS2) |
| void | set_interaction_parameters (const std::string &string_data) |
| Set the interaction parameters from a string format. More... | |
| DepartureFunction * | get_departure_function (const std::string &Name) |
| Get the allocated Departure function for a given departure function name. More... | |
| void | parse_HMX_BNC (const std::string &s, std::vector< REFPROP_binary_element > &BIP, std::vector< REFPROP_departure_function > &functions) |
| void | set_departure_functions (const std::string &string_data) |
| Set the departure functions in the departure function library from a string format. More... | |
| CoolPropDbl | sign (CoolPropDbl x) |
| void | load_incompressible_library () |
| JSONIncompressibleLibrary & | get_incompressible_library () |
| Get a reference to the library instance. More... | |
| IncompressibleFluid & | get_incompressible_fluid (const std::string &fluid_string) |
| Get the fluid structure returned as a reference. More... | |
| std::string | get_incompressible_list_pure () |
| Return a comma-separated list of incompressible pure fluid names. More... | |
| std::string | get_incompressible_list_solution () |
| Return a comma-separated list of solution names. More... | |
| std::string | get_mixture_binary_pair_pcsaft (const std::string &CAS1, const std::string &CAS2, const std::string &key) |
| void | set_mixture_binary_pair_pcsaft (const std::string &CAS1, const std::string &CAS2, const std::string &key, const double value) |
| bool | force_load_REFPROP () |
| bool | force_unload_REFPROP () |
| void | REFPROP_SETREF (char *hrf, int ixflag, double *x0, double &h0, double &s0, double &T0, double &p0, int &ierr, char *herr, int l1, int l2) |
| template<typename T > | |
| void | load_table (T &table, const std::string &path_to_tables, const std::string &filename) |
| template<typename T > | |
| void | write_table (const T &table, const std::string &path_to_tables, const std::string &name) |
| void | mass_to_molar (parameters ¶m, double &conversion_factor, double molar_mass) |
| Get a conversion factor from mass to molar if needed. More... | |
| std::string | config_key_to_string (configuration_keys keys) |
| Convert the configuration key to a string in a 1-1 representation. More... | |
| std::string | config_key_description (configuration_keys keys) |
| Return a string description of the configuration key. More... | |
| std::string | config_key_description (const std::string &key) |
| Return a string description of the configuration key (with the key passed as a string) More... | |
| configuration_keys | config_string_to_key (const std::string &s) |
| Go from string to enum key. More... | |
| Configuration * | _get_config () |
| A helper function to ensure that configuration is not accessed before it is initialized (was formerly static) More... | |
| void | set_config_bool (configuration_keys key, bool val) |
| Set the value of a boolean configuration value. More... | |
| void | set_config_int (configuration_keys key, int val) |
| Set the value of an integer configuration value. More... | |
| void | set_config_double (configuration_keys key, double val) |
| Set the value of a double configuration value. More... | |
| void | set_config_string (configuration_keys key, const std::string &val) |
| Set the value of a string configuration value. More... | |
| bool | get_config_bool (configuration_keys key) |
| Return the value of a boolean key from the configuration. More... | |
| int | get_config_int (configuration_keys key) |
| Return the value of an integer key from the configuration. More... | |
| double | get_config_double (configuration_keys key) |
| Return the value of a double configuration key. More... | |
| std::string | get_config_string (configuration_keys key) |
| Return the value of a string configuration key. More... | |
| std::string | get_config_as_json_string () |
| Get all the values in the configuration as a json-formatted string. More... | |
| void | set_config_as_json_string (const std::string &s) |
| Set the entire configuration based on a json-formatted string. More... | |
| void | set_debug_level (int level) |
| void | set_warning_string (const std::string &warning) |
| void | set_error_string (const std::string &error) |
| bool | has_backend_in_string (const std::string &fluid_string, std::size_t &i) |
| void | 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 | has_fractions_in_string (const std::string &fluid_string) |
| bool | has_solution_concentration (const std::string &fluid_string) |
| std::string | extract_fractions (const std::string &fluid_string, std::vector< double > &fractions) |
| Extract fractions (molar, mass, etc.) encoded in the string if any. More... | |
| void | _PropsSI_initialize (const std::string &backend, const std::vector< std::string > &fluid_names, const std::vector< double > &z, shared_ptr< AbstractState > &State) |
| void | _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 | StripPhase (std::string &Name, shared_ptr< AbstractState > &State) |
| void | _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 > > | 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 | PropsSI (const std::string &Output, const std::string &Name1, double Prop1, const std::string &Name2, double Prop2, const std::string &FluidName) |
| bool | add_fluids_as_JSON (const std::string &backend, const std::string &fluidstring) |
| Add fluids as a JSON-formatted string. More... | |
| void | Skip_if_No_REFPROP () |
| A function to skip tests that require REFPROPMixtureBackend in environments where it is not supported (e.g., CI builds on GitHub) More... | |
| double | Props1SI (std::string FluidName, std::string Output) |
| std::vector< std::vector< double > > | 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 | is_valid_fluid_string (const std::string &fluidstring) |
| Check if the fluid name is valid. More... | |
| double | saturation_ancillary (const std::string &fluid_name, const std::string &output, int Q, const std::string &input, double value) |
| void | set_reference_stateS (const std::string &FluidName, const std::string &reference_state) |
| Set the reference state based on a string representation. More... | |
| void | set_reference_stateD (const std::string &FluidName, double T, double rhomolar, double hmolar0, double smolar0) |
| std::string | get_global_param_string (const std::string &ParamName) |
| std::string | 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 | phase_lookup_string (phases Phase) |
| std::string | PhaseSI (const std::string &Name1, double Prop1, const std::string &Name2, double Prop2, const std::string &FluidName) |
| const ParameterInformation & | get_parameter_information () |
| bool | is_trivial_parameter (int key) |
| Returns true if the input is trivial (constants, critical parameters, etc.) More... | |
| std::string | get_parameter_information (int key, std::string_view info) |
| std::string | get_csv_parameter_list () |
| Return a list of parameters. More... | |
| bool | is_valid_parameter (const std::string &name, parameters &iOutput) |
| Returns true if a valid parameter, and sets value in the variable iOutput. More... | |
| bool | is_valid_first_derivative (const std::string &name, parameters &iOf, parameters &iWrt, parameters &iConstant) |
| bool | is_valid_first_saturation_derivative (const std::string &name, parameters &iOf, parameters &iWrt) |
| bool | is_valid_second_derivative (const std::string &name, parameters &iOf1, parameters &iWrt1, parameters &iConstant1, parameters &iWrt2, parameters &iConstant2) |
| const PhaseInformation & | get_phase_information () |
| const std::string & | get_phase_short_desc (phases phase) |
| bool | is_valid_phase (const std::string &phase_name, phases &iOutput) |
| phases | get_phase_index (const std::string ¶m_name) |
| Return the enum key corresponding to the phase name ("phase_liquid" for instance) More... | |
| const SchemeInformation & | get_scheme_information () |
| const std::string & | get_scheme_short_desc (schemes scheme) |
| bool | is_valid_scheme (const std::string &scheme_name, schemes &iOutput) |
| schemes | get_scheme_index (const std::string &scheme_name) |
| Return the enum key corresponding to the association scheme name ("2B" for instance) More... | |
| parameters | get_parameter_index (const std::string ¶m_name) |
| Return the enum key corresponding to the parameter name ("Dmolar" for instance) More... | |
| const InputPairInformation & | get_input_pair_information () |
| input_pairs | get_input_pair_index (const std::string &input_pair_name) |
| Get the input pair index associated with its string representation. More... | |
| const std::string & | get_input_pair_short_desc (input_pairs pair) |
| Return the short description of an input pair key ("DmolarT_INPUTS" for instance) More... | |
| const std::string & | get_input_pair_long_desc (input_pairs pair) |
| Return the long description of an input pair key ("Molar density in mol/m^3, Temperature in K" for instance) More... | |
| void | split_input_pair (input_pairs pair, parameters &p1, parameters &p2) |
| Split an input pair into parameters for the two parts that form the pair. More... | |
| const BackendInformation & | get_backend_information () |
| void | extract_backend_families (const std::string &backend_string, backend_families &f1, backend_families &f2) |
| Convert a string into the enum values. More... | |
| void | extract_backend_families_string (std::string backend_string, backend_families &f1, std::string &f2) |
| std::string | get_backend_string (backends backend) |
| FactoryOptionsParseResult | parse_factory_options (const std::string &factory_string) |
| CoolPropDbl | kahanSum (const std::vector< CoolPropDbl > &x) |
| bool | wayToSort (CoolPropDbl i, CoolPropDbl j) |
| double | ramp (double x) |
| double | Xdd (double X, double delta, double Delta, double Delta_d, double Delta_dd) |
| const std::string | ERR_NOT_A_TWO_PHASE_FLUID ("This is not a two-phase fluid. Please select another fluid or avoid two-phase functions.") |
| const std::string | ERR_NOT_A_TWO_PHASE_STATE ("This is not a two-phase state, update state with a two-phase set of inputs") |
| const std::string | ERR_NOT_COMPRESSIBLE ("This function is invalid for incompressible fluids.") |
| const std::string | ERR_NOT_A_TWO_PHASE_FUNCTION ("This function is invalid in the two-phase region.") |
| void | validate_json_against_schema (const std::string &instance_json, const std::string &schema_json) |
| std::string | to_canonical_json_str (const std::string &json_str) |
| std::vector< double > | NDNewtonRaphson_Jacobian (FuncWrapperND *f, const std::vector< double > &x, double tol, int maxiter, double w) |
| double | Newton (FuncWrapper1DWithDeriv *f, double x0, double ftol, int maxiter) |
| double | Halley (FuncWrapper1DWithTwoDerivs *f, double x0, double ftol, int maxiter, double xtol_rel) |
| double | Householder4 (FuncWrapper1DWithThreeDerivs *f, double x0, double ftol, int maxiter, double xtol_rel) |
| double | Secant (FuncWrapper1D *f, double x0, double dx, double tol, int maxiter) |
| double | BoundedSecant (FuncWrapper1D *f, double x0, double xmin, double xmax, double dx, double tol, int maxiter) |
| double | ExtrapolatingSecant (FuncWrapper1D *f, double x0, double dx, double tol, int maxiter) |
| double | Brent (FuncWrapper1D *f, double a, double b, double macheps, double t, int maxiter) |
| void | compare_REFPROP_and_CoolProp (const std::string &fluid, CoolProp::input_pairs inputs, double val1, double val2, std::size_t N, double d1, double d2) |
| void | compare_REFPROP_and_CoolProp (const std::string &fluid, int inputs, double val1, double val2, std::size_t N, double d1=0, double d2=0) |
| bool | match_pair (parameters key1, parameters key2, parameters x1, parameters x2, bool &swap) |
| bool | is_Qmass_pair (input_pairs p) |
| Return true if the input pair involves a mass-based quality (Qmass). More... | |
| template<class T > | |
| CoolProp::input_pairs | generate_update_pair (parameters key1, const T &value1, parameters key2, const T &value2, T &out1, T &out2) noexcept |
| Generate an update pair from key, value pairs. More... | |
| std::uint64_t | fnv1a_64 (const void *data, std::size_t n) noexcept |
| std::uint64_t | fnv1a_64 (std::string_view s) noexcept |
| std::string | to_hex16 (std::uint64_t h) |
| template<class T > | |
| std::size_t | num_rows (std::vector< T > const &in) |
| Some shortcuts and regularly needed operations. More... | |
| template<class T > | |
| std::size_t | num_rows (std::vector< std::vector< T > > const &in) |
| template<class T > | |
| std::size_t | max_cols (std::vector< std::vector< T > > const &in) |
| template<class T > | |
| bool | is_squared (std::vector< std::vector< T > > const &in) |
| template<class T > | |
| std::size_t | num_cols (std::vector< T > const &in) |
| template<class T > | |
| std::size_t | num_cols (std::vector< std::vector< T > > const &in) |
| template<typename T > | |
| std::vector< T > | eigen_to_vec1D (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &coefficients, int axis=0) |
| Convert vectors and matrices. More... | |
| template<class T > | |
| std::vector< std::vector< T > > | eigen_to_vec (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &coefficients) |
| template<class T > | |
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | vec_to_eigen (const std::vector< std::vector< T > > &coefficients) |
| template<class T > | |
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | vec_to_eigen (const std::vector< T > &coefficients, int axis=0) |
| template<class T > | |
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | vec_to_eigen (const T &coefficient) |
| template<class T > | |
| Eigen::Matrix< T, Eigen::Dynamic, 1 > | makeColVector (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &matrix) |
| Convert 1D matrix to vector. More... | |
| template<class T > | |
| Eigen::Matrix< T, Eigen::Dynamic, 1 > | makeVector (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &matrix) |
| template<class T > | |
| Eigen::Matrix< T, 1, Eigen::Dynamic > | makeRowVector (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &matrix) |
| template<class T > | |
| void | removeRow (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &matrix, std::size_t rowToRemove) |
| Remove rows and columns from matrices. More... | |
| template<class T > | |
| void | removeColumn (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &matrix, std::size_t colToRemove) |
| template<class T > | |
| std::string | vec_to_string (const std::vector< T > &a, const char *fmt) |
| Templates for turning vectors (1D-matrices) into strings. More... | |
| template<class T > | |
| std::string | vec_to_string (const std::vector< T > &a) |
| std::string | stringvec_to_string (const std::vector< std::string > &a) |
| Templates for turning vectors (1D-matrices) into strings. More... | |
| template<class T > | |
| std::string | vec_to_string (const T &a, const char *fmt) |
| Templates for turning numbers (0D-matrices) into strings. More... | |
| template<class T > | |
| std::string | vec_to_string (const T &a) |
| template<class T > | |
| std::string | vec_to_string (const std::vector< std::vector< T > > &A, const char *fmt) |
| Templates for turning 2D-matrices into strings. More... | |
| template<class T > | |
| std::string | vec_to_string (const std::vector< std::vector< T > > &A) |
| template<class T > | |
| std::string | mat_to_string (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &A, const char *fmt) |
| Templates for turning Eigen matrices into strings. More... | |
| template<class T > | |
| std::string | mat_to_string (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &A) |
| template<typename T > | |
| void | swap_rows (std::vector< std::vector< T > > *A, size_t row1, size_t row2) |
| Template class for turning numbers (0D-matrices) into strings. More... | |
| template<typename T > | |
| void | subtract_row_multiple (std::vector< std::vector< T > > *A, size_t row, T multiple, size_t pivot_row) |
| template<typename T > | |
| void | divide_row_by (std::vector< std::vector< T > > *A, size_t row, T value) |
| template<typename T > | |
| size_t | get_pivot_row (std::vector< std::vector< T > > *A, size_t col) |
| template<typename T > | |
| std::vector< std::vector< T > > | linsolve_Gauss_Jordan (std::vector< std::vector< T > > const &A, std::vector< std::vector< T > > const &B) |
| template<class T > | |
| std::vector< std::vector< T > > | linsolve (std::vector< std::vector< T > > const &A, std::vector< std::vector< T > > const &B) |
| template<class T > | |
| std::vector< T > | linsolve (std::vector< std::vector< T > > const &A, std::vector< T > const &b) |
| template<class T > | |
| std::vector< T > | get_row (std::vector< std::vector< T > > const &in, size_t row) |
| template<class T > | |
| std::vector< T > | get_col (std::vector< std::vector< T > > const &in, size_t col) |
| template<class T > | |
| std::vector< std::vector< T > > | make_squared (std::vector< std::vector< T > > const &in) |
| template<class T > | |
| T | multiply (std::vector< T > const &a, std::vector< T > const &b) |
| template<class T > | |
| std::vector< T > | multiply (std::vector< std::vector< T > > const &A, std::vector< T > const &b) |
| template<class T > | |
| std::vector< std::vector< T > > | multiply (std::vector< std::vector< T > > const &A, std::vector< std::vector< T > > const &B) |
| template<class T > | |
| T | dot_product (std::vector< T > const &a, std::vector< T > const &b) |
| template<class T > | |
| std::vector< T > | cross_product (std::vector< T > const &a, std::vector< T > const &b) |
| template<class T > | |
| std::vector< std::vector< T > > | transpose (std::vector< std::vector< T > > const &in) |
| template<class T > | |
| std::vector< std::vector< T > > | invert (std::vector< std::vector< T > > const &in) |
| void | removeRow (Eigen::MatrixXd &matrix, unsigned int rowToRemove) |
| void | removeColumn (Eigen::MatrixXd &matrix, unsigned int colToRemove) |
| template<typename Derived > | |
| Eigen::MatrixXd | minor_matrix (const Eigen::MatrixBase< Derived > &A, std::size_t i, std::size_t j) |
| double | Brent (FuncWrapper1D &f, double a, double b, double macheps, double t, int maxiter) |
| double | Secant (FuncWrapper1D &f, double x0, double dx, double ftol, int maxiter) |
| double | ExtrapolatingSecant (FuncWrapper1D &f, double x0, double dx, double ftol, int maxiter) |
| double | BoundedSecant (FuncWrapper1D &f, double x0, double xmin, double xmax, double dx, double ftol, int maxiter) |
| double | Newton (FuncWrapper1DWithDeriv &f, double x0, double ftol, int maxiter) |
| double | Halley (FuncWrapper1DWithTwoDerivs &f, double x0, double ftol, int maxiter, double xtol_rel=1e-12) |
| double | Householder4 (FuncWrapper1DWithThreeDerivs &f, double x0, double ftol, int maxiter, double xtol_rel=1e-12) |
Variables | |
| std::unique_ptr< Configuration > | pconfig |
| const std::vector< parameter_info > | parameter_info_list |
| std::unique_ptr< ParameterInformation > | parameter_information_p |
| const phase_info | phase_info_list [] |
| std::unique_ptr< PhaseInformation > | phase_information_p |
| const scheme_info | scheme_info_list [] |
| std::unique_ptr< SchemeInformation > | scheme_information_p |
| const input_pair_info | input_pair_list [] |
| std::unique_ptr< InputPairInformation > | input_pair_information_p |
| const std::vector< backend_family_info > | backend_family_list |
| const std::vector< backend_info > | backend_list |
| std::unique_ptr< BackendInformation > | backend_information_p |
| constexpr double | CPPOLY_EPSILON = DBL_EPSILON * 100.0 |
| constexpr double | CPPOLY_DELTA = CPPOLY_EPSILON * 10.0 |
| using CoolProp::AttributeError = typedef CoolPropError<CoolPropBaseError::eAttribute> |
Definition at line 54 of file Exceptions.h.
| using CoolProp::CompositionError = typedef ValueErrorSpec<CoolPropBaseError::eComposition> |
Definition at line 71 of file Exceptions.h.
| using CoolProp::DepartureFunctionPointer = typedef shared_ptr<DepartureFunction> |
Definition at line 198 of file ExcessHEFunction.h.
| using CoolProp::DirectorySizeError = typedef CoolPropError<CoolPropBaseError::eDirectorySize> |
Definition at line 60 of file Exceptions.h.
| using CoolProp::HandleError = typedef CoolPropError<CoolPropBaseError::eHandle> |
Definition at line 58 of file Exceptions.h.
| using CoolProp::InputError = typedef ValueErrorSpec<CoolPropBaseError::eInput> |
Definition at line 72 of file Exceptions.h.
| using CoolProp::KeyError = typedef CoolPropError<CoolPropBaseError::eKey> |
Definition at line 57 of file Exceptions.h.
| using CoolProp::mat = typedef std::vector<std::vector<double> > |
This class implements bicubic interpolation, as very clearly laid out by the page on wikipedia: http://en.wikipedia.org/wiki/Bicubic_interpolation.
Essentially you have an already-inverted matrix that you need to multiply
\[ A^{-1} = \left[ \begin{array}{*{16}c} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ -3 & 3 & 0 & 0 & -2 & -1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 2 & -2 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & -3 & 3 & 0 & 0 & -2 & -1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 2 & -2 & 0 & 0 & 1 & 1 & 0 & 0 \\ -3 & 0 & 3 & 0 & 0 & 0 & 0 & 0 & -2 & 0 & -1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & -3 & 0 & 3 & 0 & 0 & 0 & 0 & 0 & -2 & 0 & -1 & 0 \\ 9 & -9 & -9 & 9 & 6 & 3 & -6 & -3 & 6 & -6 & 3 & -3 & 4 & 2 & 2 & 1 \\ -6 & 6 & 6 & -6 & -3 & -3 & 3 & 3 & -4 & 4 & -2 & 2 & -2 & -2 & -1 & -1 \\ 2 & 0 & -2 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 2 & 0 & -2 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 \\ -6 & 6 & 6 & -6 & -4 & -2 & 4 & 2 & -3 & 3 & -3 & 3 & -2 & -1 & -2 & -1 \\ 4 & -4 & -4 & 4 & 2 & 2 & -2 & -2 & 2 & -2 & 2 & -2 & 1 & 1 & 1 & 1 \end{array} \right] \]
\[ x = \frac{h-h_i}{h_{i+1}-h_i} \]
\[ \frac{\partial x}{\partial h} = \frac{1}{h_{i+1}-h_i} \]
\[ \frac{\partial h}{\partial x} = h_{i+1}-h_i \]
\[ y = \frac{p-p_j}{p_{j+1}-p_j} \]
\[ \frac{\partial y}{\partial p} = \frac{1}{p_{j+1}-p_j} \]
\[ \frac{\partial p}{\partial y} = p_{j+1}-p_j \]
\[ \frac{\partial f}{\partial x} = \frac{\partial f}{\partial h}\cdot\frac{\partial h}{\partial x} \]
\
Definition at line 62 of file BicubicBackend.h.
| using CoolProp::MultipleSolutionsError = typedef ValueErrorSpec<CoolPropBaseError::eMultipleSolutions> |
Thrown when a saturation flash input maps to more than one temperature on the saturation curve (e.g. water saturated-vapor enthalpy at a given h has two T-roots). The caller should use update_with_guesses with a guess.T to pick a branch. See GitHub #2773.
Definition at line 78 of file Exceptions.h.
| using CoolProp::NotAvailableError = typedef ValueErrorSpec<CoolPropBaseError::eNotAvailable> |
Definition at line 73 of file Exceptions.h.
| using CoolProp::NotImplementedError = typedef CoolPropError<CoolPropBaseError::eNotImplemented> |
Definition at line 52 of file Exceptions.h.
| using CoolProp::OutOfRangeError = typedef CoolPropError<CoolPropBaseError::eOutOfRange> |
Definition at line 55 of file Exceptions.h.
| using CoolProp::SolutionError = typedef CoolPropError<CoolPropBaseError::eSolution> |
Definition at line 53 of file Exceptions.h.
| typedef std::vector< std::vector< CoolPropDbl > > CoolProp::STLMatrix |
Definition at line 13 of file ExcessHEFunction.h.
| using CoolProp::UnableToLoadError = typedef CoolPropError<CoolPropBaseError::eUnableToLoad> |
Definition at line 59 of file Exceptions.h.
| using CoolProp::ValueError = typedef CoolPropError<CoolPropBaseError::eValue> |
Definition at line 56 of file Exceptions.h.
| using CoolProp::WrongFluidError = typedef ValueErrorSpec<CoolPropBaseError::eWrongFluid> |
Definition at line 70 of file Exceptions.h.
| enum CoolProp::backend_families : int |
The structure is taken directly from the AbstractState class.
Definition at line 493 of file DataStructures.h.
| enum CoolProp::backends : int |
Definition at line 509 of file DataStructures.h.
These are constants for the compositions.
| Enumerator | |
|---|---|
| IFRAC_MASS | |
| IFRAC_MOLE | |
| IFRAC_VOLUME | |
| IFRAC_UNDEFINED | |
| IFRAC_PURE | |
Definition at line 270 of file DataStructures.h.
| enum CoolProp::fast_evaluate_status : int |
Per-point status codes for AbstractState::fast_evaluate. Zero means success.
| Enumerator | |
|---|---|
| fast_evaluate_ok | |
| fast_evaluate_out_of_range | |
| fast_evaluate_two_phase_disallowed | |
| fast_evaluate_unsupported_input | |
| fast_evaluate_unsupported_output | |
| fast_evaluate_internal_error | |
Definition at line 197 of file DataStructures.h.
These are unit types for the fluid.
| Enumerator | |
|---|---|
| FLUID_TYPE_PURE | |
| FLUID_TYPE_PSEUDOPURE | |
| FLUID_TYPE_REFPROP | |
| FLUID_TYPE_INCOMPRESSIBLE_LIQUID | |
| FLUID_TYPE_INCOMPRESSIBLE_SOLUTION | |
| FLUID_TYPE_UNDEFINED | |
Definition at line 280 of file DataStructures.h.
| enum CoolProp::input_pairs : int |
These are input pairs that can be used for the update function (in each pair, input keys are sorted alphabetically)
Definition at line 292 of file DataStructures.h.
| enum CoolProp::parameters : int |
These are constants for the input and output parameters The structure is taken directly from the AbstractState class.
| Enumerator | |
|---|---|
| INVALID_PARAMETER | |
| igas_constant | Ideal-gas constant. |
| imolar_mass | Molar mass. |
| iacentric_factor | Acentric factor. |
| irhomolar_reducing | Molar density used for the reducing state. |
| irhomolar_critical | Molar density used for the critical point. |
| iT_reducing | Temperature at the reducing state. |
| iT_critical | Temperature at the critical point. |
| irhomass_reducing | Mass density at the reducing state. |
| irhomass_critical | Mass density at the critical point. |
| iP_critical | Pressure at the critical point. |
| iP_reducing | Pressure at the reducing point. |
| iT_triple | Triple point temperature. |
| iP_triple | Triple point pressure. |
| iT_min | Minimum temperature. |
| iT_max | Maximum temperature. |
| iP_max | Maximum pressure. |
| iP_min | Minimum pressure. |
| idipole_moment | Dipole moment. |
| iT | Temperature. |
| iP | Pressure. |
| iQ | Vapor quality (molar; alias for iQmolar in this codebase) |
| iQmass | Mass-basis vapor quality. |
| iTau | Reciprocal reduced temperature. |
| iDelta | Reduced density. |
| iDmolar | Mole-based density. |
| iHmolar | Mole-based enthalpy. |
| iSmolar | Mole-based entropy. |
| iCpmolar | Mole-based constant-pressure specific heat. |
| iCp0molar | Mole-based ideal-gas constant-pressure specific heat. |
| iCvmolar | Mole-based constant-volume specific heat. |
| iUmolar | Mole-based internal energy. |
| iGmolar | Mole-based Gibbs energy. |
| iHelmholtzmolar | Mole-based Helmholtz energy. |
| iHmolar_residual | The residual molar enthalpy. |
| iSmolar_residual | The residual molar entropy (as a function of temperature and density) |
| iGmolar_residual | The residual molar Gibbs energy. |
| iHmolar_idealgas | The ideal gas molar enthalpy. |
| iSmolar_idealgas | The ideal gas molar entropy. |
| iUmolar_idealgas | The ideal gas molar internal energy. |
| iDmass | Mass-based density. |
| iHmass | Mass-based enthalpy. |
| iSmass | Mass-based entropy. |
| iCpmass | Mass-based constant-pressure specific heat. |
| iCp0mass | Mass-based ideal-gas specific heat. |
| iCvmass | Mass-based constant-volume specific heat. |
| iUmass | Mass-based internal energy. |
| iGmass | Mass-based Gibbs energy. |
| iHelmholtzmass | Mass-based Helmholtz energy. |
| iHmass_idealgas | The ideal gas specific enthalpy. |
| iSmass_idealgas | The ideal gas specific entropy. |
| iUmass_idealgas | The ideal gas specific internal energy. |
| iviscosity | Viscosity. |
| iconductivity | Thermal conductivity. |
| isurface_tension | Surface tension. |
| iPrandtl | The Prandtl number. |
| ispeed_sound | Speed of sound. |
| iisothermal_compressibility | Isothermal compressibility. |
| iisobaric_expansion_coefficient | Isobaric expansion coefficient. |
| iisentropic_expansion_coefficient | Isentropic expansion coefficient. |
| ifundamental_derivative_of_gas_dynamics | The fundamental derivative of gas dynamics. |
| ialphar | |
| idalphar_dtau_constdelta | |
| idalphar_ddelta_consttau | |
| ialpha0 | |
| idalpha0_dtau_constdelta | |
| idalpha0_ddelta_consttau | |
| id2alpha0_ddelta2_consttau | |
| id3alpha0_ddelta3_consttau | |
| iBvirial | Second virial coefficient. |
| iCvirial | Third virial coefficient. |
| idBvirial_dT | Derivative of second virial coefficient with temperature. |
| idCvirial_dT | Derivative of third virial coefficient with temperature. |
| iZ | The compressibility factor Z = p*v/(R*T) |
| iPIP | The phase identification parameter of Venkatarathnam and Oellrich. |
| ifraction_min | The minimum fraction (mole, mass, volume) for incompressibles. |
| ifraction_max | The maximum fraction (mole,mass,volume) for incompressibles. |
| iT_freeze | The freezing temperature for incompressibles. |
| iGWP20 | The 20-year global warming potential. |
| iGWP100 | The 100-year global warming potential. |
| iGWP500 | The 500-year global warming potential. |
| iFH | Fire hazard index. |
| iHH | Health hazard index. |
| iPH | Physical hazard index. |
| iODP | Ozone depletion potential (R-11 = 1.0) |
| iPhase | The phase index of the given state. |
| iundefined_parameter | The last parameter, so we can check that all parameters are described in DataStructures.cpp. |
Definition at line 64 of file DataStructures.h.
| enum CoolProp::phases : int |
These are constants for the phases of the fluid.
Definition at line 183 of file DataStructures.h.
| enum CoolProp::schemes |
Constants for the different PC-SAFT association schemes (see Huang and Radosz 1990)
| Enumerator | |
|---|---|
| i1 | |
| i2a | |
| i2b | |
| i3a | |
| i3b | |
| i4a | |
| i4b | |
| i4c | |
Definition at line 208 of file DataStructures.h.
| Enumerator | |
|---|---|
| XN_INDEPENDENT | x_N is an independent variable, and not calculated by \( x_N = 1-\sum_i x_i\) |
| XN_DEPENDENT | x_N is an dependent variable, calculated by \( x_N = 1-\sum_i x_i\) |
Definition at line 19 of file ReducingFunctions.h.
| Configuration * CoolProp::_get_config | ( | ) |
A helper function to ensure that configuration is not accessed before it is initialized (was formerly static)
Definition at line 128 of file Configuration.cpp.
| void CoolProp::_PropsSI_initialize | ( | const std::string & | backend, |
| const std::vector< std::string > & | fluid_names, | ||
| const std::vector< double > & | z, | ||
| shared_ptr< AbstractState > & | State | ||
| ) |
Definition at line 241 of file CoolProp.cpp.
| 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 | ||
| ) |
Definition at line 343 of file CoolProp.cpp.
| 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 | ||
| ) |
Definition at line 576 of file CoolProp.cpp.
| bool CoolProp::add_fluids_as_JSON | ( | const std::string & | backend, |
| const std::string & | fluidstring | ||
| ) |
Add fluids as a JSON-formatted string.
| backend | The backend to which these should be added; e.g. "HEOS", "SRK", "PR" |
| fluidstring | The JSON-formatted string containing the fluid data |
Definition at line 703 of file CoolProp.cpp.
| void CoolProp::apply_simple_mixing_rule | ( | const std::string & | identifier1, |
| const std::string & | identifier2, | ||
| const std::string & | rule | ||
| ) |
Add a simple mixing rule.
Apply a simple mixing rule for a given binary pair.
| identifier1 | The CAS # (or name) for the first fluid |
| identifier2 | The CAS # (or name) for the second fluid |
| rule | The simple mixing rule to be used ("linear", "Lorentz-Berthelot") |
Definition at line 286 of file MixtureParameters.cpp.
|
inline |
| double CoolProp::BoundedSecant | ( | FuncWrapper1D * | f, |
| double | x0, | ||
| double | xmin, | ||
| double | xmax, | ||
| double | dx, | ||
| double | tol, | ||
| int | maxiter | ||
| ) |
In the secant function, a 1-D Newton-Raphson solver is implemented. An initial guess for the solution is provided.
| f | A pointer to an instance of the FuncWrapper1D class that implements the call() function |
| x0 | The initial guess for the solution |
| xmax | The upper bound for the solution |
| xmin | The lower bound for the solution |
| dx | The initial amount that is added to x in order to build the numerical derivative |
| tol | The absolute value of the tolerance accepted for the objective function |
| maxiter | Maximum number of iterations |
Definition at line 373 of file Solvers.cpp.
|
inline |
| double CoolProp::Brent | ( | FuncWrapper1D * | f, |
| double | a, | ||
| double | b, | ||
| double | macheps, | ||
| double | t, | ||
| int | maxiter | ||
| ) |
This function implements a 1-D bounded solver using the algorithm from Brent, R. P., Algorithms for Minimization Without Derivatives. Englewood Cliffs, NJ: Prentice-Hall, 1973. Ch. 3-4.
a and b must bound the solution of interest and f(a) and f(b) must have opposite signs. If the function is continuous, there must be at least one solution in the interval [a,b].
| f | A pointer to an instance of the FuncWrapper1D class that must implement the class() function |
| a | The minimum bound for the solution of f=0 |
| b | The maximum bound for the solution of f=0 |
| macheps | The machine precision |
| t | Tolerance (absolute) |
| maxiter | Maximum number of steps allowed. Will throw a SolutionError if the solution cannot be found |
Definition at line 522 of file Solvers.cpp.
| void CoolProp::compare_REFPROP_and_CoolProp | ( | const std::string & | fluid, |
| CoolProp::input_pairs | inputs, | ||
| double | val1, | ||
| double | val2, | ||
| std::size_t | N, | ||
| double | d1, | ||
| double | d2 | ||
| ) |
Definition at line 16 of file SpeedTest.cpp.
| void CoolProp::compare_REFPROP_and_CoolProp | ( | const std::string & | fluid, |
| int | inputs, | ||
| double | val1, | ||
| double | val2, | ||
| std::size_t | N, | ||
| double | d1 = 0, |
||
| double | d2 = 0 |
||
| ) |
| std::string CoolProp::config_key_description | ( | configuration_keys | keys | ) |
Return a string description of the configuration key.
Definition at line 80 of file Configuration.cpp.
| std::string CoolProp::config_key_description | ( | const std::string & | key | ) |
Return a string description of the configuration key (with the key passed as a string)
Definition at line 96 of file Configuration.cpp.
| std::string CoolProp::config_key_to_string | ( | configuration_keys | keys | ) |
Convert the configuration key to a string in a 1-1 representation.
Definition at line 64 of file Configuration.cpp.
| configuration_keys CoolProp::config_string_to_key | ( | const std::string & | s | ) |
Go from string to enum key.
Convert a string description to a configuration key.
Definition at line 111 of file Configuration.cpp.
| std::vector< T > CoolProp::cross_product | ( | std::vector< T > const & | a, |
| std::vector< T > const & | b | ||
| ) |
Definition at line 843 of file MatrixMath.h.
| void CoolProp::divide_row_by | ( | std::vector< std::vector< T > > * | A, |
| size_t | row, | ||
| T | value | ||
| ) |
Definition at line 571 of file MatrixMath.h.
| T CoolProp::dot_product | ( | std::vector< T > const & | a, |
| std::vector< T > const & | b | ||
| ) |
Definition at line 835 of file MatrixMath.h.
| std::vector< std::vector< T > > CoolProp::eigen_to_vec | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | coefficients | ) |
| coefficients | matrix containing the ordered coefficients |
Definition at line 119 of file MatrixMath.h.
| std::vector< T > CoolProp::eigen_to_vec1D | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | coefficients, |
| int | axis = 0 |
||
| ) |
Convert vectors and matrices.
Conversion functions for the different kinds of object-like parameters. This might be obsolete at a later stage, but now it is still needed.
| coefficients | matrix containing the ordered coefficients |
| axis | axis along which to extract |
Definition at line 97 of file MatrixMath.h.
| const std::string CoolProp::ERR_NOT_A_TWO_PHASE_FLUID | ( | "This is not a two-phase fluid. Please select another fluid or avoid two-phase functions." | ) |
| const std::string CoolProp::ERR_NOT_A_TWO_PHASE_FUNCTION | ( | "This function is invalid in the two-phase region." | ) |
| const std::string CoolProp::ERR_NOT_A_TWO_PHASE_STATE | ( | "This is not a two-phase | state, |
| update state with a two-phase set of inputs" | |||
| ) |
| const std::string CoolProp::ERR_NOT_COMPRESSIBLE | ( | "This function is invalid for incompressible fluids." | ) |
| 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 "?".
| fluid_string | The input string |
| backend | The output backend, if none found, "?" |
| fluid | The output fluid string (minus the backend string) |
Definition at line 113 of file CoolProp.cpp.
| void CoolProp::extract_backend_families | ( | const std::string & | backend_string, |
| backend_families & | f1, | ||
| backend_families & | f2 | ||
| ) |
Convert a string into the enum values.
Definition at line 855 of file DataStructures.cpp.
| void CoolProp::extract_backend_families_string | ( | std::string | backend_string, |
| backend_families & | f1, | ||
| std::string & | f2 | ||
| ) |
Definition at line 872 of file DataStructures.cpp.
| 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.
| fluid_string | The input string |
| fractions | The fractions |
Definition at line 154 of file CoolProp.cpp.
|
inline |
| double CoolProp::ExtrapolatingSecant | ( | FuncWrapper1D * | f, |
| double | x0, | ||
| double | dx, | ||
| double | tol, | ||
| int | maxiter | ||
| ) |
In the secant function, a 1-D Newton-Raphson solver is implemented. An initial guess for the solution is provided. Note that this is different than the Secant function because if something goes out of bounds, it will just make its best guess.
| f | A pointer to an instance of the FuncWrapper1D class that implements the call() function |
| x0 | The initial guess for the solutionh |
| dx | The initial amount that is added to x in order to build the numerical derivative |
| tol | The absolute value of the tolerance accepted for the objective function |
| maxiter | Maximum number of iterations |
Definition at line 429 of file Solvers.cpp.
|
inlinenoexcept |
|
inlinenoexcept |
| bool CoolProp::force_load_REFPROP | ( | ) |
Definition at line 2788 of file REFPROPMixtureBackend.cpp.
| bool CoolProp::force_unload_REFPROP | ( | ) |
Definition at line 2801 of file REFPROPMixtureBackend.cpp.
|
noexcept |
Generate an update pair from key, value pairs.
If the input pair is valid, v1 and v2 will correspond to the returned output pair
| key1 | The first input key |
| value1 | The first input value |
| key2 | The second input key |
| value2 | The second input value |
| out1 | The first output value |
| out2 | The second output value |
< Molar quality, Temperature in K
< Mass-basis quality, Temperature in K
< Pressure in Pa, Molar quality
< Pressure in Pa, Mass-basis quality
< Pressure in Pa, Temperature in K
< Entropy in J/kg/K, Internal energy in J/kg
< Entropy in J/mol/K, Internal energy in J/mol
Definition at line 381 of file DataStructures.h.
| const BackendInformation & CoolProp::get_backend_information | ( | ) |
Definition at line 847 of file DataStructures.cpp.
|
inline |
Definition at line 55 of file AbstractState.cpp.
| std::string CoolProp::get_backend_string | ( | backends | backend | ) |
Definition at line 884 of file DataStructures.cpp.
| std::vector< T > CoolProp::get_col | ( | std::vector< std::vector< T > > const & | in, |
| size_t | col | ||
| ) |
Definition at line 743 of file MatrixMath.h.
| std::string CoolProp::get_config_as_json_string | ( | ) |
Get all the values in the configuration as a json-formatted string.
Definition at line 163 of file Configuration.cpp.
| bool CoolProp::get_config_bool | ( | configuration_keys | key | ) |
Return the value of a boolean key from the configuration.
GETTERS
Definition at line 151 of file Configuration.cpp.
| double CoolProp::get_config_double | ( | configuration_keys | key | ) |
Return the value of a double configuration key.
Definition at line 157 of file Configuration.cpp.
| int CoolProp::get_config_int | ( | configuration_keys | key | ) |
Return the value of an integer key from the configuration.
Definition at line 154 of file Configuration.cpp.
| std::string CoolProp::get_config_string | ( | configuration_keys | key | ) |
Return the value of a string configuration key.
Definition at line 160 of file Configuration.cpp.
| std::string CoolProp::get_csv_mixture_binary_pairs | ( | ) |
Get a comma-separated list of CAS code pairs.
Each of the pairs will be CAS1&CAS2 ("&" delimited)
Definition at line 291 of file MixtureParameters.cpp.
| std::string CoolProp::get_csv_parameter_list | ( | ) |
Return a list of parameters.
Get a comma separated list of parameters.
Definition at line 204 of file DataStructures.cpp.
| std::string CoolProp::get_csv_predefined_mixtures | ( | ) |
Get a comma-separated list of predefined mixtures in CoolProp.
Definition at line 53 of file MixtureParameters.cpp.
| int CoolProp::get_debug_level | ( | ) |
Get the debug level
Definition at line 90 of file CoolProp.cpp.
| DepartureFunction * CoolProp::get_departure_function | ( | const std::string & | Name | ) |
Get the allocated Departure function for a given departure function name.
| Name | The name of the function to be used, or its alias |
Definition at line 513 of file MixtureParameters.cpp.
| void CoolProp::get_dT_drho | ( | AbstractState & | AS, |
| parameters | index, | ||
| CoolPropDbl & | dT, | ||
| CoolPropDbl & | drho | ||
| ) |
Definition at line 981 of file AbstractState.cpp.
| void CoolProp::get_dT_drho | ( | HelmholtzEOSMixtureBackend * | HEOS, |
| parameters | index, | ||
| CoolPropDbl & | dT, | ||
| CoolPropDbl & | drho | ||
| ) |
Definition at line 2565 of file HelmholtzEOSMixtureBackend.cpp.
| void CoolProp::get_dT_drho_second_derivatives | ( | AbstractState & | AS, |
| int | index, | ||
| CoolPropDbl & | dT2, | ||
| CoolPropDbl & | drho_dT, | ||
| CoolPropDbl & | drho2 | ||
| ) |
Definition at line 1152 of file AbstractState.cpp.
| CoolPropFluid CoolProp::get_fluid | ( | const std::string & | fluid_string | ) |
Get the fluid structure.
Definition at line 376 of file FluidLibrary.cpp.
| std::string CoolProp::get_fluid_as_JSONstring | ( | const std::string & | identifier | ) |
Get the fluid as a JSON string, suitable for modification and reloading.
Definition at line 381 of file FluidLibrary.cpp.
| std::string CoolProp::get_fluid_list | ( | ) |
Get a comma-separated-list of fluids that are included.
Definition at line 386 of file FluidLibrary.cpp.
| 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)
| FluidName | The name of the fluid that is part of CoolProp, for instance "n-Propane" |
| ParamName | A string, can be in one of the terms described in the following table |
| ParamName | Description |
|---|---|
| "aliases" | A comma separated list of aliases for the fluid |
| "CAS", "CAS_number" | The CAS number |
| "ASHRAE34" | The ASHRAE standard 34 safety rating |
| "REFPROPName","REFPROP_name" | The name of the fluid used in REFPROP |
| "Bibtex-XXX" | A BibTeX key, where XXX is one of the bibtex keys used in get_BibTeXKey |
| "pure" | "true" if the fluid is pure, "false" otherwise |
| "formula" | The chemical formula of the fluid in LaTeX form if available, "" otherwise |
Definition at line 1134 of file CoolProp.cpp.
| std::string CoolProp::get_global_param_string | ( | const std::string & | ParamName | ) |
Get a globally-defined string
| ParamName | A string, one of "version", "errstring", "warnstring", "gitrevision", "FluidsList", "fluids_list", "parameter_list","predefined_mixtures" |
Definition at line 1042 of file CoolProp.cpp.
| void CoolProp::get_Henrys_coeffs_FP | ( | const std::string & | CAS, |
| double & | A, | ||
| double & | B, | ||
| double & | C, | ||
| double & | Tmin, | ||
| double & | Tmax | ||
| ) |
Definition at line 1053 of file FlashRoutines.cpp.
| IncompressibleFluid & CoolProp::get_incompressible_fluid | ( | const std::string & | fluid_string | ) |
Get the fluid structure returned as a reference.
Definition at line 569 of file IncompressibleLibrary.cpp.
| JSONIncompressibleLibrary & CoolProp::get_incompressible_library | ( | ) |
Get a reference to the library instance.
Definition at line 564 of file IncompressibleLibrary.cpp.
| std::string CoolProp::get_incompressible_list_pure | ( | ) |
Return a comma-separated list of incompressible pure fluid names.
Definition at line 574 of file IncompressibleLibrary.cpp.
| std::string CoolProp::get_incompressible_list_solution | ( | ) |
Return a comma-separated list of solution names.
Definition at line 578 of file IncompressibleLibrary.cpp.
| input_pairs CoolProp::get_input_pair_index | ( | const std::string & | input_pair_name | ) |
Get the input pair index associated with its string representation.
Definition at line 585 of file DataStructures.cpp.
| const InputPairInformation & CoolProp::get_input_pair_information | ( | ) |
Definition at line 578 of file DataStructures.cpp.
| const std::string & CoolProp::get_input_pair_long_desc | ( | input_pairs | pair | ) |
Return the long description of an input pair key ("Molar density in mol/m^3, Temperature in K" for instance)
Definition at line 602 of file DataStructures.cpp.
| const std::string & CoolProp::get_input_pair_short_desc | ( | input_pairs | pair | ) |
Return the short description of an input pair key ("DmolarT_INPUTS" for instance)
Definition at line 594 of file DataStructures.cpp.
| JSONFluidLibrary & CoolProp::get_library | ( | ) |
Get a reference to the library instance.
Definition at line 371 of file FluidLibrary.cpp.
| std::shared_ptr< MeltingCaloric > CoolProp::get_melting_caloric_cached | ( | HelmholtzEOSMixtureBackend & | H | ) |
Return a process-global, lazily-built MeltingCaloric for H's (pure) fluid. Returns nullptr if the fluid is not pure or has no melting line. Built once per fluid name; subsequent calls return the cached instance.
Definition at line 247 of file MeltingCaloric.cpp.
| std::string CoolProp::get_mixture_binary_pair_data | ( | const std::string & | CAS1, |
| const std::string & | CAS2, | ||
| const std::string & | key | ||
| ) |
Get a string for the given binary pair.
Definition at line 300 of file MixtureParameters.cpp.
| std::string CoolProp::get_mixture_binary_pair_pcsaft | ( | const std::string & | CAS1, |
| const std::string & | CAS2, | ||
| const std::string & | key | ||
| ) |
Definition at line 17 of file PCSAFTLibrary.cpp.
| parameters CoolProp::get_parameter_index | ( | const std::string & | param_name | ) |
Return the enum key corresponding to the parameter name ("Dmolar" for instance)
Definition at line 495 of file DataStructures.cpp.
| const ParameterInformation & CoolProp::get_parameter_information | ( | ) |
Definition at line 164 of file DataStructures.cpp.
| std::string CoolProp::get_parameter_information | ( | int | key, |
| std::string_view | info | ||
| ) |
Return information about the parameter
| key | The key, one of iT, iP, etc. |
| info | The thing you want, one of "IO" ("IO" if input/output, "O" if output only), "short" (very short description), "long" (a longer description), "units" |
Definition at line 180 of file DataStructures.cpp.
| phases CoolProp::get_phase_index | ( | const std::string & | param_name | ) |
Return the enum key corresponding to the phase name ("phase_liquid" for instance)
Definition at line 423 of file DataStructures.cpp.
| const PhaseInformation & CoolProp::get_phase_information | ( | ) |
Definition at line 394 of file DataStructures.cpp.
| const std::string & CoolProp::get_phase_short_desc | ( | phases | phase | ) |
Definition at line 401 of file DataStructures.cpp.
| size_t CoolProp::get_pivot_row | ( | std::vector< std::vector< T > > * | A, |
| size_t | col | ||
| ) |
Definition at line 578 of file MatrixMath.h.
| std::string CoolProp::get_reducing_function_name | ( | const std::string & | CAS1, |
| const std::string & | CAS2 | ||
| ) |
Definition at line 380 of file MixtureParameters.cpp.
| std::vector< T > CoolProp::get_row | ( | std::vector< std::vector< T > > const & | in, |
| size_t | row | ||
| ) |
Definition at line 739 of file MatrixMath.h.
| schemes CoolProp::get_scheme_index | ( | const std::string & | scheme_name | ) |
Return the enum key corresponding to the association scheme name ("2B" for instance)
Definition at line 486 of file DataStructures.cpp.
| const SchemeInformation & CoolProp::get_scheme_information | ( | ) |
Definition at line 457 of file DataStructures.cpp.
| const std::string & CoolProp::get_scheme_short_desc | ( | schemes | scheme | ) |
Definition at line 464 of file DataStructures.cpp.
|
inline |
| double CoolProp::Halley | ( | FuncWrapper1DWithTwoDerivs * | f, |
| double | x0, | ||
| double | ftol, | ||
| int | maxiter, | ||
| double | xtol_rel | ||
| ) |
In the Halley's method solver, two derivatives of the input variable are needed, it yields the following method:
\[ x_{n+1} = x_n - \frac {2 f(x_n) f'(x_n)} {2 {[f'(x_n)]}^2 - f(x_n) f''(x_n)} \]
http://en.wikipedia.org/wiki/Halley%27s_method
| f | A pointer to an instance of the FuncWrapper1DWithTwoDerivs class that implements the call() and two derivatives |
| x0 | The initial guess for the solution |
| ftol | The absolute value of the tolerance accepted for the objective function |
| maxiter | Maximum number of iterations |
| xtol_rel | The minimum allowable (relative) step size |
Definition at line 159 of file Solvers.cpp.
| bool CoolProp::has_backend_in_string | ( | const std::string & | fluid_string, |
| std::size_t & | i | ||
| ) |
Definition at line 108 of file CoolProp.cpp.
| bool CoolProp::has_fractions_in_string | ( | const std::string & | fluid_string | ) |
Definition at line 136 of file CoolProp.cpp.
| bool CoolProp::has_solution_concentration | ( | const std::string & | fluid_string | ) |
Definition at line 140 of file CoolProp.cpp.
|
inline |
| double CoolProp::Householder4 | ( | FuncWrapper1DWithThreeDerivs * | f, |
| double | x0, | ||
| double | ftol, | ||
| int | maxiter, | ||
| double | xtol_rel | ||
| ) |
In the 4-th order Householder method, three derivatives of the input variable are needed, it yields the following method:
\[ x_{n+1} = x_n - f(x_n)\left( \frac {[f'(x_n)]^2 - f(x_n)f''(x_n)/2 } {[f'(x_n)]^3-f(x_n)f'(x_n)f''(x_n)+f'''(x_n)*[f(x_n)]^2/6 } \right) \]
http://numbers.computation.free.fr/Constants/Algorithms/newton.ps
| f | A pointer to an instance of the FuncWrapper1DWithThreeDerivs class that implements the call() and three derivatives |
| x0 | The initial guess for the solution |
| ftol | The absolute value of the tolerance accepted for the objective function |
| maxiter | Maximum number of iterations |
| xtol_rel | The minimum allowable (relative) step size |
Definition at line 227 of file Solvers.cpp.
| std::vector< std::vector< T > > CoolProp::invert | ( | std::vector< std::vector< T > > const & | in | ) |
Definition at line 866 of file MatrixMath.h.
| bool CoolProp::is_predefined_mixture | ( | const std::string & | name, |
| Dictionary & | dict | ||
| ) |
Get the parameters for a predefined mixture - R410A, R404A, etc. if the mixture is predefined.
Definition at line 62 of file MixtureParameters.cpp.
|
inline |
Return true if the input pair involves a mass-based quality (Qmass).
Definition at line 352 of file DataStructures.h.
| bool CoolProp::is_squared | ( | std::vector< std::vector< T > > const & | in | ) |
Definition at line 58 of file MatrixMath.h.
| bool CoolProp::is_trivial_parameter | ( | int | key | ) |
Returns true if the input is trivial (constants, critical parameters, etc.)
Definition at line 171 of file DataStructures.cpp.
| bool CoolProp::is_valid_first_derivative | ( | const std::string & | name, |
| parameters & | iOf, | ||
| parameters & | iWrt, | ||
| parameters & | iConstant | ||
| ) |
Returns true if the string corresponds to a valid first derivative
If it is a value derivative, the variables are set to the parts of the derivative
Definition at line 227 of file DataStructures.cpp.
| bool CoolProp::is_valid_first_saturation_derivative | ( | const std::string & | name, |
| parameters & | iOf, | ||
| parameters & | iWrt | ||
| ) |
Returns true if the string corresponds to a valid first saturation derivative - e.g. "d(P)/d(T)|sigma" for instance
If it is a valid derivative, the variables are set to the parts of the derivative
Definition at line 270 of file DataStructures.cpp.
| bool CoolProp::is_valid_fluid_string | ( | const std::string & | fluidstring | ) |
Check if the fluid name is valid.
Definition at line 921 of file CoolProp.cpp.
| bool CoolProp::is_valid_parameter | ( | const std::string & | param_name, |
| parameters & | iOutput | ||
| ) |
Returns true if a valid parameter, and sets value in the variable iOutput.
Definition at line 213 of file DataStructures.cpp.
| bool CoolProp::is_valid_phase | ( | const std::string & | phase_name, |
| phases & | iOutput | ||
| ) |
Return true if passed phase name is valid, otherwise false
| phase_name | The phase name string to be checked ("phase_liquid" for instance) |
| iOutput | Gets updated with the phases enum value if phase_name is found |
Definition at line 409 of file DataStructures.cpp.
| bool CoolProp::is_valid_scheme | ( | const std::string & | scheme_name, |
| schemes & | iOutput | ||
| ) |
Return true if passed PC-SAFT association scheme name is valid, otherwise false
| scheme_name | The association scheme string to be checked ("2B" for instance) |
| iOutput | Gets updated with the schemes enum value if scheme_name is found |
Definition at line 473 of file DataStructures.cpp.
| bool CoolProp::is_valid_second_derivative | ( | const std::string & | name, |
| parameters & | iOf1, | ||
| parameters & | iWrt1, | ||
| parameters & | iConstant1, | ||
| parameters & | iWrt2, | ||
| parameters & | iConstant2 | ||
| ) |
Returns true if the string corresponds to a valid second derivative
If it is a value derivative, the variables are set to the parts of the derivative
Definition at line 312 of file DataStructures.cpp.
| CoolPropDbl CoolProp::kahanSum | ( | const std::vector< CoolPropDbl > & | x | ) |
Definition at line 14 of file Helmholtz.cpp.
| std::vector< std::vector< T > > CoolProp::linsolve | ( | std::vector< std::vector< T > > const & | A, |
| std::vector< std::vector< T > > const & | B | ||
| ) |
Definition at line 719 of file MatrixMath.h.
| std::vector< T > CoolProp::linsolve | ( | std::vector< std::vector< T > > const & | A, |
| std::vector< T > const & | b | ||
| ) |
Definition at line 724 of file MatrixMath.h.
| std::vector< std::vector< T > > CoolProp::linsolve_Gauss_Jordan | ( | std::vector< std::vector< T > > const & | A, |
| std::vector< std::vector< T > > const & | B | ||
| ) |
Definition at line 593 of file MatrixMath.h.
| void CoolProp::load | ( | ) |
Definition at line 46 of file FluidLibrary.cpp.
| void CoolProp::load_incompressible_library | ( | ) |
Definition at line 552 of file IncompressibleLibrary.cpp.
| void CoolProp::load_table | ( | T & | table, |
| const std::string & | path_to_tables, | ||
| const std::string & | filename | ||
| ) |
| table | |
| path_to_tables | |
| filename |
Definition at line 35 of file TabularBackends.cpp.
| std::vector< std::vector< T > > CoolProp::make_squared | ( | std::vector< std::vector< T > > const & | in | ) |
Definition at line 759 of file MatrixMath.h.
| Eigen::Matrix< T, Eigen::Dynamic, 1 > CoolProp::makeColVector | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | matrix | ) |
Convert 1D matrix to vector.
Returns either a row- or a column-based vector. By default, Eigen prefers column major ordering, just like Fortran.
Definition at line 181 of file MatrixMath.h.
| Eigen::Matrix< T, 1, Eigen::Dynamic > CoolProp::makeRowVector | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | matrix | ) |
Definition at line 199 of file MatrixMath.h.
| Eigen::Matrix< T, Eigen::Dynamic, 1 > CoolProp::makeVector | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | matrix | ) |
Definition at line 195 of file MatrixMath.h.
|
inline |
Get a conversion factor from mass to molar if needed.
Definition at line 175 of file TabularBackends.h.
| std::string CoolProp::mat_to_string | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | A | ) |
Definition at line 398 of file MatrixMath.h.
| std::string CoolProp::mat_to_string | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | A, |
| const char * | fmt | ||
| ) |
Templates for turning Eigen matrices into strings.
Definition at line 376 of file MatrixMath.h.
|
inline |
Definition at line 346 of file DataStructures.h.
| std::size_t CoolProp::max_cols | ( | std::vector< std::vector< T > > const & | in | ) |
Definition at line 46 of file MatrixMath.h.
|
inline |
Definition at line 902 of file MatrixMath.h.
| std::vector< std::vector< T > > CoolProp::multiply | ( | std::vector< std::vector< T > > const & | A, |
| std::vector< std::vector< T > > const & | B | ||
| ) |
Definition at line 810 of file MatrixMath.h.
| std::vector< T > CoolProp::multiply | ( | std::vector< std::vector< T > > const & | A, |
| std::vector< T > const & | b | ||
| ) |
Definition at line 796 of file MatrixMath.h.
| T CoolProp::multiply | ( | std::vector< T > const & | a, |
| std::vector< T > const & | b | ||
| ) |
Definition at line 792 of file MatrixMath.h.
| std::vector< double > CoolProp::NDNewtonRaphson_Jacobian | ( | FuncWrapperND * | f, |
| const std::vector< double > & | x, | ||
| double | tol, | ||
| int | maxiter, | ||
| double | w | ||
| ) |
In this formulation of the Multi-Dimensional Newton-Raphson solver the Jacobian matrix is known. Therefore, the dx vector can be obtained from
J(x)dx=-f(x)
for a given value of x. The pointer to the class FuncWrapperND that is passed in must implement the call() and Jacobian() functions, each of which take the vector x. The data is managed using std::vector<double> vectors
| f | A pointer to an subclass of the FuncWrapperND class that implements the call() and Jacobian() functions |
| x | The initial guess value for the solution |
| tol | The root-sum-square of the errors from each of the components |
| maxiter | The maximum number of iterations |
| w | A relaxation multiplier on the step size, multiplying the normal step size |
Definition at line 49 of file Solvers.cpp.
|
inline |
| double CoolProp::Newton | ( | FuncWrapper1DWithDeriv * | f, |
| double | x0, | ||
| double | ftol, | ||
| int | maxiter | ||
| ) |
In the newton function, a 1-D Newton-Raphson solver is implemented using exact solutions. An initial guess for the solution is provided.
| f | A pointer to an instance of the FuncWrapper1D class that implements the call() function |
| x0 | The initial guess for the solution |
| ftol | The absolute value of the tolerance accepted for the objective function |
| maxiter | Maximum number of iterations |
Definition at line 108 of file Solvers.cpp.
| std::size_t CoolProp::num_cols | ( | std::vector< std::vector< T > > const & | in | ) |
Definition at line 77 of file MatrixMath.h.
| std::size_t CoolProp::num_cols | ( | std::vector< T > const & | in | ) |
Definition at line 73 of file MatrixMath.h.
| std::size_t CoolProp::num_rows | ( | std::vector< std::vector< T > > const & | in | ) |
Definition at line 41 of file MatrixMath.h.
| std::size_t CoolProp::num_rows | ( | std::vector< T > const & | in | ) |
Some shortcuts and regularly needed operations.
Definition at line 37 of file MatrixMath.h.
| FactoryOptionsParseResult CoolProp::parse_factory_options | ( | const std::string & | factory_string | ) |
Definition at line 21 of file FactoryOptions.cpp.
| void CoolProp::parse_HMX_BNC | ( | const std::string & | s, |
| std::vector< REFPROP_binary_element > & | BIP, | ||
| std::vector< REFPROP_departure_function > & | functions | ||
| ) |
Definition at line 646 of file MixtureParameters.cpp.
| std::string CoolProp::phase_lookup_string | ( | phases | Phase | ) |
An internal function to extract the phase string, given the phase index; Handy for printing the actual phase string in debug, warning, and error messages.
| Phase | The enumerated phase index to be looked up |
< Liquid
< Supercritical (p > pc, T > Tc)
< Supercritical gas (p < pc, T > Tc)
< Supercritical liquid (p > pc, T < Tc)
< At the critical point
< Subcritical gas
< Twophase (between saturation curves - inclusive)
< Unknown phase
Definition at line 1168 of file CoolProp.cpp.
| std::string CoolProp::PhaseSI | ( | const std::string & | Name1, |
| double | Prop1, | ||
| const std::string & | Name2, | ||
| double | Prop2, | ||
| const std::string & | FluidName | ||
| ) |
Return a string representation of the phase
| Name1 | The first state variable name, one of "T","D","H",etc. |
| Prop1 | The first state variable value |
| Name2 | The second state variable name, one of "T","D","H",etc. |
| Prop2 | The second state variable value |
| FluidName | The fluid name |
Definition at line 1191 of file CoolProp.cpp.
| double CoolProp::Props1SI | ( | std::string | FluidName, |
| std::string | Output | ||
| ) |
Return a value that does not depend on the thermodynamic state - this is a convenience function that does the call PropsSI(Output, "", 0, "", 0, FluidName)
| FluidName | The fluid name |
| Output | The output parameter, one of "Tcrit","D","H",etc. |
Definition at line 866 of file CoolProp.cpp.
| 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)
| Outputs | A vector of strings for the output parameters |
| backend | The string representation of the backend (HEOS, REFPROP, INCOMP, etc.) |
| fluids | The fluid name(s) |
| fractions | The fractions (molar, mass, volume, etc.) of the components |
Definition at line 893 of file CoolProp.cpp.
| double CoolProp::PropsSI | ( | const std::string & | Output, |
| const std::string & | Name1, | ||
| double | Prop1, | ||
| const std::string & | Name2, | ||
| double | Prop2, | ||
| const std::string & | FluidName | ||
| ) |
Return a value that depends on the thermodynamic state
| Output | The output parameter, one of "T","D","H",etc. |
| Name1 | The first state variable name, one of "T","D","H",etc. |
| Prop1 | The first state variable value |
| Name2 | The second state variable name, one of "T","D","H",etc. |
| Prop2 | The second state variable value |
| FluidName | The fluid name |
Definition at line 654 of file CoolProp.cpp.
| 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.
| Outputs | A vector of strings for the output parameters |
| Name1 | The name of the first input variable |
| Prop1 | A vector of the first input values |
| Name2 | The name of the second input variable |
| Prop2 | A vector of the second input values |
| backend | The string representation of the backend (HEOS, REFPROP, INCOMP, etc.) |
| fluids | The fluid name(s) |
| fractions | The fractions (molar, mass, volume, etc.) of the components |
Definition at line 622 of file CoolProp.cpp.
| double CoolProp::ramp | ( | double | x | ) |
Definition at line 30 of file Helmholtz.cpp.
| void CoolProp::REFPROP_SETREF | ( | char * | hrf, |
| int | ixflag, | ||
| double * | x0, | ||
| double & | h0, | ||
| double & | s0, | ||
| double & | T0, | ||
| double & | p0, | ||
| int & | ierr, | ||
| char * | herr, | ||
| int | l1, | ||
| int | l2 | ||
| ) |
Definition at line 2815 of file REFPROPMixtureBackend.cpp.
| void CoolProp::register_backend | ( | const backend_families & | bf, |
| const shared_ptr< AbstractStateGenerator > & | gen | ||
| ) |
Register a backend in the backend library (statically defined in AbstractState.cpp and not publicly accessible)
Definition at line 60 of file AbstractState.cpp.
| void CoolProp::removeColumn | ( | Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | matrix, |
| std::size_t | colToRemove | ||
| ) |
Definition at line 236 of file MatrixMath.h.
|
inline |
Definition at line 890 of file MatrixMath.h.
| void CoolProp::removeRow | ( | Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | matrix, |
| std::size_t | rowToRemove | ||
| ) |
Remove rows and columns from matrices.
A set of convenience functions inspired by http://stackoverflow.com/questions/13290395/how-to-remove-a-certain-row-or-column-while-using-eigen-library-c but altered to respect templates.
Definition at line 218 of file MatrixMath.h.
|
inline |
Definition at line 878 of file MatrixMath.h.
| double CoolProp::saturation_ancillary | ( | const std::string & | fluid_name, |
| const std::string & | output, | ||
| int | Q, | ||
| const std::string & | input, | ||
| double | value | ||
| ) |
Definition at line 935 of file CoolProp.cpp.
|
inline |
| double CoolProp::Secant | ( | FuncWrapper1D * | f, |
| double | x0, | ||
| double | dx, | ||
| double | tol, | ||
| int | maxiter | ||
| ) |
In the secant function, a 1-D Newton-Raphson solver is implemented. An initial guess for the solution is provided.
| f | A pointer to an instance of the FuncWrapper1D class that implements the call() function |
| x0 | The initial guess for the solutionh |
| dx | The initial amount that is added to x in order to build the numerical derivative |
| tol | The absolute value of the tolerance accepted for the objective function |
| maxiter | Maximum number of iterations |
Definition at line 288 of file Solvers.cpp.
| void CoolProp::set_config_as_json_string | ( | const std::string & | s | ) |
Set the entire configuration based on a json-formatted string.
Definition at line 170 of file Configuration.cpp.
| void CoolProp::set_config_bool | ( | configuration_keys | key, |
| bool | val | ||
| ) |
Set the value of a boolean configuration value.
SETTERS
Definition at line 135 of file Configuration.cpp.
| void CoolProp::set_config_double | ( | configuration_keys | key, |
| double | val | ||
| ) |
Set the value of a double configuration value.
Definition at line 141 of file Configuration.cpp.
| void CoolProp::set_config_int | ( | configuration_keys | key, |
| int | val | ||
| ) |
Set the value of an integer configuration value.
Definition at line 138 of file Configuration.cpp.
| void CoolProp::set_config_string | ( | configuration_keys | key, |
| const std::string & | val | ||
| ) |
Set the value of a string configuration value.
Definition at line 144 of file Configuration.cpp.
| void CoolProp::set_debug_level | ( | int | level | ) |
Set the debug level
| level | The level of the verbosity for the debugging output (0-10) 0: no debgging output |
Definition at line 87 of file CoolProp.cpp.
| void CoolProp::set_departure_functions | ( | const std::string & | string_data | ) |
Set the departure functions in the departure function library from a string format.
| string_data | The departure functions to be set, either provided as a JSON-formatted string or as a string of the contents of a HMX.BNC file from REFPROP |
Definition at line 792 of file MixtureParameters.cpp.
| void CoolProp::set_error_string | ( | const std::string & | error | ) |
Set the global error string
| error | The error string to use |
Definition at line 102 of file CoolProp.cpp.
| void CoolProp::set_fluid_enthalpy_entropy_offset | ( | const std::string & | fluid, |
| double | delta_a1, | ||
| double | delta_a2, | ||
| const std::string & | ref | ||
| ) |
Set the internal enthalpy and entropy offset variables.
Definition at line 391 of file FluidLibrary.cpp.
| void CoolProp::set_interaction_parameters | ( | const std::string & | string_data | ) |
Set the interaction parameters from a string format.
| string_data | The model parameters, as a JSON-formatted string |
Definition at line 396 of file MixtureParameters.cpp.
| void CoolProp::set_mixture_binary_pair_data | ( | const std::string & | CAS1, |
| const std::string & | CAS2, | ||
| const std::string & | param, | ||
| const double | val | ||
| ) |
Set a parameter for the given binary pair.
| CAS1 | The CAS # for the first fluid (order matters!) |
| CAS2 | The CAS # for the second fluid (order matters!) |
| param | The parameter you want to set |
| val | The value of the parameter |
Definition at line 353 of file MixtureParameters.cpp.
| void CoolProp::set_mixture_binary_pair_pcsaft | ( | const std::string & | CAS1, |
| const std::string & | CAS2, | ||
| const std::string & | key, | ||
| const double | value | ||
| ) |
Definition at line 21 of file PCSAFTLibrary.cpp.
| void CoolProp::set_predefined_mixtures | ( | const std::string & | string_data | ) |
Set predefined mixtures at runtime.
| string_data | The predefined mixtures, as a JSON-formatted string |
Definition at line 72 of file MixtureParameters.cpp.
| void CoolProp::set_reference_stateD | ( | const std::string & | FluidName, |
| double | T, | ||
| double | rhomolar, | ||
| double | hmolar0, | ||
| double | smolar0 | ||
| ) |
Set the reference state based on a thermodynamic state point specified by temperature and molar density
| FluidName | The name of the fluid |
| T | Temperature at reference state [K] |
| rhomolar | Molar density at reference state [mol/m^3] |
| hmolar0 | Molar enthalpy at reference state [J/mol] |
| smolar0 | Molar entropy at reference state [J/mol/K] |
Definition at line 1028 of file CoolProp.cpp.
| void CoolProp::set_reference_stateS | ( | const std::string & | FluidName, |
| const std::string & | reference_state | ||
| ) |
Set the reference state based on a string representation.
| FluidName | The name of the fluid (Backend can be provided like "REFPROP::Water", or if no backend is provided, "HEOS" is the assumed backend) |
| reference_state | The reference state to use, one of |
| Reference State | Description |
|---|---|
| "IIR" | h = 200 kJ/kg, s=1 kJ/kg/K at 0C saturated liquid |
| "ASHRAE" | h = 0, s = 0 @ -40C saturated liquid |
| "NBP" | h = 0, s = 0 @ 1.0 bar saturated liquid |
| "DEF" | Reset to the default reference state for the fluid |
| "RESET" | Remove the offset |
The offset in the ideal gas Helmholtz energy can be obtained from
\[ \displaystyle\frac{\Delta s}{R_u/M}+\frac{\Delta h}{(R_u/M)T}\tau \]
where \( \Delta s = s-s_{spec} \) and \( \Delta h = h-h_{spec} \)
Definition at line 946 of file CoolProp.cpp.
| void CoolProp::set_warning_string | ( | const std::string & | warning | ) |
An internal function to set the global warning string
| warning | The string to set as the warning string |
Definition at line 98 of file CoolProp.cpp.
| CoolPropDbl CoolProp::sign | ( | CoolPropDbl | x | ) |
Definition at line 925 of file VLERoutines.cpp.
| void CoolProp::Skip_if_No_REFPROP | ( | ) |
A function to skip tests that require REFPROPMixtureBackend in environments where it is not supported (e.g., CI builds on GitHub)
Definition at line 720 of file CoolProp.cpp.
| void CoolProp::split_input_pair | ( | input_pairs | pair, |
| parameters & | p1, | ||
| parameters & | p2 | ||
| ) |
Split an input pair into parameters for the two parts that form the pair.
Definition at line 610 of file DataStructures.cpp.
|
inline |
Templates for turning vectors (1D-matrices) into strings.
Definition at line 334 of file MatrixMath.h.
| bool CoolProp::StripPhase | ( | std::string & | Name, |
| shared_ptr< AbstractState > & | State | ||
| ) |
Definition at line 532 of file CoolProp.cpp.
| void CoolProp::subtract_row_multiple | ( | std::vector< std::vector< T > > * | A, |
| size_t | row, | ||
| T | multiple, | ||
| size_t | pivot_row | ||
| ) |
Definition at line 565 of file MatrixMath.h.
| void CoolProp::swap_rows | ( | std::vector< std::vector< T > > * | A, |
| size_t | row1, | ||
| size_t | row2 | ||
| ) |
Template class for turning numbers (0D-matrices) into strings.
Definition at line 559 of file MatrixMath.h.
| std::string CoolProp::to_canonical_json_str | ( | const std::string & | json_str | ) |
Definition at line 19 of file SchemaValidation.cpp.
| std::vector< std::vector< T > > CoolProp::transpose | ( | std::vector< std::vector< T > > const & | in | ) |
Definition at line 848 of file MatrixMath.h.
| void CoolProp::validate_json_against_schema | ( | const std::string & | instance_json, |
| const std::string & | schema_json | ||
| ) |
Definition at line 10 of file SchemaValidation.cpp.
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > CoolProp::vec_to_eigen | ( | const std::vector< std::vector< T > > & | coefficients | ) |
| coefficients | matrix containing the ordered coefficients |
Definition at line 136 of file MatrixMath.h.
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > CoolProp::vec_to_eigen | ( | const std::vector< T > & | coefficients, |
| int | axis = 0 |
||
| ) |
| coefficients | matrix containing the ordered coefficients |
| axis | axis along which to extract data |
Definition at line 151 of file MatrixMath.h.
| Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > CoolProp::vec_to_eigen | ( | const T & | coefficient | ) |
| coefficient |
Definition at line 168 of file MatrixMath.h.
| std::string CoolProp::vec_to_string | ( | const std::vector< std::vector< T > > & | A | ) |
Definition at line 370 of file MatrixMath.h.
| std::string CoolProp::vec_to_string | ( | const std::vector< std::vector< T > > & | A, |
| const char * | fmt | ||
| ) |
Templates for turning 2D-matrices into strings.
Definition at line 359 of file MatrixMath.h.
| std::string CoolProp::vec_to_string | ( | const std::vector< T > & | a | ) |
Definition at line 330 of file MatrixMath.h.
| std::string CoolProp::vec_to_string | ( | const std::vector< T > & | a, |
| const char * | fmt | ||
| ) |
Templates for turning vectors (1D-matrices) into strings.
Definition at line 319 of file MatrixMath.h.
| std::string CoolProp::vec_to_string | ( | const T & | a | ) |
Definition at line 353 of file MatrixMath.h.
| std::string CoolProp::vec_to_string | ( | const T & | a, |
| const char * | fmt | ||
| ) |
Templates for turning numbers (0D-matrices) into strings.
Definition at line 347 of file MatrixMath.h.
|
inline |
Templates for turning vectors (1D-matrices) into strings.
Definition at line 20 of file HelmholtzEOSBackend.h.
| bool CoolProp::wayToSort | ( | CoolPropDbl | i, |
| CoolPropDbl | j | ||
| ) |
Definition at line 25 of file Helmholtz.cpp.
| void CoolProp::write_table | ( | const T & | table, |
| const std::string & | path_to_tables, | ||
| const std::string & | name | ||
| ) |
Definition at line 92 of file TabularBackends.cpp.
| double CoolProp::Xdd | ( | double | X, |
| double | delta, | ||
| double | Delta, | ||
| double | Delta_d, | ||
| double | Delta_dd | ||
| ) |
Definition at line 964 of file Helmholtz.cpp.
| const std::vector<backend_family_info> CoolProp::backend_family_list |
Definition at line 802 of file DataStructures.cpp.
| std::unique_ptr<BackendInformation> CoolProp::backend_information_p |
Definition at line 846 of file DataStructures.cpp.
| const std::vector<backend_info> CoolProp::backend_list |
Definition at line 807 of file DataStructures.cpp.
|
constexpr |
Definition at line 21 of file PolyMath.cpp.
|
constexpr |
Definition at line 20 of file PolyMath.cpp.
| std::unique_ptr<InputPairInformation> CoolProp::input_pair_information_p |
Definition at line 577 of file DataStructures.cpp.
| const input_pair_info CoolProp::input_pair_list[] |
Definition at line 510 of file DataStructures.cpp.
| const std::vector<parameter_info> CoolProp::parameter_info_list |
Definition at line 18 of file DataStructures.cpp.
| std::unique_ptr<ParameterInformation> CoolProp::parameter_information_p |
Definition at line 163 of file DataStructures.cpp.
| std::unique_ptr<Configuration> CoolProp::pconfig |
Definition at line 126 of file Configuration.cpp.
| const phase_info CoolProp::phase_info_list[] |
Definition at line 366 of file DataStructures.cpp.
| std::unique_ptr<PhaseInformation> CoolProp::phase_information_p |
Definition at line 393 of file DataStructures.cpp.
| const scheme_info CoolProp::scheme_info_list[] |
| std::unique_ptr<SchemeInformation> CoolProp::scheme_information_p |
Definition at line 456 of file DataStructures.cpp.