Thermal Energy Storage - Nouman090/ThermoSim GitHub Wiki
The TES component models a thermal energy storage system using phase-change material (PCM).
Syntax
TES(Model, ID, PPT, Charge, T_melt,
Hot_In_state, Hot_Out_state,
Cold_In_state, Cold_Out_state,
Charging_time, Discharging_time,
per_loss, Capacity=None, Calculate=False)
| Parameter | Type | Description |
|---|---|---|
Charge |
str | 'Charging' or 'Discharging' |
T_melt |
float | PCM melting temperature [K] |
Charging_time |
float | Duration of charging [hours] |
Discharging_time |
float | Duration of discharging [hours] |
per_loss |
float | Fractional loss (0–1) |
Capacity |
float/None | Storage capacity [J] |
Charging Example
from ThermoSim import ThermodynamicModel
from ThermoSim.heat_exchangers import TES
Model = ThermodynamicModel()
Model.set_dead_state()
Model.add_point('Therminol66', 'h_in', P=1e5, T=573.15, Mass_flowrate=5)
Model.add_point('Therminol66', 'h_out', P=1e5)
TES(Model, 'PCM_Store', PPT=5, Charge='Charging',
T_melt=500,
Hot_In_state='h_in', Hot_Out_state='h_out',
Cold_In_state=None, Cold_Out_state=None,
Charging_time=8, Discharging_time=4,
per_loss=0.05, Calculate=True)
Discharging Example
Model.add_point('water', 'c_in', P=1e6, T=350, Mass_flowrate=2)
Model.add_point('water', 'c_out', P=1e6)
TES(Model, 'PCM_Discharge', PPT=5, Charge='Discharging',
T_melt=500,
Hot_In_state=None, Hot_Out_state=None,
Cold_In_state='c_in', Cold_Out_state='c_out',
Charging_time=8, Discharging_time=4,
per_loss=0.05, Capacity=stored_capacity,
Calculate=True)