29 namespace CellHousekeep {
42 auto& p = m_cd.m_parameters;
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");
51 m_area_incr = m_cell_expansion_rate * m_time_step;
56 const string ham_select = m_cd.m_parameters->get<
string> (
"model.mc_hamiltonian");
58 const double IAA = cell->GetChemical(0);
59 const double t_area = cell->GetTargetArea();
60 const double t_length = cell->GetTargetLength();
66 const double update_t_area = t_area + IAA / (1.0 + IAA) * m_area_incr;
70 const double update_t_length = t_length * sqrt(update_t_area / t_area);
72 cell->SetTargetArea(update_t_area);
73 cell->SetTargetLength(update_t_length);
75 if (ham_select ==
"ElasticWall") {
78 for (list<Wall*>::iterator i = cell->
GetWalls().begin(); i != cell->
GetWalls().end(); ++i) {
80 if (w->
GetLength() > 1.50 * w->GetRestLength()) {
87 if (ham_select ==
"Maxwell") {
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);
94 for (list<Wall*>::iterator i = cell->
GetWalls().begin(); i != cell->
GetWalls().end(); ++i) {
97 const double update_rest_length = w->
GetLength()
99 * exp(-0.01 * m_elastic_modulus * m_time_step / m_viscosity_const);
100 w->SetRestLength(update_rest_length);
void Initialize(const CoreData &cd)
Initialize or re-initialize.
Core data with mesh, parameters, random engine and time data.
A cell contains walls and nodes.
SmithPhyllotaxis(const CoreData &cd)
Initializing constructor.
void operator()(Cell *cell)
Execute.
CellHousekeep for SmithPhyllotaxis model.
const std::list< Wall * > & GetWalls() const
Access the cell's walls.
Namespace for components of the Default model group.
double GetLength() const
Returns (and calculates, if length marked as dirty) the length along all nodes.
double GetArea() const
Return the area of the cell.
A cell wall, runs between cell corner points and consists of wall elements.