salt_water/lib.rs
1//! Salt-Water stand-alone CAPE-OPEN 1.2 Property Package
2//!
3//! This is an example property package implementation, featuring
4//! a single water phase and two components: water and NaCl. The
5//! calculations for the liquid phase are based on
6//! * Mostafa H. Sharqawy, John H. Lienhard V, Syed M. Zubair, Desalination and Water Treatment, doi 10.5004/dwt.2010.1079
7//! * Kishor G. Nayar, Mostafa H. Sharqawy, Leonardo D. Banchik, John H. Lienhard V, Desalination, doi 10.1016/j.desal.2016.02.024
8//!
9//! The package support calculation of the following liquid properties:
10//! * Density
11//! * Volume
12//! * Enthalpy
13//! * Entropy
14//! * Viscosity
15//! * Thermal conductivity
16//!
17//! See the [salt_water_calculator] documentation fo validity ranges.
18//!
19//! Phase equilibria routines are provided that calculate the conditions
20//! of the liquid phase, at given temperaure and pressure, temperature and
21//! enthalpy, and temperature and entropy, which makes the packge suitable
22//! for steady state flowsheet calculations including heat exchangers,
23//! pumps and turbines.
24//!
25//! To use the property package from source, compile the source, and
26//! register the property package using
27//!
28//! `cobiaRegister.exe salt_water.dll`
29//!
30//! An installer for Windows is made available through the AmsterCHEM web site.
31//!
32//! This software uses strum, a set of macros and traits for working with enums and strings easier in Rust, by Peter GlotFelty
33
34//To build documentation:
35// cargo doc --no-deps --document-private-items --package salt_water --open
36
37use cobia;
38mod salt_water_calculator;
39mod salt_water_property_package;
40mod property_tables;
41mod phase_equilibrium_type;
42
43/// Registering a PMC for all users requires administrative privileges; this package is registred for the current user only
44fn register_pmcs_for_all_users() -> bool {
45 false
46}
47
48///A list of all the PMCs that need to be registered
49static PMCS: &[cobia::PMCInfo] = &[cobia::pmc_info::<salt_water_property_package::SaltWaterPropertyPackage>()];
50
51//this defines the entry point for the cobia PMC shared library
52cobia::pmc_entry_points!(PMCS, register_pmcs_for_all_users());