PhysChem

Contains functions pertaining to the design of physical and chemical unit processes of AguaClara water treatment plants.

aguaclara.core.physchem.density_air(Pressure, MolarMass, Temperature)[source]

Deprecated since version `density_air`: is deprecated; use density_gas instead.

aguaclara.core.physchem.density_gas(Pressure, MolarMass, Temperature)[source]

Return the density of air at the given pressure, molar mass, and temperature.

Parameters:
  • Pressure (u.pascal) – pressure of air in the system

  • MolarMass (u.gram/u.mol) – molar mass of air in the system

  • Temperature (u.degK) – Temperature of air in the system

Returns:

density of air in the system

Return type:

u.kg/u.m**3

aguaclara.core.physchem.area_circle(DiamCircle)[source]

Return the area of a circle given its diameter.

Parameters:

DiamCircle (u.m) – diameter of circle

Returns:

area of circle

Return type:

u.m**2

aguaclara.core.physchem.diam_circle(AreaCircle)[source]

Return the diameter of a circle given its area.

Parameters:

AreaCircle (u.m**2) – area of circle

Returns:

diameter of circle

Return type:

u.m

aguaclara.core.physchem.RE_TRANSITION_PIPE = 2100
aguaclara.core.physchem.WATER_DENSITY_TABLE = [(273.15, 278.15, 283.15, 293.15, 303.15, 313.15, 323.15, 333.15, 343.15, 353.15, 363.15, 373.15), (999.9, 1000, 999.7, 998.2, 995.7, 992.2, 988.1, 983.2, 977.8, 971.8, 965.3, 958.4)]

Table of temperatures and the corresponding water density.

WATER_DENSITY_TABLE[0] is a list of water temperatures, in Kelvin. WATER_DENSITY_TABLE[1] is the corresponding densities, in kg/m³.

aguaclara.core.physchem.viscosity_dynamic(temp)[source]

Deprecated since version `viscosity_dynamic`: is deprecated; use viscosity_dynamic_water instead.

aguaclara.core.physchem.viscosity_dynamic_water(Temperature)[source]

Return the dynamic viscosity of water at a given temperature.

Parameters:

Temperature (u.degK) – temperature of water

Returns:

dynamic viscosity of water

Return type:

u.kg/(u.m*u.s)

aguaclara.core.physchem.density_water(Temperature=None, *, temp=None)[source]

Return the density of water at a given temperature.

Parameters:
  • Temperature (u.degK) – temperature of water

  • temp – deprecated; use Temperature instead

Returns:

density of water

Return type:

u.kg/u.m**3

aguaclara.core.physchem.viscosity_kinematic(temp)[source]

Deprecated since version `viscosity_kinematic`: is deprecated; use viscosity_kinematic_water instead.

aguaclara.core.physchem.viscosity_kinematic_water(Temperature)[source]

Return the kinematic viscosity of water at a given temperature.

Parameters:

Temperature (u.degK) – temperature of water

Returns:

kinematic viscosity of water

Return type:

u.m**2/u.s

aguaclara.core.physchem.radius_hydraulic(Width, Depth, openchannel)[source]

Deprecated since version `radius_hydraulic`: is deprecated; use radius_hydraulic_rect instead.

aguaclara.core.physchem.radius_hydraulic_rect(Width, Depth, OpenChannel)[source]

Return the hydraulic radius of a rectangular channel given width and depth of water.

Parameters:
  • Width (u.m) – width of channel

  • Depth (u.m) – depth of water in channel

  • OpenChannel (boolean) – true if channel is open, false if closed

Returns:

hydraulic radius of rectangular channel

Return type:

u.m

aguaclara.core.physchem.radius_hydraulic_general(Area, PerimWetted)[source]

Deprecated since version `radius_hydraulic_general`: is deprecated; use radius_hydraulic_channel instead.

aguaclara.core.physchem.radius_hydraulic_channel(Area, PerimWetted)[source]

Return the hydraulic radius of a general channel given cross sectional area and wetted perimeter.

Parameters:
  • Area (u.m**2) – cross sectional area of channel

  • PerimWetted (u.m) – wetted perimeter of channel

Returns:

hydraulic radius of general channel

Return type:

u.m

aguaclara.core.physchem.re_pipe(FlowRate, Diam, Nu)[source]

Return the Reynolds number of flow through a pipe.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through pipe

  • Diam (u.m) – diameter of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

Returns:

Reynolds number of flow through pipe

Return type:

u.dimensionless

aguaclara.core.physchem.re_rect(FlowRate, Width, Depth, Nu, OpenChannel=None, *, openchannel=None)[source]

Return the Reynolds number of flow through a rectangular channel.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through channel

  • Width (u.m) – width of channel

  • Depth (u.m) – depth of water in channel

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • OpenChannel (boolean) – true if channel is open, false if closed

  • openchannel – deprecated; use OpenChannel instead

Returns:

Reynolds number of flow through rectangular channel

Return type:

u.dimensionless

aguaclara.core.physchem.re_general(Vel, Area, PerimWetted, Nu)[source]

Deprecated since version `re_general`: is deprecated; use re_channel instead.

aguaclara.core.physchem.re_channel(Vel, Area, PerimWetted, Nu)[source]

Return the Reynolds number of flow through a general cross section.

Parameters:
  • Vel (u.m/u.s) – velocity of fluid

  • Area (u.m**2) – cross sectional area of channel

  • PerimWetted (u.m) – wetted perimeter of channel

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

Returns:

Reynolds number of flow through general cross section

Return type:

u.dimensionless

aguaclara.core.physchem.fric(FlowRate, Diam, Nu, PipeRough)[source]

Deprecated since version `fric`: is deprecated; use fric_pipe instead.

aguaclara.core.physchem.fric_pipe(FlowRate, Diam, Nu, Roughness)[source]

Return the friction factor for pipe flow.

For laminar flow, the friction factor is 64 is divided the Reynolds number. For turbulent flows, friction factor is calculated using the Swamee-Jain equation, which works best for Re > 3000 and ε/Diam < 0.02.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through pipe

  • Diam (u.m) – diameter of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of pipe

Returns:

friction factor of flow through pipe

Return type:

u.dimensionless

aguaclara.core.physchem.fric_rect(FlowRate, Width, Depth, Nu, Roughness=None, OpenChannel=None, *, PipeRough=None, openchannel=None)[source]

Return the friction factor of a rectangular channel.

The Swamee-Jain equation is adapted for a rectangular channel.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through channel

  • Width (u.m) – width of channel

  • Depth (u.m) – depth of water in channel

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of channel

  • OpenChannel (boolean) – true if channel is open, false if closed

  • PipeRough – deprecated; use Roughness instead

  • openchannel – deprecated; use OpenChannel instead

Returns:

friction factor of flow through rectangular channel

Return type:

u.dimensionless

aguaclara.core.physchem.fric_general(Area, PerimWetted, Vel, Nu, PipeRough)[source]

Deprecated since version `fric_general`: is deprecated; use fric_channel instead.

aguaclara.core.physchem.fric_channel(Area, PerimWetted, Vel, Nu, Roughness)[source]

Return the friction factor for a general channel.

The Swamee-Jain equation is adapted for a general cross-section.

Parameters:
  • Area (u.m**2) – cross sectional area of channel

  • PerimWetted (u.m) – wetted perimeter of channel

  • Vel (u.m/u.s) – velocity of fluid

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • PipeRough (u.m) – roughness of channel

Returns:

friction factor for flow through general channel

Return type:

u.dimensionless

aguaclara.core.physchem.headloss_fric(FlowRate, Diam, Length, Nu, PipeRough)[source]

Deprecated since version `headloss_fric`: is deprecated; use headloss_major_pipe instead.

aguaclara.core.physchem.headloss_major_pipe(FlowRate, Diam, Length, Nu, Roughness)[source]

Return the major head loss (due to wall shear) in a pipe.

This function applies to both laminar and turbulent flows.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through pipe

  • Diam (u.m) – diameter of pipe

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of pipe

Returns:

major head loss in pipe

Return type:

u.m

aguaclara.core.physchem.headloss_exp(FlowRate, Diam, KMinor)[source]

Deprecated since version `headloss_exp`: is deprecated; use headloss_minor_pipe instead.

aguaclara.core.physchem.headloss_minor_pipe(FlowRate, Diam, KMinor)[source]

Return the minor head loss (due to changes in geometry) in a pipe.

This function applies to both laminar and turbulent flows.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through pipe

  • Diam (u.m) – diameter of pipe

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

Returns:

minor head loss in pipe

Return type:

u.m

aguaclara.core.physchem.headloss(FlowRate, Diam, Length, Nu, PipeRough, KMinor)[source]

Deprecated since version `headloss`: is deprecated; use headloss_pipe instead.

aguaclara.core.physchem.headloss_pipe(FlowRate, Diam, Length, Nu, Roughness, KMinor)[source]

Return the total head loss from major and minor losses in a pipe.

This function applies to both laminar and turbulent flows.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through pipe

  • Diam (u.m) – diameter of pipe

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of pipe

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

Returns:

total head loss in pipe

Return type:

u.m

aguaclara.core.physchem.headloss_fric_rect(FlowRate, Width, Depth, Length, Nu, PipeRough, openchannel)[source]

Deprecated since version `headloss_fric_rect`: is deprecated; use headloss_major_rect instead.

aguaclara.core.physchem.headloss_major_rect(FlowRate, Width, Depth, Length, Nu, Roughness, OpenChannel)[source]

Return the major head loss due to wall shear in a rectangular channel.

This equation applies to both laminar and turbulent flows.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through channel

  • Width (u.m) – width of channel

  • Depth (u.m) – depth of water in channel

  • Length (u.m) – length of channel

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of channel

  • OpenChannel (boolean) – true if channel is open, false if closed

Returns:

major head loss in rectangular channel

Return type:

u.m

aguaclara.core.physchem.headloss_exp_rect(FlowRate, Width, Depth, KMinor)[source]

Deprecated since version `headloss_exp_rect`: is deprecated; use headloss_minor_rect instead.

aguaclara.core.physchem.headloss_minor_rect(FlowRate, Width, Depth, KMinor)[source]

Return the minor head loss due to expansion in a rectangular channel.

This equation applies to both laminar and turbulent flows.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through channel

  • Width (u.m) – width of channel

  • Depth (u.m) – depth of water in channel

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

Returns:

minor head loss in rectangular channel

Return type:

u.m

aguaclara.core.physchem.headloss_rect(FlowRate, Width, Depth, Length, KMinor, Nu, Roughness=None, OpenChannel=None, *, PipeRough=None, openchannel=None)[source]

Return the total head loss from major and minor losses in a rectangular channel.

This equation applies to both laminar and turbulent flows.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through channel

  • Width (u.m) – width of channel

  • Depth (u.m) – depth of water in channel

  • Length (u.m) – length of channel

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of channel

  • OpenChannel (boolean) – true if channel is open, false if closed

  • PipeRough – deprecated; use Roughness instead

Returns:

total head loss in rectangular channel

Return type:

u.m

aguaclara.core.physchem.headloss_fric_general(Area, PerimWetted, Vel, Length, Nu, PipeRough)[source]

Deprecated since version `headloss_fric_general`: is deprecated; use headloss_major_channel instead.

aguaclara.core.physchem.headloss_major_channel(Area, PerimWetted, Vel, Length, Nu, Roughness)[source]

Return the major head loss due to wall shear in a general channel.

This equation applies to both laminar and turbulent flows.

Parameters:
  • Area (u.m**2) – cross sectional area of channel

  • PerimWetted (u.m) – wetted perimeter of channel

  • Vel (u.m/u.s) – velocity of fluid

  • Length (u.m) – length of channel

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of channel

Returns:

major head loss in general channel

Return type:

u.m

aguaclara.core.physchem.headloss_exp_general(Vel, KMinor)[source]

Deprecated since version `headloss_exp_general`: is deprecated; use headloss_minor_channel instead.

aguaclara.core.physchem.headloss_minor_channel(Vel, KMinor)[source]

Return the minor head loss due to expansion in a general channel.

This equation applies to both laminar and turbulent flows.

Parameters:
  • Vel (u.m/u.s) – velocity of fluid

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

Returns:

minor head loss in general channel

Return type:

u.m

aguaclara.core.physchem.headloss_gen(Area, Vel, PerimWetted, Length, KMinor, Nu, PipeRough)[source]

Deprecated since version `headloss_gen`: is deprecated; use headloss_channel instead.

aguaclara.core.physchem.headloss_channel(Area, Vel, PerimWetted, Length, KMinor, Nu, Roughness)[source]

Return the total head loss from major and minor losses in a general channel.

This equation applies to both laminar and turbulent flows.

Parameters:
  • Area (u.m**2) – cross sectional area of channel

  • Vel (u.m/u.s) – velocity of fluid

  • PerimWetted (u.m) – wetted perimeter of channel

  • Length (u.m) – length of channel

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of channel

Returns:

total head loss in general channel

Return type:

u.m

aguaclara.core.physchem.headloss_manifold(FlowRate, Diam, Length, KMinor, Nu, Roughness=None, NumOutlets=None, *, PipeRough=None)[source]

Return the total head loss through the manifold.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through manifold

  • Diam (u.m) – diameter of manifold

  • Length (u.m) – length of manifold

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of manifold

  • NumOutlets (u.dimensionless or unitless) – number of outlets from manifold

  • PipeRough – deprecated; use Roughness instead

Returns:

total headloss through manifold

Return type:

u.m

aguaclara.core.physchem.elbow_minor_loss(q, id_, k)[source]

Deprecated since version `elbow_minor_loss`: is deprecated; use headloss_minor_elbow instead.

aguaclara.core.physchem.headloss_minor_elbow(FlowRate, Diam, KMinor)[source]

Return the minor head loss (due to changes in geometry) in an elbow.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate through pipe

  • Diam (u.m) – diameter of pipe

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

Returns:

minor head loss in pipe

Return type:

u.m

aguaclara.core.physchem.flow_orifice(Diam, Height, RatioVCOrifice)[source]

Return the flow rate of the orifice.

Parameters:
  • Diam (u.m) – diameter of orifice

  • Height (u.m) – piezometric height of orifice

  • RatioVCOrifice (u.dimensionless or unitless) – vena contracta ratio of orifice

Returns:

flow rate of orifice

Return type:

u.m**3/u.s

aguaclara.core.physchem.flow_orifice_vert(Diam, Height, RatioVCOrifice)[source]

Return the vertical flow rate of the orifice.

Parameters:
  • Diam (u.m) – diameter of orifice

  • Height (u.m) – piezometric height of orifice

  • RatioVCOrifice (u.dimensionless or unitless) – vena contracta ratio of orifice

Returns:

vertical flow rate of orifice

Return type:

u.m**3/u.s

aguaclara.core.physchem.head_orifice(Diam, RatioVCOrifice, FlowRate)[source]

Return the piezometric head of the orifice.

Parameters:
  • Diam (u.m) – diameter of orifice

  • RatioVCOrifice (u.dimensionless or unitless) – vena contracta ratio of orifice

  • FlowRate (u.m**3/u.s) – flow rate of orifice

Returns:

head of orifice

Return type:

u.m

aguaclara.core.physchem.area_orifice(Height, RatioVCOrifice, FlowRate)[source]

Return the area of the orifice.

Parameters:
  • Height (u.m) – piezometric height of orifice

  • RatioVCOrifice (u.dimensionless or unitless) – vena contracta ratio of orifice

  • FlowRate (u.m**3/u.s) – flow rate of orifice

Returns:

area of orifice

Return type:

u.m**2

aguaclara.core.physchem.num_orifices(FlowRate, RatioVCOrifice, HeadLossOrifice, DiamOrifice)[source]

Return the number of orifices.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate of orifice

  • RatioVCOrifice (u.dimensionless or unitless) – vena contracta ratio of orifice

  • HeadLossOrifice (u.m) – head loss of orifice

  • DiamOrifice (u.m) – diameter of orifice

Returns:

number of orifices

Return type:

u.dimensionless

aguaclara.core.physchem.flow_transition(Diam, Nu)[source]

Return the flow rate for the laminar/turbulent transition.

Parameters:
  • Diam (u.m) – diameter of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

Returns:

flow rate for laminar/turbulent transition

Return type:

u.m**3/u.s

aguaclara.core.physchem.flow_hagen(Diam, HeadLossMajor=None, Length=None, Nu=None, *, HeadLossFric=None)[source]

Return the flow rate for laminar flow with only major losses.

Parameters:
  • Diam (u.m) – diameter of pipe

  • HeadLossMajor (u.m) – head loss due to friction

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • HeadLossFric – deprecated; use HeadLossMajor instead

Returns:

flow rate for laminar flow with only major losses

Return type:

u.m**3/u.s

aguaclara.core.physchem.flow_swamee(Diam, HeadLossMajor=None, Length=None, Nu=None, Roughness=None, *, HeadLossFric=None, PipeRough=None)[source]

Return the flow rate for turbulent flow with only major losses.

Parameters:
  • Diam (u.m) – diameter of pipe

  • HeadLossMajor (u.m) – head loss due to friction

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of pipe

  • HeadLossFric – deprecated; use HeadLossMajor instead

  • PipeRough – deprecated; use Roughness instead

Returns:

flow rate for turbulent flow with only major losses

Return type:

u.m**3/u.s

aguaclara.core.physchem.flow_pipemajor(Diam, HeadLossFric, Length, Nu, PipeRough)[source]

Deprecated since version `flow_pipemajor`: is deprecated; use flow_major_pipe instead.

aguaclara.core.physchem.flow_major_pipe(Diam, HeadLossMajor, Length, Nu, Roughness)[source]

Return the flow rate with only major losses.

This function applies to both laminar and turbulent flows.

Parameters:
  • Diam (u.m) – diameter of pipe

  • HeadLossMajor (u.m) – head loss due to friction

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of pipe

Returns:

flow rate with only major losses

Return type:

u.m**3/u.s

aguaclara.core.physchem.flow_pipeminor(Diam, HeadLossExpans, KMinor)[source]

Deprecated since version `flow_pipeminor`: is deprecated; use flow_minor_pipe instead.

aguaclara.core.physchem.flow_minor_pipe(Diam, HeadLossMinor, KMinor)[source]

Return the flow rate with only minor losses.

This function applies to both laminar and turbulent flows.

Parameters:
  • Diam (u.m) – diameter of pipe

  • HeadLossExpans (u.m) – head loss due to expansion

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

Returns:

flow rate with only minor losses

Return type:

u.m**3/u.s

aguaclara.core.physchem.flow_pipe(Diam, HeadLoss, Length, Nu, Roughness=None, KMinor=None, *, PipeRough=None)[source]

Return the flow rate in a pipe.

This function works for both major and minor losses as well as both laminar and turbulent flows.

Parameters:
  • Diam (u.m) – diameter of pipe

  • HeadLoss (u.m) – total head loss from major and minor losses

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of pipe

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

  • PipeRough – deprecated; use Roughness instead

Returns:

flow rate in pipe

Return type:

u.m**3/u.s

aguaclara.core.physchem.diam_hagen(FlowRate, HeadLossMajor=None, Length=None, Nu=None, *, HeadLossFric=None)[source]

Return the inner diameter of a pipe with laminar flow and no minor losses.

The Hagen Poiseuille equation is dimensionally correct and returns the inner diameter of a pipe given the flow rate and the head loss due to shear on the pipe walls. The Hagen Poiseuille equation does NOT take minor losses into account. This equation ONLY applies to laminar flow.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate of pipe

  • HeadLossFric (u.m) – head loss due to friction

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • HeadLossFric – deprecated; use HeadLossMajor instead

Returns:

inner diameter of pipe

Return type:

u.m

aguaclara.core.physchem.diam_swamee(FlowRate, HeadLossMajor=None, Length=None, Nu=None, Roughness=None, *, HeadLossFric=None, PipeRough=None)[source]

Return the inner diameter of a pipe with turbulent flow and no minor losses.

The Swamee Jain equation is dimensionally correct and returns the inner diameter of a pipe given the flow rate and the head loss due to shear on the pipe walls. The Swamee Jain equation does NOT take minor losses into account. This equation ONLY applies to turbulent flow.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate of pipe

  • HeadLossFric (u.m) – head loss due to friction

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • PipeRough (u.m) – roughness of pipe

  • HeadLossFric – deprecated; use HeadLossMajor instead

  • PipeRough – deprecated; use Roughness instead

Returns:

inner diameter of pipe

Return type:

u.m

aguaclara.core.physchem.diam_pipemajor(FlowRate, HeadLossFric, Length, Nu, PipeRough)[source]

Deprecated since version `diam_pipemajor`: is deprecated; use diam_major_pipe instead.

aguaclara.core.physchem.diam_major_pipe(FlowRate, HeadLossMajor, Length, Nu, Roughness)[source]

Return the pipe inner diameter that would result in given major losses.

This function applies to both laminar and turbulent flow.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate of pipe

  • HeadLossMajor (u.m) – head loss due to friction

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • Roughness (u.m) – roughness of pipe

Returns:

inner diameter of pipe

Return type:

u.m

aguaclara.core.physchem.diam_pipeminor(FlowRate, HeadLossExpans, KMinor)[source]

Deprecated since version `diam_pipeminor`: is deprecated; use diam_minor_pipe instead.

aguaclara.core.physchem.diam_minor_pipe(FlowRate, HeadLossMinor, KMinor)[source]

Return the pipe inner diameter that would result in the given minor losses.

This function applies to both laminar and turbulent flow.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate of pipe

  • HeadLossMinor (u.m) – head loss due to expansion

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

Returns:

inner diameter of pipe

Return type:

u.m

aguaclara.core.physchem.diam_pipe(FlowRate, HeadLoss, Length, Nu, PipeRough, KMinor)[source]

Return the pipe inner diameter that would result in the given total head loss.

This function applies to both laminar and turbulent flow and incorporates both minor and major losses.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate of pipe

  • HeadLoss (u.m) – total head loss from major and minor losses

  • Length (u.m) – length of pipe

  • Nu (u.m**2/u.s) – kinematic viscosity of fluid

  • PipeRough (u.m) – roughness of pipe

  • KMinor (u.dimensionless or unitless) – minor loss coefficient

Returns:

inner diameter of pipe

Return type:

u.m

aguaclara.core.physchem.pipe_ID(FlowRate, Pressure)[source]

Return the inner diameter of a pipe for a given pressure recovery constraint.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate of pipe

  • Pressure (u.m) – pressure recovery constraint

Returns:

inner diameter of pipe

Return type:

u.m

aguaclara.core.physchem.width_rect_weir(FlowRate, Height)[source]

Deprecated since version `width_rect_weir`: is deprecated; use width_weir_rect instead.

aguaclara.core.physchem.width_weir_rect(FlowRate, Height)[source]

Return the width of a rectangular weir given its flow rate and the height of the water above the weir. For a weir that is a vertical pipe, this value is the circumference.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate over weir

  • Height (u.m) – height of water above weir

Returns:

width of weir

Rtypes:

u.m

aguaclara.core.physchem.headloss_weir(FlowRate, Width)[source]

Deprecated since version `headloss_weir`: is deprecated; use headloss_weir_rect instead.

aguaclara.core.physchem.headloss_weir_rect(FlowRate, Width)[source]

Return the head loss of a rectangular or vertical pipe weir.

Head loss for a weir is the difference in height between the water upstream of the weir and the top of the weir.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate over weir

  • Width (u.m) – width of weir (circumference for a vertical pipe)

Returns:

head loss of weir

Rtypes:

u.m

aguaclara.core.physchem.flow_rect_weir(Height, Width)[source]

Deprecated since version `flow_rect_weir`: is deprecated; use flow_weir_rect instead.

aguaclara.core.physchem.flow_weir_rect(Height, Width)[source]

Return the flow rate of a rectangular or vertical pipe weir.

Parameters:
  • Height (u.m) – height of water above weir

  • Width (u.m) – width of weir (circumference for a vertical pipe)

Returns:

flow of weir

Return type:

u.m**3/u.s

exception aguaclara.core.physchem.DeprecatedFunctionError(message)[source]
aguaclara.core.physchem.headloss_kozeny(Length, DiamMedia=None, ApproachVel=None, Porosity=None, Nu=None, *, Diam=None, Vel=None)[source]

Deprecated since version `headloss_kozeny`: is deprecated; use headloss_ergun instead.

aguaclara.core.physchem.re_ergun(ApproachVel, DiamMedia, Temperature, Porosity)[source]

Return the Reynolds number for flow through porous media.

Parameters:
  • ApproachVel (u.m/u.s) – approach velocity or superficial fluid velocity

  • DiamMedia (u.m) – particle diameter

  • Temperature (u.degK) – temperature of porous medium

  • Porosity (u.dimensionless or unitless) – porosity of porous medium

Returns:

Reynolds number for flow through porous media

Return type:

u.dimensionless

aguaclara.core.physchem.fric_ergun(ApproachVel, DiamMedia, Temperature, Porosity)[source]

Return the friction factor for flow through porous media.

Parameters:
  • ApproachVel (u.m/u.s) – superficial fluid velocity (VelSuperficial?)

  • DiamMedia (u.m) – particle diameter

  • Temperature (u.degK) – temperature of porous medium

  • Porosity (u.dimensionless or unitless) – porosity of porous medium

Returns:

friction factor for flow through porous media

Return type:

u.dimensionless

aguaclara.core.physchem.headloss_ergun(ApproachVel, DiamMedia, Temperature, Porosity, Length)[source]

Return the frictional head loss for flow through porous media.

Parameters:
  • ApproachVel (u.m/u.s) – superficial fluid velocity (VelSuperficial?)

  • DiamMedia (u.m) – particle diameter

  • Temperature (u.degK) – temperature of porous medium

  • Porosity (u.dimensionless or unitless) – porosity of porous medium

  • Length (u.m) – length of pipe or duct

Returns:

frictional head loss for flow through porous media

Return type:

u.m

aguaclara.core.physchem.g_cs_ergun(ApproachVel, DiamMedia, Temperature, Porosity)[source]

Camp Stein velocity gradient for flow through porous media.

Parameters:
  • ApproachVel (u.m/u.s) – superficial fluid velocity (VelSuperficial?)

  • DiamMedia (u.m) – particle diameter

  • Temperature (u.degK) – temperature of porous medium

  • Porosity (u.dimensionless or unitless) – porosity of porous medium

Returns:

Camp Stein velocity gradient for flow through porous media

Return type:

u.Hz

aguaclara.core.physchem.height_water_critical(FlowRate, Width)[source]

Return the critical local water height.

Parameters:
  • FlowRate (u.m**3/u.s) – flow rate of water

  • Width (u.m) – width of channel (????????)

Returns:

critical water height

Return type:

u.m

aguaclara.core.physchem.vel_horizontal(HeightWaterCritical)[source]

Return the horizontal velocity. (at the critical water depth??????)

Parameters:

HeightWaterCritical (u.m) – critical water height

Returns:

horizontal velocity

Return type:

u.m/u.s

aguaclara.core.physchem.manifold_id_alt(q, pr_max)[source]

Return the inner diameter of a manifold when major losses are negligible.