rheoflow package

Submodules

rheoflow.friction_factor_property module

class rheoflow.friction_factor_property.friction_factor(name, rho, d, l, viscosity)[source]

Bases: object

This class computes pipe flow information based on the non-Newtonian Dodge-Metzner paper.

There is a Jupyter notebook demonstrating usage.

d
f
l
pressure_drop
re
rho
u

rheoflow.laminar module

class rheoflow.laminar.laminar_slit_flow(name='default', height=0.01, width=0.1, length=1.0, density=1000.0, pressure_drop=None, q=None, viscosity=<function laminar_slit_flow.<lambda>>)[source]

Bases: object

This class contains a variety of methods for computing quantities of interest for laminar flow in a slit. The argument viscosity requires a function (or class with method) calc_visc with parameters already set and the shear rate as it’s only argument.

pressure_drop
q
q_plot(pressure_drop_min, pressure_drop_max)[source]

Creates log-log plot of pressure drop versus flow rate. A log-spacing of pressure drops between args pressure_drop_min and pressure_drop_max are created.

re_wall()[source]

Computes Reynolds number at the wall.

shear_rate(h, dp)[source]

This method computes the shear rate at a y position for dp.

shear_rate_plot()[source]

Creates plot of shear rate versus radial position.

shear_rate_wall()[source]

Computes the true wall shear rate, or shear rate at radial position radius.

stress_wall()[source]

Computes shear stress at wall, radial position radius.

viscosity_wall()[source]

Computes viscosity at wall, radial position radius.

vz(h, dp)[source]

This method computes the axial velocity vz at a radial position, rad.

vz_plot()[source]

Creates plot of axial velocity versus radial position.

rheoflow.pipe module

class rheoflow.pipe.laminar(name='Default', density=1000.0, radius=0.01, length=1.0, viscosity=<rheoflow.viscosity.newtonian object>, scale=1000000.0, pressure_drop=None, q=None)[source]

Bases: object

This class contains a variety of methods for computing quantities of interest for laminar flow in a tube. The argument viscosity requires a function (or class with method) calc_visc with parameters already set and the shear rate as it’s only argument. Default values are provided. A default visosity function is provided

density
length
pressure_drop
q
q_plot(pressure_drop_min, pressure_drop_max)[source]

Creates log-log plot of pressure drop versus flow rate. A log-spacing of pressure drops between args pressure_drop_min and pressure_drop_max are created.

radius
re_wall()[source]

Computes Reynolds number at the wall.

shear_rate(rad, dp)[source]

This method computes the shear rate at a radial position (rad) that is the only argument.

shear_rate_plot()[source]

Creates plot of shear rate versus radial position.

shear_rate_wall
shear_stress_wall
stress_wall()[source]

Computes shear stress at wall, radial position radius.

viscosity_wall()[source]

Computes viscosity at wall, radial position radius.

vz(rad, dp)[source]

This method computes the axial velocity vz at a radial position, rad.

vz_plot()[source]

Creates plot of axial velocity versus radial position.

class rheoflow.pipe.laminar_HB_analytical(name='Default', density=1000.0, radius=0.01, length=1.0, viscosity=<rheoflow.viscosity.herschel_bulkley object>, scale=1000000.0, pressure_drop=None, q=None)[source]

Bases: object

This class contains analytical solution for pipe flow of Herschel-Bulkley fluids

density
length
pressure_drop
q
q_plot(pressure_drop_min, pressure_drop_max)[source]

Creates log-log plot of pressure drop versus flow rate. A log-spacing of pressure drops between args pressure_drop_min and pressure_drop_max are created.

radius
re_wall()[source]

Computes Reynolds number at the wall.

shear_rate(rad, dp)[source]
shear_rate_plot()[source]

Creates plot of shear rate versus radial position.

shear_rate_wall
shear_stress_wall
stress_wall()[source]

Computes shear stress at wall, radial position radius.

viscosity_wall()[source]

Computes viscosity at wall, radial position radius.

vz(rad, dp)[source]

This method computes the axial velocity vz at a radial position, rad.

vz_plot()[source]

Creates plot of axial velocity versus radial position.

rheoflow.slit module

class rheoflow.slit.laminar(name='default', height=0.01, width=0.1, length=1.0, density=1000.0, pressure_drop=None, q=None, viscosity=<function laminar.<lambda>>)[source]

Bases: object

This class contains a variety of methods for computing quantities of interest for laminar flow in a slit. The argument viscosity requires a function (or class with method) calc_visc with parameters already set and the shear rate as it’s only argument.

pressure_drop
q
q_plot(pressure_drop_min, pressure_drop_max)[source]

Creates log-log plot of pressure drop versus flow rate. A log-spacing of pressure drops between args pressure_drop_min and pressure_drop_max are created.

re_wall()[source]

Computes Reynolds number at the wall.

shear_rate(h, dp)[source]

This method computes the shear rate at a y position for dp.

shear_rate_plot()[source]

Creates plot of shear rate versus radial position.

shear_rate_wall()[source]

Computes the true wall shear rate, or shear rate at radial position radius.

stress_wall()[source]

Computes shear stress at wall, radial position radius.

viscosity_wall()[source]

Computes viscosity at wall, radial position radius.

vz(h, dp)[source]

This method computes the axial velocity vz at a radial position, rad.

vz_plot()[source]

Creates plot of axial velocity versus radial position.

rheoflow.viscosity module

class rheoflow.viscosity.bi_power_law(name='Default', k_low=1.0, n_low=0.9, k_high=1.0, n_high=0.5)[source]

Bases: rheoflow.viscosity.property_plot

calc_visc(rate)[source]
class rheoflow.viscosity.carreau(name='Default', eta0=10.0, etainf=0.1, reltime=1.0, a=2.0, n=0.5)[source]

Bases: rheoflow.viscosity.property_plot

calc_visc(rate)[source]
class rheoflow.viscosity.herschel_bulkley(name='Default', tauy=1.0, k=1.0, n=1.0, m=1000.0, m_flag=1)[source]

Bases: rheoflow.viscosity.property_plot

Herschel-Bulkley viscosity model using Papanastasiou modification with m=1000. Also has eps=1.e-9 with shear rate in denominator of viscosity equation.

calc_visc(rate)[source]
class rheoflow.viscosity.newtonian(name='Default', mu=1.0)[source]

Bases: rheoflow.viscosity.property_plot

calc_visc(rate)[source]
class rheoflow.viscosity.power_law(name='Default', k=1.0, n=0.5)[source]

Bases: rheoflow.viscosity.property_plot

calc_visc(rate)[source]
class rheoflow.viscosity.property_plot[source]

Bases: object

This class must be inherited from a viscosity model class.
It is not well written and cannot stand alone, which is a problem.
stress_plot()[source]

Method to create log-log plot of shear stress versus shear rate. 50 pts are evenly spaced on log axis betwen rate_min and rate_max. This class expects to be inherited by a viscosity function class.

visc_plot()[source]

Method to create log-log plot of viscosity versus shear rate. 50 pts are evenly spaced on log axis betwen rate_min and rate_max. This class expects to be inherited by a viscosity function class.

class rheoflow.viscosity.three_component(name='Default', tauy=1.0, gamma_crit=1.0, eta_bg=1.0, m=1000.0, m_flag=1)[source]

Bases: rheoflow.viscosity.property_plot

Marco’s 3-component viscosity model using Papanastasiou modification with m=1000. Also has eps=1.e-9 with shear rate in denominator of viscosity equation.

calc_visc(rate)[source]

Module contents