Tank - Spliter¶
Model description¶
The component models a tank that splits a single incoming fluid stream into multiple outgoing streams based on specified outlet flow rate proportions. The splitter ensures that the temperature, pressure, and specific enthalpy of the outgoing streams are equal to those of the incoming stream.
Class description¶
- class component.tank.tank_spliter.TankSpliter(geom=None, outlet_repartition=None)[source]¶
Component: Spliter
Model: Mass Flow Splitting Model
Description:
The Spliter component divides an incoming mass flow into multiple outlet streams based on specified mass flow fractions. It assumes no change in fluid properties (pressure, temperature, enthalpy) across the splitter. The model is useful for distributing mass flows in a system model where the thermodynamic state remains unchanged.
Assumptions:
Steady-state operation.
No heat or work interactions (adiabatic, no shaft work).
Ideal splitting with no pressure or temperature drops.
The sum of the outlet flow fractions must equal 1 (within a small numerical tolerance).
Connectors:
su (MassConnector): Mass connector for the inlet supply stream. ex_1, ex_2, …, ex_n (MassConnector): Mass connectors for each outlet stream, created based on the number of elements in outlet_repartition.
Parameters:
outlet_repartition (list of float): Fractions of the total inlet mass flow allocated to each outlet. Must sum to 1 within a small tolerance.
Inputs:
fluid (str): Inlet fluid. T_su (float): Inlet temperature [K]. h_su (float): Inlet specific enthalpy [J/kg]. P_su (float): Inlet pressure [Pa]. m_dot (float): Inlet mass flow rate [kg/s].
Outputs:
- For each outlet connector (ex_1, ex_2, …, ex_n):
fluid: Same as inlet fluid.
P: Same as inlet pressure [Pa].
h: Same as inlet enthalpy [J/kg].
m_dot: Mass flow rate for the outlet, computed as su_m_dot * outlet_repartition[i] [kg/s].
Example of use¶
# -*- coding: utf-8 -*-
"""
Created on Fri May 10 14:42:00 2024
@author: Basile
"""
from labothappy.component.tank.tank_spliter import TankSpliter
# 1) Data ------------------------------------------------------------------------------------------
# Create splitter with specified outlet repartition
spliter = TankSpliter(outlet_repartition=[0.3, 0.4, 0.3])
# Set inputs
spliter.set_inputs(
T_su=10 + 273.15, # Temperature in Kelvin
m_dot=13.8, # Mass flow rate in kg/s
P_su=0.8 * 1e5, # Pressure in Pa
fluid="Cyclopentane" # Working fluid
)
# Solve
spliter.solve()
# You can also print results to verify
for i in range(len(spliter.outlet_repartition)):
outlet = getattr(spliter, f"ex_{i+1}")
print(f"Outlet {i+1}: m_dot = {outlet.m_dot} kg/s, p = {outlet.p} Pa, h = {outlet.h} J/kg")
# Plot States
fig = spliter.plot_thermo_states()
fig.show()
References¶
/