Equipment
Vessels
Vessel volume (Ellipsoidal head)
- indsl.equipment.filled_volume_ellipsoidal_head_vessel(D: Series | float, L: Series | float, a: Series | float, h: Series | float, orientation: Literal['Horizontal', 'Vertical'] = 'Horizontal') Series | float
Vessel volume (Ellipsoidal).
Calculates partially full volume of a vertical or horizontal vessel with ellipsoidal convex heads. For vertical vessels the bottom is considered as ellipsoidal, but no provision for the top of the vessel is made here.
For 2:1 Elliptical Head, \(a = D/4\).
- Parameters:
D – Internal diameter [m]. Diameter of the main cylindrical section.
L – Straight length [m]. Length of the main cylindrical section.
a – Inside dish depth (a) [m]. Distance the ellipsoidal head extends on one side
h – Fluid level [m]. Height, as measured from the lowest point of the vessel to the fluid surface.
orientation – Vessel orientation.
- Returns:
- Volume [m³]
Volume of liquid in the vessel.
- Return type:
Union[pd.Series, float]
References
Caleb Bell (2016-2021). fluids: Fluid dynamics component of Chemical Engineering Design Library (ChEDL) https://github.com/CalebBell/fluids.
Vessel volume (Spherical head)
- indsl.equipment.filled_volume_spherical_head_vessel(D: Series | float, L: Series | float, a: Series | float, h: Series | float, orientation: Literal['Horizontal', 'Vertical'] = 'Horizontal') Series | float
Vessel volume (Spherical).
Calculates partially full volume of a vertical or horizontal vessel with spherical convex heads. For vertical vessels the bottom is considered as spherical, but no provision for the top of the vessel is made here.
For Hemispherical Head, \(a = D/2\).
- Parameters:
D – Internal diameter [m]. Diameter of the main cylindrical section.
L – Straight length [m]. Length of the main cylindrical section.
a – Inside dish depth (a) [m]. Distance the spherical head extends on one side
h – Fluid level [m]. Height, as measured up to where the fluid ends.
orientation – Vessel orientation.
- Returns:
- Volume [m³]
Volume of liquid in the vessel.
- Return type:
Union[pd.Series, float]
References
Caleb Bell (2016-2021). fluids: Fluid dynamics component of Chemical Engineering Design Library (ChEDL) https://github.com/CalebBell/fluids.
Vessel volume (Torispherical head)
- indsl.equipment.filled_volume_torispherical_head_vessel(D: Series | float, L: Series | float, f: Series | float, k: Series | float, h: Series | float, orientation: Literal['Horizontal', 'Vertical'] = 'Horizontal') Series | float
Vessel volume (Torispherical).
Calculates partially full volume of a vertical or horizontal vessel with torispherical convex heads. For vertical vessels the bottom is considered as torispherical, but no provision for the top of the vessel is made here.
For torispherical vessel heads, the following f and k parameters are used in standards. The default is ASME F&D. - 2:1 semi-elliptical: f = 0.9, k = 0.17 - ASME F&D: f = 1, k = 0.06 - ASME 80/6: f = 0.8, k = 0.06 - ASME 80/10 F&D: f = 0.8, k = 0.1 - DIN 28011: f = 1, k = 0.1 - DIN 28013: f = 0.8, k = 0.154
- Parameters:
D – Internal diameter [m]. Diameter of the main cylindrical section.
L – Straight length [m]. Length of the main cylindrical section.
f – Dish-radius parameter (f) [-].
k – Knuckle-radius parameter (k) [-].
h – Fluid level [m]. Height, as measured up to where the fluid ends.
orientation – Vessel orientation.
- Returns:
- Volume [m³]
Volume of liquid in the vessel.
- Return type:
Union[pd.Series, float]
References
Caleb Bell (2016-2021). fluids: Fluid dynamics component of Chemical Engineering Design Library (ChEDL) https://github.com/CalebBell/fluids.
Pumps
Total head
- indsl.equipment.total_head(discharge_pressure: Series | float, suction_pressure: Series | float, den: Series | float, align_timesteps: bool = False) Series
Total head.
Head is a measure of the potential of a liquid to reach a certain height. The head is essentially a unit of pressure. The total head is the difference in pressure of the discharge to the suction of the pump.he formula for total head \(h\) [m] given inputs discharge pressure \(P_{discharge}\) [Pa], suction pressure \(P_{suction}\) [Pa] and liquid density \(\rho_L\:[\frac{kg}{m^3}]\).
\[h = \frac{P_{discharge} - P_{suction}}{9.81\rho_L}\]- Parameters:
discharge_pressure – Discharge pressure [Pa]. Discharge pressure of a centrifugal pump.
suction_pressure – Suction pressure [Pa]. Suction pressure of a centrifugal pump.
den – Density of the fluid [\(\mathrm{\frac{kg}{m^3}}\)].
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
- Total head [m]
Difference in total discharge head and the total suction head.
- Return type:
pandas.Series
Best Efficiency Point (BEP) from flowrate
- indsl.equipment.percent_BEP_flowrate(pump_liquid_flowrate: Series | float, BEP_flowrate: Series | float, align_timesteps: bool = False) Series
BEP from flowrate [%].
Centrifugal pumps operate optimally at a specific liquid flow rate which is typically called the Best Efficiency Point (BEP). This function calculates the flow rate relative to BEP as a percentage. i.e. 100% means the current flow rate is at the BEP, 110% means the current flow rate is 10% above BEP. The formula for this equation is:
\[BEP\:from\:flow rate\:[\%]=\frac{Pump\:liquid\:flow rate} {BEP}*100\]- Parameters:
pump_liquid_flowrate – Pump liquid flow rate [\(\mathrm{\frac{m^3}{s}}\)]. The current flow rate of the pump.
BEP_flowrate – Best efficiency point [-]. The best efficiency flow rate point of the pump.
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
- BEP to current flowrate [%].
Percentage of current flow rate to BEP
- Return type:
pandas.Series
Hydraulic power
- indsl.equipment.pump_hydraulic_power(pump_liquid_flowrate: Series | float, total_head: Series | float, den: Series | float, align_timesteps: bool = False) Series
Pump hydraulic power.
Pump hydraulic power [W] is the amount of energy per unit time delivered to the liquid. Pump hydraulic power can be calculated if the pump liquid flow rate \(Q_L\:[\frac{m^3}{s}]\), total head across the pump \(h\) [m], and density of the fluid \(\rho_L\:[\frac{kg}{m^3}]\).
\[Pump\:hydraulic\:power=9.81Q_L\rho_Lh\]- Parameters:
pump_liquid_flowrate – Pump liquid flow rate [\(\mathrm{\frac{m^3}{s}}\)]. The current flow rate of the pump.
total_head – Total head across pump [m]. Difference in pressure between discharge and suction of pump.
den – Density of the fluid [\(\mathrm{\frac{kg}{m^3}}\)].
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
- Pump hydraulic power [W].
Pump hydraulic power of pump.
- Return type:
pandas.Series
Shaft power
- indsl.equipment.pump_shaft_power(pump_hydraulic_power: Series | float, pump_liquid_flowrate: Series | float, eff_parameter_1: Series | float, eff_parameter_2: Series | float, eff_intercept: Series | float, align_timesteps: bool = False) Series
Pump shaft power.
Pump shaft power is the input power delivered by the shaft. Pump shaft power can be calculated by dividing the pump hydraulic hp by the pump efficiency. Pump efficiency is a function of liquid flow rate \(\eta(Q_L)\). The pump efficiency curve as a function of liquid flow rate is assumed to be a 2nd order polynomial. Therefore the input parameters of the curve are coefficients to \(x^2\) and \(x\) and the \(y\) intercept of the curve.
\[Pump\:shaft\:power=\frac{Pump\:hydraulic\:power}{\eta(Q_L)}\]- Parameters:
pump_hydraulic_power – Pump hydraulic power [W].
pump_liquid_flowrate – Pump liquid flowrate [\(\mathrm{\frac{m^3}{h}}\)]. The current flow rate of the pump.
eff_parameter_1 – \(x^2\) coefficient [-]. Coefficient of \(x^2\).
eff_parameter_2 – \(x\) coefficient [-]. Coefficient of \(x\).
eff_intercept – \(y\)-intercept [-]. Coefficient of \(y\)-intercept of curve
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
- Pump shaft power [W]
Pump shaft power of pump.
- Return type:
pandas.Series
Recycle valve power loss
- indsl.equipment.recycle_valve_power_loss(Q_valve: Series | float, total_head: Series | float, den: Series | float, align_timestamps: bool = False) Series
Pump recycle valve power loss.
This calculation can be used where there is a recirculation line with a recycle valve whose purpose is to maintain a minimum flow through the pump. The calculation does not consider the difference in pump efficiency at different flow rates. This is acceptable because pumps are usually sized to account for extra flow due to recirculation.
\[Power\:loss=9.81Q_{valve}\rho_Lh\]- Parameters:
Q_valve – Valve flow rate [\(\mathrm{\frac{m^3}{h}}\)]. Flow rate through the recycle valve.
total_head – Pump total head [m].
den – Density of the fluid [\(\mathrm{\frac{kg}{m^3}}\)].
align_timestamps – Auto-align. Automatically align time stamp of input time series. Defaults to False.
- Returns:
- Power loss [W].
Power loss by recirculation though the pump.
- Return type:
pd.Series
Valves
Volumetric flow through valve
- indsl.equipment.valve_parameters.flow_through_valve(inlet_P: Series | float, outlet_P: Series | float, valve_opening: Series | float, SG: Series | float, min_opening: float, max_opening: float, min_Cv: float, max_Cv: float, compressible: bool = False, type: Literal['Linear', 'EQ'] = 'Linear', gas_expansion_factor: float | None = None, inlet_T: Series | float | None = None, Z: Series | float | None = None, align_timestamps: bool = False) Series
Valve volumetric flow rate.
This calculation can be used when there is no flow meter, but the pressure difference over the valve is known. The calculated flow rate is only applicable to Newtonian fluids in single-phase flow. The availible valve characteristics are
Linear: \(C_{\text v} = ax + b\).
Equal percentage: \(C_{\text v} = ae^x + b\).
The formula for the flow rate for an incompressible fluid is
\[Q = NC_{\text v} \sqrt{\frac{P_{\text{in}} - P_{\text{out}}}{SG}},\]where \(N = 0.865 \frac{\text h}{\text{gpm m}^3\text{bar}^{0.5}}\). For a compressible fluid the equation is [1]
\[Q = NC_{\text v} P_{\text{in}} Y \sqrt{\frac{x}{SG T_{\text{in}} Z}},\]where \(N = 417 \frac{\text{h K}^{0.5}}{\text{gpm m}^3\text{bar}}\) and \(x = \Delta P/P_{\text{in}}\) is the pressure drop ratio.
- Parameters:
inlet_P – Absolute pressure at inlet [bar].
outlet_P – Absolute pressure at outlet [bar].
valve_opening – Valve opening [-]. Note that this is the proportional and not percentage valve opening.
SG – Specific gravity of fluid [-].
min_opening – Min opening [-]. Valve opening at minimum flow.
max_opening – Max opening [-]. Valve opening at maximum flow.
min_Cv – Min \(C_v\) [gpm]. Valve \(C_{\text v}\) at minimum flow. Note that the flow coefficient should be expressed in imperial units.
max_Cv – Max \(C_v\) [gpm]. Valve \(C_{\text v}\) at maximum flow. Note that the flow coefficient should be expressed in imperial units.
compressible – If the fluid is compressible. The equation for an incompressible fluid is simpler and needs fewer inputs. Defaults to false.
type – Valve characteristic. Valve characteristic, either “Linear” or “EQ” (equal percentage). Default is “Linear”.
gas_expansion_factor – Gas expansion factor [-]. It can be calculated as \(Y = 1-\frac{x}{3F_\gamma x_{\text T}}\), where \(F_\gamma = \gamma/1.40\) is the specific heat ratio factor and \(\gamma\) is ratio of specfific heat capacities for the fluid. \(x_{\text T}\) is the terminal pressure drop ratio factor.
inlet_T – Temperature at inlet [K].
Z – Compressibility factor [-]. Calculated at valve inlet. By definition it is \(\frac{PV}{nRT}\).
align_timestamps – Auto-align. Automatically align time stamp of input time series. Default is false.
- Raises:
ValueError – If the valve characteristic is not recognized.
- Returns:
Valve flow rate [m³/h].
- Return type:
pd.Series
Reference list
Examples: