Commit 3ccadf63 by Mathieu RASSON

### Filamentation figures and study

parent 54726ff3
 ... ... @@ -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.
 ... ... @@ -104,7 +104,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.8" "version": "3.7.3" } }, "nbformat": 4, ... ...
 #----------------------------------------------- #------------ 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')

142 KB

130 KB

79.7 KB

75.7 KB

145 KB

139 KB

102 KB

85.1 KB

109 KB

90.6 KB

123 KB

109 KB

118 KB

115 KB

117 KB

113 KB

139 KB

122 KB

141 KB

130 KB

68.5 KB

135 KB

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