Fluid Dynamics
Dimensionless Numbers
Reynolds Number
- indsl.fluid_dynamics.Re(velocity: Series | float, density: Series | float, d_viscosity: Series | float, length_scale: Series | float, align_timesteps: bool = False) Series
Reynolds Number.
The Reynolds number is the ratio of inertial forces to viscous forces within a fluid subjected to relative internal movement due to different fluid velocities.
Re = velocity * density * length_scale / d_viscosity
- Parameters:
velocity – Fluid velocity [m/s].
density – Density [kg/m3]. Density of the fluid.
d_viscosity – Dynamic viscosity [kg/ms]. Dynamic viscosity of the fluid.
length_scale – Characteristic length [m]. Characteristic linear dimension. A characteristic length is an important dimension that defines the scale of a physical system. Often, the characteristic length is the volume of a system divided by its surface.
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Reynolds number [-]
- Return type:
pandas.Series
Weber Number
- indsl.fluid_dynamics.We(velocity: Series | float, density: Series | float, surface_tension: Series | float, length_scale: Series | float, align_timesteps: bool = False) Series
Weber Number.
The Weber number describes the ratio between deforming inertial forces and stabilizing cohesive forces for liquids flowing through a fluid medium. For example, the Weber number characterizes the atomizing quality of a spray and the resulting droplet size when producing emulsions.
\(We = \frac{\rho u^2 L}{\sigma}\)
\(\rho\): Fluid density [\(\mathrm{\frac{kg}{m^3}}\)]
\(u\): Fluid velocity [\(\mathrm{\frac{m}{s}}\)]
\(L\): Lenght scale [\(\mathrm{m}\)]
\(\sigma\): Surface tension [\(\mathrm{\frac{N}{m}}\)]
- Parameters:
velocity – Flow speed [\(\mathrm{\frac{m}{s}}\)].
density – Density [\(\mathrm{\frac{kg}{m^3}}\)]. Density of the fluid.
surface_tension – Surface tension [\(\mathrm{\frac{N}{m}}\)]. Surface tension between the current fluid (the spesified density) and the surrounding fluid
length_scale – Characteristic length [\(\mathrm{m}\)]. Characteristic linear dimension. A characteristic length is an important dimension that defines the scale of a physical system. Often, the characteristic length is the volume of a system divided by its surface.
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Weber number [-]
- Return type:
pandas.Series
Froude Number
- indsl.fluid_dynamics.Fr(velocity: Series | float, length_scale: Series | float, align_timesteps: bool = False) Series
Froude Number.
The Froude number is a ratio of inertial and gravitational forces
\(Fr = \frac{u}{\sqrt{g L}}\)
u: velocity \(\mathrm{\frac{m}{s}}\)
g: 9.81 acceleration due to gravity [\(\mathrm{\frac{m}{s^2}}\)]
L: Length scale [\(\mathrm{m}\)]
- Parameters:
velocity – Fluid velocity [\(\mathrm{\frac{m}{s}}\)].
length_scale – Characteristic length [\(\mathrm{m}\)]. Characteristic linear dimension. A characteristic length is an important dimension that defines the scale of a physical system. Often, the characteristic length is the volume of a system divided by its surface.
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Froude number [-]
- Return type:
pandas.Series
Density scaled Froude Number
- indsl.fluid_dynamics.Fr_density_scaled(velocity: Series | float, density_1: Series | float, density_2: Series | float, length_scale: Series | float, align_timesteps: bool = False) Series
Density scaled Froude Number.
The Froude number is a ratio of inertial and gravitational forces. The density scaled Fround number is typically used in two phase flow
\(Fr_{\rho-scaled} =\frac{u}{\sqrt{g L (1 - \frac{\rho_1}{\rho_2})}}\)
u: velocity \(\mathrm{\frac{m}{s}}\)
g: 9.81 acceleration due to gravity [\(\mathrm{\frac{m}{s^2}}\)]
L: Length scale [\(\mathrm{m}\)]
\(\rho_1\): Density lighter fluid [\(\mathrm{\frac{kg}{m^3}}\)]
\(\rho_2\): Density heavier fluid [\(\mathrm{\frac{kg}{m^3}}\)]
- Parameters:
velocity – Average fluid velocity [\(\mathrm{\frac{m}{s}}\)].
density_1 – Density lighter fluid [\(\mathrm{\frac{kg}{m^3}}\)].
density_2 – Density heavier fluid [\(\mathrm{\frac{kg}{m^3}}\)].
length_scale – Characteristic length [\(\mathrm{m}\)]. Characteristic linear dimension. For pipe flow, the characteristic length is normally the pipe diameter
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Density scaled Froude number [-]
- Return type:
pandas.Series
2 phase Froude Number
- indsl.fluid_dynamics.Fr_2phase(liquid_fraction: Series | float, superficial_velocity_gas: Series | float, superficial_velocity_liquid: Series | float, density_gas: Series | float, density_liquid: Series | float, inclination: Series | float, diameter: Series | float, align_timesteps: bool = False) Series
2 phase Froude Number.
The Froude number is a ratio of inertial and gravitational forces. This calculated a Froude number for a two phase pipe flow situation.
- Parameters:
liquid_fraction – Volume fraction of liquid [-]. The fluid fraction is a scaled value, so gas_fraction + liquid_fraction = 1.
superficial_velocity_gas – Gas superficial velocity [\(\mathrm{\frac{m}{s}}\)]. The superficial flow is defined as the hypothetical flow velocity had the phase covered the entire flow area. \(US_{phase} = \frac{Q_{phase}}{\alpha_{phase}}\). Superficial flow velocity of the phase. \(Q_{phase}\): Volume flow velocity of the phase. \(\alpha_{phase}\): Flow area covered by the phase.
superficial_velocity_liquid – Liquid superficial velocity [\(\mathrm{\frac{m}{s}}\)].
density_gas – Density of the lighter fluid [\(\mathrm{\frac{kg}{m^3}}\)].
density_liquid – Density of the denser fluid [\(\mathrm{\frac{kg}{m^3}}\)].
inclination – Pipe inclination [\(\mathrm{deg}\)].
diameter – Pipe inner diameter [\(\mathrm{m}\)].
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
2 phase Froude number [-]
- Return type:
pandas.Series
Inviscid Kelvin Helmholtz Froude Number
- indsl.fluid_dynamics.Fr_inviscid_kelvin_helmholtz(liquid_fraction: Series | float, superficial_velocity_gas: Series | float, superficial_velocity_liquid: Series | float, density_gas: Series | float, density_liquid: Series | float, inclination: Series | float, diameter: Series | float, align_timesteps: bool = False) Series
IKH Froude Number.
Invicid Kelvin Helmholtz Froude number. The Froude number is a ratio of inertial and gravitational forces.
- Parameters:
liquid_fraction – Volume fraction of liquid [-]. The fluid fraction is a scaled value, so gas_fraction + liquid_fraction = 1.
superficial_velocity_gas – Gas superficial velocity [\(\mathrm{\frac{m}{s}}\)]. The superficial flow is defined as the hypothetical flow velocity had the phase covered the entire flow area. \(US_{phase} = \frac{Q_{phase}}{\alpha_{phase}}\). Superficial flow velocity of the phase. \(Q_{phase}\): Volume flow velocity of the phase. \(\alpha_{phase}\): Flow area covered by the phase.
superficial_velocity_liquid – Liquid superficial speed [\(\mathrm{\frac{m}{s}}\)].
density_gas – Density of the lighter fluid [\(\mathrm{\frac{kg}{m^3}}\)].
density_liquid – Density of the denser fluid [\(\mathrm{\frac{kg}{m^3}}\)].
inclination – Pipe inclination [\(\mathrm{deg}\)].
diameter – Pipe inner diameter [\(\mathrm{m}\)].
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
IKH Froude number [-]
- Return type:
pandas.Series
Scaled pressure gradient
- indsl.fluid_dynamics.Pressure_scaled(pressure_gradient: Series | float, velocity: Series | float, density: Series | float, length_scale: Series | float, align_timesteps: bool = False) Series
Scaled pressure gradient.
Pressure gradient on a dimentionless form
\(PI = \frac{\mathrm{d}P}{\mathrm{d}x}\frac{L}{\rho u^2}\)
\(\frac{\mathrm{d}P}{\mathrm{d}x}\): Pressure gradient [\(\mathrm{\frac{Pa}{m}}\)]
\(u\): Fluid velocity [\(\mathrm{\frac{m}{s}}\)]
\(L\): Lenght scale [\(\mathrm{m}\)]
\(\rho\): Fluid density [\(\mathrm{\frac{kg}{m^3}}\)]
- Parameters:
pressure_gradient – Pressure gradient [\(\mathrm{\frac{Pa}{m}}\)]. Presure gradient in the flow direction (along the pipe, assuming pipe flow)
velocity – Flow velocity [\(\mathrm{\frac{m}{s}}\)].
density – Density [\(\mathrm{\frac{kg}{m^3}}\)].
length_scale – Characteristic length [\(\mathrm{m}\)]. Characteristic linear dimension. For pipe flow, the characteristic length is normally the pipe diameter
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Scaled pressure gradient [-]
- Return type:
pandas.Series
Scaled pipe roughness
- indsl.fluid_dynamics.Roughness_scaled(roughness: Series | float, diameter: Series | float, align_timesteps: bool = False) Series
Scaled pipe roughness.
This is the roughness that is used in the Darcy-Weisbach equation
roughness_scaled = roughness / diameter
- Parameters:
roughness – Pipe inner roughness [m]. Pipe inner roughness as sand size equivalent
diameter – Pipe diameter [m].
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Scaled pipe roughness number [-]
- Return type:
pandas.Series
Pressure drop in pipes
Haaland equation
- indsl.fluid_dynamics.Haaland(Re: Series, roughness: float) Series
Haaland equation.
The Haaland equation was proposed in 1983 by Professor S.E. Haaland of the Norwegian Institute of Technology. It is used to directly solve the Darcy–Weisbach friction factor for a full-flowing circular pipe. It is an approximation of the implicit Colebrook–White equation, but the discrepancy from experimental data is well within the accuracy of the data.
- Parameters:
Re – Reynolds Number [-].
roughness – Surface roughness [m].
- Returns:
Friction factor [-]
- Return type:
pandas.Series
Fast Colebrook approximation
- indsl.fluid_dynamics.Colebrook(Re: Series | float, roughness_scaled: Series | float, align_timesteps: bool = False) Series
Colebrook approximation.
A computationally efficient Colebrook approximation taken from the following article
“Fast and Accurate Approximations for the Colebrook Equation” Dag Biberg Journal of Fluids Engineering Copyright VC 2017 by ASME MARCH 2017, Vol. 139 / 031401-1
This is a faster and more accurat approximation to Colebrook than Haaland
- Parameters:
Re – Reynolds Number [-].
roughness_scaled – Scaled surface roughness [-]. The wall surface roughness is normally scaled with the pipe inner diameter
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Friction factor [-]
- Return type:
pandas.Series
Laminar flow friction factor
- indsl.fluid_dynamics.friction_factor_laminar(Re: Series | float) Series
Friction factor laminar flow.
- friction_factor = \(\frac{64}{Re}\)
Re: Reynolds number = \(\frac{\rho u D}{\mu}\)
- Parameters:
Re – Reynolds Number [-].
- Returns:
Friction factor laminar flow [-]
- Return type:
pandas.Series
Darcy friction factor
- indsl.fluid_dynamics.Darcy_friction_factor(Re: Series | float, roughness_scaled: Series | float, laminar_limit: float = 2300.0, turbulent_limit: float = 4000.0, align_timesteps: bool = False) Series
Darcy friction factor.
Computes the Darcy friction factor, including the laminar-turbulent transition.
- Parameters:
Re – Reynolds Number [-].
roughness_scaled – Scaled surface roughness [-].
laminar_limit – Laminar transition [-]. Limit where lower Reynolds numbers give pure laminar flow, Typical value is 2300 [-]
turbulent_limit – Turbulent transition Limit where higher Reynolds numbers give pure turbulent flow. Typical value is 4000 [-]
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Darcy friction factor [-]
- Return type:
pandas.Series
Single phase wall shear stress
- indsl.fluid_dynamics.pipe_wall_shear_stress(velocity: Series | float, density: Series | float, d_viscosity: Series | float, diameter: Series | float, roughness: Series | float, laminar_limit: float = 2300.0, turbulent_limit: float = 4000.0, align_timesteps: bool = False) Series
Single phase wall shear stress.
Computes the wall shear stress for single phase flow.
\(\tau = \lambda\frac{u^2 D}{8}\)
\(\tau\): Wall shear stress [\(\mathrm{Pa}\)]
\(x\): Direction along pipeline [\(\mathrm{m}\)]
\(\lambda\): Friction factor [\(\mathrm{-}\)]
\(u\): Fluid velocity [\(\mathrm{\frac{m}{s}}\)]
\(D\): Pipe diameter [\(\mathrm{m}\)]
- Parameters:
velocity – Average fluid velocity [\(\mathrm{\frac{m}{s}}\)].
density – Fluid density [\(\mathrm{\frac{kg}{m^3}}\)].
d_viscosity – Dynamic viscosity [\(\mathrm{\frac{kg}{m s}}\)].
diameter – Pipe inner diameter [\(\mathrm{m}\)].
roughness – Unscaled surface roughness [\(\mathrm{m}\)]. Unscaled pipe inner wall surface roughness.
laminar_limit – Laminar transition [-]. Limit where lower Reynolds numbers give pure laminar flow, Typical value is 2300 [-].
turbulent_limit – Trubulent transition. Limit where higher Reynolds numbers give pure turbulent flow. Typical value is 4000 [-].
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Pipe wall shear stress [\(\mathrm{Pa}\)]
- Return type:
pandas.Series
Single phase pressure gradient
- indsl.fluid_dynamics.pipe_pressure_gradient(velocity: Series | float, density: Series | float, d_viscosity: Series | float, diameter: Series | float, roughness: Series | float, laminar_limit: float = 2300.0, turbulent_limit: float = 4000.0, align_timesteps: bool = False) Series
Single phase pressure gradient.
Computes the pressure gradient from wall friction in single phase flow in pipe.
\(\frac{\mathrm{d}P}{\mathrm{d}x} = \lambda\frac{u^2 D}{2}\)
\(P\): Pressure [\(\mathrm{Pa}\)]
\(x\): Direction along pipeline [\(\mathrm{m}\)]
\(\lambda\): Friction factor [\(\mathrm{-}\)]
\(u\): Fluid velocity [\(\mathrm{\frac{m}{s}}\)]
\(D\): Pipe diameter [\(\mathrm{m}\)]
- Parameters:
velocity – Average fluid velocity [\(\mathrm{\frac{m}{s}}\)].
density – Fluid density [\(\mathrm{\frac{kg}{m^3}}\)].
d_viscosity – Dynamic viscosity [\(\mathrm{\frac{kg}{m s}}\)].
diameter – Pipe inner diameter [\(\mathrm{m}\)].
roughness – Unscaled surface roughness [\(\mathrm{m}\)]. Unscaled pipe inner wall surface roughness.
laminar_limit – Laminar transition [-]. Limit where lower Reynolds numbers give pure laminar flow, Typical value is 2300 [-].
turbulent_limit – Trubulent transition. Limit where higher Reynolds numbers give pure turbulent flow. Typical value is 4000 [-].
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Fluid pressure gradient [\(\mathrm{\frac{Pa}{m}}\)]
- Return type:
pandas.Series
Single phase pressure drop
- indsl.fluid_dynamics.pipe_pressure_drop(velocity: Series | float, density: Series | float, d_viscosity: Series | float, diameter: Series | float, roughness: Series | float, pipe_length: Series | float, pipe_height_difference: Series | float, laminar_limit: float = 2300.0, turbulent_limit: float = 4000.0, align_timesteps: bool = False) Series
Single phase pressure drop.
Computes the pressure drop for single phase flow in a pipe, adding frictional pressure drop and gravitational pressure drop
It assumes constant properties along pipeline
- Parameters:
velocity – Average fluid velocity [\(\mathrm{\frac{m}{s}}\)].
density – Fluid density [\(\mathrm{\frac{kg}{m^3}}\)].
d_viscosity – Dynamic viscosity [\(\mathrm{\frac{kg}{m s}}\)].
diameter – Pipe inner diameter [\(\mathrm{m}\)].
roughness – Unscaled surface roughness [\(\mathrm{m}\)]. Unscaled pipe inner wall surface roughness.
pipe_length – total length of pipe [\(\mathrm{m}\)].
pipe_height_difference – Height difference [\(\mathrm{m}\)]. Difference in height between start and end of pipe.
laminar_limit – Laminar transition [-]. Limit where lower Reynolds numbers give pure laminar flow, Typical value is 2300 [-].
turbulent_limit – Trubulent transition. Limit where higher Reynolds numbers give pure turbulent flow. Typical value is 4000 [-].
align_timesteps – Auto-align. Automatically align time stamp of input time series. Default is False.
- Returns:
Pipe pressure drop [\(\mathrm{Pa}\)]
- Return type:
pandas.Series