Skip to main content

EESLib

EESLib is a Python library for heat transfer and thermodynamics calculations, derived from Engineering Equation Solver (EES) functions. It is designed for educational use in the ME564 Heat Transfer course at the University of Wisconsin-Madison.

Features

EESLib provides implementations for various engineering calculations including:

Fluid Properties

  • Thermodynamic properties (enthalpy, entropy, density, etc.) using CoolProp
  • Functions for common fluids with temperature, pressure, and quality inputs
  • NOTE: The CoolProp fluid property implementation approach differs from the fluid properties in EES! Do not expect perfect correspondence between properties obtained using either method. CoolProp is generally less robust and slower than the native EES implementation.

Heat Transfer Functions

  • Internal Flow: Nusselt number and friction factor calculations for pipe and duct flow (laminar, turbulent, transitional)
  • External Flow: Heat transfer and friction for flow over plates, cylinders, and other geometries
  • Boiling and Condensation: Heat transfer correlations for boiling and condensing fluid with various geometries
  • Heat Exchangers: NTU and LMTD calculations for various flow configurations
  • Fin Efficiency: Efficiency calculations for fins with various profiles and tip boundary conditions
  • Radiation: Blackbody radiation, view factors, and radiative heat transfer functions. Note that a catalog of view factors with number ID assignments is provided in a PDF distributed in the source code folder.

Utilities

  • Unit conversions
  • Lookup tables for various properties
  • Talbot inversion for Laplace transforms
  • Result printing and PDF generation utilities

Installation

Prerequisites

  • Python 3.14 or higher
  • Packages listed in requirements.txt

Install from PyPi

Quick Setup

Open a command window with the same privileges used to install Python.

conda activate me564 
pip install eeslib

Full Setup

  1. Download miniconda executable from (https://www.anaconda.com/download/success#miniconda)
  2. Run installer:
    • Choose "Just for me" option
    • Check 'yes' for Add Miniconda3 to PATH, and 'yes' for registering as the default Python
  3. Download code resources from Canvas: Files/Lectures/examples_<version#>.zip. This folder contains a number of examples that we’ll use in both lecture and homework codes.
  4. Create the me564 environment in conda. In the command window, type:
    conda create -n me564 python=3.14
    
  5. Open command window (shell). Navigate your command window to the folder you downloaded. For example, type:
    cd C:/path/to/my/folder/examples
    
  6. Activate your conda environment. In the command window, type:
    conda activate me564
    
  7. Install the EESLib package from PyPi
    pip install eeslib
    
  8. Automatic PDF reports are created from EESLib using LaTeX. This requires two tools to be installed on your computer that generate the reports.

Install from source

Use this option if you are going to make local changes to the EESLib package source code.

git clone https://github.com/uw-esolab/eeslib.git
cd eeslib
pip install -e .

Usage

Import the library modules as needed:

from eeslib import fluid_properties as fp
from eeslib import internal_flow as iflow
from eeslib import functions as fn

# Get water properties at 100°C and 1 atm
rho = fp.density('Water', T=373.15, P=101325)
print(f"Density: {rho} kg/m³")

# Calculate Nusselt number for pipe flow
Nu, f = iflow.pipeflow_nd(Re=10000, Pr=7, LoverD=50, relRough=0.001)
print(f"Nusselt number: {Nu}, Friction factor: {f}")

# Convert units
temp_c = fn.converttemp('F', 'C', 212)
print(f"212°F = {temp_c}°C")

Modules

Module Description
boiling.py Boiling and condensing correlations
fluid_properties.py Thermodynamic property calculations
internal_flow.py Heat transfer in pipes and ducts
external_flow.py External convection heat transfer
heat_exchangers.py Heat exchanger analysis
fin_efficiency.py Extended surface heat transfer
radiation.py Radiative heat transfer and view factors
functions.py Utility functions, unit conversions
lookup_data.py Interpolation and lookup tables
talbot_inversion.py Numerical Laplace transform inversion

License

Portions of this code are derived from Engineering Equation Solver (EES) under license restrictions and is intended for educational use at the University of Wisconsin-Madison.

Contributing

This library is maintained for educational purposes. Please contact the instructor for contributions or modifications.

Testing

EESLib includes a comprehensive test suite to ensure functionality and catch regressions.

Running Tests

Install test dependencies:

pip install -e ".[dev]"

Run all tests:

python run_tests.py

Run specific test file:

python run_tests.py tests/test_fluid_properties.py

Run with coverage:

pip install pytest-cov
python -m pytest --cov=eeslib --cov-report=html

Uploading a new version to Pypi

To upload a new version of EESLib to Pypi, follow the steps outlined in the Python packaging tutorial.

The preferred packaging tool is setuptools.

The most relevant steps are as follows:

  1. Don't forget to update the code version number in pyproject.toml and in the src/__init__.py file.

  2. Open a command window and navigate to the eesdir directory, such as

    cd C:\repositories\eeslib
    
  3. Ensure the build and packaging tools are installed in the Conda environment that you're using. The preferred method will install a developer tools, including build, pytest, and twine, specified in the pyproject.toml file in the eeslib directory:

    pip install .[dev]
    

    Alternatively, you can manually install packages:

    python -m pip install --upgrade build 
    python -m pip install --upgrade twine
    
  4. Build the Python distributable

    python -m build
    

    This should create a folder dist/ that contains a wheel (.whl) and tar.gz file.

  5. Upload the file to Pypi. You will need to have first created a username and API token, following the packing tutorial instructions. If uploading to the production server, use the command:

    twine upload dist/*
    

    If using the test server, use the command:

    python -m twine upload --repository testpypi dist/*
    
  6. To install the package, activate the Conda environment (e.g., conda activate me564), and install. If running from the production environment use:

    pip install eeslib
    

    If you have previous versions of eeslib already installed, force use of the most recent version using:

    pip install --force-reinstall --upgrade eeslib
    

Generate Sphinx documentation

After installing the dev prerequisites using pip, you can generate the documentation using the following steps:

  1. Navigate to the docs/ directory in bash.

  2. Generate the documentation stubs for the modules:

    sphinx-apidoc -o source ../src/eeslib/
    
  3. Build the HTML

    make html
    
  4. Open the documentation in a browser. The main index file is: docs/build/html/index.html

References

  • Engineering Equation Solver (EES)
  • CoolProp library for fluid properties
  • Heat Transfer by Nellis & Klein, 2007

Metadata

Release files for eeslib 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eeslib 0.0.5
File Size Uploaded Provenance
eeslib-0.0.5.tar.gz 122.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for eeslib 0.0.5
File Interpreter ABI Platform
eeslib-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 226.7 kB

Release files / eeslib-0.0.5.tar.gz

Download URL eeslib-0.0.5.tar.gz
Size 122.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b8cdafd31df395928658ec13140cac64d7d8c6ce3088be837edd3ddcc6bb854b
BLAKE2b-256 checksum
How to use checksums
a73d0fd52b592c162c183ecdd94da7c76315e755ab3db94be37d7de513a7cbba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / eeslib-0.0.5-py3-none-any.whl

Download URL eeslib-0.0.5-py3-none-any.whl
Size 104.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b803b034be4382aff6a163e78a02c44e14ba670e67ccbe8d2ceba5e2f3dfaab4
BLAKE2b-256 checksum
How to use checksums
844564ad22a33f27bfa457311557d32d65fe30ba2b8f19d7a650beec2bbf7ee6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for eeslib 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page