Interactive thermodynamics
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
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