VPTissue Reference Manual
cell_housekeep/SmithPhyllotaxis.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2016 Universiteit Antwerpen
3  *
4  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
5  * the European Commission - subsequent versions of the EUPL (the "Licence");
6  * You may not use this work except in compliance with the Licence.
7  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the Licence is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the Licence for the specific language governing
13  * permissions and limitations under the Licence.
14  */
20 #include "SmithPhyllotaxis.h"
21 
22 
23 #include "bio/Cell.h"
24 #include "bio/Mesh.h"
25 
26 #include <cmath>
27 
28 namespace SimPT_Default {
29 namespace CellHousekeep {
30 
31 using namespace std;
32 using namespace boost::property_tree;
33 
35 {
36  Initialize(cd);
37 }
38 
40 {
41  m_cd = cd;
42  auto& p = m_cd.m_parameters;
43 
44  // Initialize model parameters from ptree
45  m_cell_expansion_rate = p->get<double>("cell_mechanics.cell_expansion_rate");
46  m_elastic_modulus = p->get<double>("cell_mechanics.elastic_modulus");
47  m_response_time = p->get<double>("cell_mechanics.response_time");
48  m_time_step = p->get<double>("model.time_step");
49  m_viscosity_const = p->get<double>("cell_mechanics.viscosity_const");
50  // Calculate additional parameters
51  m_area_incr = m_cell_expansion_rate * m_time_step;
52 }
53 
55 {
56  const string ham_select = m_cd.m_parameters->get<string> ("model.mc_hamiltonian");
57 
58  const double IAA = cell->GetChemical(0);
59  const double t_area = cell->GetTargetArea();
60  const double t_length = cell->GetTargetLength();
61 
62  // Logistic function centered around IAA concentration 5 seems to give more
63  // localized growth than the expression used in AuxinGrowth
64  //const double update_t_area = t_area + 1.0 / (1.0 + exp(-IAA + 5.0)) * m_area_incr;
65  // TODO: reverted for now, DDV suggested it's more adopted in the field.
66  const double update_t_area = t_area + IAA / (1.0 + IAA) * m_area_incr;
67  // The update in cell length (longest axis of the cell ellipse) is chosen
68  // such that l / sqrt(A) is a constant which means that the cell should be
69  // as "square" (or round) as possible.
70  const double update_t_length = t_length * sqrt(update_t_area / t_area);
71 
72  cell->SetTargetArea(update_t_area);
73  cell->SetTargetLength(update_t_length);
74 
75  if (ham_select == "ElasticWall") {
76  // Update the rest length of wall
77  // TODO: 1.50 (maximal extension) and 1.25 (irreversible extension) are hidden parameters
78  for (list<Wall*>::iterator i = cell->GetWalls().begin(); i != cell->GetWalls().end(); ++i) {
79  Wall* w = *i;
80  if (w->GetLength() > 1.50 * w->GetRestLength()) {
81  // Irreversible extension
82  w->SetRestLength(w->GetLength() / 1.25);
83  }
84  }
85  }
86 
87  if (ham_select == "Maxwell") {
88  // Update the solute of cell and the rest length of wall
89  const double solute = m_viscosity_const * sqrt(cell->GetArea());
90  const double update_solute = solute
91  - (solute - cell->GetSolute()) * exp(-0.1 * m_time_step / m_response_time);
92  cell->SetSolute(update_solute);
93 
94  for (list<Wall*>::iterator i = cell->GetWalls().begin(); i != cell->GetWalls().end(); ++i) {
95  Wall* w = *i;
96 
97  const double update_rest_length = w->GetLength()
98  - (w->GetLength() - w->GetRestLength())
99  * exp(-0.01 * m_elastic_modulus * m_time_step / m_viscosity_const);
100  w->SetRestLength(update_rest_length);
101  }
102  }
103 }
104 
105 } // namespace
106 } // namespace
107 
108 
void Initialize(const CoreData &cd)
Initialize or re-initialize.
Core data with mesh, parameters, random engine and time data.
Definition: CoreData.h:38
STL namespace.
A cell contains walls and nodes.
Definition: Cell.h:48
SmithPhyllotaxis(const CoreData &cd)
Initializing constructor.
CellHousekeep for SmithPhyllotaxis model.
const std::list< Wall * > & GetWalls() const
Access the cell's walls.
Definition: Cell.h:88
Namespace for components of the Default model group.
Interface for Cell.
double GetLength() const
Returns (and calculates, if length marked as dirty) the length along all nodes.
Definition: Wall.cpp:97
double GetArea() const
Return the area of the cell.
Definition: Cell.cpp:178
A cell wall, runs between cell corner points and consists of wall elements.
Definition: Wall.h:48
Interface for Mesh.