VPTissue Reference Manual
cell2cell_transport/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/Cell.h"
23 #include "bio/Wall.h"
24 #include "sim/CoreData.h"
25 
26 namespace SimPT_Default {
27 namespace CellToCellTransport {
28 
29 using namespace std;
30 using namespace SimPT_Sim::Util;
31 using namespace boost::property_tree;
32 
34 {
35  Initialize(cd);
36 }
37 
39 {
40  m_cd = cd;
41  auto& p = m_cd.m_parameters;
42  m_chemical_count = p->get<unsigned int>("model.cell_chemical_count");
43 
44  //m_transport = p->get<double>("auxin_transport.transport");
45  m_k_export = p->get<double>("wortel.k_export");
46  m_k_import = p->get<double>("wortel.k_import");
47  m_km_shy = p->get<double>("wortel.km_shy");
48  //m_d = 1800.;//p->get<double>("auxin_transport.D[0]");
49  m_D.clear();
50  ptree const& arr_D = p->get_child("wortel.D.value_array");
51  unsigned int c = 0;
52  for (auto it = arr_D.begin(); it != arr_D.end(); it++) {
53  if (c == m_chemical_count) {
54  break;
55  }
56  m_D.push_back(it->second.get_value<double>());
57  c++;
58  }
59  // Defensive: if fewer than chemical_count parameters were specified, fill up.
60  for (unsigned int i = c; i < m_chemical_count; i++) {
61  m_D.push_back(0.0);
62  }
63 }
64 
65 void Wortel::operator()(Wall* w, double* dchem_c1, double* dchem_c2)
66 {
67  if ( !(w->GetC1()->IsBoundaryPolygon()) && !(w->GetC2()->IsBoundaryPolygon()) ) //This line is not relevant any more it appears...
68  {
69  const double apoplast_thickness = 2.;
70 
71  const double phi = (w->GetLength() / apoplast_thickness) * m_D[0] * ( ( w->GetC2()->GetChemical(0) / (w->GetC2()->GetArea()) )
72  - ( w->GetC1()->GetChemical(0) / (w->GetC1()->GetArea()) ) ); //LEVELS!
73 
74  dchem_c1[0] += phi; //LEVELS!
75  dchem_c2[0] -= phi; //LEVELS!
76 
77  // Active fluxes (PIN1 mediated transport) (Transporters measured in moles, here)
78  //const double k_import = 60.;
79  //const double k_export = m_transport; //SHY2 inhibits PIN transport
80 
81  // transport ((RM: efflux)) from cell 1 to cell 2
82  //const double kmshy = 0.1;//SHY2
83  const double shy12 = m_km_shy / ( m_km_shy + ( w->GetC1()->GetChemical(2) ) / (w->GetC1()->GetArea()) );//SHY2
84  const double trans12 = w->GetLength() * ( w->GetC1()->GetChemical(0) / (w->GetC1()->GetArea()) ) * (m_k_export * w->GetTransporters1(1) * shy12 + m_k_import);//LEVELS!
85 
86  // transport ((RM: efflux)) from cell 2 to cell 1
87  const double shy21 = m_km_shy / ( m_km_shy + ( w->GetC2()->GetChemical(2) ) / (w->GetC2()->GetArea()) );
88  const double trans21 = w->GetLength() * ( w->GetC2()->GetChemical(0) / (w->GetC2()->GetArea()) ) * (m_k_export * w->GetTransporters2(1) * shy21 + m_k_import);//LEVELS!
89 
90  dchem_c1[0] += (trans21 - trans12);//LEVELS!
91  dchem_c2[0] += (trans12 - trans21);//LEVELS!
92 
93  //DDV2012:second diffusive hormone - chemical '1'
94  const double phi2 = (w->GetLength() / apoplast_thickness) * m_D[1] * ( ( w->GetC2()->GetChemical(1) / (w->GetC2()->GetArea()) )
95  - ( w->GetC1()->GetChemical(1) / (w->GetC1()->GetArea()) ) ); //LEVELS!
96 
97  dchem_c1[1] += phi2 ; //LEVELS!
98  dchem_c2[1] -= phi2 ; //LEVELS!
99  }
100 }
101 
102 } // namespace
103 } // namespace
Core data with mesh, parameters, random engine and time data.
Definition: CoreData.h:38
STL namespace.
Core data used during model execution.
Namespace for miscellaneous utilities.
Definition: PTreeFile.cpp:44
Namespace for components of the Default model group.
Interface for Cell.
Wortel(const CoreData &cd)
Initializing constructor.
CellToCellTransport for Wortel model.
void operator()(Wall *w, double *dchem_c1, double *dchem_c2)
Execute.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
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 Wall.