User Tools

Site Tools


rainbow_project
A PCRE internal error occured. This might be caused by a faulty plugin

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

Link to this comparison view

rainbow_project [2014/05/28 06:36]
wikimanager [Coding tasks]
rainbow_project [2014/06/03 19:18] (current)
delakins [Coding tasks]
Line 117: Line 117:
         * $P_\text{sc}$ $\,​=\,​I_\text{sc}\!\cdot\!{\text{Area}}_\text{sc}$ $\,​\approx\,​I_\text{sc}\!\cdot\!2\pi\,​(D\sin\gamma)\,​D\Delta \gamma\;$, where $\,D$ is the distance from the droplet to the observer.         * $P_\text{sc}$ $\,​=\,​I_\text{sc}\!\cdot\!{\text{Area}}_\text{sc}$ $\,​\approx\,​I_\text{sc}\!\cdot\!2\pi\,​(D\sin\gamma)\,​D\Delta \gamma\;$, where $\,D$ is the distance from the droplet to the observer.
         * $P_\text{sc}$ $=s\!\cdot\!P_\text{inp}$         * $P_\text{sc}$ $=s\!\cdot\!P_\text{inp}$
-        * $I_\text{sc}$ $=s\!\cdot\!I_\text{inp}\frac{d}{D^2\sin\gamma}\frac{\Delta d}{\Delta\gamma}$ $=s \cdot I_\text{inp}\frac{R^2\delta}{D^2\sin\gamma}\frac{\Delta \delta}{\Delta\gamma}$ $\sim I_\text{inp}\frac{\delta}{\sin\gamma}\frac{\Delta \delta}{\Delta\gamma}\;​$:​ here the factors //s//, //R//, and //D// are pretty constant (or too complicated to calculate) and do not contribute to the relative intensity at various angles and wavelengths+        * $I_\text{sc}$ $=s\!\cdot\!I_\text{inp}\frac{d}{D^2\sin\gamma}\left|\frac{\Delta d}{\Delta\gamma}\right|$ $=s \cdot I_\text{inp}\frac{R^2\delta}{D^2\sin\gamma}\left|\frac{\Delta \delta}{\Delta\gamma}\right|$ $\sim I_\text{inp}\frac{\delta}{\sin\gamma}\left|\frac{\Delta \delta}{\Delta\gamma}\right|\;$: here the factors //s//, //R//, and //D// are pretty constant (or too complicated to calculate) and do not contribute to the relative intensity at various angles and wavelengths
  
 | {{ :​projects:​rainbow:​rainbowdrawing2.png?​nolink |}} | | {{ :​projects:​rainbow:​rainbowdrawing2.png?​nolink |}} |
Line 124: Line 124:
 ====Questions about theory and coding==== ====Questions about theory and coding====
   - I was  wondering if the relative scattered intensity was suppose to be calculated with the Rayleigh forumula?   - I was  wondering if the relative scattered intensity was suppose to be calculated with the Rayleigh forumula?
-    * **Answer**: No, Rayleigh formula refers to scattering of light off of objects whose size is much smaller than the wavelength of light (see Wikipedia article on [[wp>​Rayleigh scattering]]). ​ The rain droplets are 1-3 mm on average (as somebody posted in the data section below), much larger than the wavelengths of light.  ​instead, you should use the ray diagrams and Snell'​s law and the law of reflection, see the Figures above. You need to figure out the angles in Fig. 4 using these laws, then put the formulas into excel.+    * **Answer**: No, Rayleigh formula refers to scattering of light off of objects whose size is much smaller than the wavelength of light (see Wikipedia article on [[wp>​Rayleigh scattering]]). ​ The rain droplets are 3 mm on average (as somebody posted in the data section below), much larger than the wavelengths of light.  ​Instead, you should use the ray diagrams and Snell'​s law and the law of reflection, see the Figures above. You need to figure out the angles in Fig. 4 using these laws, then put the formulas into excel.
   -  I figured out the trigonometry/​geometry of the raindrop and light rays. I am having trouble with Excel, however. ​ Please view the attached spreadsheet (highlighted cells). ​ The value that Excel is calculating for Sin(-4....) (''​CELL AJ06''​) is different from what I get on my calculator, Wolframalpha,​ and Google. ​ This is preventing me from formatting any further as I continue to get an ERROR message (''​CELL AP06''​).   -  I figured out the trigonometry/​geometry of the raindrop and light rays. I am having trouble with Excel, however. ​ Please view the attached spreadsheet (highlighted cells). ​ The value that Excel is calculating for Sin(-4....) (''​CELL AJ06''​) is different from what I get on my calculator, Wolframalpha,​ and Google. ​ This is preventing me from formatting any further as I continue to get an ERROR message (''​CELL AP06''​).
     * **Answer**: I think I know what your problem is.  Excel always used radians for all trig functions. That's why you have to use ''​DEGREES()''​ to convert angles to degrees. But then, in columns ''​X:​AC'',​ you use ''​SIN(R5)''​ and so on, but cells like ''​R5''​ contain the angle in degrees. The ''​SIN()''​ always expects the radians though, and calculates the wrong value. Then it is all corrupt after that.     * **Answer**: I think I know what your problem is.  Excel always used radians for all trig functions. That's why you have to use ''​DEGREES()''​ to convert angles to degrees. But then, in columns ''​X:​AC'',​ you use ''​SIN(R5)''​ and so on, but cells like ''​R5''​ contain the angle in degrees. The ''​SIN()''​ always expects the radians though, and calculates the wrong value. Then it is all corrupt after that.
       * Remember, radians and degrees are related through the factor of $\frac{\pi}{180}$. ​ You can either keep everything in degrees up to the last final plot, or use a conversion factor every time you take a ''​SIN()''​ or ''​TAN()''​.       * Remember, radians and degrees are related through the factor of $\frac{\pi}{180}$. ​ You can either keep everything in degrees up to the last final plot, or use a conversion factor every time you take a ''​SIN()''​ or ''​TAN()''​.
 +  - I think my problem is that I am apparently not understanding what needs to be done...
 +    * **Answer**: You've done the first step -- got your hands on the actual data for $n(\lambda)$ dependence for pure water. ​  Now you need to do the rest of the analysis. ​ It is all explained on this wiki. Briefly, you need to
 +    - Look at Fig. 4 above and, using the parameter $d$ as a given, as well as the index of refraction $n$, calculate $\beta_1+\beta_2+\beta_3'​$ (this is the total deflection angle for the 1<​sup>​st</​sup>​ rainbow), and, optionally, $\beta_1+\beta_2+\beta_3+\beta_4'​$ (this is the total deflection angle for the 2<​sup>​nd</​sup>​ rainbow). ​ Basically, you need to obtain these two formulas (a bunch of sin() functions, really) that depend on $n$ and on $d/R$ ratio.
 +    - Set up a grid of possible $d/R$ ratios from 0 (normal incidence) to 1 (grazing beam), with some small step, e.g. 0.001
 +    - On that grid, for a particular $\lambda$, calculate the total deflection angle as a function of $d/R$ (i.e. your grid)
 +    - Then, on the same grid, calculate the intensity of the deflected light, assuming some (any, really) intensity of the sunlight
 +    - (//​optional,​ for maximum grade//​) ​ - convert this intensity as a function of the $d/R$ grid to the total deflection angle grid.  That would be the model of what you observe when you look at the actual rainbow, for each color.
 +  - I am having difficulty substituting $\beta_1$ into Snell'​s law. Is it possible I could have a hint based on the geometry of the diagram for the rainbow project to lead me in the right direction?
 +    * **Answer**: ​ If you look at a point where the beam enters the droplet, and notice that $\theta_i$ is equal to $\theta_i$ immediately on the other side of the water surface, then you can just see that $\beta_1$ is the difference $\theta_i-\theta_r$. See that on the drawing (Fig. 4)? The next reflection point is symmetric with this one, but the meaning of angles is different. Also, if you spot a right-angled triangle with $R$ (radius of the sphere) and $d$ as its sides, and the angle $\theta_i$ as one of its angles, that will allow you to relate $\sin\theta_i$ to the $d/R$ ratio. The flow of math is: 
 +      - from $\;d/R\;$ find $\;​\sin\theta_i$
 +      - from that find $\theta_i$
 +      - from that, using Snell'​s law, find $\theta_r$
 +      - from that, find $\beta_1$
 +  - How would I start solving for beta $\beta_2$, $\beta_3$, and $\beta_4$?
 +    * **Answer**: ​  If you look at the next reflection (Fig. 4), you can see that $\beta_2+\theta_r+\theta_r$ add up to 180$^\circ$ (or, $\pi$ radians). There, from symmetry, $\theta_r$ is the same as $\theta_r$ in the first refraction. All the other points are also symmetric to the original, so same logic applies. $\beta_3'​$ is the difference between two thetas already found earlier. And so on.
 + 
 =====Data===== =====Data=====
 Give yourself 20 minutes to google or search the literature for the index of refraction of water as a function of wavelength. Paste references and data (formulas and raw numbers if compact) below. Give yourself 20 minutes to google or search the literature for the index of refraction of water as a function of wavelength. Paste references and data (formulas and raw numbers if compact) below.
- +  - **Index of refraction for water** ​ = 1.33.  This is the average value. We need its dependence on the wavelength $\lambda$! 
-**Index of refraction for water** ​ = 1.33.  This is the average value. We need its dependence on the wavelength $\lambda$! +  ​- ​**Average radius of water droplet** = 3 mm ([[rainbow project#​references|Ref. [4]]]) 
- +  - **Average [[wp>​Sunlight]] Intensity on Earth** = 1367 $\frac{W}{m^2}$ ​
-**Average radius of water droplet** = 3 mm ([[rainbow project#​references|Ref. [4]]])+
  
 {{visible_spectrum.jpg}} {{visible_spectrum.jpg}}
  
-| **Table 1**. Refraction index of pure water at $T=10\,​^\circ$C,​ $\rho=999.7\,​\frac{\text{kg}}{ {\text m}^3}$ \\ //​Calculated by N.K. from Ref. 2//  ||| +| **Table 1**. Refraction index of pure water. ||||| 
-^ $\lambda$ (nm)  ^ $(n^2−1)/​(n^2\!+2)$ ​ ^ $n$  ^  +|   ​| ​at $T=10\,​^\circ$C,​ $\rho=999.7\,​\frac{\text{kg}}{ {\text m}^3}$ \\ //​Calculated by N.K. from Ref. 2//<color white>​... ... ... ... ... ... ... ...</​color> ​ ​|| ​at $T=20\,​^\circ$C,​\\ //adapted from Refs. 1, 5 by B.V.// ​ | at $T=25\,​^\circ$C,​\\ //adapted from Refs. 1, 6 by B.V.// ​   ​
-| 400  | 0.211798 ​ | 1.343924521 ​ |  +^ $\lambda$ (nm)  ^ $(n^2−1)/​(n^2\!+2)$ $\text{at}$ $10\,​^\circ{\text C}$ ^ $n\big(10\,​^\circ{\text C}\big)$  ^ $n\big(20\,​^\circ{\text C}\big)$ ​ ^ $n\big(25\,​^\circ{\text C}\big)$  ^  
-| 410  | 0.211276 ​ | 1.342985396 ​ |  +| 400  | 0.211798 ​ | 1.343924521  ​| 1.34356 ​ | 1.339   |  
-| 420  | 0.210789 ​ | 1.342112754 ​ |  +| 410  | 0.211276 ​ | 1.342985396 ​ | 1.34264 ​ | 1.3386 ​ |  
-| 430  | 0.210336 ​ | 1.341300053 ​ |  +| 420  | 0.210789 ​ | 1.342112754 ​ | 1.3418 ​  | 1.3382 ​ |  
-| 440  | 0.209913 ​ | 1.340541623 ​ |  +| 430  | 0.210336 ​ | 1.341300053 ​ | 1.34102 ​ | 1.3378 ​ |  
-| 450  | 0.209518 ​ | 1.339832528 ​ |  +| 440  | 0.209913 ​ | 1.340541623 ​ | 1.34029 ​ | 1.3374 ​ |  
-| 460  | 0.209147 ​ | 1.339168446 ​ |  +| 450  | 0.209518 ​ | 1.339832528  ​| 1.33961 ​ | 1.337   |  
-| 470  | 0.208799 ​ | 1.338545577 ​ |  +| 460  | 0.209147 ​ | 1.339168446 ​ | 1.33897 ​ | 1.3366 ​ |  
-| 480  | 0.208472 ​ | 1.337960559 ​ |  +| 470  | 0.208799 ​ | 1.338545577 ​ | 1.33838 ​ | 1.3362 ​ |  
-| 490  | 0.208165 ​ | 1.337410411 ​ |  +| 480  | 0.208472 ​ | 1.337960559 ​ | 1.33782 ​ | 1.3358 ​ |  
-| 500  | 0.207875 ​ | 1.336892472 ​ |  +| 490  | 0.208165 ​ | 1.337410411 ​ | 1.33729 ​ | 1.3354 ​ |  
-| 510  | 0.207602 ​ | 1.33640436 ​ |  +| 500  | 0.207875 ​ | 1.336892472  ​| 1.3368 ​  | 1.335   |  
-| 520  | 0.207344 ​ | 1.335943933 ​ |  +| 510  | 0.207602 ​ | 1.33640436 ​  | 1.33633 ​ | 1.3346 ​ |  
-| 530  | 0.207101 ​ | 1.335509257 ​ |  +| 520  | 0.207344 ​ | 1.335943933 ​ | 1.33588 ​ | 1.3342 ​ |  
-| 540  | 0.206871 ​ | 1.33509858 ​ |  +| 530  | 0.207101 ​ | 1.335509257 ​ | 1.33546 ​ | 1.3338 ​ |  
-| 550  | 0.206654 ​ | 1.334710307 ​ |  +| 540  | 0.206871 ​ | 1.33509858 ​  | 1.33506 ​ | 1.3334 ​ |  
-| 560  | 0.206448 ​ | 1.334342982 ​ |  +| 550  | 0.206654 ​ | 1.334710307  ​| 1.33468 ​ | 1.333   |  
-| 570  | 0.206253 ​ | 1.33399527 ​ |  +| 560  | 0.206448 ​ | 1.334342982  ​| 1.33432 ​ | 1.333   |  
-| 580  | 0.206069 ​ | 1.333665945 ​ |  +| 570  | 0.206253 ​ | 1.33399527 ​  | 1.33397 ​ | 1.333   |  
-| 590  | 0.205894 ​ | 1.333353873 ​ |  +| 580  | 0.206069 ​ | 1.333665945 ​ | 1.33364 ​ | 1.3328 ​ |  
-| 600  | 0.205728 ​ | 1.333058007 ​ |  +| 590  | 0.205894 ​ | 1.333353873 ​ | 1.33333 ​ | 1.3324 ​ |  
-| 610  | 0.205571 ​ | 1.332777373 ​ |  +| 600  | 0.205728 ​ | 1.333058007  ​| 1.33302 ​ | 1.332   |  
-| 620  | 0.205421 ​ | 1.332511064 ​ |  +| 610  | 0.205571 ​ | 1.332777373  ​| 1.33273 ​ | 1.332   |  
-| 630  | 0.205279 ​ | 1.332258233 ​ |  +| 620  | 0.205421 ​ | 1.332511064  ​| 1.33245 ​ | 1.332   |  
-| 640  | 0.205145 ​ | 1.332018084 ​ |  +| 630  | 0.205279 ​ | 1.332258233 ​ | 1.33218 ​ | 1.3318 ​ |  
-| 650  | 0.205017 ​ | 1.331789872 ​ |  +| 640  | 0.205145 ​ | 1.332018084 ​ | 1.33192 ​ | 1.3314 ​ |  
-| 660  | 0.204895 ​ | 1.331572894 ​ |  +| 650  | 0.205017 ​ | 1.331789872  ​| 1.33167 ​ | 1.331   |  
-| 670  | 0.204779 ​ | 1.331366485 ​ |  +| 660  | 0.204895 ​ | 1.331572894  ​| 1.33142 ​ | 1.331   |  
-| 680  | 0.204669 ​ | 1.331170018 ​ |  +| 670  | 0.204779 ​ | 1.331366485  ​| 1.33119 ​ | 1.331   |  
-| 690  | 0.204564 ​ | 1.330982896 ​ |  +| 680  | 0.204669 ​ | 1.331170018  ​| 1.33096 ​ | 1.331   |  
-| 700  | 0.204464 ​ | 1.330804551 ​ |  +| 690  | 0.204564 ​ | 1.330982896  ​| 1.33073 ​ | 1.331   |  
-| 710  | 0.204368 ​ | 1.330634445 ​ |  +| 700  | 0.204464 ​ | 1.330804551  ​| 1.33052 ​ | 1.331   |  
-| 720  | 0.204277 ​ | 1.33047206 ​ |  +| 710  | 0.204368 ​ | 1.330634445 ​ | 1.33031 ​ | 1.3306 ​ |  
-| 730  | 0.204190  ​| 1.330316905 ​ |  +| 720  | 0.204277 ​ | 1.33047206 ​  | 1.3301 ​  | 1.3302 ​ |  
-| 740  | 0.204106 ​ | 1.330168507 ​ |  +| 730  | 0.20419   | 1.330316905  ​| 1.3299 ​  | 1.33    ​|  
-| 750  | 0.204027 ​ | 1.330026414 ​ |  +| 740  | 0.204106 ​ | 1.330168507  ​| 1.3297 ​  | 1.33    ​|  
-| 760  | 0.203950  ​| 1.329890191 ​ |  +| 750  | 0.204027 ​ | 1.330026414  ​| 1.32951 ​ | 1.33    ​|  
-| 770  | 0.203877 ​ | 1.32975942 ​ |  +| 760  | 0.20395   | 1.329890191  ​| 1.32933 ​ | 1.33    ​|  
-| 780  | 0.203806 ​ | 1.3296337 ​ |  +| 770  | 0.203877 ​ | 1.32975942 ​  | 1.32914 ​ | 1.33    ​|  
-| 790  | 0.203738 ​ | 1.329512641 ​ |  +| 780  | 0.203806 ​ | 1.3296337 ​   | 1.32896 ​ | 1.3298 ​ |  
-| 800  | 0.203672 ​ | 1.329395872 ​ |+| 790  | 0.203738 ​ | 1.329512641 ​ | 1.32878 ​ | 1.3294 ​ |  
 +| 800  | 0.203672 ​ | 1.329395872 ​ | 1.32861 ​ | 1.329   | 
 =====References===== =====References=====
   - http://​refractiveindex.info/​legacy/?​group=LIQUIDS&​material=Water   - http://​refractiveindex.info/​legacy/?​group=LIQUIDS&​material=Water
   - I. Thormählen,​ J. Straub, and U. Grigull,\\ //​[[http://​www.nist.gov/​data/​PDFfiles/​jpcrd282.pdf|"​Refractive Index of Water and Its Dependence on Wavelength, Temperature,​ and Density"​]]//,​\\ J. Phys. Chem. Ref. Data **14**, 933 (1985)\\ Note, that Eq.(5) <color red>​contains a typo</​color>:​ the left-hand side, typeset as $\frac{n^2-1}{n^2+1}\!\cdot\!\frac{1}{\rho^*}=$,​ should read $\frac{n^2-1}{n^2+2}\!\cdot\!\frac{1}{\rho^*}=$ instead.   - I. Thormählen,​ J. Straub, and U. Grigull,\\ //​[[http://​www.nist.gov/​data/​PDFfiles/​jpcrd282.pdf|"​Refractive Index of Water and Its Dependence on Wavelength, Temperature,​ and Density"​]]//,​\\ J. Phys. Chem. Ref. Data **14**, 933 (1985)\\ Note, that Eq.(5) <color red>​contains a typo</​color>:​ the left-hand side, typeset as $\frac{n^2-1}{n^2+1}\!\cdot\!\frac{1}{\rho^*}=$,​ should read $\frac{n^2-1}{n^2+2}\!\cdot\!\frac{1}{\rho^*}=$ instead.
-  - "​Handbook of Optical Metrology: Principles and Applications",​ edited by Toru Yoshizawa, Ch. 16: "​Displacement",​ A. Hirai et al., p. 409. CRC Press, 2009. ISBN: [[http://​books.google.com/​books?​id=DdzBQsqPbzcC&​pg=PA408&​dq=refractive+index+of+air+temperature&​hl=en&​sa=X&​ei=-iZ8U5e9Es3eoASEo4KgBQ&​ved=0CC0Q6AEwAA#​v=onepage&​q=FIGURE%2016.15&​f=false|978-0-8493-3760-4]]+  - "​Handbook of Optical Metrology: Principles and Applications",​ edited by Toru Yoshizawa,\\ Ch. 16: "​Displacement",​ A. Hirai et al., p. 409. CRC Press, 2009.\\ ISBN: [[http://​books.google.com/​books?​id=DdzBQsqPbzcC&​pg=PA408&​dq=refractive+index+of+air+temperature&​hl=en&​sa=X&​ei=-iZ8U5e9Es3eoASEo4KgBQ&​ved=0CC0Q6AEwAA#​v=onepage&​q=FIGURE%2016.15&​f=false|978-0-8493-3760-4]]
   - Emmanuel Villermaux, Benjamin Bossa.\\ "//​Single-drop fragmentation distribution of raindrops.//"​\\ Nature Physics **5** (9): 697-702 (September 2009).\\ [[http://​doi.org/​10.1038/​NPHYS1340|doi:​10.1038/​NPHYS1340]]. Lay summary   - Emmanuel Villermaux, Benjamin Bossa.\\ "//​Single-drop fragmentation distribution of raindrops.//"​\\ Nature Physics **5** (9): 697-702 (September 2009).\\ [[http://​doi.org/​10.1038/​NPHYS1340|doi:​10.1038/​NPHYS1340]]. Lay summary
 +  - M. Daimon and A. Masumura,\\ //​Measurement of the refractive index of distilled water from the near-infrared region to the ultraviolet region//,\\ Appl. Opt. **46**, 3811-3820 (2007)\\ [[http://​dx.doi.org/​10.1364/​AO.46.003811|doi:​10.1364/​AO.46.003811]]
 +  - G. M. Hale and M. R. Querry,\\ //Optical Constants of Water in the 200-nm to 200-$\mu$m Wavelength Region//,\\ Appl. Opt. **12**, 555-563 (1973)\\ [[http://​dx.doi.org/​10.1364/​AO.12.000555|doi:​10.1364/​AO.12.000555]]
 +
rainbow_project.txt · Last modified: 2014/06/03 19:18 by delakins