Skip to content

Add microfluidic device and biology tutorials - #6

Open
marpaia wants to merge 2 commits into
marpaia/microfluidics-device-assetsfrom
marpaia/microfluidics-tutorials
Open

Add microfluidic device and biology tutorials#6
marpaia wants to merge 2 commits into
marpaia/microfluidics-device-assetsfrom
marpaia/microfluidics-tutorials

Conversation

@marpaia

@marpaia marpaia commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Purpose

This final stack layer provides runnable reference models that compose the earlier contributions: #2 supplies wall and transport geometry, #3 supplies native CPU, Metal, and CUDA flow solvers, #4 supplies kinematic cell drift and runtime feedback, and #5 supplies the Prindle source drawings. This PR adds the compositions and their documentation; it introduces no new flow discretization.

Reference models

  • microfluidic_trap.py couples nutrient delivery, consumption, growth, flow, colony-dependent resistance, and outlet washout.
  • danino_clock.py places the SimBOL quorum clock and a state-dependent AHL loss field in the trap device.
  • biopixel_trap.py models one Prindle trapping region while keeping publication-derived dimensions, CAD-derived layout facts, and numerical model choices distinct.
  • pillar_channel.py combines cylindrical walls, conservative voxelization, adhered founders, released daughters, colony feedback, and washout.

Backend selection

Each model first creates its Simulation with the requested backend and then asks the device helper to solve the initial flow field through that same simulation. Feedback updates also pass the active simulation to the flow solver. Initial and repeated solves therefore execute on CPU, Metal, or CUDA consistently with the rest of the model; importing a tutorial module does not perform an implicit CPU solve.

Model construction

  • One device definition creates analytic mechanics walls, the conservative obstacle mask, fixed media reservoirs, gap mobility, and the solved velocity field.
  • At a fixed model-defined cadence, cell volume is rasterized into resistance, flow is re-solved through the selected backend, and Simulation.set_velocity_field replaces the live field. The field then transports signals and kinematically moves released cells.
  • Cells beyond the outlet are removed while lineage records remain available.
  • The flow documentation distinguishes the depth-averaged closure used for shallow devices and frequent feedback from the resolved MAC solver used when the grid adequately resolves cross-channel profiles.

Scientific scope

  • These examples are qualitative reference models, not reproductions or experimental validations of the Prindle or Danino studies.
  • The biopixel example represents one trap under a chosen local inlet condition. It does not model the full array manifold, inter-trap coupling, or measured flow nonuniformity.
  • CAD scale is a documented inference corroborated by publication dimensions, not a generic DXF unit convention.
  • Flow, transport, colony resistance, and feedback cadence are explicit model choices. Quantitative claims require measured boundary conditions and properties together with grid, timestep, and parameter-sensitivity studies.
  • Cell response remains the passive kinematic rule from Add experimental kinematic flow coupling #4 rather than force-balanced fluid-structure interaction.

Stack

PR 5 of 5.

Base: #5 (marpaia/microfluidics-device-assets).

This is the top of the five-PR stack.

Validation at 1ffe2d3

  • Full Python suite: 283 passed, 43 skipped
  • Full pre-commit suite: passed
  • CPU native tests: 22 of 22 passed
  • Metal native tests on Apple M4 Max: 23 of 23 passed
  • CPU and Metal analytic flow benchmarks: 10 of 10 checks passed on each backend
  • CUDA 12.8 compile and link gate: 72 targets built and 23 tests registered; no NVIDIA runtime was available, so CUDA runtime conformance remains pending

@marpaia
marpaia force-pushed the marpaia/microfluidics-tutorials branch from 18ec62b to 8d78d1f Compare August 20, 2026 17:08
@marpaia
marpaia force-pushed the marpaia/microfluidics-tutorials branch from 8d78d1f to 27a3c97 Compare August 20, 2026 17:10
@marpaia
marpaia force-pushed the marpaia/microfluidics-tutorials branch 2 times, most recently from 11fd9a5 to 8a21217 Compare August 20, 2026 21:14
@marpaia
marpaia force-pushed the marpaia/microfluidics-tutorials branch from 8a21217 to d130f70 Compare August 20, 2026 21:38
@marpaia
marpaia force-pushed the marpaia/microfluidics-tutorials branch from d130f70 to 84c95bb Compare August 20, 2026 22:05
@marpaia
marpaia marked this pull request as ready for review August 20, 2026 23:48
@marpaia
marpaia force-pushed the marpaia/microfluidics-tutorials branch from 84c95bb to 1ffe2d3 Compare August 29, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant