27 namespace CellToCellTransport {
41 auto& p = m_cd.m_parameters;
42 m_chemical_count = p->get<
unsigned int>(
"model.cell_chemical_count");
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");
50 ptree
const& arr_D = p->get_child(
"wortel.D.value_array");
52 for (
auto it = arr_D.begin(); it != arr_D.end(); it++) {
53 if (c == m_chemical_count) {
56 m_D.push_back(it->second.get_value<
double>());
60 for (
unsigned int i = c; i < m_chemical_count; i++) {
67 if ( !(w->GetC1()->IsBoundaryPolygon()) && !(w->GetC2()->IsBoundaryPolygon()) )
69 const double apoplast_thickness = 2.;
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()) ) );
83 const double shy12 = m_km_shy / ( m_km_shy + ( w->GetC1()->GetChemical(2) ) / (w->GetC1()->
GetArea()) );
84 const double trans12 = w->
GetLength() * ( w->GetC1()->GetChemical(0) / (w->GetC1()->
GetArea()) ) * (m_k_export * w->GetTransporters1(1) * shy12 + m_k_import);
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);
90 dchem_c1[0] += (trans21 - trans12);
91 dchem_c2[0] += (trans12 - trans21);
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()) ) );
Core data with mesh, parameters, random engine and time data.
Core data used during model execution.
Namespace for miscellaneous utilities.
Namespace for components of the Default model group.
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.
double GetArea() const
Return the area of the cell.
A cell wall, runs between cell corner points and consists of wall elements.