Learning from a model, one slider at a time

Even models that are conceptually simple, but are controlled by multiple parameters, can be challenging to interpret and learn from. One way to address this is to visualise the model dynamically so that changes to the governing parameters are immediately reflected in the visual representation of the model. The humble range slider allows the user to adjust one parameter while keeping the others fixed. A grid of sliders shows the state of all relevant parameters and enables the model to be explored, one slider at a time.

Pumped thermal energy storage (PTES)

PTES is a concept for storing excess electrical energy for use at a later time. PTES stores energy as heat, either in a solid or liquid medium, and is suitable for storing energy for multiple days. During charge, the device operates as a heat pump: electrical work is supplied to the system, raising the temperature of the hot store and reducing the temperature of the cold store. During discharge, the device becomes a heat engine (the hot store temperature decreases, the cold store temperature increases, and electrical work is output). More information is available on the thermodynamics of PTES, PTES using liquid thermal storage, and on other thermomechanical energy storage systems.

Interactive model

−600−400−20002004006008001,000Entropy (J/kgK)1002003004005006007008009001,000Temperature (K)−600−400−20002004006008001,000Entropy (J/kgK)1002003004005006007008009001,000Temperature (K)
RTE:0.70
Charge pRat:2.57
Discharge pRat:3.20
Heat pump COP:1.47
Heat engine eff:0.48
Work ratio:3.12
Heat to work ratio:6.00
Discharge turbine power (MW):2.10
Discharge compressor power (MW):1.10
Discharge mass flow (kg/s):10.43
Charge compressor inlet vol flow (m3/s):16.93
Hot store tank volume (m3):0.00
Hot store tank diameter (m):0.00
Hot Store Fluid
Cold Store Fluid
Hot Store Max (K)773
Hot Store Min (K)573
Cold Store Max (K)273
Turbo eta poly0.9
Low pressure (Pa)101325
Discharge power (MW)1
Discharge duration (h)5
Same pressure ratio

This chart is an interactive thermodynamic cycle diagram (temperature vs entropy) of the working fluid (air) for both the charge and discharge cycles. Various output metrics are shown to the right of the diagram. Both the cycle diagram and the output metrics respond to changes in the input parameters at the bottom of the chart. In this simple model, the heat exchanges are considered to be perfect but the compression and expansion processes are irreversible (controlled by the polytropic efficiency slider).

Implementation

I have used d3 to render the cycle diagram (svg elements) and to add the inputs and outputs. The cycle diagram is deleted (all elements removed from the DOM) and redrawn each time an input is changed. The thermodynamic analysis itself is also coded in JavaScript