tutorials:radiation-model-in-crop_model3
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorials:radiation-model-in-crop_model3 [2025/05/27 16:34] – created barley1965 | tutorials: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// | + | // |
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 '' | 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 '' | ||
<code java> | <code java> | ||
- | module Internode(super.length, int age) extends | + | module Internode(super.length) extends |
Cylinder(length, | Cylinder(length, | ||
{setShader(internodemat); | {setShader(internodemat); | ||
} | } | ||
- | module Leaf(super.length, | + | module Leaf(super.length, |
Box(length, | Box(length, | ||
(setShader(new AlgorithmSwitchShader(new RGBAShader(0, | (setShader(new AlgorithmSwitchShader(new RGBAShader(0, | ||
</ | </ | ||
- | Then we initialize the length (and width) with a small value (0.1 and 0.07), and set the initial age to 1 in the init() method: | + | Then we initialize the '' |
+ | |||
+ | <code java> | ||
+ | Bud(r, p, o), (r < 10 && p == 0 && o <= 3) ==> RV(-0.1) | ||
+ | Internode(0.1, | ||
+ | [ RL(LEAF_ANGLE) Leaf(0.1, 0.07, 0)] RH(GOLDEN_ANGLE) RV(-0.1) | ||
+ | Internode(0.1) Bud(r+1, PHYLLOCHRON, | ||
+ | </ | ||
- | Next, we need to find an appropriate function that describes growth. The logistic function is actually quite accurate when it comes to description of organ length. It is one of the many sigmoid functions. Its derivative can be used to describe the growth rate as a function of organ age. We declare the derivative of this logistic function as a new public method in the code, before the init() method: | + | Next, we need to find an appropriate function that describes growth. The logistic function is actually quite accurate when it comes to description of organ length. It is one of the many sigmoid functions. Its derivative can be used to describe the growth rate as a function of organ age. We declare the derivative of this logistic function as a new public method in the code, before the '' |
+ | |||
+ | <code java> | ||
+ | //logistic function, used to determine growth rate: | ||
+ | public float logistic (float maxdim, int time, float phylloM, float slope) | ||
+ | { | ||
+ | return(slope*maxdim*Math.exp(-slope*(time-phylloM)))/ | ||
+ | ((Math.exp(-slope*(time-phylloM))+1)**2); | ||
+ | } | ||
+ | </ | ||
The function has three parameters, for now we are only interested in organ age. This we declare as a further (integer) parameter in Leaf and Internode: | The function has three parameters, for now we are only interested in organ age. This we declare as a further (integer) parameter in Leaf and Internode: | ||
+ | |||
+ | <code java> | ||
+ | module Internode(super.length, | ||
+ | Cylinder(length, | ||
+ | {setShader(internodemat); | ||
+ | } | ||
+ | |||
+ | module Leaf(super.length, | ||
+ | Box(length, | ||
+ | (setShader(new AlgorithmSwitchShader(new RGBAShader(0, | ||
+ | </ | ||
+ | |||
- | Next, we need to initialize age with 1 in the run() method (L. 103). | + | Next, we need to initialize |
+ | |||
+ | <code java> | ||
+ | Bud(r, p, o), (r < 10 && p == 0 && o <= 3) ==> RV(-0.1) | ||
+ | Internode(0.1, | ||
+ | [ RL(LEAF_ANGLE) Leaf(0.1, 0.07, 0, 1)] RH(GOLDEN_ANGLE) RV(-0.1) | ||
+ | Internode(0.1, | ||
+ | </ | ||
- | 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 '' |
+ | |||
+ | <code java> | ||
+ | protected void absorbAndGrow() | ||
+ | [ | ||
+ | lf:Leaf ::> { | ||
+ | lf[al] = lm.getAbsorbedPower3d(lf).integrate()*2.25; | ||
+ | // | ||
+ | lf.(setShader(new AlgorithmSwitchShader(new RGBAShader(lf[al]/ | ||
+ | //ageing and growth of leaf: | ||
+ | lf[age]++; | ||
+ | lf[length] += logistic(3, | ||
+ | lf[width] = lf[length]*0.7; | ||
+ | } | ||
+ | ] | ||
+ | </ | ||
Finally, we add another execution (update) rule to model internode extension: | Finally, we add another execution (update) rule to model internode extension: | ||
- | |||
- | Task: Change the leaf growth | + | <code java> |
- | | + | protected void absorbAndGrow() |
+ | [ | ||
+ | lf:Leaf ::> { | ||
+ | lf[al] = lm.getAbsorbedPower3d(lf).integrate()*2.25; | ||
+ | // | ||
+ | lf.(setShader(new AlgorithmSwitchShader(new RGBAShader(lf[al]/ | ||
+ | //ageing and growth | ||
+ | lf[age]++; | ||
+ | lf[length] += logistic(3, | ||
+ | lf[width] = lf[length]*0.7; | ||
+ | } | ||
+ | // | ||
+ | itn: | ||
+ | itn[age]++; | ||
+ | itn[length] += logistic(1, | ||
+ | } | ||
+ | ] | ||
+ | </ | ||
+ | //Task: Change the leaf growth parameters to obtain a very flat or else a rather steep light interception curve! (see figures below)// | ||
+ | |||
+ | {{tutorials: | ||
tutorials/radiation-model-in-crop_model3.1748356459.txt.gz · Last modified: 2025/05/27 16:34 by barley1965