MATLAB Framework for Thermodynamic Modelling, Optimisation, Sizing, and Economic Assessment of Maritime Waste Heat Recovery Systems

Published: 18 August 2026| Version 1 | DOI: 10.17632/jwkkyvkd4n.1
Contributor:

Description

Overview: This repository contains the complete MATLAB codebase developed for the design and comparison of shipboard waste heat recovery cycles. The software models idealised transcritical CO2 cycles: simple, recuperated, reheated recuperated, recompressed recuperated and cascade recuperated (CR); as well as six shipboard cycle architectures: simple, CR, split recuperated, split reheated recuperated, dual pressure (DP) and DP CR; across six different working fluids: CO2, steam, toluene, cyclohexane, cyclopentane and pentane. Cycles recover heat from marine engine exhaust gas and jacket water streams. It performs steady-state thermodynamic analysis, gradient free optimisation, component sizing (heat exchangers and turbomachinery), and costing to evaluate net power output, thermal efficiency, heat recovery efficiency, footprint, capital cost, fuel savings and payback periods across representative marine operating zones. Modelling Approach: The code was created to be modular, with separate functions for each cycle component (condenser, pump/compressor, recuperator, heater, mixer and turbine) that allow simple construction and modification of cycle architectures. These component functions were also made to generate the T-s and P-h diagram representations. Heat exchanger modelling follows a minimum pinch point approach, and sizing is done with an LMTD / enthalpy based effectiveness-NTU approach, phase-change segmentation and Gnielinski convective coefficients. Turbomachinery sizing is achieved with specific speed and specific diameter correlations. Power-law equipment costing correlations were used from Turton, Weiland and Shamoushaki for shell-and-tube heat exchangers, recuperators, supercritical radial turbines, axial turbines, pumps, generators and gearboxes. Costs are escalated to 2026 using CEPCI. Optimisation uses a genetic algorithm to find the optimal basin, followed by refinement with a general pattern search, over each cycle's decision variables. Each constructed cycle has associated optimisation algorithms and enforced feasibility constraints (turbine superheat enforcement, wet expansion correction factors, acid dew point and minimum jacket water return temperatures). A series of post-processing tools span zone-weighted annual performance to figure plotting. Working-fluid properties are calculated using CoolProp via a Python interface in MATLAB. Structure: componentFunctions/ - modular component models cycleFunctions/ - cycle models sizingFunctions/ - heat exchanger and turbomachinery sizing costingFunctions/ - equipment cost correlations optimisationScripts/ - GA and GPS postProcessing/ - plotting and calculations Dependencies: MATLAB R2021b or later MATLAB global optimization toolbox MATLAB parallel computing toolbox Python v3.9 with CoolProp installed Contact: lewis.g.briggs@icloud.com Related Publication: Comparative Assessment of Transcritical CO2, Steam, and Organic Rankine Cycles for Maritime Waste Heat Recovery

Files

Steps to reproduce

1) Install dependencies Ensure the following are installed before running the software: MATLAB R2021b or later, with the Global Optimization Toolbox and Parallel Computing Toolbox Python v3.9, with CoolProp installed 2) Configure CoolProp Open startup.m and edit the pythonExe variable to point at the Python executable on your machine that has CoolProp installed. Save the file, then run startup.m. The script adds all repository folders to the MATLAB path, verifies the CoolProp installation, generates the CoolProp.m property wrapper, and performs a check. Startup only needs to be run once per MATLAB session. 3) Construct / run a cycle Cycles are constructed by combining the modular component models in componentFunctions/ (condenser, pump/compressor, recuperator, heater, mixer, turbine), as demonstrated in the ready-made cycle models in cycleFunctions/. Each cycle function takes the cycle boundary conditions and decision variables as inputs and returns the full steady-state thermodynamic solution, including state points for T-s and P-h diagrams. Additional cycles to those provided can be created. 4) Optimise The scripts in optimisationScripts/ provide ready-to-run optimisation routines for the various cycle architectures. These include the sensitivity studies presented in the associated publication, as well as scripts optimising net power output across different climatic operating zones and engine load profiles. Each script applies a genetic algorithm followed by a general pattern search refinement, subject to the enforced feasibility constraints. File names for the saved optimisation results can be adapted by the user within each script. 5) Post-process and plot results Once a cycle has been optimised, the tools in postProcessing/ can be used to load the saved results and reproduce the figures and derived metrics reported in the publication, including zone-weighted annual performance, fuel savings, payback periods, and cycle diagrams. Output file names and figure settings can be adjusted by the user as needed.

Categories

Energy Engineering, Software, Thermodynamics, Carbon Dioxide, Heat Exchanger, Waste Heat Recovery System, Maritime Transportation, Turbomachinery, Supercritical Technology, Steam Cycle, Organic Rankine Cycle

Licence