1#ifndef PLUGINGRIMESOXYGEN_HPP
2#define PLUGINGRIMESOXYGEN_HPP
13#include "../SpheroidManager/PluginSpheroidManager.hpp"
28 template<
typename cell_t>
32 double a = 5.634224/10.0;
46 double cstConsoDiff =
a *
omega / (6. *
D);
50 for (
auto &c : cells) {
51 c->getBody().setOxygen(
eqOxygen(cstConsoDiff, rn, c->getBody().getDistanceFromCentroid()));
63 double eqOxygen(
double cstConsoDiff,
double rn,
double r) {
130 template<
typename world_t>
133 if (w->cells.size() > 5) {
Class for managing spherical oxygen diffusion.
void setOmega(double om)
Sets the Henry constant for oxygen.
void setPo(double p)
Sets the external partial pressure of oxygen.
void updateOxygen(std::vector< cell_t * > cells)
Updates the oxygen levels for the given cells.
PluginGrimesOxygen()=default
Default constructor.
void preBehaviorUpdate(world_t *w)
Pre-behavior update hook for MecaCell.
void setDiffusionConstant(double d)
Sets the diffusion constant.
PluginGrimesOxygen(SpheroidManager::PluginSpheroidManager< cell_t > *sm)
Constructor with spheroid manager.
SpheroidManager::PluginSpheroidManager< cell_t > * spheroidManager
void setOxygenConsumption(double c)
Sets the oxygen consumption rate.
double eqOxygen(double cstConsoDiff, double rn, double r)
Computes the partial pressure of oxygen for a cell.
Class for managing spheroid bodies.
A simple vector class template.
Namespace for oxygen diffusion-related classes and functions.
double acos(double x)
Computes the arc cosine of a number.
double sqrt(double x)
Computes the square root of a number.
double pow(double base, double exponent)
Computes the power of a number.
double cos(double x)
Computes the cosine of a number.