ECE 5358/6358 HW 4B
                                         h. q. Le (c) 2017

Question 1  How far is the “water” on the road? 
(70 pts)

Have you seen the phenomenon below? How far away is the “water” on the road?

Hint

You can answer the question by doing the following.

The dielectric of any rarified gas, such as air can be modeled as: 
                                             (Subscript[ϵ, air])=1+ γ n                            (1)
where γ is some constant and n is the air density. 
The dependence of air density on temperature can be approximated with ideal gas law:
                                                 P=n R T                        (2)
where P is the pressure, n is the molar density (N/V), R is the gas constant and T is the temperature. At constant pressure:
                                                   n=(P/(R T))                          (3)
Hence, substitute (3) into (1):
                                              (Subscript[ϵ, air])=1+ γ (P/R) ((1/T) ) =1+ α (1/T)   (4)
where α is just a constant. In principle, we need to determine (Subscript[ϵ, air]) only at one temperature and can derive the value of any temperature. However, due to other slightly more complicated effect, we can use a linear model fit to obtain the following expression:
                                              (Subscript[ϵ, air])=(Subscript[ϵ, air;0])+α ((1/(T+273.15)) -(1/((Subscript[T, 0])+273.15)))    (4)
where (Subscript[T, 0]) is chosen to be 20 C,  (Subscript[ϵ, air;0])=(1.000273782)^2 , and α=0.1761838

Below is a plot of the refractive index of air, minused 1, as a function of temperature in Celsius.

Manipulate[
u=(Sqrt[ϵair20+0.1761838((1/(Tc+273.15))-(1/(20+273.15)))]) -1;
Show[Plot[(Sqrt[ϵair20+0.1761838((1/(x+273.15))-(1/(20+273.15)))])-1,{x,20,70}
,PlotRange->{{20,75},{2.2*10^-4, 2.8*10^-4}}, 
PlotStyle->{Hue[0.35,1,1]}
,FrameStyle->White, GridLinesStyle->GrayLevel[0.6]
,Frame-> True, GridLines-> Automatic
,FrameLabel->{"Temperature (C)","air refractive index -1"}
,LabelStyle->16
,FrameTicksStyle->12
]
,Graphics[{Hue[0,0.7,1],PointSize[0.04],Point[{Tc,u}]
,Text[Style[ScientificForm[u,4],18,White,FontFamily->"Calibri"],{Tc+6,u+4*10^-6}]}],Background-> Black]

,{{Tc,60},25,70}
,Initialization:>{
nair20=1.000273782;
ϵair20=nair20^2 ;
}]

How hot can the road be?  Below is a pict of melted road surface In India (likely with a high mix of rubber).

Although there are several scientific papers about road temperature, most are about road conditions during winter, one is for summer.  (http://www.sciencedirect.com/science/article/pii/S1877705812018656/pdf?md5=baf33100d5a3f9a0de7be958bc63d614&pid=1-s2.0-S1877705812018656-main.pdf)
But here is some non-scientific but very credible data of road temperature (an issue for dogs).

You must convert temperature from F into C.

Other useful information: the typical vision line height from the ground for a compact sedan is 1.25 m (greater for a SUV or van)

Caculate your model as a function of temperatures. For example, how far is the “water on road” for temperature from 50 - 70 C, assuming ambient air temperature 30 C

Question 2  You are driving 100 km/hr. How long does it takes for you to arrive at the “water”? 
(30 pts)

Question 3  why do you think our brain tries to tell us what we see is water, while in fact, there is no water?
(10 pts bonus)

Problem 2 (100 pts)

You have a flash light like the one below, and adjust the zoom lens to have a beam coming out 30-degree cone of divergence with approximately uniform distribution (it means the light intensity in every direction within the (30^o)-cone is approximately the same - this is true for a flash light that was tested). You shine the beam into a pool to look for something that you dropped. For simplicity, treat the beam as 1-dimensional as shown in the graphics below. Index of refraction of water is 1.33.

Manipulate[
θ=θd*Pi/180.; θr=ArcSin[θ/nwat];
θrp=ArcSin[(θ+Pi/12.)/nwat];θrm=ArcSin[(θ-Pi/12.)/nwat];
fl={{0,ht},{ht Tan[θ+Pi/12.],0},{ht Tan[θ+Pi/12.],0}
,{ht Tan[θ+Pi/12.],0}+dp{Tan[θrp],-1}
,{ht Tan[θ-Pi/12.],0}+dp{Tan[θrm],-1}
,{ht Tan[θ-Pi/12.],0},{0,ht}};
axisl={{0,ht},{ht Tan[θ],0},{ht Tan[θ],0}+dp{Tan[θr],-1}};
Graphics[{White,Opacity[0.7],Polygon[fl]
,Hue[0.08,1,0.65,1],Rectangle[{-2,-1},{0,0.6}]
,Red,Opacity[1],Dashed,Thickness[0.01],Line[axisl]
,Hue[0.45,1,1,0.3],Rectangle[{0,-dp},{6,0}]
}
,Epilog-> Inset[Show[hum,ImageSize->60],{-0.5,2.2}]
, PlotRange-> {All,{-1,4}},Background->Black]
,{{θd,20},0,50}
,Initialization:>{
ht=2;dp=1;nwat=1.33;
hum=;
}]

2.1 Calculate total light power falling on the bottom of the pool

Given that the flashlight light power output is 20 watt. What is the total power at the bottom of the pool? (if it is a function of the incident angle, then, calculate and plot it as a function of incident angle θ from 15 to 50 degree.

2.2 Calculate the relative visibility of the diamond

Again, treat everything as one dimensional. Suppose what you dropped is a 5-carat diamond engagement ring, of which the “sentimental value” is even more than the market value of $70 K. Calculate the relative visibility of the diamond as a function of its viewing angle from your perspective. The viewing angle is the incident angle of the beam axis (the white line in the graphics above) relative to the normal axis of the water. Both the diamond ring and your eyes are quite small on the scale of the problem and can be treated as a point.

Hint: Calculate light intensity on the bottom of the pool, and then, the backscattered light from the diamond transmitted into your eye.

2.3 Beam direction for searching

Suppose the diamond ring is at your viewing angle 50 degree. What direction of the light beam that will give it the most visibility?

2.4 Linearly polarized laser.

Instead of a flashlight, you have a powerful a linearly polarized laser, also zoom-adjusted for divergence output of ~30 degree, but the beam has this approximate distribution:
                                   P[θ]=(Subscript[P, laser])((ArcCosh[2])/(2 (Subscript[θ, 0]) ((Cosh[θ ArcCosh[2]/(Subscript[θ, 0])])^2)))
where (Subscript[θ, 0]) =15  degree. (the distribution is such at at ±15 degree, the electric field is 50% of the peak center).
Explain how you would approach to do the search.

θ0=Pi/12.;
Plot[(1/((Cosh[θ  ArcCosh[2.]π/(180. θ0)])^2)),{θ,-90,90}, PlotRange-> All]

Example of a problem with given solution: Transmission and reflection of a laser beam

Read for your own understanding only and see if it helps to solve the problem of diamond ring search above.

Suppose you do an experiment, using a 1-W laser beam to probe a sample as illustrated in the left figure below.

The laser beam polarization is TE. The glass slab has a refractive index=1.5 with no absorption. You can consider the beam as 1-D Gaussian as in LectSet 1, or just treat it as a generic parallel beam with no diffraction. (It doesn’t matter what the beam width is, as long as it is >> the beam wavelength). 
Calculate and plot the transmitted power and reflected power as a function of incident angle from 0 to 70 degree.

Note: the beam has 1 W power. Plot your power in unit of W also. Use the right unit. Hint: use this APP also for clue.

Solution - Approach 1 (“quick and dirty”)

1. Consideration:

Is plane wave a good approximation? Let’s check

RayleighRange=((π (w^2))/λ) /. w-> 0.1  /. λ->  0.532*10^-4

Yes, 590 cm is >> 0.2 cm. This is essentially a very parallel beam or plane-wave like.

(0.1/(590.5249348852994`))

(w/(Subscript[ζ, 0]))~1.7* (10^(-4))

2. Transmitted intensity vs. incident intensity

For a plane wave, the transmitted field is:
                                        (Subscript[E, trans])= ((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2]))) (e^(i (β z+(Subscript[k, 2]) x-ω t)))                  (1)
where:       (Subscript[k, 1])=(Subscript[k, 0]) Cos[θ] ;      (Subscript[k, 2])=(Subscript[k, 0]) (Sqrt[(n^2)-((Sin[θ])^2)])                (2)

The transmitted intensity is given by:   (Subscript[I, trans])=(c/(8 π))(Sqrt[(ϵ/μ)]) ((|(Subscript[E, trans])|)^2) =((c n)/(8 π)) ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2)        (3)
The peak intensity of the incident field is given by:
                                            (Subscript[I, inc])=(c/(8 π)) ((|(Subscript[E, inc])|)^2) =(c/(8 π))       (4)
Comparing (4) and (3):
                                          (Subscript[I, trans])=n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2) (Subscript[I, inc])       (5)                                                  
Both intensities of Eq. (5) are for peak intensity.

3. Square aperture approximation

What we will do here is to approximate our Gaussian beam like a square aperture of width = 2 w, with constant intensity across its width.  Then:                           (Subscript[I, inc;ave])=(P/(2 w))            (6)

Note: this is a definition of “average power” nothing fundamental in this. Just a convenient quantity. By using the “square aperture” (or rectangle) approximation, the intensity is treated as constant throughout.
The transmitted intensity is:   (Subscript[I, trans])=n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2) (P/(2 w))       (7)           
The transmitted power is:       (Subscript[P, trans])=2 (Subscript[w, t]) (Subscript[I, trans])          (8)
But what is transmitted beam width (Subscript[w, t])?

From the geometry of the figure above, we see that:
                                        2 (Subscript[w, t])=D Cos[(Subscript[θ, r])]    ;    2 w=D Cos[θ]         (9)
Hence:                               2 (Subscript[w, t])=((2 w)/(Cos[θ])) Cos[(Subscript[θ, r])]                                (10)
Thus:                         (Subscript[P, trans])=2 w((Cos[(Subscript[θ, r])])/(Cos[θ])) n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2) (P/(2 w))=P ((Cos[(Subscript[θ, r])])/(Cos[θ])) n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2)          (11)

4. Plot

Code

Manipulate[
If[INIT== 1,
{off,on}={Button["OFF",BaseStyle->{16, Bold,White,FontFamily-> "Arial"}
,Background->Red]
,Button["ON",BaseStyle->{16, Bold,White,FontFamily-> "Arial"}
,Background->Hue[0.36,1,0.4]]} ;
ITransAve[P_,w_,θ_,n_]:=Module[{k1,k2},
k1=Cos[θ]; k2=(Sqrt[(n^2)-((Sin[θ])^2)]); 
n ((Abs[((2 k1)/(k1+k2))])^2) (( P)/(2 w))  ];
PTransFactor[θ_,n_]:=Module[{k1,k2},
k1=Cos[θ]; k2=(Sqrt[(n^2)-((Sin[θ])^2)]); 
n ((Abs[((2 k1)/(k1+k2))])^2) (( (Sqrt[1-(((Sin[θ])^2)/(n^2))]))/(Cos[θ]))  ];
PReflectFactor[θ_,n_]:=Module[{k1,k2},
k1=Cos[θ]; k2=(Sqrt[(n^2)-((Sin[θ])^2)]); 
((Abs[((k1-k2)/(k1+k2))])^2)   ];

INIT=0 
,TextCell["Not ready"
,Black,20,Italic,FontFamily->"Calibri",Background->GrayLevel[0.5]]] 
;

Manipulate[  
If[RUN== 1,
Manipulate[P=1; w= 0.1 ;
Row[ {Plot[{PReflectFactor[θ*Pi/180.,n],PTransFactor[θ*Pi/180.,n]},{θ,0,80}, PlotRange-> {0,1},PlotStyle-> {Red,Blue}
,FrameTicks->{Table[30*i,{i,0,3}] ,Automatic}
,Filling->{{1->  {Axis,Hue[0.16,1,1,0.5]}},{2->  {Axis,Hue[0.55,1,1,0.5]}}}
, Frame-> True,FrameLabel-> {"Incident angle (degree)","Trans/Reflect Power (W)"}
,LabelStyle->{15,FontFamily-> "Arial"}, Frame-> True, GridLines->{Table[15*i,{i,0,6}] ,Automatic}
,ImageSize->{300,200}]
,Plot[ITransAve[P,w,θ*Pi/180.,n],{θ,0,70}, PlotRange-> {0,5}, Frame-> True, GridLines->{Table[15*i,{i,0,6}] ,Automatic}
,FrameTicks->{Table[30*i,{i,0,3}] ,Automatic}
, PlotStyle-> {Blue},Filling->{1->  {Axis,Hue[0.3,1,1,0.5]}}, Frame-> True,FrameLabel-> {"Incident angle (degree)","Trans. intensity (W/cm)"}
,LabelStyle->{15,FontFamily-> "Arial"},ImageSize->{300,200}]}]
,{{n,1.5},1.3,2}]


, ]
,Row[{Button["Toggle box to start, and turn off when not running",BaseStyle->{16,White, Bold,FontFamily-> "Calibri"}
,Background->Black],Control[{{RUN,0,"->"},{0,1}}]
}]
]
,Button["TRANSMISSION & REFLECTION POWER AND INTENSITY FOR SIMPLE 2 DIELECTRIC  ",BaseStyle->{24,Black, Bold,FontFamily-> "Calibri"}
,Background->Hue[0.4,1,1]]
,
TextCell["Medium 1 is air. Vary the index of medium 2"
,Black,20,Italic,FontFamily->"Calibri",Background->Hue[0.35,0.4,1]]
,
Row[{Button["Click once to initialize",BaseStyle->{16,White, Bold,FontFamily-> "Calibri"}
,Background->Red],Control[{{INIT,0,"->"},{0,1}}]
}]
]

Solution - Approach 2 (a bit more “rigorous”)

1. Beam Gaussian profile

We still have the relationship:
                                          (Subscript[I, trans])=n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2) (Subscript[I, inc])              (5)

Since the incident is a 1-D Gaussian:
                      E[ξ,η]=A(( 1)/(Sqrt[1+i(η/(Subscript[ζ, 0]))]))   (e^(i η (Subscript[k, 0])-((ξ^2)/((w^2)(1+i(η/(Subscript[ζ, 0])))))))       (6)
where we use coordinate ξ and η to be transverse and along its axis, respectively to distinguish with the x and z coordinates in this problem, we can use a slightly more rigorous approximation than a square aperture.
We want to find the field profile at the interface.

1.1 Rotation of coordinates

XYRot[x_,θ_]:={{Cos[θ], Sin[θ]},{-Sin[θ], Cos[θ]}} . x ;
λ=0.532;w=1. ; 
LaserBeam[λ_,w_,θ_,xr_]:=Module[{ζ},
ζ=(10^4)((π (w^2))/λ);
ParametricPlot[{XYRot[{u,v Sqrt[1+(((u/ζ))^2)]},θ],XYRot[{u,-v Sqrt[1+(((u/ζ))^2)]},θ]},{u,xr[[1]],xr[[2]]},{v,0,1}, PlotStyle->Red, Mesh-> False,PlotRange-> {{xr[[1]],xr[[2]]},{xr[[1]],xr[[2]]}}]];
medium[s_]:=Graphics[{Hue[0.45,1,1,0.5],Rectangle[{-s,-0.5s},{s,0}]}] ;
Manipulate[R=3;
zAxis=Graphics[{Arrow[R*{{-1,0},{1,0}}]}] ;
xAxis=Graphics[{Arrow[R*{{0,1},{0,-1}}]}] ;
xhat=Graphics[{Blue,Thickness[0.01],Arrow[{{0,0},{0,-1}}]
,Inset[(OverHat[x]),1.1 *{-0.2,-1},BaseStyle->Directive[24,FontFamily->"Helvetica"]] }] ;
zhat=Graphics[{Hue[0.3,1,0.6],Thickness[0.01],Arrow[{{0,0},{1,0}}]
,Inset[(OverHat[z]),1.1 *{1,0.2},BaseStyle->Directive[24,FontFamily->"Helvetica"]] }] ;
ηAxis=Graphics[{Red,Arrow[R*{{-Cos[θ],Sin[θ]},{Cos[θ],-Sin[θ]}}]}] ;
ξAxis=Graphics[{Red,Arrow[R*{{-Sin[θ],-Cos[θ]},{Sin[θ],Cos[θ]}}]}] ;
jhat=Graphics[{Purple,Thickness[0.01],Arrow[{{0,0},{Cos[θ],-Sin[θ]}}]
,Inset[(OverHat[η]),1.1 *{Cos[θ],-Sin[θ]},BaseStyle->Directive[24,FontFamily->"Helvetica"]]}] ;
ihat=Graphics[{Hue[0.14,1,0.6],Thickness[0.01],Arrow[{{0,0},{Sin[θ],Cos[θ]}}]
,Inset[(OverHat[ξ]),1.1 *{Sin[θ],Cos[θ]},BaseStyle->Directive[24,FontFamily->"Helvetica"]]}] ;
Show[{medium[R],zAxis, xAxis,ηAxis,ξAxis,xhat,zhat,jhat,ihat,
LaserBeam[λ,w,θ,{-R,0}]},PlotRange-> {{-R,R},{-R,R}}, AspectRatio->1]
,{{θ,π/3},0,π/2}]

1.2 Beam cross section at the interface

We can do this by substitute:
                      η-> z Sin[θ] ; ξ-> z Cos[θ]

Note: you can save time using Mathematica

(( 1)/(Sqrt[1+I(η/(Subscript[ζ, 0]))]))  (E^(I (Subscript[k, 0])η))   (E^(-((ξ^2)/((w^2) (1+I(η/(Subscript[ζ, 0])))))))           /. ξ-> z Cos[θ]  /. η->  z Sin[θ]

Or:      E[x=0]= (A/(Sqrt[1+((i z sin(θ))/(Subscript[ζ, 0]))]))  (e^(i β z))   (e^(-(((z^2) (cos^2)(θ))/((w^2) (1+((i z sin(θ))/(Subscript[ζ, 0])))))))      (7)
Because  ((( z sin(θ))/(Subscript[ζ, 0]))~((w sin(θ))/(Cos[θ] (Subscript[ζ, 0]))) =((w )/( (Subscript[ζ, 0])))Tan[θ] <1.7* (10^(-4)) Tan[θ] ): This is the case of very long Rayleigh range beam (ray-like or pencil-like), it is approximately Gaussian as long as 1.7* (10^(-4)) Tan[θ] <<1, we can drop (( z sin(θ))/(Subscript[ζ, 0])) in (7):
                E[x=0]~ A  (e^(i β z))   (e^(-(((z^2) )/((((w/(Cos[θ]))))^2))))                        (8)
Note that the spot size increases by the geometrical factor (1/(Cos[θ]))

2. Beam power

The power across a general surface is:
                         P=∫(c/(8 π))(Sqrt[(ϵ/μ)])((|E|)^2)(OverHat[k]) .  (OverHat[n])dS             (9)
 The incident power is: 
                 P =(c/(8 π))((|A|)^2) Cos[θ] (∫_(-∞)^∞)(e^(-((2 (z^2) )/((((w/(Cos[θ]))))^2))))dz      (10)
 The transmitted power is also simply an integration, but with a different angle:         
               (Subscript[P, trans]) = (c/(8 π))n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2)((|A|)^2)Cos[(Subscript[θ, r])](∫_(-∞)^∞)(e^(-((2 (z^2) )/((((w/(Cos[θ]))))^2))))dz   (11)

We can rewrite:     (Subscript[P, trans]) =((Cos[(Subscript[θ, r])] )/(Cos[θ]))n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2) ((c/(8 π))((|A|)^2)Cos[θ](∫_(-∞)^∞)(e^(-((2 (z^2) )/((((w/(Cos[θ]))))^2))))dz)   (12)
 Or:        (Subscript[P, trans]) =((Cos[(Subscript[θ, r])] )/(Cos[θ]))n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2) (P)                 (13)
 We have the same relationship with average intensity. Define:
                      (Subscript[I, trans; ave]) =((Subscript[P, trans])/(2 (Subscript[w, t])))                                (14a)
Then:             (Subscript[I, trans; ave]) =(1/(2 (Subscript[w, t])))P((Cos[(Subscript[θ, r])] )/(Cos[θ]))n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2)   (14b)              
             (Subscript[I, trans; ave]) =(( P)/(2 w))(w/(Subscript[w, t]))((Cos[(Subscript[θ, r])] )/(Cos[θ]))n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2)             (15)
                    
                
 Since:        ((2 w)/(Cos[θ]))=((2 (Subscript[w, t]))/(Cos[(Subscript[θ, r])]))=D   ;    (w/(Subscript[w, t]))= ((Cos[θ])/(Cos[(Subscript[θ, r])]))  (16)
               (Subscript[I, trans; ave]) =(P/(2 w))n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2) =(Subscript[I, inc; ave]) n ((|((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))|)^2)     (17)

These are exactly the same results as the “square aperture” approximation.

Under what condition does the above approximation may fail?
Let’s look at this again:
              ((( z sin(θ))/(Subscript[ζ, 0]))~((w sin(θ))/(Cos[θ] (Subscript[ζ, 0]))) =((w )/( (Subscript[ζ, 0])))Tan[θ] <1.7* (10^(-4)) Tan[θ] ) 
If θ is large and Tan[θ] is large, it is equivalent with the Gaussian beam being cut along its length rather than the cross section: the beam would deviate from Gaussian dramatically. Our Gaussian approximation above may not be valid.
However, the total power is just an integration over the profile, regardless the profile details.

Suppose we put a limit on ((i w )/( (Subscript[ζ, 0])))Tan[θ]  such that it is <= (10^(-2)).
Then, Tan[θ]<= ((10^(-2))/(1.7* (10^(-4))))

180*ArcTan[((10^(-2))/(1.7* (10^(-4))))]/Pi

We see that even 89 degree, the approximation is still good.