User Tools

Site Tools


tutorials:radiation-model-in-crop_model3

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:radiation-model-in-crop_model3 [2025/05/27 16:39] barley1965tutorials:radiation-model-in-crop_model3 [2025/05/27 17:55] (current) barley1965
Line 1: Line 1:
 ====== Introducing leaf growth ====== ====== Introducing leaf growth ======
  
-//Open LeafGrowth.gsz//+//Open the file {{ :tutorials:LeafGrowth.gsz |LeafGrowth.gsz}}.// 
  
 Currently, the leaves and internodes of our plant just “pop up” with their final size, although in a real plant they would, of course, grow. Growth in length can be modelled easily: first, we need to give both ''Leaf'' and ''Internode'' several new parameters: ''length'' and ''age'' for ''Internode''; and ''length'', ''width'' and ''age'' for ''Leaf'' (L. 9 and L. 14).  Currently, the leaves and internodes of our plant just “pop up” with their final size, although in a real plant they would, of course, grow. Growth in length can be modelled easily: first, we need to give both ''Leaf'' and ''Internode'' several new parameters: ''length'' and ''age'' for ''Internode''; and ''length'', ''width'' and ''age'' for ''Leaf'' (L. 9 and L. 14). 
Line 20: Line 20:
 Bud(r, p, o), (r < 10 && p == 0 && o <= 3) ==> RV(-0.1)  Bud(r, p, o), (r < 10 && p == 0 && o <= 3) ==> RV(-0.1) 
  Internode(0.1, 1) Node [RL(BRANCH_ANGLE) Bud(r, PHYLLOCHRON, o+1) ]  Internode(0.1, 1) Node [RL(BRANCH_ANGLE) Bud(r, PHYLLOCHRON, o+1) ]
- [ RL(LEAF_ANGLE) Leaf(0.1, 0.07, 0, 1)] RH(GOLDEN_ANGLE) RV(-0.1)  + [ RL(LEAF_ANGLE) Leaf(0.1, 0.07, 0)] RH(GOLDEN_ANGLE) RV(-0.1)  
- Internode(0.1, 1) Bud(r+1, PHYLLOCHRON, o); + Internode(0.1) Bud(r+1, PHYLLOCHRON, o);
 </code> </code>
    
Line 39: Line 39:
  
 <code java> <code java>
-module Internode(super.length, **int age**) extends +module Internode(super.length, int age) extends 
  Cylinder(length, 0.05) {  Cylinder(length, 0.05) {
  {setShader(internodemat);}  {setShader(internodemat);}
 } }
  
-module Leaf(super.length, super.width, float al, **int age**) extends +module Leaf(super.length, super.width, float al, int age) extends 
  Box(length,width,0.01).  Box(length,width,0.01).
  (setShader(new AlgorithmSwitchShader(new RGBAShader(0, 1, 0), GREEN)));  (setShader(new AlgorithmSwitchShader(new RGBAShader(0, 1, 0), GREEN)));
Line 50: Line 50:
  
    
-Next, we need to initialize age with 1 in the run() method (L. 103). +Next, we need to initialize ''age'' with 1 in the ''run()'' method (L. 103).  
 + 
 +<code java> 
 +Bud(r, p, o), (r < 10 && p == 0 && o <= 3) ==> RV(-0.1)  
 + Internode(0.1, 1) Node [RL(BRANCH_ANGLE) Bud(r, PHYLLOCHRON, o+1) ] 
 + [ RL(LEAF_ANGLE) Leaf(0.1, 0.07, 0, 1)] RH(GOLDEN_ANGLE) RV(-0.1)  
 + Internode(0.1, 1) Bud(r+1, PHYLLOCHRON, o);  
 +</code>
    
-Then, we extend the Leaf rule in the method that we now rename to absorbAndGrow() to model leaf ageing and extension in length and width:+Then, we extend the ''Leaf'' rule in the method that we now rename to ''absorbAndGrow()'' to model leaf ageing and extension in length and width: 
 + 
 +<code java> 
 +protected void absorbAndGrow() 
 +[                
 + lf:Leaf ::> { 
 + lf[al] = lm.getAbsorbedPower3d(lf).integrate()*2.25; 
 + //println(lf[al]); 
 + lf.(setShader(new AlgorithmSwitchShader(new RGBAShader(lf[al]/5.0, lf[al]*2,lf[al]/100.0),GREEN))); 
 + //ageing and growth of leaf:  
 + lf[age]++; 
 + lf[length] += logistic(3,lf[age],40,0.1); 
 + lf[width] = lf[length]*0.7; 
 + }                       
 +
 +</code>
    
 Finally, we add another execution (update) rule to model internode extension: Finally, we add another execution (update) rule to model internode extension:
-  
  
-TaskChange the leaf growth parameters to obtain a very flat or else a rather steep light interception curve! (see figures below+<code java> 
-   +protected void absorbAndGrow() 
 +[                
 + lf:Leaf ::> { 
 + lf[al] = lm.getAbsorbedPower3d(lf).integrate()*2.25; 
 + //println(lf[al]); 
 + lf.(setShader(new AlgorithmSwitchShader(new RGBAShader(lf[al]/5.0, lf[al]*2,lf[al]/100.0),GREEN))); 
 + //ageing and growth of leaf:  
 + lf[age]++; 
 + lf[length] += logistic(3,lf[age],40,0.1)
 + lf[width] = lf[length]*0.7; 
 + }                       
 + //extension of internode:     
 + itn:Internode ::> { 
 + itn[age]++; 
 + itn[length] += logistic(1,itn[age],10,0.1); 
 +
 +] 
 +</code> 
  
 +//Task: Change the leaf growth parameters to obtain a very flat or else a rather steep light interception curve! (see figures below)//
 +   
 +{{tutorials:outputLG1.png?200*240}}{{tutorials:outputLG2.png?200*240}}{{tutorials:outputLG3.png?200*240}}
  
tutorials/radiation-model-in-crop_model3.1748356749.txt.gz · Last modified: 2025/05/27 16:39 by barley1965