tutorials:radiation-model-in-crop_model6
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:radiation-model-in-crop_model6 [2025/05/27 17:43] – barley1965 | tutorials:radiation-model-in-crop_model6 [2025/05/29 00:47] (current) – barley1965 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== More realistic non-linear photosynthesis ====== | ====== More realistic non-linear photosynthesis ====== | ||
- | //Open the file NLPS.gsz.// | + | //Open the file {{ : |
In this more realistic photosynthesis model, the rate of carbon fixation or carbon exchange is not directly linearly related to the light quantity but becomes saturated with increasing photosynthetic photon flux density: | In this more realistic photosynthesis model, the rate of carbon fixation or carbon exchange is not directly linearly related to the light quantity but becomes saturated with increasing photosynthetic photon flux density: | ||
Line 7: | Line 7: | ||
{{tutorials: | {{tutorials: | ||
- | where // | + | where // |
We first declare the parameters of this model, they are all constants: | We first declare the parameters of this model, they are all constants: | ||
- | + | <code java> | |
- | Next, a new method, calculateCER is created, which calculates the carbon exchange rate as a function | + | // |
+ | const float FMAX = 20.0; | ||
+ | const float PHOTO_EFFICIENCY = 0.7; | ||
+ | const float DARK_RESPIRATION_RATE = 0.5; | ||
+ | </ | ||
+ | Next, a new method, '' | ||
+ | |||
+ | <code java> | ||
+ | //method to calculate the Carbon Exchange Rate CER: | ||
+ | float calculateCER(float ppfd) { | ||
+ | return (float) | ||
+ | ((FMAX + DARK_RESPIRATION_RATE)*PHOTO_EFFICIENCY*ppfd) | ||
+ | / | ||
+ | - DARK_RESPIRATION_RATE; | ||
+ | } | ||
+ | </ | ||
- | This means the method calculateCER requires as input the quantity of absorbed light. | + | This means the method |
- | In order to obtain the actual amount of assimilates produced by any leaf with a certain area and during a certain period, we need another method: | + | |
+ | In order to obtain the actual amount of assimilates produced by any leaf with a certain area and during a certain period, we need another method, '' | ||
+ | |||
+ | <code java> | ||
+ | //method to calculate the actual amount of assimilates produced by any leaf: | ||
+ | float calculatePS(float a, float ppfd, float d) { | ||
+ | return calculateCER(ppfd) * a * d * 44.01e-6 | ||
+ | *(180.162/ | ||
+ | /1000.0; | ||
+ | } | ||
+ | </ | ||
- | This method invokes the method calculateCER and multiplies it with the leaf area and a duration in time, which will be defined below, and with a number of other conversion coefficients to get the biomass in kg glucose equivalents. | + | This method invokes the method |
You have noticed that the leaves used in this model are rectangles. However, the surface of a leaf is not equal to the product of its length and diameter but only about 65 to 70% of this. Thus, we needed to introduce a coefficient, | You have noticed that the leaves used in this model are rectangles. However, the surface of a leaf is not equal to the product of its length and diameter but only about 65 to 70% of this. Thus, we needed to introduce a coefficient, | ||
+ | |||
+ | <code java> | ||
+ | //form factor | ||
+ | const float LEAF_FF = 0.6; | ||
+ | </ | ||
The amount of absorbed light is already expressed as a photon flux density; we had done the conversion earlier on. For the duration, we assume a day length of 8 hours, thus 8*60*60 seconds: | The amount of absorbed light is already expressed as a photon flux density; we had done the conversion earlier on. For the duration, we assume a day length of 8 hours, thus 8*60*60 seconds: | ||
+ | |||
+ | <code java> | ||
+ | //duration: | ||
+ | const float DURATION = 8 * 60 * 60; | ||
+ | </ | ||
- | The method absorbAndGrow() is now modified accordingly. In lf[as] we are going to store the actual cumulated amount of assimilates by invoking the calculatePS() method. Note that we are using a graph/data table lightresponse, | + | The method |
- | + | ||
- | Run the model. Change the form factor of the leaves to 0.9 to see if this has an effect! Do the same with the parameters of the lamp and the PS model. | + | <code java> |
+ | lf:Leaf ::> { | ||
+ | lf[al] = lm.getAbsorbedPower3d(lf).integrate()*2.25*10; | ||
+ | lf.(setShader(new AlgorithmSwitchShader(new RGBAShader(lf[al]*0.005, | ||
+ | lf[al]*0.05, | ||
+ | lf[age]++; | ||
+ | // functions | ||
+ | float area = LEAF_FF*lf[length]*lf[width]/ | ||
+ | lf[as] += calculatePS(area, | ||
+ | float cer = calculateCER(lf[al]); | ||
+ | lightresponse.addRow().set(0, | ||
+ | lf[length] += logistic(2, lf[age], 10, 0.5); | ||
+ | lf[width] = lf[length]*0.7; | ||
+ | } | ||
+ | </ | ||
+ | //Run the model. Change the form factor of the leaves to 0.9 to see if this has an effect! Do the same with the parameters of the lamp and the PS model. | ||
+ | // |
tutorials/radiation-model-in-crop_model6.1748360595.txt.gz · Last modified: 2025/05/27 17:43 by barley1965