Commit 12a1b9a9 authored by Antoine RAVETTA's avatar Antoine RAVETTA

Merge remote-tracking branch 'origin/master'

parents 02bdfdc9 ed6e12bb
......@@ -77,6 +77,10 @@ class CrankNicolsonFilamentation:
E2 = E_init.copy()
rho = np.zeros([self.n_r, self.n_t])
for n in range(self.n_z):
# Status check
print(str(n/self.n_z * 100) + ' % complete')
# General step initialisation
self.E_matrix[n,:,:] = E
self.rho_matrix[n,:,:] = rho
......
This diff is collapsed.
#-----------------------------------------------
#------------ Functions ------------------------
#-----------------------------------------------
def potential(r):
try:
return diff_coeff / r
except ZeroDivisionError:
return 0
def gaussian(r, t, r0=0, w0=1, t0=0, tp=1, Pin=1):
return np.sqrt(2*Pin/(np.pi*w0**2)) * np.exp(-(r-r0)** 2/(w0**2) - (t-t0)** 2/(tp**2))
def initial_enveloppe(r_pts, t_pts, w0, tp, Pin):
return np.array([[gaussian(r_pts[i], t_pts[j], w0=w0, tp=tp, Pin=Pin) for j in range(len(t_pts))] \
for i in range(len(r_pts))])
#----- Non linearities --------------
def kerr(E):
return 1j * k * n2 * np.abs(E)**2 * E
def answer(t):
pass
def kerr_delay(E):
pass
def kerr_MPA(E):
return 1j*k*n2*np.abs(E)**2 * E - beta/2 * np.abs(E)**(2*K-2) * E
#-----------------------------------------------
#------------ Imports ------------------------
#-----------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
from FCN import CrankNicolsonFilamentation
#-----------------------------------------------
#------------ Parameters ------------------------
#-----------------------------------------------
# Physics
c = 3e8
mu = 4*np.pi*1e-7
# Beam
lambd = 0.7e-6 # 0.775e-6
w0 = 1e-3 # 0.7e-3
tp = 85e-15
Pcr = 1.7e9
# Dispersion
k = 2 * np.pi / lambd
k_2 = 2e-28 # 0.2e-28
# Kerr Effect
n2 = 5.57e-23
# MPA
K = 7
beta = 6.5e-104
# Density
omega0 = k * c
ofi = 8.84e-71/omega0
ava = 2.9e-6
sigma = 5.1e-24
tau = 3.5e-13
# CN parameters
diff_coeff = 1j*1/(2 * k)
disp_coeff = -1j*k_2/2
#-----------------------------------------------
#------------ Instantiation ------------------------
#-----------------------------------------------
# Integration parameters
delta_z = 3e-4
z_max = 4
n_z = int(z_max/delta_z)
# Loop parameters
pow_inf = 2
pow_sup = 11
# Power loop
for i in range(pow_inf, pow_sup):
#--------------- Solver ----------------
# Initial power
Pin = i*Pcr
# Instantiation
crank = CrankNicolsonFilamentation()
crank.set_grid(r_max=4e-3, n_r=300, z_min=0, z_max=z_max, n_z=n_z, t_min=-4e-13, t_max=4e-13, n_t=600)
crank.set_parameters(Dr=diff_coeff, Dt=disp_coeff, V=potential, ofi=ofi, ava=ava, K=K, sigma=sigma, omega0=omega0, tau=tau, f=kerr_MPA)
crank.solve(initial_enveloppe(crank.r_pts, crank.t_pts, w0, tp, Pin))
#------------ Plots ------------------
# Maximal intensity along z
E_max = 1/(c*mu) * np.array([np.amax(np.abs(crank.E_matrix[i,:,:])**2) for i in range(crank.n_z)])
plt.figure()
plt.plot(np.real(crank.z_pts), E_max)
plt.xlabel('Propagation distance (m)')
plt.ylabel('Intensity ($W \cdot m^{-2}$)')
plt.savefig('FCN' + str(i) + 'P_E.png', dpi=300)
# Maximal charge density along z
rho_max = np.array([np.amax(crank.rho_matrix[i,:,:]) for i in range(crank.n_z)])
plt.figure()
plt.plot(np.real(crank.z_pts), rho_max)
plt.xlabel('Propagation distance (m)')
plt.ylabel('Charge density ($m^{-3}$)')
plt.savefig('FCN' + str(i) + 'P_rho.png', dpi=300)
# Ending check
print(str(i) + '-step complete')
......@@ -11,3 +11,7 @@ Parameters leading to the plots displayed in the report are listed in captions.
## Data analysis
Integration data are saved in .npy files thanks to the save function of Numpy. Then they are loaded into a analysis notebooks in which plots are implemented. **NB:** for the heavy integrations required by full filamentation data is not saved, because of the size of field and charge matrices. Analysis is done just after integration in the notebook and plots are saved.
## Filamentation Loop
In order to integrate the filamentation equation for various input powers, the script /codes/production/CN_classes/filamentation_loop.py can be run. A list of entire multiples of the critical power can be chosen and filamentation is calculated with those values. Resulting matrices are not stored but plots of maximum field intensity and charge density are saved.
......@@ -98,7 +98,7 @@ A delayed Kerr effect can as well be introduced as
\begin{equation*}
- \dfrac{\beta^{(K)}}{2} |\mathcal{E}|^{2K - 2} \mathcal{E}
\end{equation*}
where $K$ is the number of photons absorbed at a time, $K = 7$ for air, and $\beta^{(K)}$ accounts for the efficiency of this absorption.
where $K$ is the number of photons absorbed at a time, $K = 7$ for air and the wavelength considered hereafter, and $\beta^{(K)}$ accounts for the efficiency of this absorption.
The second defocusing effects is due to the \textbf{reaction of charges} in the plasma to the excitation of the electric field. Considering a Drude model for electrons, their answer to a periodic excitation creates a delay in their \textbf{polarisation}. This answer reads
\begin{equation*}
......@@ -352,7 +352,9 @@ The different Crank-Nicholson solvers, according to the effects implemented, are
Each of those classes are accompanied by a Jupyter Notebook named \texttt{*\_script.ipynb}, which instantiates the solver and runs the integration. Then, for linear integrations, data are saved in a \texttt{.npy} file and analysed in another Jupyter Notebook at \texttt{/codes/analyse}. For non linear integrations, results are analysed directly in the integration notebook.
An independant script, \texttt{filamentation\_loop.py}, stored with solving classes, can be run to calculate filamentation for a list of input powers. In this case, resulting data is not returned and cannot be accessed, but plots of maximum field intensity, along propagation axis, and of charge density created by the pulse, along propagation axis, are saved.
The parameters used to create the results displayed in this report are listed in the captions of figures, and some options are proposed in the notebooks, to test the influence of the various effects involved.
\newpage
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment