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.
Your function Subscript[r, te][NDegtoRad[x]][] is almost constant:
You should review its definition.
Thank you, Gianluca, for replying, but your suggestion only tells me what I already knew (i.e., that my piecewise definition for parts two and three of my plot variables is not executing as expected) without explaining why that is happening. To clarify further, the expected plot of these parts (which I previously evaluated in another application) would look something like the following:
You can check the values this way:
Subscript[r, tm][NDegtoRad[x]][]} /.
Map[List, Thread[x -> \[Theta]]]