FlowCell Class#
- class FlowCell(*, width, height, sample_volume_flow, sheath_volume_flow, mu=<Quantity(0.001, 'pascal * second')>, N_terms=25, n_int=200)[source]#
Bases:
FLOWCELL
Represents a rectangular flow cell in which the velocity field is computed from an analytical Fourier series solution for pressure-driven flow. The focused sample region is estimated from the volumetric flow rates of the sample and sheath fluids.
The analytical solution for the x-direction velocity in a rectangular channel is given by:
\[u(y,z) = \frac{16b^2}{\pi^3 \mu}\left(-\frac{dp}{dx}\right) \sum_{\substack{n=1,3,5,\ldots}}^{\infty} \frac{1}{n^3} \left[ 1 - \frac{ \cosh\left(\frac{n\pi y}{2b}\right) }{ \cosh\left(\frac{n\pi a}{2b}\right) } \right] \sin\left(\frac{n\pi (z+b)}{2b}\right)\]where:
\(a\) is the half-width of the channel (in the y-direction),
\(b\) is the half-height of the channel (in the z-direction),
\(mu\) is the dynamic viscosity,
\(dp/dx\) is the pressure gradient driving the flow,
the summation is over odd integers (i.e. \(n = 1, 3, 5, ...\)).
The derivation of this solution is based on the method of separation of variables and eigenfunction expansion applied to the Poisson equation for fully developed laminar flow. The validity of this approach and the resulting solution for rectangular ducts is well documented in classical fluid mechanics texts.
References
Shah, R.K. & London, A.L. (1978). Laminar Flow in Ducts. Academic Press.
White, F.M. (2006). Viscous Fluid Flow (3rd ed.). McGraw-Hill.
Happel, J. & Brenner, H. (1983). Low Reynolds Number Hydrodynamics. Martinus Nijhoff.
Di Carlo, D. (2009). “Inertial Microfluidics,” Lab on a Chip, 9, 3038-3046.
In flow cytometry, hydrodynamic focusing is used to narrow the sample stream for optimal optical interrogation. The same theoretical framework for rectangular duct flow is applied to these microfluidic devices.
- Parameters:
width (Length) – Width of the channel in the y-direction (m).
height (Length) – Height of the channel in the z-direction (m).
mu (Quantity) – Dynamic viscosity of the fluid (Pa·s).
sample_volume_flow (FlowRate) – Volumetric flow rate of the sample fluid (m³/s).
sheath_volume_flow (FlowRate) – Volumetric flow rate of the sheath fluid (m³/s).
N_terms (int, optional) – Number of odd terms to use in the Fourier series solution (default: 25).
n_int (int, optional) – Number of grid points for numerical integration over the channel cross-section (default: 200).
- Q_total#
Total volumetric flow rate (m³/s).
- Type:
Quantity
- dpdx#
Computed pressure gradient (Pa/m) driving the flow.
- Type:
float
- u_center#
Centerline velocity, i.e. u(0,0) (m/s).
- Type:
float
- width_sample#
Width of the focused sample region (m).
- Type:
Quantity
- height_sample#
Height of the focused sample region (m).
- Type:
Quantity
- event_scheme#
Scheme for event sampling, ‘uniform-random’, ‘sorted’, ‘poisson’, ‘preserve’ (default: ‘preserve’).
- Type:
str
- N_terms: int = 25#
- get_sample_volume(**kwargs)#
- height: Length#
- mu: Viscosity = <Quantity(0.001, 'pascal * second')>#
- n_int: int = 200#
- sample_transverse_profile(n_samples)[source]#
Sample particles from the focused sample stream.
The sample stream is assumed to be uniformly distributed over a centered rectangular region defined by:
\[y \in [-a_{\text{sample}}, a_{\text{sample}}] \quad \text{and} \quad z \in [-b_{\text{sample}}, b_{\text{sample}}]\]The area of the sample region is given by:
\[A_{\text{sample}} = 4\,a_{\text{sample}}\,b_{\text{sample}}\]and is estimated as:
\[A_{\text{sample}} = \frac{Q_{\text{sample}}}{u(0,0)}.\]- Parameters:
n_samples (int) – Number of particles to sample.
- Returns:
positions (ndarray) – A NumPy array of shape (n_samples, 2) containing the [y, z] coordinates (in m).
velocities (ndarray) – A NumPy array of shape (n_samples,) containing the local x-direction velocities (in m/s).
- Return type:
tuple
- sample_volume_flow: FlowRate#
- sheath_volume_flow: FlowRate#
- width: Length#