package affectors; import main.Node; import main.Globals; /** This is one half of a pair of Affectors that moves things between neighboring faces of a cell. This is a rough approximation to diffusion around the membrane of a cell. This Affector models the efflux from one face to its neighboring faces. Whenever you add this to a Node, you should also add the LMxferIAff as well, which does the influx part. Note that the transfer rate should be the same in both the LMxferEAff and LMxferIAff. Also remember that for membrane-bound Nodes, the program keeps track of a separate concentration on each face of a cell, so the formula below is for the concentration on one face.
Formula
dNODEX/dt = - LMxfer_NODEX * NODEX
Parameters
Target [NODEX] | The Node that is being diffused. |
Transfer rate [LMxfer_NODEX] | The rate at which the Node moves from one face to its neighbors. |
Usage
*/
public class LMxferEAff extends Affector {
/** Efflux rate... make sure it's identical to the influx rate. */
int xferRateParam;
static final String desc = "Lateral membrane transfer; version E for efflux";
static final String [] nodeDescriptions = {"Target"};
static final String [] paramDescriptions = {"Rate of transfer"};
static final int [] whichSides = {-1};
public LMxferEAff() {}
protected void setLabelsAndTypes() {
setDescriptions(this.desc, nodeDescriptions, paramDescriptions);
setSided(true, whichSides);
setContainsTarget(true);
this.Type[GUI_CAPABLE] = 1;
this.Type[CERTIFICATION] = Affector.RETURNS_DERIV;
this.Type[MATHTYPE] = Affector.HH;
this.Type[TERMTYPE] = Affector.CONVERSION;
}
public void setParameterNumbers(int [] param_nums)
{
xferRateParam = param_nums[0];
}
public float getValue(Node which_node) {
return -Globals.characteristicTime * params[xferRateParam] * 2 * Nodes[0].getIntegrationValue(side);
}
public float getNCValue(Node which_node) {
return -Globals.characteristicTime * params[xferRateParam] * 2;
}
}
&NODEX
&LMxferEAff NODEX LMxfer_NODEX
&LMxferIAff NODEX LMxfer_NODEX
&endNODEX