VPTissue Reference Manual
cell2cell_transport/AuxinGrowth.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 "AuxinGrowth.h"
21 
22 #include "bio/Cell.h"
23 #include "bio/Wall.h"
24 
25 namespace SimPT_Default {
26 namespace CellToCellTransport {
27 
28 using namespace std;
29 using namespace boost::property_tree;
30 
32 {
33  Initialize(cd);
34 }
35 
37 {
38  m_cd = cd;
39  auto& p = m_cd.m_parameters;
40 
41  m_chemical_count = p->get<unsigned int>("model.cell_chemical_count");
42  m_D.clear();
43  m_ka = p->get<double>("auxin_transport.ka");
44  m_tip_source = p->get<double>("auxin_transport.leaf_tip_source");
45  m_sam_efflux = p->get<double>("auxin_transport.sam_efflux");
46  m_transport = p->get<double>("auxin_transport.transport");
47 
48  ptree const& arr_D = p->get_child("auxin_transport.D.value_array");
49  unsigned int c = 0;
50  for (auto it = arr_D.begin(); it != arr_D.end(); it++) {
51  if (c == m_chemical_count) {
52  break;
53  }
54  m_D.push_back(it->second.get_value<double>());
55  c++;
56  }
57  // Defensive: if fewer than chemical_count parameters were specified, fill up.
58  for (unsigned int i = c; i < m_chemical_count; i++) {
59  m_D.push_back(0.0);
60  }
61 }
62 
63 void AuxinGrowth::operator()(Wall* w, double* dchem_c1, double* dchem_c2)
64 {
65  // leaf edge is const source of auxin (Neumann boundary condition: we specify the influx)
66  if (w->GetC2()->IsBoundaryPolygon()) {
67  if (w->IsAuxinSource()) {
68  double const aux_flux = m_tip_source * w->GetLength();
69  dchem_c1[0] += aux_flux;
70  }
71  return;
72  }
73 
74  if (w->GetC1()->IsBoundaryPolygon()) {
75  if (w->IsAuxinSource()) {
76  double const aux_flux = m_tip_source * w->GetLength();
77  dchem_c2[0] += aux_flux;
78  }
79  else if (w->IsAuxinSink()) {
80  // efflux into Shoot Apical meristem
81  // we assume all PINs are directed towards shoot apical meristem
82  double const chem = w->GetC2()->GetChemical(0);
83  dchem_c2[0] -= m_sam_efflux * chem / (m_ka + chem);
84  }
85  return;
86  }
87 
88  // Passive fluxes (Fick's law)
89  // only auxin flux for now; flux depends on edge length and concentration difference
90  double const phi = w->GetLength() * m_D[0]
91  * (w->GetC2()->GetChemical(0) - w->GetC1()->GetChemical(0));
92  dchem_c1[0] += phi;
93  dchem_c2[0] -= phi;
94 
95  // Active transport (PIN1 mediated) (Transporters measured in moles, here)
96  double const chem_1_0 = w->GetC1()->GetChemical(0);
97  double const chem_2_0 = w->GetC2()->GetChemical(0);
98  double const trans12 = m_transport * w->GetTransporters1(1) * chem_1_0 / (m_ka + chem_1_0);
99  double const trans21 = m_transport * w->GetTransporters2(1) * chem_2_0 / (m_ka + chem_2_0);
100  dchem_c1[0] += trans21 - trans12;
101  dchem_c2[0] += trans12 - trans21;
102 }
103 
104 } // namespace
105 } // namespace
Core data with mesh, parameters, random engine and time data.
Definition: CoreData.h:38
STL namespace.
Namespace for components of the Default model group.
Interface for Cell.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
CellToCellTransport for AuxinGrowth model.
void operator()(Wall *w, double *dchem_c1, double *dchem_c2)
Execute.
double GetLength() const
Returns (and calculates, if length marked as dirty) the length along all nodes.
Definition: Wall.cpp:97
AuxinGrowth(const CoreData &cd)
Initializing constructor.
A cell wall, runs between cell corner points and consists of wall elements.
Definition: Wall.h:48
Interface for Wall.