Skip to content

Hydrogen Compressor (H2Compressor)

Class: H2Compressor | Module: energysim.models.hydrogen | Validation benchmarks | Units

Overview

Multi-stage hydrogen compressor with intercooling.

n_stages stages (default 3) share the overall pressure ratio equally, r = (p_discharge / p_suction)^(1/n_stages). Each stage draws gas at temperature t_in_c (first stage) or t_intercool_c (after intercooling) and needs the isentropic work (ideal gas, constant gamma = 1.41, no compressibility correction)

w_stage = gamma/(gamma-1) * R_H2 * T_in * (r^((gamma-1)/gamma) - 1) / eta_isen.

P_elec_kW is the total shaft/electric work (no mechanical/motor losses beyond isentropic_efficiency). Q_intercool_kW is the heat removed in the n_stages - 1 intercoolers (cooling gas from the stage outlet temperature to t_intercool_c); the after-cooler is not counted. Stateless: dt has no effect.

Parameters

Parameter Type Default Unit Description
name str 'H2Compressor' - Unique component name identifier
max_flow_kg_hr float 500.0 kg/h -
p_suction_bar float 30.0 bar -
p_discharge_bar float 350.0 bar -
isentropic_efficiency float 0.7 - -
n_stages int 3 - -
t_in_c float 20.0 degC -
t_intercool_c float 30.0 degC -
step_size float 1.0 s -

Inputs

Variable Unit Description
m_dot_in_kg_hr kg/h Inlet mass flow rate of hydrogen to compress

Outputs

Variable Unit Description
P_elec_kW kW -
m_dot_out_kg_hr kg/h High-pressure delivery flow rate
Q_intercool_kW kW -

Validity and notes

Validity: ideal-gas hydrogen (gamma = 1.41, no compressibility correction), equal stage pressure ratios, steady-state flow up to max_flow_kg_hr; no start-up or surge behaviour.

Usage example

from energysim import world
from energysim.models import H2Compressor

sim = world(start_time=0, stop_time=3600, t_macro=900)
sim.add_model('h2compressor', model=H2Compressor(), outputs=['P_elec_kW', 'm_dot_out_kg_hr', 'Q_intercool_kW'], step_size=60)
res = sim.simulate()
print(res['h2compressor'].tail(2))