The BioCro C++ Library
respiration.cpp
Go to the documentation of this file.
1#include "respiration.h"
2#include "temperature_response_functions.h" // for Q10_temperature_response
3
58 double const base_rate, // any flux units
59 double const grc // dimensionless
60)
61{
62 // Check for error conditions
63 if (grc < 0.0 || grc > 1.0) {
64 throw std::range_error("Thrown in growth_resp: grc is outside [0, 1].");
65 }
66
67 return base_rate < 0 ? 0.0 : base_rate * grc;
68}
69
160 double const base_rate, // any flux units
161 double const grc0, // dimensionless
162 double const Tleaf, // degrees C
163 double const Tref // degrees C
164)
165{
166 // Get the growth respiration coefficient at the current temperature
167 double const grc{grc0 * Q10_temperature_response(Tleaf, Tref)}; // dimensionless
168
169 return growth_resp(base_rate, grc);
170}
171
229 double const tissue_mass, // Mg / ha
230 double const mrc0, // kg / kg / hr
231 double const Tleaf, // degrees C
232 double const Tref // degrees C
233)
234{
235 // Get the maintenance respiration coefficient at the current temperature
236 double const mrc{mrc0 * Q10_temperature_response(Tleaf, Tref)}; // kg / kg / hr
237
238 return tissue_mass * mrc;
239}
double maintenance_resp_Q10(double const tissue_mass, double const mrc0, double const Tleaf, double const Tref)
Calculates respiratory losses associated with the total biomass of a particular tissue.
double growth_resp(double const base_rate, double const grc)
Calculates respiratory losses associated with a particular base rate of biomass available for growth.
Definition: respiration.cpp:57
double growth_resp_Q10(double const base_rate, double const grc0, double const Tleaf, double const Tref)
Calculates respiratory losses associated with a particular base rate of biomass available for growth.
double Q10_temperature_response(double temperature, double Tref)
A typical Q10-based temperature response. The two temperatures below must be supplied in the same uni...