VPTissue Reference Manual
cell_chemistry/Wortel.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 "Wortel.h"
21 
22 #include "bio/BoundaryType.h"
23 #include "bio/Cell.h"
24 #include "bio/ReduceCellWalls.h"
25 
26 
27 namespace SimPT_Default {
28 namespace CellChemistry {
29 
30 using namespace std;
31 using boost::property_tree::ptree;
32 
34 {
35  Initialize(cd);
36 }
37 
39 {
40  m_cd = cd;
41  //const auto& p = m_cd.m_parameters->get_child("auxin_transport");
42  const auto& p = m_cd.m_parameters->get_child("wortel");
43 
44  //m_aux1prod = p.get<double>("aux1prod");
45  //m_aux_breakdown = p.get<double>("aux_breakdown");
46  m_aux_breakdown = p.get<double>("aux_breakdown");
47  m_aux_production = p.get<double>("aux_production");
48  m_aux_shy2_breakdown = p.get<double>("aux_shy2_breakdown");
49  m_aux_sink = p.get<double>("aux_sink");
50  m_aux_source = p.get<double>("aux_source");
51  m_ck_breakdown = p.get<double>("ck_breakdown");
52  m_ck_shy2_production = p.get<double>("ck_shy2_production");
53  m_ck_sink = p.get<double>("ck_sink");
54  m_ck_source = p.get<double>("ck_source");
55  m_ga_breakdown = p.get<double>("ga_breakdown");
56  m_ga_production = p.get<double>("ga_production");
57  m_km_aux_ck = p.get<double>("km_aux_ck");
58  m_km_aux_shy2 = p.get<double>("km_aux_shy2");
59  m_shy2_breakdown = p.get<double>("shy2_breakdown");
60  m_shy2_production = p.get<double>("shy2_production");
61  m_vm_aux_ck = p.get<double>("vm_aux_ck");
62 
63 
64 }
65 
66 void Wortel::operator()(Cell* cell, double* dchem)
67 {
70  //double kmauxCK = 100.;
71  if (cell->GetIndex() >= 2 && cell->GetIndex() <= 9 )
72  {
73  dchem[0] = m_aux_source + (cell->GetArea()) * m_aux_production - m_aux_breakdown * (cell->GetChemical(0)) ;//LEVELS!
74  dchem[1] = m_ck_source + ( m_vm_aux_ck * (cell->GetArea()) * m_km_aux_ck / ( m_km_aux_ck + (cell->GetChemical(0) / (cell->GetArea())) ) ) - m_ck_breakdown * (cell->GetChemical(1)) ;//LEVELS!
75  }
76  else if ( (cell->GetIndex() >= 0 && cell->GetIndex() <= 1) || (cell->GetIndex() >= 10 && cell->GetIndex() <= 11) )
77  {
78  dchem[0] = -m_aux_sink + (cell->GetArea()) * m_aux_production - m_aux_breakdown * (cell->GetChemical(0)) ;//LEVELS!
79  dchem[1] = -m_ck_sink + ( m_vm_aux_ck * (cell->GetArea()) * m_km_aux_ck / ( m_km_aux_ck + (cell->GetChemical(0) / (cell->GetArea())) ) ) - m_ck_breakdown * (cell->GetChemical(1)) ;//LEVELS!
80  }
81  else
82  {
83  dchem[0] = (cell->GetArea()) * m_aux_production - m_aux_breakdown * (cell->GetChemical(0)) ;//LEVELS!
84  dchem[1] = ( m_vm_aux_ck * (cell->GetArea()) * m_km_aux_ck / ( m_km_aux_ck + (cell->GetChemical(0) / (cell->GetArea())) ) ) - m_ck_breakdown * (cell->GetChemical(1)) ;//LEVELS!
85  }
86 
88 
89  if( ( cell->GetChemical(1) / (cell->GetArea()) ) > m_ck_shy2_production )
90  {
91  dchem[2] = m_shy2_production * (cell->GetArea()) - (cell->GetChemical(2)) * ( m_shy2_breakdown + m_aux_shy2_breakdown * ( (cell->GetChemical(0) / cell->GetArea()) / ( m_km_aux_shy2 + cell->GetChemical(0) / cell->GetArea()) ) );
92  }
93  else
94  {
95  dchem[2] = - m_shy2_breakdown * (cell->GetChemical(2));
96  }
97 
99  if( cell->GetCellType() > 2 && cell->GetCellType() < 8 )
100  {
101  dchem[3] = m_ga_production - m_ga_breakdown * cell->GetChemical(3);
102  }
103  else
104  {
105  dchem[3] = 2 * m_ga_production - m_ga_breakdown * cell->GetChemical(3);//wider cells have proportionally more GA production
106  }
107 }
108 
109 } // namespace
110 } // namespace
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
void operator()(Cell *cell, double *dchem)
Execute.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
CellChemistry for Wortel model.
Namespace for components of the Default model group.
Wortel(const CoreData &cd)
Initializing constructor.
Interface for Cell.
BoundaryType enumeration class.
int GetIndex() const
Return the index.
Definition: Cell.h:76
Interface/Implementation for ReduceCellWalls.
double GetArea() const
Return the area of the cell.
Definition: Cell.cpp:178