tutorials:spectral-light-modeling-architecture
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:spectral-light-modeling-architecture [2025/05/28 16:12] – barley1965 | tutorials:spectral-light-modeling-architecture [2025/06/01 17:45] (current) – barley1965 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Effect of spectral light on morphogenesis ====== | ====== Effect of spectral light on morphogenesis ====== | ||
- | Open {{tutorials: | + | Open {{tutorials: |
What can this model do? Well, as its name suggests, with this model we can simulate spectral light. So, instead of just simulating a lamp with white light or, at best, red, green and blue light, we now have the possibility to simulate an entire spectrum of visible light and even part of the light just outside the visible spectrum! | What can this model do? Well, as its name suggests, with this model we can simulate spectral light. So, instead of just simulating a lamp with white light or, at best, red, green and blue light, we now have the possibility to simulate an entire spectrum of visible light and even part of the light just outside the visible spectrum! | ||
Line 22: | Line 22: | ||
static const float[] AMPLITUDES_FR ={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...}; | static const float[] AMPLITUDES_FR ={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...}; | ||
- | //lampe phenobean | + | //lamp phenobean |
static const float[] AMPLITUDES_PHENOB = {7.26375E-05, | static const float[] AMPLITUDES_PHENOB = {7.26375E-05, | ||
</ | </ | ||
Line 30: | Line 30: | ||
The following four arrays (L. 12 – 22) yield the amplitude data for red, blue, far red and phenobean LED lamps, whereas the constants in L. 25 – 27 give correction factors to arrive at a PAR output of 52 µmol/m2 per light string, the nominal output power. | The following four arrays (L. 12 – 22) yield the amplitude data for red, blue, far red and phenobean LED lamps, whereas the constants in L. 25 – 27 give correction factors to arrive at a PAR output of 52 µmol/m2 per light string, the nominal output power. | ||
- | To see the process of construction of the different lamp types we have to go to Modules.rgg: | + | To see the process of construction of the different lamp types we have to go to Modules.rgg: |
+ | |||
+ | We have visualized the beams so that you can see them in the scene: at the moment there are five lamps in the scene, they are defined in L. 25 – 29 of '' | ||
+ | |||
+ | <code java> | ||
+ | ==>> ^ M(70) RU(180) RedLEDtop; | ||
+ | ==>> ^ M(70) RU(180) Translate(0, | ||
+ | ==>> ^ M(40) RU(180) RL(45) Translate(0, | ||
+ | ==>> ^ M(40) RU(180) FRLED;// | ||
+ | ==>> ^ M(50) RU(180) Translate(0, | ||
+ | </ | ||
- | You can see in the commented block that we have already used several lamps. You can do the same: change the composition of lamps as you like, save the code file, and then on Render View Flux renderer, to see the color combination. You may then click on the Run grow button to see some output: First of all, you note that there are several charts: Leaf surface dynamics (to monitor the leaf surface of each leaf rank), then Internode length dynamics (for each internode rank), Red/Far red ratio, Phytochrome ratio, and Absorbed spectrum. Starting with the last item, Absorbed spectrum actually gives out the light absorbed per leaf rank, but for each “bucket” of about 2.6 nm wavelength, so you can see how much blue, green, red and far red light each leaf is actually absorbing (we can only guess how much of this is transmitted and reflected but all of this must add up to 100%...). How does this work? Have a look at the definition of the Leaf (Modules.rgg, | + | You can see in the commented block that we have already used several lamps. You can do the same: change the composition of lamps as you like, save the code file, and then on //Render View// -> //Flux renderer//, to see the color combination. |
+ | |||
+ | {{: | ||
+ | |||
+ | You may then click on the '' | ||
+ | |||
+ | <code java> | ||
+ | module Leaf (int ID, super.length, | ||
+ | Measurement ms, float rfr, float absred, float absfarred, | ||
+ | float absblue, float as) extends Box(length, width, 0.01){ | ||
+ | { | ||
+ | Phong myShader = new Phong(); | ||
+ | myShader.setDiffuse(reflectionSPD); | ||
+ | myShader.setDiffuseTransparency(transmissionSPD); | ||
+ | // | ||
+ | setShader(new AlgorithmSwitchShader(new RGBAShader(0, | ||
+ | |||
+ | float getSurface() | ||
+ | { | ||
+ | float SCF = 1000; | ||
+ | return this.length*this.width*SCF; | ||
+ | } | ||
+ | }; | ||
+ | </ | ||
- | We note that Leaf has a lot of parameters apart from its length and width, the absorbed light al and the amount of assimilates as: We will come back to that later. Let’s first of all explore the shader of the leaf, it’s called a Phong shader, named after the researcher who worked on this topic. Using such a Phong shader allows you to specify spectra for reflection and transmission (methods setDiffuse() and setDiffuseTransparency()). The arguments for these methods are two arrays with numbers containing the amount of light reflected and transmitted per waveband, based on measurements using a spectrophotometer). The two arrays can be found at the very end of Parameter.rgg (they are in fact curves that are constructed with the static statement in L. 397-401 using data from other arrays (L. 257ff). | + | We note that '' |
- | Back to the definition of the Leaf module: you note that one of its parameters is called ms and it’s of a type we’ve never seen before: Measurement. Let’s see how this is used: go to Main.rgg, L. 63. Here we see in the method absorbAndGrow() that the parameter ms of Leaf is updated: | + | |
- | + | Back to the definition of the Leaf module: you note that one of its parameters is called | |
- | A “measurement” is in fact a data table, in which the absorbed spectrum is stored, one measurement per wavelength. This is done by an extended light model called FluxLightModel. A spectral measurement can now be used in several ways: we can output the data to a graph and display the absorbed spectrum as is done in L. 140 of Main.rgg. Or we can pick specific wavelengths such as the peaks of absorbed blue (450 nm), red (630 nm), and far red (760 nm) and store them in the previously defined variables absblue, absred and absfarred (L. 132 – 134). | + | |
- | It is then quite easy to calculate the red/far red ratio (L. 135), which is another one of the variables of Leaf. | + | <code java> |
- | The R/FR ratio is translated within the plant into an equilibrium ratio of two forms of phytochromes Pr and Pfr. This is not a linear relation; therefore we need to employ another function that we called calcPhytochrome(), | + | lf[ms] = lm.getAbsorbedPowerMeasurement(lf); |
+ | </code> | ||
+ | A '' | ||
+ | |||
+ | <code java> | ||
+ | lf[absblue] = lf[ms].data[19]; | ||
+ | lf[absred] = lf[ms].data[86]; | ||
+ | lf[absfarred] = 0.0001 + lf[ms].data[135]; | ||
+ | </ | ||
+ | |||
+ | It is then quite easy to calculate the red/far red ratio (L. 135), which is another one of the variables of Leaf. | ||
+ | |||
+ | <code java> | ||
+ | lf[rfr] = lf[absred]/ | ||
+ | </ | ||
+ | |||
+ | The R/FR ratio is translated within the plant into an equilibrium ratio of two forms of phytochromes Pr and Pfr. This is not a linear relation; therefore we need to employ another function that we called '' | ||
+ | |||
+ | <code java> | ||
+ | public static double calcPhytochrome(float rfr) | ||
+ | { | ||
+ | double phi = 0; | ||
+ | double Zpfr = 1.7; | ||
+ | double phiR = 0.75; | ||
+ | double phiFR = 0.03; | ||
+ | return phi = 1 - (rfr + Zpfr) / ( (rfr/ | ||
+ | } | ||
+ | </ | ||
+ | |||
The function basically defines the response curve of phytochrome ratio to R/FR. You can see the dynamic output in the graphs “Red/Far red ratio” and “Phytochrome ratio”. | The function basically defines the response curve of phytochrome ratio to R/FR. You can see the dynamic output in the graphs “Red/Far red ratio” and “Phytochrome ratio”. | ||
- | What is the effect of different wavelengths on plant morphology? There are several, but it is known that a low R/FR will enhance internode length and leaf surface, and that blue light will have the opposite effect. Also, blue light will have a delaying effect on the phyllochrone. We have added a number of functions to this effect, that will modify the parameters of the logistic growth function for internodes and leaves, as a function of R/Fr and absorbed blue light (methods “maxlength”, | + | |
+ | {{: | ||
+ | |||
+ | |||
+ | What is the effect of different wavelengths on plant morphology? There are several, but it is known that a low R/FR will enhance internode length and leaf surface, and that blue light will have the opposite effect. Also, blue light will have a delaying effect on the phyllochrone. We have added a number of functions to this effect, that will modify the parameters of the logistic growth function for internodes and leaves, as a function of R/Fr and absorbed blue light (methods “maxlength”, | ||
+ | |||
+ | <code java> | ||
+ | public static double maxlength(float absblue, float rfr) | ||
+ | { | ||
+ | float residual = 0.15; | ||
+ | float phi = calcPhytochrome(rfr); | ||
+ | float ml = residual + (Math.exp(-phi-25*absblue)); | ||
+ | return ml; | ||
+ | } | ||
+ | |||
+ | public static double intslope(float absblue, float rfr) | ||
+ | { | ||
+ | float residual = 0.01; | ||
+ | float phi = calcPhytochrome(rfr); | ||
+ | float isl = residual + 0.1*Math.exp(-phi-25*absblue); | ||
+ | // | ||
+ | return isl; | ||
+ | } | ||
+ | |||
+ | public static int phyllochron(int rank, int id) | ||
+ | { | ||
+ | if(rank> | ||
+ | float phi = calcPhytochrome(lef[rfr]); | ||
+ | return (int) (28 + 8*Math.exp(-10*lef[absblue]+2*phi)); | ||
+ | else { return 28;} | ||
+ | } | ||
+ | </ | ||
Tasks: | Tasks: | ||
1) Run the model with different lamp configurations! Observe the effect on internode length and leaf surface dynamics! | 1) Run the model with different lamp configurations! Observe the effect on internode length and leaf surface dynamics! | ||
- | 2) Run the model for a number of steps, then move a lamp*, or change its power output! You can also add a Sky light source but beware that this has a dramatic effect on the R/FR ratio (hint! To prevent this, you have to increase the power output of the two far red lamps as it currently is too low). Once you have added a Sky light, you can also have a look at the Photosynthesis rate dynamics (for some reason, the light output of the LED lamps alone is a bit too low). | + | |
- | 3) Open the Excel file Spectre.xlsx and inspect the way the relation between absorbed blue and rfr and slope/ | + | 2) Run the model for a number of steps, then move a lamp<sup>*</ |
+ | |||
+ | 3) Open the Excel file {{tutorials: | ||
4) Currently we have only one plant in the scene: go to Parameters.rgg, | 4) Currently we have only one plant in the scene: go to Parameters.rgg, | ||
- | *to move a lamp, you can click on its tip and then drag the lamp into one direction (x, y z) by clicking, holding and moving one of the three arrowheads. If selection in the scene doesn’t work you can try finding the lamp using the Flat Object Inspector window that is already open in your model: | + | |
+ | ''< | ||
| | ||
tutorials/spectral-light-modeling-architecture.1748441571.txt.gz · Last modified: 2025/05/28 16:12 by barley1965