User Tools

Site Tools


tutorials:radiation-model-in-crop_model6

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorials:radiation-model-in-crop_model6 [2025/05/29 00:33] barley1965tutorials: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 ======
  
Line 31: Line 30:
 </code> </code>
    
-This means the method calculateCER requires as input the quantity of absorbed light.  +This means the method ''calculateCER'' requires as input the quantity of absorbed light. 
-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, ''calculatePS()'':
 +
 +<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/264.06)
 + /1000.0;
 +}
 +</code>
    
-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 ''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.  
 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, which reduces the leaf area accordingly. This is also called a form factor: 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, which reduces the leaf area accordingly. This is also called a form factor:
 +
 +<code java>
 +//form factor
 +const float LEAF_FF = 0.6;
 +</code>
    
 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; 
 +</code>
    
-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, in which we plot lf[al] against the result of the invocation of the calculateCER() method, with lf[al] as input (L. 154) (to do so, we have created a new variable cer in L. 153):  +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, in which we plot ''lf[al]'' against the result of the invocation of the ''calculateCER()'' method, with ''lf[al]'' as input (L. 154) (to do so, we have created a new variable ''cer'' in L. 153):  
-  + 
-Run the modelChange the form factor of the leaves to 0.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[al]*0.001),GREEN))); 
 + lf[age]++; 
 + // functions to calculate leaf ps:  
 + float area = LEAF_FF*lf[length]*lf[width]/10000; 
 + lf[as] += calculatePS(area,lf[al]/area,DURATION); 
 + float cer = calculateCER(lf[al]); 
 + lightresponse.addRow().set(0,lf[al],cer); 
 + lf[length] += logistic(2, lf[age], 10, 0.5); 
 + lf[width] = lf[length]*0.7; 
 +
 + </code>
  
 +//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.txt · Last modified: 2025/05/29 00:47 by barley1965