#[non_exhaustive]pub struct Config {Show 29 fields
pub debug_level: u8,
pub assume_critical_point_is_stable: bool,
pub critical_within_1uk: bool,
pub dont_check_prop_limits: bool,
pub enable_critical_splines: bool,
pub enable_superancillaries: bool,
pub henrys_law_to_generate_vle_guesses: bool,
pub normalize_gas_constants: bool,
pub overwrite_binary_interaction: bool,
pub overwrite_departure_fn: bool,
pub overwrite_substances: bool,
pub phase_envelope_start_pressure_pa: f64,
pub ru_codata: f64,
pub spinodal_min_delta: f64,
pub use_guesses_in_props_si: bool,
pub alt_refprop_path: Option<PathBuf>,
pub alt_refprop_lib_path: Option<PathBuf>,
pub alt_refprop_hmx_bnc_path: Option<PathBuf>,
pub refprop_dont_estimate_interaction_params: bool,
pub refprop_ignore_error_estimated_interaction_params: bool,
pub refprop_use_gerg: bool,
pub refprop_use_peng_robinson: bool,
pub alt_tables_path: Option<PathBuf>,
pub float_punctuation: char,
pub list_punctuation: char,
pub max_table_dir_size_in_gb: f64,
pub save_raw_tables: bool,
pub vtpr_always_reload_lib: bool,
pub vtpr_unifac_path: Option<PathBuf>,
}Expand description
Crate configuration state.
This configuration mirrors the configuration options available in CoolProp.
Each field corresponds directly to a CoolProp configuration parameter and
is synchronized with the underlying CoolProp library when
config::update is called.
ยงserde Support
Enable the serde feature for serialization and deserialization support.
See the module documentation for details and examples.
ยงThread Safety
The configuration is stored in a global state protected by an
RwLock. Use config::read to get
the current configuration and config::update to modify it.
Fields (Non-exhaustive)ยง
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.debug_level: u8CoolProp debug level.
The debug level controls the verbosity of debugging output from CoolProp.
Valid range is 0-10:
0โ debugging output is disabled> 0โ debugging output is enabled, with larger values producing more verbose output
Default: 0
assume_critical_point_is_stable: boolIf true, evaluation of the stability of critical point will be skipped and point will be
assumed to be stable.
Default: false
critical_within_1uk: boolif true, any temperature within 1 uK of the critical temperature will be considered to
be AT the critical point.
Default: true
dont_check_prop_limits: boolIf true, when possible, CoolProp will skip checking whether values are inside the
property limits.
Default: false
enable_critical_splines: boolIf true, the critical splines will be used in the near-vicinity of the critical point.
Default: true
enable_superancillaries: boolif true, the superancillary functions will be used for VLE of pure fluids.
Default: true
henrys_law_to_generate_vle_guesses: boolIf true, when doing water-based mixture dewpoint calculations, use Henryโs Law to
generate guesses for liquid-phase composition.
Default: false
normalize_gas_constants: boolIf true, for mixtures, the molar gas constant (R) will be set to the CODATA value.
Default: true
overwrite_binary_interaction: boolIf true, and a pair of binary interaction pairs to be added is already there, rather than
not adding the binary interaction pair (and probably throwing an exception), overwrite
it.
Default: false
overwrite_departure_fn: boolif true, and a departure function to be added is already there, rather than not adding
the departure function (and probably throwing an exception), overwrite it.
Default: false
overwrite_substances: boolIf true, and a substance is added to the substances library that is already there, rather
than not adding the substance (and probably throwing an exception), overwrite it.
Default: false
phase_envelope_start_pressure_pa: f64Starting pressure in Pa for phase envelope construction.
Default: 100.0
ru_codata: f64The value for the ideal gas constant in J/mol/K according to CODATA 2022. This value is
used to harmonize all the ideal gas constants. This is especially important in the critical
region.
Default: 8.314_462_618_153_24
spinodal_min_delta: f64The minimal delta to be used in tracing out the spinodal; make sure that the EOS has a
spinodal at this value of delta=rho/rho_r.
Default: 0.5
use_guesses_in_props_si: boolIf true, calls to the vectorized versions of PropsSI use the previous state as guess
value while looping over the input vectors, only makes sense when working with a single
fluid and with points that are not too far from each other.
Default: false
alt_refprop_path: Option<PathBuf>An alternative path to be provided to the directory that contains REFPROPโs fluids and
mixtures directories. If provided, the SETPATH function will be called with this
directory prior to calling any REFPROP functions.
Default: None
alt_refprop_lib_path: Option<PathBuf>An alternative path to the shared library file. If provided, it will be used to load
REFPROP.
Default: None
alt_refprop_hmx_bnc_path: Option<PathBuf>An alternative path to the HMX.BNC file. If provided, it will be passed into REFPROPโs
SETUP or SETMIX routines.
Default: None
refprop_dont_estimate_interaction_params: boolIf true, if the binary interaction parameters in REFPROP are estimated, throw an error
rather than silently continuing.
Default: false
refprop_ignore_error_estimated_interaction_params: boolIf true, if the binary interaction parameters in REFPROP are unable to be estimated,
silently continue rather than failing.
Default: false
refprop_use_gerg: boolIf true, rather than using the highly-accurate pure fluid equations of state, use the
pure-fluid EOS from GERG-2008.
Default: false
refprop_use_peng_robinson: boolIf true, rather than using the highly-accurate pure fluid equations of state, use the
Peng-Robinson EOS.
Default: false
alt_tables_path: Option<PathBuf>If provided, this path will be the root directory for the tabular data. Otherwise,
${HOME}/.CoolProp/Tables is used.
Default: None
float_punctuation: charThe first character of this string will be used as the separator between the number fraction.
Default: '.'
list_punctuation: charThe delimiter to be used when converting a list of strings to a string.
Default: ','
max_table_dir_size_in_gb: f64The maximum allowed size of the directory that is used to store tabular data.
Default: 1.0
save_raw_tables: boolIf true, the raw, uncompressed tables will also be written to file.
Default: false
vtpr_always_reload_lib: boolIf true, the library will always be reloaded, no matter what is currently loaded.
Default: false
vtpr_unifac_path: Option<PathBuf>The path to the directory containing the UNIFAC JSON files.
Default: None