Catalog PyPI
Back to packageRELEASE DETAILS

1.1.0

PyPI

absorptionlib

Thermophysical properties of salt solutions (NaOH, LiBr, LiCl, CaCl2) for absorption systems

Published9 Oct 2026
Direct dependencies4
Transitive dependenciesNot calculated

README

Version 1.1.0 documentation

absorptionlib

This package contains thermophysical property functions for the following aqueous solutions used in absorption systems:

  • NaOH-water
  • LiBr-water
  • LiCl-water
  • CaCl2-water

If you use this package, please cite:

Höffner et al. 2025 — Potentials of absorption thermal energy storage systems in seasonal application

DOI: https://doi.org/10.18462/iir.tptpr2025.1130

Installation and Usage

pip install absorptionlib
# Import
from absorptionlib import NaOH, LiBr, LiCl, CaCl2

# Example Usage
p = 100000  # [Pa]
x = 0.4     # [kg NaOH / kg solution]
t_sat = NaOH.saturation_temperature(x, p)
print(round(t_sat, 2))

Output

129.75

Units

All functions use the same units throughout the package:

SymbolMeaningUnit
xSalt mass fractionkg salt / kg solution
TTemperature°C
pPressurePa

Warnings and errors

Each function checks its inputs against the validity range of the underlying correlation:

  • Inputs outside the validated range emit an OutOfRangeWarning (the value is still computed and returned).
  • State points below the crystallization line emit a CrystallizationWarning.
  • Physically invalid inputs raise a ValueError.

Every property function accepts prevent_errors=True, which suppresses all warnings and returns float('nan') instead of raising a ValueError — useful inside optimizers and root finders:

NaOH.enthalpy(0.4, 80, prevent_errors=True)

Warnings can also be controlled globally:

import absorptionlib
absorptionlib.disable_warnings()   # silence all package warnings
absorptionlib.enable_warnings()    # restore them

# or with the standard library, e.g. turn warnings into exceptions:
import warnings
warnings.filterwarnings("error", category=absorptionlib.CrystallizationWarning)

Quick documentation

Each submodule has its own "in-line" documentation, which can be called with the documentation() function. Each property function has a docstring, which can be printed with the explain() function.

# How to get quick documentation on the modules
NaOH.documentation()  # or LiBr, LiCl, CaCl2

# How to get quick documentation for functions
NaOH.explain("enthalpy")    # prints docstring of NaOH.enthalpy
LiCl.explain("pTDiagram")   # prints docstring of LiCl.pTDiagram

Available Property Functions

Function NameDescriptionNaOHLiBrLiClCaCl2
saturation_temperatureBoiling point temperature of the solution [°C]xxxx
saturation_pressureEquilibrium (vapor) pressure of the solution [Pa]xxxx
saturation_concentrationSaturation concentration at given pressure and temperature [kg/kg]xxxx
enthalpySpecific enthalpy of the solution [kJ/kg]xxxx
differential_enthalpy_ADDifferential enthalpy of dilution [kJ/kg H2O]xx
densityDensity of the solution [kg/m³]xxxx
specific_heat_capacitySpecific heat capacity of the solution [kJ/(kg K)]xxx
dynamic_viscosityDynamic viscosity of the solution [Pa s]xxx
thermal_conductivityThermal conductivity of the solution [W/(m K)]x
diffusion_coefficientSelf diffusion coefficient of the solution [m²/s]xx
solubility_temperatureCrystallization temperature at given concentration [°C]xxxx
hxDiagramPlots the enthalpy-concentration diagramxxxx
pTDiagramPlots the pressure-temperature diagramxxxx
crystallization_curvePlots (or returns) the crystallization curvexxxx

Diagrams

You can construct diagrams (pT-diagram, hx-diagram, crystallization curve) with the package. For example:

NaOH.pTDiagram()

pT-Diagram

Note: The plots can be styled with the usual matplotlib syntax. If the plot should be editable, use NaOH.pTDiagram(editablePlot=True). To reproduce the same-looking plot, set up matplotlib using:

import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'Georgia'
plt.rcParams['mathtext.fontset'] = 'custom'
plt.rcParams['mathtext.rm'] = 'Georgia'
plt.rcParams['mathtext.it'] = 'Georgia:italic'

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 4

Native requirements
4 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
numpy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
numpyruntime
scipy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
scipyruntime
matplotlib
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
matplotlibruntime
pyXSteam
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pyXSteamruntime

Distribution files

2 collected
absorptionlib-1.1.0-py3-none-any.whl

bdist_wheel · 36.98 KB · Python py3

Source file
absorptionlib-1.1.0.tar.gz

sdist · 31.54 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:38 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:d115f19c1127a166e6b1cb964b4e3859f272ea25b8612601b7a5f4614134399a

Other collected versions

View all collected versions →