You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crowded cells overlap without limit: relaxation under-resolves contacts and growth ignores confinement #51
On master, nothing stops cells from growing into each other. Contact relaxation leaves large overlaps even in a colony with free space around it, and growth never responds to contact, so a confined colony keeps growing until every pair overlaps completely. The solver reports CONVERGED on every step throughout.
This replaces #42. The stall shown there came from the unmerged branch of #41; master has the opposite behaviour.
Measurements
All on CPU at ae689c8, dt = 0.05, growth rate 1, default MechanicsConfig() unless stated. "Overlap" is the deepest pair penetration per cell, from find_cell_contacts.
Closed 4 x 4 x 1.2 chamber (the square_trap model from #41: radius 0.4, divide above length 2):
Time
Cells
Footprint / floor area
Deepest overlap
3.5
8
0.60
0.06
4.0
8
0.82
0.49
5.0
16
1.43
0.40
8.05
128
8.21
0.80 (a full diameter)
11.0
512
43.5
0.80
Unconfined colony (radius 0.5, no constraints), median / 90th percentile overlap per cell:
Cells
gamma = 10 (default)
gamma = 100
64
0.07 / 0.12
0.016 / 0.040
512
0.32 / 0.58
0.003 / 0.012
At the default gamma, one relaxation pass on the 512-cell colony moves the median overlap from 0.35 to 0.33.
examples/microfluidic_trap.py (dt = 0.02, 700 steps): median / 90th percentile overlap 0.15 / 0.34 at 169 cells with gamma = 10, and 0.13 / 0.50 at 223 cells with gamma = 100.
Causes
Under-relaxation. The regularized solve damps motion by cell mass over gamma. Resolving an overlap in the middle of a colony means moving a chain of cells, so at gamma = 10 a pass resolves only a small fraction of it once the colony is more than a few cells across.
No growth response.Simulation.step commits growth before mechanics runs, and relax_cell_mechanics integrates without length increments. The rule max(0, desired + delta_l) in integrate_mechanics_result is reached only from a C++ unit test.
Soft walls in the solve, hard walls after it. Wall rows carry the same weight as pair rows, so a crowded solve pushes cells into walls and the projection then moves them back onto their neighbours.
Approaches that did not work on their own
Prototyped in Python against the two cases above:
More passes or a larger gamma. Fixes the unconfined colony at gamma >= 100; does not bound overlap in the closed chamber or the trap.
Retracting growth by the solve's length correction. Slows growth but never stalls it: the chamber still reached 135 cells and 12x floor coverage at t = 15. It also suppresses growth inside large unconfined colonies.
Scaling growth by measured overlap. Stalls the chamber, but jammed cells still overlap by about a radius, and the settings that give a clean jam cut unconfined growth by 20-30%.
Expected behaviour
An unconfined colony grows at close to its nominal rate with small overlaps.
A confined colony rearranges to use the free space, then stops growing where it is jammed, with bounded overlap.
A jammed colony keeps stepping without an exception.
Existing checkpoints, including crowded ones, still resume.
Change:Replace the least-squares relaxation with contact dynamics coupled to growth #54 replaces the least-squares relaxation with a contact solve that has non-negative forces and growth in the same problem. The closed chamber measured above fills to 8–9 cells and holds, and overlaps stay at what the contact forces press into the cells.
The measurements in this issue were taken on the least-squares relaxation, which #54 removes, so they cannot be reproduced after it merges.
Activity
marpaia commentedon Nov 13, 2026
This is being fixed in #54, which closes this issue when it merges.
The measurements in this issue were taken on the least-squares relaxation, which #54 removes, so they cannot be reproduced after it merges.