# Mechanical Interactions

## Introduction

In Biocellion, mechanical interactions in pairwise cells are handled on a separate file, model_routine_mech_intrct.cpp. model_routine_mech_intrct.cpp has three support functions, initJunctionSpAgent(), computeForceSpAgent(), and computeExtraMechIntrctSpAgent() which computes junction information, force between cells, and additional user-defined mechanical interactions, respectively. In this tutorial, we apply one of the functions, computeForceSpAgent(), to the previous model to incorporate shoving and adhesion between cells similar to Cell Sorting example (Tasseff).

The tutorial is organized in the following manner:

Section 2. Model Descriptions explains the 3 files changed from the previous tutorial:

• model_define.h
• model_routine_agent.cpp
• model_routine_mech_intrct.cpp

Section 3. Model Output describes the expected output and animation of the model.

## Model Descriptions

### model_define.h

The Hooke’s law is used for cell shoving, and a common formulation for cell adhesion. We define two constants used in the two forces in model_define.h.

       A_CELL_SPRING_CONSTANT


Bigger spring constant will cause greater displacement caused by shoving of two different cells. model_routine_agent.cpp

Mechanical forces are computed in model_routine_mech_intrct.cpp. To use the computed force and invoke at each time-step, call mechanical interaction data in adjustSpAgent(): disp = mechIntrctData.force.

The displacement for Random Boolean Network is used in conjunction with displacement from mechanical interactions.

### model_routine_mech_intrct.cpp

In computeForceSpAgent(), we determine whether there is shoving or adhesion between two cells based on the sum of radiuses. Variable ‘dist’, is the distance between two agents from its origins. If the ‘dist’ is less than or equal to the sum of radii (there is an overlap), then the formula for cell shoving is applied. The cell shoving force is governed by the spring force formula, ${\displaystyle F=-kx}$, where ${\displaystyle k}$ is A_CELL_SPRING_CONSTANT, and ${\displaystyle x}$ is ${\displaystyle (R-dist)}$. Else, cell adhesion formula is applied: ${\displaystyle F=-0.5*(dist-R)*exp\{{\frac {-1*(x-1.0)^{2}}{k}}\}}$, where ${\displaystyle k}$ is A_CELL_ADHESION constant. The 'force' magnitude is returned by reference for all x, y, z directions.

## Model Output

Refer to the attached animation.