Add numerical flow solvers for device authoring - #3
Open
marpaia wants to merge 3 commits into
Open
Conversation
marpaia
force-pushed
the
marpaia/microfluidics-flow-solvers
branch
from
August 20, 2026 17:10
2ca3f45 to
90c7b60
Compare
This was referenced Aug 20, 2026
marpaia
force-pushed
the
marpaia/microfluidics-flow-solvers
branch
from
August 20, 2026 20:52
90c7b60 to
1ac63e0
Compare
marpaia
marked this pull request as ready for review
August 20, 2026 23:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This layer introduces the numerical flow and device-authoring methodology. It turns PR #2's wall and transport primitives into reproducible microfluidic inputs; it does not yet move cells with the resulting field.
Key methodological contributions
cellmodeller2.flowsolvesdiv(m grad p) = 0over fluid voxels with harmonic face mobilities, fixed inlet and outlet pressures, and no wall flux. A matrix-free preconditioned conjugate-gradient solve produces a face-staggered field that satisfies discrete continuity to solver tolerance and is normalized to a requested mean inlet speed. Gap-height mobility supplies the Hele-Shaw closure.cellmodeller2.stokessolves the incompressible Stokes-Brinkman equations on a marker-and-cell grid with no-slip voxel walls and optional drag. It returns the same velocity representation used by signal transport, providing a higher-cost reference when the mesh resolves the channel gap.colony_mobilitycombines that resistance with channel mobility, andSimulation.set_velocity_fieldatomically installs a re-solved field at a model-chosen cadence.TrapChannelDeviceandBiopixelTrapDevicegenerate analytic mechanics walls, a conservatively voxelized solid mask, fixed reservoirs, gap mobility, and a solved flow field from common dimensions. A voxel is solid only when it lies wholly inside a wall, so the smooth mechanics boundary encloses the transport mask.INSERTtransforms are not applied. Separately,BiopixelTrapDevicedefaults to the published 100 x 85 x 1.65 micrometer Prindle trapping region; channel dimensions, wall thickness, and flow speed remain explicit model choices. The supplied CAD assets are isolated in Add Prindle microfluidic device source files #5 and interpreted in Add microfluidic device and biology tutorials #6.Scientific scope
Stack
PR 2 of 5.
Base: #2 (
marpaia/microfluidics-primitives)Next: #4 (
marpaia/microfluidics-experimental-coupling)Validation