Go to the documentation of this file. 1 #ifndef MOJA_MODULES_CBM_ROOTBIOMASSEQUATION_H_
2 #define MOJA_MODULES_CBM_ROOTBIOMASSEQUATION_H_
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
20 : _biomassToCarbonRate(biomassToCarbonRate) {}
23 : _biomassToCarbonRate(other._biomassToCarbonRate) {}
27 inline double carbonToBiomass(
double carbon) {
return carbon / _biomassToCarbonRate; }
28 inline double biomassToCarbon(
double biomass) {
return biomass * _biomassToCarbonRate; }
32 virtual double calculateRootBiomass(
double componentAbovegroundCarbon) = 0;
36 virtual RootProportions calculateRootProportions(
double standRootBiomass) = 0;
46 _rootBioA(rootBioA), _frpA(frpA), _frpB(frpB), _frpC(frpC) {}
52 return _rootBioA * carbonToBiomass(componentAbovegroundCarbon);
57 double fineRootProp = _frpA + _frpB * std::exp(_frpC * standRootBiomass);
58 double coarseRootProp = 1 - fineRootProp;
74 _rootBioA(rootBioA), _rootBioB(rootBioB), _frpA(frpA), _frpB(frpB), _frpC(frpC) {}
80 return _rootBioA * std::pow(carbonToBiomass(componentAbovegroundCarbon), _rootBioB);
85 double fineRootProp = _frpA + _frpB * std::exp(_frpC * standRootBiomass);
86 double coarseRootProp = 1 - fineRootProp;
Definition: ageclasshelper.cpp:12
double _frpC
Definition: rootbiomassequation.h:67
double _frpA
Definition: rootbiomassequation.h:65
RootBiomassEquation(double biomassToCarbonRate=0.5)
Definition: rootbiomassequation.h:19
RootBiomassEquation(const RootBiomassEquation &other)
Definition: rootbiomassequation.h:22
double fine
Definition: rootbiomassequation.h:13
double _frpA
Definition: rootbiomassequation.h:94
double calculateRootBiomass(double componentAbovegroundCarbon)
Definition: rootbiomassequation.h:50
double _rootBioA
Definition: rootbiomassequation.h:92
RootProportions calculateRootProportions(double standRootBiomass)
Definition: rootbiomassequation.h:55
Definition: rootbiomassequation.h:12
double coarse
Definition: rootbiomassequation.h:14
double carbonToBiomass(double carbon)
Definition: rootbiomassequation.h:27
double _biomassToCarbonRate
Definition: rootbiomassequation.h:39
Definition: rootbiomassequation.h:17
double _rootBioA
Definition: rootbiomassequation.h:64
double _frpB
Definition: rootbiomassequation.h:95
double _frpB
Definition: rootbiomassequation.h:66
double _frpC
Definition: rootbiomassequation.h:96
HardwoodRootBiomassEquation(double rootBioA, double rootBioB, double frpA, double frpB, double frpC)
Definition: rootbiomassequation.h:72
double calculateRootBiomass(double componentAbovegroundCarbon)
Definition: rootbiomassequation.h:78
RootProportions calculateRootProportions(double standRootBiomass)
Definition: rootbiomassequation.h:83
SoftwoodRootBiomassEquation(double rootBioA, double frpA, double frpB, double frpC)
Definition: rootbiomassequation.h:44
Definition: rootbiomassequation.h:70
Definition: ageclasshelper.cpp:10
double biomassToCarbon(double biomass)
Definition: rootbiomassequation.h:28
double _rootBioB
Definition: rootbiomassequation.h:93
Definition: rootbiomassequation.h:42