Skip to content

mmsg-warwick/composite-LTES

Repository files navigation

Composite LTES models

DOI

This repository contains the models for composite latent energy storage (LTES) from the article:

E.K. Luckins, F. Brosa Planella, Homogenized models for composite phase-change materials, Proceedings of the Royal Society A 481 (2025) 20250660.

To reproduce the results from the article, run the examples in the scripts directory:

  • comsol_model.mph is the COMSOL model to implement the full model. Requires COMSOL v6.2 to run. Exporting the results defined in the model produces the cell_data_sharp.csv and cell_data_mush.csv files.
  • process_COMSOL_data.py processes the exported data from COMSOL and saves it in the data directory in the relevant format.
  • plot_COMSOL_data.py and compare_temperature_profiles.pyplots the processed data from COMSOL against the reduced models in PyBaMM, producing the figures in the article (saved in the figures directory).
  • compute_melting_times.py runs the reduced models at different values of kappa and computes the melting times. They are saved as csv in the data directory.
  • plot_melting_times.py plots the melting times against kappa using the data computed by the previous script, producing the figures in the article (saved in the figures directory).

🚀 Installing the package

The package is not yet available on PyPI so it needs to be installed from the source code. These instructions assume that you have a compatible Python version installed (between 3.9 and 3.12).

Linux and macOS

First clone the repository, either from the command line or using a Git client:

git clone git@github.com:mmsg-warwick/composite-LTES.git

If you do not have nox installed, install it with

python3 -m pip install nox

Then, navigate to the repository you just cloned and run

nox -s dev

This will create a virtual environment called venv in your current directory and install the package in editable mode with all the development dependencies. To activate the virtual environment, run

source env/bin/activate

You can now run the examples in the examples directory.

If needed, you can deactivate your virtual environment with

deactivate

Windows

First clone the repository, either from the command line or using a Git client:

git clone git@github.com:mmsg-warwick/composite-LTES.git

If you do not have nox installed, install it with

python3 -m pip install nox

Then, navigate to the repository you just cloned and run

nox -s dev

This will create a virtual environment called venv in your current directory and install the package in editable mode with all the development dependencies. To activate the virtual environment, run

venv\Scripts\activate.bat

if you are using Command Prompt, or

venv\Scripts\Activate.ps1

if you are using PowerShell.

You can now run the examples in the examples directory.

If needed, you can deactivate your virtual environment with

deactivate

About

A project to simulate composite latent thermal energy storage systems.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages