|
BioCMAMC-ST
|
Acetate model with explicit oxygen limitation. More...
#include <acetate.hpp>
Public Types | |
| enum class | particle_var : int { length = 0 , l_max , a_p , a_max , a_e , a_go , a_fe , a_ao , phi_s , phi_o2 , phi_a , __COUNT__ } |
| enum | species_index : std::size_t { S = 0 , O2 = 1 , Ac = 2 , N_N = n_c } |
| Species indices, O2 has to stay at index 1 (gas/liquid transfer) More... | |
| enum | reaction_index : std::size_t { i_go = 0 , i_fe = 1 , i_ov = 2 , i_ao = 3 , N_R = 4 } |
| Reaction indices. More... | |
| using | uniform_weight = std::true_type |
| using | Self = Acetate |
| using | FloatType = float |
| using | Config = std::nullopt_t |
| using | SelfParticle = MC::ParticlesModel<Self::n_var, Self::FloatType> |
| using | SelfContribs = MC::ParticlesContribs<Self::n_c, Self::FloatType> |
| using | reaction_rates = Kokkos::Array<FloatType, N_R> |
| using | uptake_rates = Kokkos::Array<FloatType, N_N> |
Static Public Member Functions | |
| static KOKKOS_INLINE_FUNCTION void | init (const MC::pool_type &random_pool, std::size_t idx, const SelfParticle &arr) |
| static KOKKOS_INLINE_FUNCTION MC::Status | update (const MC::pool_type &random_pool, FloatType d_t, std::size_t idx, const SelfParticle &arr, const SelfContribs &arr_contribs, std::size_t position_index, const MC::LocalConcentration &c) |
| static KOKKOS_INLINE_FUNCTION void | division (const MC::pool_type &random_pool, std::size_t idx, std::size_t idx2, const SelfParticle &arr, const SelfParticle &buffer_arr) |
| static KOKKOS_INLINE_FUNCTION reaction_rates | metabolism (const uptake_rates &phi, FloatType nu_p, FloatType &nu) |
| Distribute the available uptake fluxes over the four reactions. | |
| static KOKKOS_INLINE_FUNCTION double | mass (std::size_t idx, const SelfParticle &arr) |
| static std::array< std::string_view, Self::n_var > | names () |
| static std::array< std::string_view, Self::n_c > | species () |
Public Attributes | |
| MODEL_CONSTANT FloatType | a_max_m = 2e-6 / 3600. |
| MODEL_CONSTANT FloatType | l_max_m = 2e-6 |
| MODEL_CONSTANT FloatType | l_min_m = l_max_m / 2. |
| MODEL_CONSTANT FloatType | d_m = 0.6e-6 |
| MODEL_CONSTANT FloatType | lin_density = c_linear_density(static_cast<FloatType>(1000), d_m) |
| MODEL_CONSTANT FloatType | k_s = 1e-3 |
| Monod affinity constants [kg/m^3]. | |
| MODEL_CONSTANT FloatType | k_o = 1e-5 |
| Anane et. al 2017 (Biochem. Eng. J). | |
| MODEL_CONSTANT FloatType | k_a = 1e-4 |
| MODEL_CONSTANT FloatType | y_x_go = 0.5F |
| gX/gS | |
| MODEL_CONSTANT FloatType | y_x_fe = 0.15F |
| gX/gS | |
| MODEL_CONSTANT FloatType | y_x_ov = 0.0F |
| overflow does not grow | |
| MODEL_CONSTANT FloatType | y_x_ao = 0.33F |
| gX/gAc | |
| MODEL_CONSTANT FloatType | y_o2_go |
| gO2/gS, 0.384 | |
| MODEL_CONSTANT FloatType | y_o2_ao |
| gO2/gAc | |
| MODEL_CONSTANT FloatType | y_ac_fe |
| gAc/gS produced by fermentation, 0.808 | |
| MODEL_CONSTANT FloatType | y_ac_ov |
| gAc/gS produced by overflow. C6H12O6 -> 3 C2H4O2 balances as is, so 1 | |
| MODEL_CONSTANT FloatType | f_o2_max = 1.2 |
| MODEL_CONSTANT FloatType | f_ac_max = 1. / 3. |
| Acetate uptake capacity relative to the glucose one. | |
| MODEL_CONSTANT FloatType | phi_s_max = a_max_m * lin_density / y_x_go |
| MODEL_CONSTANT FloatType | x_c_max = 30. |
| MODEL_CONSTANT FloatType | f_pos = 2. |
| One explicit step removes at most 1/f_pos of the local concentration. | |
| MODEL_CONSTANT FloatType | d_t_floor = 1e-30 |
| Only there so that d_t = 0 does not divide by zero. | |
| MODEL_CONSTANT FloatType | a_p_min = 1e-3F * a_max_m |
| MODEL_CONSTANT FloatType | a_p_recovery = 0.25F |
| MODEL_CONSTANT auto | l_max_dist |
| MODEL_CONSTANT auto | l_dist |
Static Public Attributes | |
| static constexpr std::size_t | n_var = INDEX_FROM_ENUM(particle_var::__COUNT__) |
| static constexpr std::string_view | name = "acetate" |
| static constexpr std::size_t | n_c = 3 |
| Liquid species: glucose, dioxygen, acetate. | |
Acetate model with explicit oxygen limitation.
Derived from Models::SimpleAcetate, this model adds dissolved oxygen as a third liquid species.
Four lumped reactions, by decreasing priority:
i_go S + O2 -> X + CO2 respirationi_ao Ac + O2 -> X + CO2 acetate re-uptakei_ov S -> Ac overflow, no growthi_fe S -> X + Ac + CO2 fermentationAs in SimpleAcetate the internal unit is the elongation rate a [m/s], converted to a mass flux through the linear density.
| using Models::Acetate::Config = std::nullopt_t |
| using Models::Acetate::FloatType = float |
| using Models::Acetate::reaction_rates = Kokkos::Array<FloatType, N_R> |
| using Models::Acetate::Self = Acetate |
| using Models::Acetate::uniform_weight = std::true_type |
| using Models::Acetate::uptake_rates = Kokkos::Array<FloatType, N_N> |
|
strong |
| enum Models::Acetate::reaction_index : std::size_t |
| enum Models::Acetate::species_index : std::size_t |
Species indices, O2 has to stay at index 1 (gas/liquid transfer)
Use enumeration, not MODEL_CONSTANT: they are used as runtime subscripts of Kokkos::Array in the device kernels and nvcc rejects a static constexpr scalar there ("undefined in device code"). An enumerator has no storage, so it is always usable on the device.
| Enumerator | |
|---|---|
| S | |
| O2 | |
| Ac | |
| N_N | |
|
static |
|
static |
|
inlinestatic |
|
static |
Distribute the available uptake fluxes over the four reactions.
| phi | uptake potentials [kg/s] indexed by species |
| nu_p | potential growth rate of the cell [kgX/s] |
| nu | out: growth rate effectively realised [kgX/s] |
|
inlinestatic |
|
inlinestatic |
|
static |
| MODEL_CONSTANT FloatType Models::Acetate::a_max_m = 2e-6 / 3600. |
Lowest admissible growth capacity [m/s]. a_p has to stay strictly positive: it is the only thing that lets a starved lineage grow again, and log(a_p) is taken at every division.
| MODEL_CONSTANT FloatType Models::Acetate::a_p_recovery = 0.25F |
Regression of the newborn capacity toward its own a_max at division. a_e <= a_p holds by construction, so a redistribution centred on the performance of the mother alone (0) is a one way ratchet: the capacity of a lineage can only decrease and collapses to 0 over the generations.
| MODEL_CONSTANT FloatType Models::Acetate::d_m = 0.6e-6 |
| MODEL_CONSTANT FloatType Models::Acetate::d_t_floor = 1e-30 |
Only there so that d_t = 0 does not divide by zero.
| MODEL_CONSTANT FloatType Models::Acetate::f_ac_max = 1. / 3. |
Acetate uptake capacity relative to the glucose one.
| MODEL_CONSTANT FloatType Models::Acetate::f_o2_max = 1.2 |
Oxygen uptake capacity, as a multiple of the stoichiometric demand of a fully respired glucose uptake. Above 1 the cell is never limited by its own uptake machinery, only by the dissolved oxygen available.
y_o2_go: the respirable glucose is min(phi_S, f_o2_max * phi_s_max * monod(O2)), the yield cancels between the capacity and the phi[O2]/y_o2_go bound. | MODEL_CONSTANT FloatType Models::Acetate::f_pos = 2. |
One explicit step removes at most 1/f_pos of the local concentration.
| MODEL_CONSTANT FloatType Models::Acetate::k_a = 1e-4 |
| MODEL_CONSTANT FloatType Models::Acetate::k_o = 1e-5 |
Anane et. al 2017 (Biochem. Eng. J).
| MODEL_CONSTANT auto Models::Acetate::l_dist |
| MODEL_CONSTANT auto Models::Acetate::l_max_dist |
| MODEL_CONSTANT FloatType Models::Acetate::l_max_m = 2e-6 |
| MODEL_CONSTANT FloatType Models::Acetate::lin_density = c_linear_density(static_cast<FloatType>(1000), d_m) |
|
staticconstexpr |
Liquid species: glucose, dioxygen, acetate.
|
staticconstexpr |
|
staticconstexpr |
| MODEL_CONSTANT FloatType Models::Acetate::phi_s_max = a_max_m * lin_density / y_x_go |
| MODEL_CONSTANT FloatType Models::Acetate::x_c_max = 30. |
Highest biomass concentration the reactor is expected to reach [kg/m^3]. Sizes the cap below, no influence on the metabolism; overestimating it only makes the cap engage a little earlier.
| MODEL_CONSTANT FloatType Models::Acetate::y_ac_fe |
gAc/gS produced by fermentation, 0.808
| MODEL_CONSTANT FloatType Models::Acetate::y_ac_ov |
gAc/gS produced by overflow. C6H12O6 -> 3 C2H4O2 balances as is, so 1
| MODEL_CONSTANT FloatType Models::Acetate::y_o2_ao |
gO2/gAc
| MODEL_CONSTANT FloatType Models::Acetate::y_x_ao = 0.33F |
gX/gAc
| MODEL_CONSTANT FloatType Models::Acetate::y_x_fe = 0.15F |
gX/gS
| MODEL_CONSTANT FloatType Models::Acetate::y_x_go = 0.5F |
gX/gS
| MODEL_CONSTANT FloatType Models::Acetate::y_x_ov = 0.0F |
overflow does not grow