Plotting Fresnel Equation
fqs December 11, 2023 #physics #python #exampleIntroduction: Simple Equation Derivation
We start with Fresnel Equations
$$
\tilde{E}_{0_R}
= \left(\frac{\alpha-\beta}{\alpha+\beta}\right)\tilde{E}_{0_I}, ~~~~~~ \tilde{E}_{0_T}
= \left(\frac{2}{\alpha + \beta}\right) \tilde{E}_{0_I}. \tag{1}
$$
where
$$ \alpha\equiv \frac{\cos\theta_T}{\cos\theta_I}, \tag{2} $$
and
$$ \beta \equiv \frac{\mu_1 v_1}{\mu_2 v_2} = \frac{\mu_1 n_2}{\mu_2 n_1}. \tag{3} $$
If we assume the special case where $\mu_1 \cong \mu_2 \cong \mu_0$ then
$$ \beta \cong \frac{n_2}{n_1}. \tag{4} $$
Based on Snell’s law we know that
$$ \sin\theta_T = \frac{n_1}{n_2} \sin\theta_I. \tag{5} $$
Using identity $\cos^2\theta_T+\sin^2\theta_T = 1$ then the previous $ \alpha $ equation (2) becomes
$$ \alpha = \frac{\sqrt{1-\sin^2\theta_T}}{\cos\theta_I} = \frac{\sqrt{1-\left[(n_1/n_2)\sin\theta_I\right]^2}}{\cos\theta_I}. $$
For reflectance and transmittance
$$
\newcommand{\rbrak}[1]{\left(#1 \right)}
T\equiv\frac{I_T}{I_I}=\underbrace{\frac{\epsilon_2v_2}{\epsilon_1v_1}}_\beta\underbrace{\rbrak{\frac{E_{0_T}}{E_{0_I}}}}_\text{Eq. 1}\underbrace{\frac{\cos\theta_T}{\cos\theta_I}}_\alpha=\alpha\beta\rbrak{\frac{2}{\alpha+\beta}}^2.
$$
Source Code
https://github.com/firman-qs/fresnel-equation-plot-python.
"""
FRESNEL EQUATION PLOT.
Today we will plot FRESNEL EQUATION.
Required libraries: NumPy and Matplotlib.
"""
# Import Library
"""
For mathematical beauty, if you have, you can use latex fonts.
"""
=
"""
First we determine the refractive index of the medium,
for example from air (1.0) to glass (1.5).
"""
= 1.0 # refractive index of air
= 1.5 # refractive index of glass
'''
Function that returns alpha (as a function of the angle of incidence) and
beta (you can see equations 9.106 and 9.108 in Griffiths's book Introduction
to Electrodynamics)
'''
= /
= /
return ,
'''
Function that returns the reflection coefficient and transmission coefficient
(you can read the Fresnel equation (Equation 9.109) in Griffiths's book:
Introduction to Electrodynamics).
'''
=
=
# (Equation 9.109 Griffith Introduction to Electrodynamics).
= /
= 2/
return ,
""" Reflectance and Transmittance Function.
A function that returns the transmittance reflectance (Equation 9.115 & 9.116
in Griffiths's book Introduction to Electrodynamics).
"""
=
=
# (Equation 9.115 & 9.116 Griffith Introduction to Electrodynamics).
= **2
= **
return ,
# Creates an array of theta_i axis values
=
# Create an array of transmission & reflection coefficient values for each
# theta_i in theta_range
=
=
# Create an array of transmittance & reflectance values for each theta_i
# in theta_range
=
=
# Brewster's angle
=
# Tick for x-axis and y-axis
=
=
'''
Plot of Reflection and Transmission Coefficients
'''
, =
'''
Transmittance & Reflectance Plot
'''
# General Properties of Graph 1 & 2
# Axis thickness
# Subplots settings
# Save plot to png file.
Final Result
