The BioCro C++ Library
temperature_response_functions.h
Go to the documentation of this file.
1#ifndef TEMPERATURE_RESPONSE_FUNCTIONS_H
2#define TEMPERATURE_RESPONSE_FUNCTIONS_H
3
4#include <cmath> // for exp, pow
5#include "../framework/constants.h" // for ideal_gas_constant
6
42 double c, // dimensionless
43 double activation_energy, // J / mol
44 double temperature_k // Kelvin
45)
46{
47 using physical_constants::ideal_gas_constant; // J / k / mol
48 return exp(c - activation_energy / (ideal_gas_constant * temperature_k));
49}
50
66 double temperature, // degrees C
67 double Tref // degrees C
68)
69{
70 constexpr double Q10 = 2.0;
71 return pow(Q10, (temperature - Tref) / 10.0);
72}
73
108 double c, // dimensionless
109 double Ha, // J / mol
110 double Hd, // J / mol
111 double S, // J / K / mol
112 double temperature_k // K
113)
114{
115 using physical_constants::ideal_gas_constant; // J / k / mol
116
117 double const top =
118 temperature_k * arrhenius_exponential(c, Ha, temperature_k);
119
120 double const bot =
121 1.0 + arrhenius_exponential(S / ideal_gas_constant, Hd, temperature_k);
122
123 return top / bot;
124}
125
143 double c0, // output units
144 double c1, // output units * (degrees C)^(-1)
145 double c2, // output units * (degrees C)^(-2)
146 double temperature_c // degrees C
147)
148{
149 return c0 + c1 * temperature_c + c2 * pow(temperature_c, 2);
150}
151
152#endif
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...
double johnson_eyring_williams_response(double c, double Ha, double Hd, double S, double temperature_k)
A temperature response function originally defined in Johnson, Eyring, and Williams (1942),...
double polynomial_response(double c0, double c1, double c2, double temperature_c)
A simple second-order polynomial equation describing the temperature response of a reaction rate or o...
double arrhenius_exponential(double c, double activation_energy, double temperature_k)
Calculates the exponential term of the Arrhenius equation.