Loading OpenSimRoot/src/modules/ShootModule/LeafTemperature.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ NOTE: The GPL.v3 license requires that all derivative work is distributed under #include "../PlantType.hpp" #include <math.h> LeafTemperature::LeafTemperature(SimulaDynamic* pSD):DerivativeBase(pSD), absorptance(0.85), IRAbsorptance(0.95), leafCharacteristicDimension(0.1), conversionFactor(1){ LeafTemperature::LeafTemperature(SimulaDynamic *pSD) : DerivativeBase(pSD), absorptance(0.85), IRAbsorptance(0.95), leafCharacteristicDimension(0.1), conversionFactor(1) { std::string name = pSD->getName().substr(0, 6); // name = sunlit or shaded std::string plantType; PLANTTYPE(plantType,pSD); Loading @@ -54,7 +54,8 @@ absorptance(0.85), IRAbsorptance(0.95), leafCharacteristicDimension(0.1), conver pTranspirationRate = pSD->existingSibling(name + "PotentialTranspirationRate", "cm3/day"); if (!pTranspirationRate) pTranspiration = pSD->getSibling(name + "PotentialTranspiration", "cm3"); pLeafArea = pSD->getSibling(name + "LeafArea"); pLeafArea = pSD->getSibling(name + "LeafArea", "cm2"); pStomatalConductance = pSD->getSibling(name + "StomatalConductance", "mol/m2/s"); } void LeafTemperature::calculate(const Time &t, double <){ // We adapt the leaf energy balance as described in Park S. Nobel - Physiochemical and Environmental Plant Physiology, Fourth Edition, 2009 Loading Loading @@ -102,8 +103,8 @@ void LeafTemperature::calculate(const Time &t, double <){ //checking realistic transpirationRate const double RH = 0.5; //todo stomatalConductance_->get(t, g_sV); //mol/m2/s const double g_sw = 0.2; // mean total conductance to water vapor (mol/m2/s) double g_sw = 0.2; // mean total conductance to water vapor (mol/m2/s) pStomatalConductance->get(t, g_sw); //mol/m2/s const double P_atm = 101325; // Atmospheric pressure (Pa) //Saturation Vapor Pressure Function (Pa) - Tetens Equation auto calc_esat = [](double tempC) {return(611 * exp((17.27 * tempC) / (tempC + 237.3)));}; Loading OpenSimRoot/src/modules/ShootModule/LeafTemperature.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public: protected: void calculate(const Time &t, double &concentration); double absorptance, IRAbsorptance, leafCharacteristicDimension, conversionFactor; SimulaBase *pIrradiation, *pAirTemperature, *pWindSpeed, *pTranspirationRate, *pTranspiration, *pLeafArea; SimulaBase *pIrradiation, *pAirTemperature, *pWindSpeed, *pTranspirationRate, *pTranspiration, *pLeafArea, *pStomatalConductance; }; #endif /*LEAFTEMPERATURE_HPP_*/ Loading
OpenSimRoot/src/modules/ShootModule/LeafTemperature.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ NOTE: The GPL.v3 license requires that all derivative work is distributed under #include "../PlantType.hpp" #include <math.h> LeafTemperature::LeafTemperature(SimulaDynamic* pSD):DerivativeBase(pSD), absorptance(0.85), IRAbsorptance(0.95), leafCharacteristicDimension(0.1), conversionFactor(1){ LeafTemperature::LeafTemperature(SimulaDynamic *pSD) : DerivativeBase(pSD), absorptance(0.85), IRAbsorptance(0.95), leafCharacteristicDimension(0.1), conversionFactor(1) { std::string name = pSD->getName().substr(0, 6); // name = sunlit or shaded std::string plantType; PLANTTYPE(plantType,pSD); Loading @@ -54,7 +54,8 @@ absorptance(0.85), IRAbsorptance(0.95), leafCharacteristicDimension(0.1), conver pTranspirationRate = pSD->existingSibling(name + "PotentialTranspirationRate", "cm3/day"); if (!pTranspirationRate) pTranspiration = pSD->getSibling(name + "PotentialTranspiration", "cm3"); pLeafArea = pSD->getSibling(name + "LeafArea"); pLeafArea = pSD->getSibling(name + "LeafArea", "cm2"); pStomatalConductance = pSD->getSibling(name + "StomatalConductance", "mol/m2/s"); } void LeafTemperature::calculate(const Time &t, double <){ // We adapt the leaf energy balance as described in Park S. Nobel - Physiochemical and Environmental Plant Physiology, Fourth Edition, 2009 Loading Loading @@ -102,8 +103,8 @@ void LeafTemperature::calculate(const Time &t, double <){ //checking realistic transpirationRate const double RH = 0.5; //todo stomatalConductance_->get(t, g_sV); //mol/m2/s const double g_sw = 0.2; // mean total conductance to water vapor (mol/m2/s) double g_sw = 0.2; // mean total conductance to water vapor (mol/m2/s) pStomatalConductance->get(t, g_sw); //mol/m2/s const double P_atm = 101325; // Atmospheric pressure (Pa) //Saturation Vapor Pressure Function (Pa) - Tetens Equation auto calc_esat = [](double tempC) {return(611 * exp((17.27 * tempC) / (tempC + 237.3)));}; Loading
OpenSimRoot/src/modules/ShootModule/LeafTemperature.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public: protected: void calculate(const Time &t, double &concentration); double absorptance, IRAbsorptance, leafCharacteristicDimension, conversionFactor; SimulaBase *pIrradiation, *pAirTemperature, *pWindSpeed, *pTranspirationRate, *pTranspiration, *pLeafArea; SimulaBase *pIrradiation, *pAirTemperature, *pWindSpeed, *pTranspirationRate, *pTranspiration, *pLeafArea, *pStomatalConductance; }; #endif /*LEAFTEMPERATURE_HPP_*/