enex_analysis.gas_boiler_tank¶
Gas boiler with hot-water storage tank — dynamic model.
- System chain:
Combustion Chamber → Hot Water Tank → 3-Way Mixing Valve → Service Water
The combustion model uses a constant thermal efficiency
eta_comb to relate fuel input to useful heat.
Exhaust gas losses are (1 − eta_comb) × E_NG.
- Exergy topology (4 components):
Combustion — NG chemical exergy, exhaust exergy
Tank — stored, loss, destruction
Mixing — destruction
System total — NG exergy input
Classes
|
Gas-fired boiler with storage tank. |
- class enex_analysis.gas_boiler_tank.GasBoilerTank(eta_comb=0.9, T_exh=70.0, burner_capacity=15000.0, r0=0.2, H=0.8, x_shell=0.01, x_ins=0.1, k_shell=25, k_ins=0.03, h_o=15, T_tank_w_upper_bound=65.0, T_tank_w_lower_bound=60.0, T_mix_w_out=45.0, T_sup_w=10.0, dV_mix_w_out_max=0.001, tank_always_full=True, tank_level_lower_bound=0.5, tank_level_upper_bound=1.0, dV_tank_w_in_refill=0.001, prevent_simultaneous_flow=False, on_schedule=None, stc=None, uv=None)[source]¶
Gas-fired boiler with storage tank.
Combustion chamber heats water which is stored in an insulated tank. Service water is delivered via a 3-way mixing valve.
- Parameters:
eta_comb (
float)T_exh (
float)burner_capacity (
float)r0 (
float)H (
float)x_shell (
float)x_ins (
float)k_shell (
float)k_ins (
float)h_o (
float)T_tank_w_upper_bound (
float)T_tank_w_lower_bound (
float)T_mix_w_out (
float)T_sup_w (
float)dV_mix_w_out_max (
float)tank_always_full (
bool)tank_level_lower_bound (
float)tank_level_upper_bound (
float)dV_tank_w_in_refill (
float)prevent_simultaneous_flow (
bool)on_schedule (
list[tuple[float,float]] |None)
- __init__(eta_comb=0.9, T_exh=70.0, burner_capacity=15000.0, r0=0.2, H=0.8, x_shell=0.01, x_ins=0.1, k_shell=25, k_ins=0.03, h_o=15, T_tank_w_upper_bound=65.0, T_tank_w_lower_bound=60.0, T_mix_w_out=45.0, T_sup_w=10.0, dV_mix_w_out_max=0.001, tank_always_full=True, tank_level_lower_bound=0.5, tank_level_upper_bound=1.0, dV_tank_w_in_refill=0.001, prevent_simultaneous_flow=False, on_schedule=None, stc=None, uv=None)[source]¶
- Parameters:
eta_comb (
float)T_exh (
float)burner_capacity (
float)r0 (
float)H (
float)x_shell (
float)x_ins (
float)k_shell (
float)k_ins (
float)h_o (
float)T_tank_w_upper_bound (
float)T_tank_w_lower_bound (
float)T_mix_w_out (
float)T_sup_w (
float)dV_mix_w_out_max (
float)tank_always_full (
bool)tank_level_lower_bound (
float)tank_level_upper_bound (
float)dV_tank_w_in_refill (
float)prevent_simultaneous_flow (
bool)on_schedule (
list[tuple[float,float]] |None)
- analyze_steady(T_tank_w, T0, Q_heat_target, *, return_dict=True)[source]¶
Run a steady-state performance snapshot.
- Parameters:
T_tank_w (
float)T0 (
float)Q_heat_target (
float)return_dict (
bool)
- Return type:
dict|DataFrame
- analyze_dynamic(simulation_period_sec, dt_s, T_tank_w_init_C, dhw_usage_schedule, T0_schedule, tank_level_init=1.0, result_save_csv_path=None)[source]¶
Run a time-stepping dynamic simulation.
- Parameters:
simulation_period_sec (int) – Total simulation duration [s].
dt_s (int) – Time step size [s].
T_tank_w_init_C (float) – Initial tank temperature [°C].
dhw_usage_schedule (array-like) – DHW usage schedule.
T0_schedule (array-like) – Outdoor temperature per step [°C].
tank_level_init (float) – Initial fractional tank level (0–1).
result_save_csv_path (str | None) – Optional CSV output path.
- Returns:
Per-timestep result DataFrame.
- Return type:
pd.DataFrame
- postprocess_exergy(df)[source]¶
Compute gas-boiler exergy variables.
Exergy topology (4 components):
NG chemical exergy, exhaust exergy
Water exergy (tank inlet/outlet, mixing valve)
Heat loss exergy, tank stored exergy
Component-level exergy destruction
Exergetic efficiency metrics
- Parameters:
df (pd.DataFrame) – Result DataFrame from
analyze_dynamic().- Returns:
DataFrame with exergy columns appended.
- Return type:
pd.DataFrame