VPTissue Reference Manual
cell2cell_transport/Basic.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 "Basic.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 
36 void Basic::Initialize(const CoreData& cd)
37 {
38  m_cd = cd;
39  auto& p = m_cd.m_parameters;
40 
41  ptree const& arr_D = p->get_child("auxin_transport.D.value_array");
42  m_d = arr_D.begin()->second.get_value<double>();
43 
44  m_ka = p->get<double>("auxin_transport.ka");
45  m_tip_source = p->get<double>("auxin_transport.leaf_tip_source", 0.0);
46  m_transport = p->get<double>("auxin_transport.transport");
47 }
48 
49 void Basic::operator()(Wall* w, double* dchem_c1, double* dchem_c2)
50 {
51  double const phi = w->GetLength() * m_d
52  * (w->GetC2()->GetChemical(0) - w->GetC1()->GetChemical(0));
53  dchem_c1[0] += phi;
54  dchem_c2[0] -= phi;
55 
56  // directed transport: efflux from cell 1 to cell 2
57  double const trans12 = m_transport * w->GetTransporters1(1) * w->GetC1()->GetChemical(0)
58  / (m_ka + w->GetC1()->GetChemical(0));
59 
60  // directed transport: efflux from cell 2 to cell 1
61  double const trans21 = m_transport * w->GetTransporters2(1) * w->GetC2()->GetChemical(0)
62  / (m_ka + w->GetC2()->GetChemical(0));
63 
64  dchem_c1[0] += trans21 - trans12;
65  dchem_c2[0] += trans12 - trans21;
66 
67  // Influx at leaf "AuxinSource" (as specified in initial condition)
68  if (w->IsAuxinSource()) {
69  double const aux_flux = m_tip_source * w->GetLength();
70  dchem_c1[0] += aux_flux;
71  dchem_c2[0] += aux_flux;
72  }
73 }
74 
75 } // namespace
76 } // 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.
Basic(const CoreData &cd)
Initializing constructor.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
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
Basic CellToCellTransport component.
A cell wall, runs between cell corner points and consists of wall elements.
Definition: Wall.h:48
Interface for Wall.