Microfluidics

Authors: Valentyn Stadnytskyi Date created: 23 Oct 2019 Date last modified: 25 Oct 2019 Python Version: 3

Description:

laue_crystallography.microfluidics.analyse_array(arr, threshold=10, N=[2])[source]
laue_crystallography.microfluidics.droplet_volume(length=100, diameter=250)[source]

convert the length of a plug to volume in 250 um capillary.

Parameters
lfloat

droplet or plug length

dfloat

channel diameter

Returns
vfloat

volume of the object

Examples

the example of usage

>>> droplet_volume(250,250)
laue_crystallography.microfluidics.ellipse(h=250, v=250, x0=400, y0=400, size=(1024, 1360), theta=0)[source]

returns array with ‘size’ with an ellipse centered at x0,y0 with diameters h(horizontal) and v(vertical) tilted at theta degrees. The h-horizontal and v-vertical is accurate only if theta is zero degrees.

Parameters
hfloat

diameter of horizontal(zero degrees) axis of the ellipse

vfloat

diameter of vertical(zero degrees) axis of the ellipse

x0float

x-coordinate of the center of the ellipse

y0float

y-coordinate of the center of the ellipse

sizetuple

size of the output image Default: 1024,1360

thetafloat

angle of rotation in degrees. Default: 0

Returns
masknumpy array

numpy array with ‘size’

Examples

the example of usage. To draw an ellise center at (1115,659) with horizontal diameter of 52 pixels and vertical diameter of 56 pixels.

>>> e = draw_an_ellipsoid(h = 52, v = 56, x0 = 1115, y0 = 659
laue_crystallography.microfluidics.find_circles(image)[source]

takes and input image and find circles in it.

returns radius and center coordinates of circles

laue_crystallography.microfluidics.flow_cylinder(diameter=250, length=1, viscosity=1, pressure=0.1, output_units='nL')[source]

calculates flow rate via a cylindrical capillary with a given diameter, length and fluid viscosity under a given pressure drop. Also takes string value to define output units

Parameters
lengthfloat

length of a cylinder in meters

diameterfloat

diameter of round cross-section in micrometer

viscosityfloat

viscosity in cP or mPa*s

pressurefloat

pressure difference in atmospheres

output_units

output units for the flow. Supports: nL/s, uL/s. Default: nL/s

Returns
flowfloat

flow of fluid in nL/s

Examples

the example of usage. D=50um,L = 1, eta = 1, P = 2 -> 31.086 nL/s D=10oum,L = 0.7, eta = 23, P = 2 -> 30.893 nL/s

>>> flow_cylinder(diameter = 50, length = 1, viscosity = 1.0, pressure = 2.0)
>>> 31.086120666502506
laue_crystallography.microfluidics.plot_image_with_sum(img, title='')[source]

plots an image with two graphs

laue_crystallography.microfluidics.pressure_cylinder(diameter=250, length=1, viscosity=1, flow=0.1, flow_units='nL/s', output_units='atm')[source]

calculates pressure drop across a cylindrical capillary with a given diameter, length and fluid viscosity with given flow rate. Also takes string value to define output units

Parameters
lengthfloat

length of a cylinder in meters

diameterfloat

diameter of round cross-section in micrometer

viscosityfloat

viscosity in cP or mPa*s

flowfloat

pressure difference in atmospheres

flow_unitsstring

flow units (pL/s, uL/s, ul/s, mL/s, L/s, m^3/s)

output_unitsstring

output units for the flow. Supports: atm, Pa. Default: atm

Returns
pressurefloat

pressure drop across the capillary

Examples

the example of usage. D=50um,L = 1, eta = 1, P = 2 -> 31.086 nL/s D=10oum,L = 0.7, eta = 23, P = 2 -> 30.893 nL/s

>>> pressure_cylinder(diameter = 50, length = 1, viscosity = 1.0, flow = 31.086, flow_units = 'nL/s')
>>> 1.9999922366316594
laue_crystallography.microfluidics.tau(length, diameter, viscosity, compressibility)[source]

convert the length of a plug to volume in 250 um capillary.

Parameters
lengthfloat

cylinder length

diameterfloat

cylinder diameter

Returns
taufloat

tau constant in seconds

Examples

the example of usage

>>> droplet_volume(250,250)