The attached worksheet attempts to calculate & plot the Fresnel reflection coefficients at the boundaries of a simple three-layer etalon cavity. The calculation & plotting at the first (external) boundary execute as expected, however, the calculation & plotting of the real & imaginary parts of the coefficients at the second (internal) cavity boundary do not return the expected values. The problem appears to be in the evaluation of the coefficient definitions, which I define in terms of a piecewise function to account for the phase changes when the AOI at the internal boundary equals or exceeds the critical angle, which I define previously. I feel like I might be missing something simple in my use of Mathematica syntax; any help is appreciated in advance. Scott
Thank you, Gianluca,
I am tardy in my response, but your comments enabled me to track down my errors, which were indeed with my function expression, and not with my syntax. Everything is working as expected now.
Scott
Your function Subscript[r, te][NDegtoRad[x]][[2]] is almost constant:
Subscript[r, te][NDegtoRad[x]][[2]]
You should review its definition.
You can check the values this way:
{Subscript[r, te][NDegtoRad[x]][[2]], Subscript[r, tm][NDegtoRad[x]][[2]], Subscript[r, te][NDegtoRad[x]][[3]], Subscript[r, tm][NDegtoRad[x]][[3]]} /. Map[List, Thread[x -> \[Theta]]]