Skip to content

fix velocity calculation for cells between fibers - #443

Open
rheiland wants to merge 4 commits into
MathCancer:developmentfrom
rheiland:test-physimess
Open

rheiland wants to merge 4 commits into
MathCancer:developmentfrom
rheiland:test-physimess

Conversation

@rheiland

@rheiland rheiland commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator
  • in certain cell-fiber arrangements, a cell's velocity could be unrealistically large
  • fix is computationally negligible
  • discovered while helping @AdrianneJennerQUT on a PhysiMeSS-related model
  • added sample_projects/physimess/config/Cell_Fibre_Mechanics/test_2fibres.{xml,csv} to test
  • minimally tested on other PhysiMeSS models
  • added sample_projects/physimess/config/Cell_Fibre_Mechanics/fibre_rotating.xml to match https://doi.org/10.46471/gigabyte.136

This image illustrates the undesirable result from the original code, using the test_2fibres.xml. It shows a single cell between 2 fibers, chemotaxing to the secreting cell at the bottom. The left plot is the .svg plot, showing the fibers as rods. The right plot, from the Studio, shows the "trapped" cell's large velocity (magnitude > 1000) from a custom_data variable (requiring a custom.cpp, not in this PR). And unfortunately, the right (Studio) plot just plots the fibers as circles instead of rods.

Screenshot 2026-11-16 at 10 10 45 AM

@rheiland

Copy link
Copy Markdown
Collaborator Author

@vincent-noel and others more familiar with PhysiMeSS should comment before merging.

marcorusc added a commit to PhysiMeSS/PhysiMeSS that referenced this pull request Nov 17, 2026
…a cell

The adhesion to a fibre and the drag by its contact were computed from
the previous velocity of the cell and added once per fibre.

- the velocity of a cell between two fibres could diverge (more than
  100 micron in one minute with the default parameters). As proposed in
  MathCancer#443: the adhesion factor is limited to positive
  values, and the previous velocity is no longer subtracted per fibre;
  the strongest contact damps the motility across that fibre, once
- the adhesion always pushed the cell along the stored orientation of
  the fibre, whatever the direction of the cell: a cell was accelerated
  along a fibre in one direction and blocked in the other. It is now
  along the fibre in the direction of motion (not in the PhysiCell PR)

The three formulas are in PhysiMeSS_geometry.h with 8 unit tests.
MODEL_CHANGES.md: new section 4.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@marcorusc

Copy link
Copy Markdown
Contributor

Hi Randy. I reproduced the problem and tested the fix while working on the 3d branch of PhysiMeSS (physimess_3d in PhysiMeSS/PhysiMeSS). I finished sorting the code of Ambre, now everything should be cleaner.
The fix of course works so thanks a lot, I have patched the 3d version too and added some unit test.

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.

2 participants