27 namespace CellToCellTransport {
43 const auto& p = m_cd.m_parameters->get_child(
"smith_phyllotaxis");
44 m_D = p.get<
double>(
"D");
45 m_T = p.get<
double>(
"T");
46 m_k_T = p.get<
double>(
"k_T");
47 m_c = p.get<
double>(
"c");
57 Cell * C_i = w->GetC1();
58 Cell * C_j = w->GetC2();
61 if (!(C_i->IsBoundaryPolygon() || C_j->IsBoundaryPolygon())) {
63 const double IAA_i = C_i->GetChemical(0);
64 const double IAA_j = C_j->GetChemical(0);
65 const double PIN_i = C_i->GetChemical(1);
66 const double PIN_j = C_j->GetChemical(1);
69 const double V_i = C_i->
GetArea();
70 const double V_j = C_j->
GetArea();
74 const double diff_j_to_i = l_ij * m_D * (IAA_j - IAA_i);
75 dchem_c1[0] += diff_j_to_i / V_i;
76 dchem_c2[0] -= diff_j_to_i / V_j;
80 function<double(Cell *, Cell *, Wall *)> P_ab_denom_term = \
85 if (!(C_a->IsBoundaryPolygon() || C_b->IsBoundaryPolygon())) {
86 const double IAA_b = C_b->GetChemical(0);
87 const double l_ab = W_ab->GetLength();
88 return l_ab * exp(m_c * IAA_b);
96 const double P_ij = PIN_i * l_ij * exp(m_c * IAA_j) /
ReduceCellWalls(C_i, P_ab_denom_term);
97 const double P_ji = PIN_j * l_ij * exp(m_c * IAA_i) /
ReduceCellWalls(C_j, P_ab_denom_term);
98 const double actr_j_to_i = P_ji * IAA_j * IAA_j / (1.0 + m_k_T * IAA_i * IAA_i) \
99 - P_ij * IAA_i * IAA_i / (1.0 + m_k_T * IAA_j * IAA_j);
100 dchem_c1[0] += m_T * actr_j_to_i / V_i;
101 dchem_c2[0] -= m_T * actr_j_to_i / V_j;
Core data with mesh, parameters, random engine and time data.
A cell contains walls and nodes.
CellToCellTransport for SmithPhyllotaxis model.
R ReduceCellWalls(Cell *cell, std::function< R(Cell *, Cell *, Wall *)> f)
Traverse walls of cell and apply functor.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
void operator()(Wall *w, double *dchem_c1, double *dchem_c2)
Execute.
SmithPhyllotaxis(const CoreData &cd)
Initializing constructor.
Namespace for components of the Default model group.
double GetLength() const
Returns (and calculates, if length marked as dirty) the length along all nodes.
Interface/Implementation for ReduceCellWalls.
double GetArea() const
Return the area of the cell.
A cell wall, runs between cell corner points and consists of wall elements.