Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add more realistic adhesion force options #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion model_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const REAL A_MCARRIER_DENSITY_PER_UB = 1000 / (32.0 *32.0 * 32.0 ) ; // 2000 /
const REAL INIT_CELLS_PER_MICROCARRIER = 4; //10;
const REAL A_CELL_D_MAX[ NUM_AGENT_TYPES ] = { 150.0 * 1.25, 20.0 * 1.25 };


const S32 ADHESION_TYPE = 2; //change the type of adhesion implementation, 1 for tanh based, 2 for piecewise linear, 3 for lennart-jones
const REAL ADHESION_S = 0.01;
const REAL RANDOM_VIBRATION_SCALE = 0.05;

Expand Down
62 changes: 56 additions & 6 deletions model_routine_mech_intrct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ NOTICE: These data were produced by Battelle Memorial Institute (BATTELLE) unde
using namespace std;

#if HAS_SPAGENT

static REAL addAdhesionForce( REAL& Fij, const REAL& xij, const REAL& sij);

void ModelRoutine::initJunctionSpAgent( const VIdx& vIdx0, const SpAgent& spAgent0, const UBEnv& ubEnv0, const VIdx& vIdx1, const SpAgent& spAgent1, const UBEnv& ubEnv1, const VReal& vDir/* unit direction vector from spAgent1 to spAgent0 */, const REAL dist, BOOL& link, JunctionEnd& end0/* dummy if link == false */, JunctionEnd& end1/* dummy if link == false */ ) {
/* MODEL START */
link = false;
Expand Down Expand Up @@ -72,6 +75,7 @@ void ModelRoutine::computeMechIntrctSpAgent( const S32 iter, const VIdx& vIdx0,
REAL R1 = A_AGENT_SHOVING_SCALE[type1]*spAgent1.state.getModelReal( CELL_MODEL_REAL_RADIUS ) ;
REAL dist_threshold = R0 + R1;
REAL D = R0 + R1 - 0.5*A_AGENT_SHOVING_LIMIT[type0] - 0.5*A_AGENT_SHOVING_LIMIT[type1];
REAL Fij = 0.0;
REAL mag = 0.0;
REAL stress = 0.0 ;
REAL xij = D - dist ;
Expand All @@ -86,7 +90,7 @@ void ModelRoutine::computeMechIntrctSpAgent( const S32 iter, const VIdx& vIdx0,
}
else{
// compute elastic force
REAL Fij = 0.5 * xij * tanh(FABS(xij)*sij);
Fij += addAdhesionForce(Fij, xij, sij);
mag = mag + Fij ;
stress = stress + dist * Fij ;

Expand Down Expand Up @@ -118,11 +122,13 @@ void ModelRoutine::computeMechIntrctSpAgent( const S32 iter, const VIdx& vIdx0,
}

// add force rigth away
REAL D = R0 + R1;
REAL xij = D - dist ;
REAL Fij = 0.5 * xij * tanh(FABS(xij)*sij);
mag = mag + Fij ;
stress = stress + dist * Fij;
REAL D = R0 + R1;
REAL xij = D - dist ;
REAL Fij = 0.0;
Fij += addAdhesionForce(Fij, xij, sij);

mag = mag + Fij ;
stress = stress + dist * Fij;
}
}

Expand Down Expand Up @@ -150,5 +156,49 @@ void ModelRoutine::computeMechIntrctSpAgent( const S32 iter, const VIdx& vIdx0,
return;

}
static REAL addAdhesionForce( REAL& Fij, const REAL& xij, const REAL& sij){
// compute elastic force
switch (ADHESION_TYPE) {

//original tanh based adhesion force (more info ask Boris Aguilar)
case 1:
Fij += 0.5 * xij * tanh(FABS(xij)*sij);
break;

// piecewise linear based on dx.doi.org/10.1021/la500045q
// bond strenght sij should be 1 for cell-microcarrier bond in above literature
case 2:
if ( xij < 1.5 ) { //distance in micron
Fij += sij * xij * 30; //force in nN
}
else if ( xij < 5) {
Fij += sij * 45 - 0.3 * (xij - 1.5);
}
else if ( xij < 13) {
Fij += sij * 43 - 5 * (xij - 5);
}
else if ( xij < 16.5) {
Fij += sij * 3.5 - 0.9 * (xij - 13);
}
break;

// adhesion force with Lennard-Jones potential
case 3:{
REAL sig;
REAL eps = 45 ;
REAL LJBase = sig / FABS(xij);

Fij += 4 * eps * ( pow( LJBase , 6) - pow( LJBase , 12) ) * sij;
break;
}
// adhesion force by integrin simulation
case 4:
//TODO
break;

}

return Fij;
}
#endif