Commit 5252eb28 authored by Mathieu RASSON's avatar Mathieu RASSON

Filamentation at 2P

parent 1162d74e
......@@ -10,7 +10,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def potential(r):\n",
......@@ -118,13 +120,13 @@
"metadata": {},
"outputs": [],
"source": [
"delta_z = 3e-3\n",
"z_max = 2.7\n",
"delta_z = 3e-4\n",
"z_max = 4\n",
"n_z = int(z_max/delta_z)\n",
"\n",
"crank = CrankNicolsonFilamentation()\n",
"\n",
"crank.set_grid(r_max=2e-3, n_r=150, z_min=0, z_max=z_max, n_z=n_z, t_min=-2e-13, t_max=2e-13, n_t=150)\n",
"crank.set_grid(r_max=4e-3, n_r=200, z_min=0, z_max=z_max, n_z=n_z, t_min=-4e-13, t_max=4e-13, n_t=450)\n",
"crank.set_parameters(Dr=diff_coeff, Dt=disp_coeff, V=potential, ofi=ofi, ava=ava ,K=K, sigma=sigma, \\\n",
" omega0=omega0, tau=tau, f=kerr_MPA)\n",
"\n",
......@@ -169,16 +171,23 @@
"metadata": {},
"outputs": [],
"source": [
"E, rho = crank.get_data()\n",
"#E, rho = crank.E_matrix.copy(), crank.rho_matrix.copy()"
"# Data extraction\n",
"\n",
"#E, rho = crank.get_data()\n",
"#E, rho = crank.E_matrix.copy(), crank.rho_matrix.copy()\n",
"E, rho = crank.E_matrix, crank.rho_matrix"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# 2D plot (r,z) of field intensity at pulse central date\n",
"\n",
"fig, ax = plt.subplots()\n",
"#mesh = ax.pcolormesh(np.real(crank.r_pts), np.real(crank.z_pts), np.abs(E[:,:,crank.n_t//2])**2)\n",
"mesh = ax.pcolormesh(np.abs(E[:,:,crank.n_t//2])**2)\n",
......@@ -196,22 +205,24 @@
"metadata": {},
"outputs": [],
"source": [
"# Maximal intensity along z\n",
"\n",
"listemax = 1/(c*mu) * np.array([np.amax(np.abs(E[i,:,:])**2) for i in range(crank.n_z)])\n",
"#listemax = np.array([np.amax(np.abs(E[i,:,:])**2) for i in range(crank.n_z)])\n",
"#listemax = 1/(c*mu) * np.array([np.amax(np.abs(E[i,2,:])**2) for i in range(crank.n_z)])\n",
"\n",
"maxi = 736\n",
"print(crank.n_z)\n",
"print(1/(c*mu))\n",
"maxi = crank.n_z\n",
"print('n_z: ', crank.n_z)\n",
"#print(1/(c*mu))\n",
"\n",
"plt.figure()\n",
"plt.plot(np.real(crank.z_pts[:maxi]), listemax[:maxi])\n",
"plt.ylim(0, 1.5e15)\n",
"plt.xlim(2, 2.3)\n",
"#plt.ylim(0, 1.5e15)\n",
"#plt.xlim(2, 2.3)\n",
"plt.xlabel('Propagation distance (m)')\n",
"plt.ylabel('Intensity ($W \\cdot m^{-2}$)')\n",
"#plt.ylabel('Squared Field Amplitude ($C^2 \\cdot m^{-2}$)')\n",
"#plt.savefig('field_kerr_instability.png', dpi=300)\n",
"#plt.savefig('FCN2Posc2_E.png', dpi=300)\n",
"plt.show()"
]
},
......@@ -221,6 +232,8 @@
"metadata": {},
"outputs": [],
"source": [
"# Caracteristic non linear length for measured saturation\n",
"\n",
"print('Kerr: ', 1/(n2*k*3e17))\n",
"print('Plasma: ', 1/(sigma/2*omega0*tau*5e22))"
]
......@@ -231,14 +244,29 @@
"source": [
"The two caracteristic distances are around 5 mm. Therefore $\\Delta z$ has to be chosen around 0.5 mm and 0.1 mm is even better.\n",
"\n",
"Convergence achieved:\n",
"Convergence achieved, oscillations at saturation:\n",
"* $P = 2 P_{cr}$\n",
"* Calculation time: 10'\n",
"* Plot: FCN2Posc\n",
"* Saturation at $E^2 = 3 \\cdot 10^{17} \\, C^2 \\cdot m^{-2}$ and $\\rho = 5 \\cdot 10^{22} \\, m^{-3}$\n",
"* $z_{max} = 4 \\, m$ (article)\n",
"* $r_{max} = 2 \\, mm$\n",
"* $r_{max} = 4 \\, mm$\n",
"* $t_{max} = \\pm 2 \\cdot 10^{-13} \\, s$\n",
"* $\\Delta z = 0.1 \\, mm$\n",
"* $n_t = n_r = 150$\n",
"* $\\Delta z = 0.3 \\, mm$\n",
"* $n_t = 150$\n",
"* $n_r = 300$\n",
"\n",
"Convergence, less oscillations:\n",
"* $P = 2 P_{cr}$\n",
"* Calculation time: 15'\n",
"* Plot: FCN2Posc2\n",
"* Saturation at $E^2 = 3 \\cdot 10^{17} \\, C^2 \\cdot m^{-2}$ and $\\rho = 5 \\cdot 10^{22} \\, m^{-3}$\n",
"* $z_{max} = 4 \\, m$ (article)\n",
"* $r_{max} = 4 \\, mm$\n",
"* $t_{max} = \\pm 4 \\cdot 10^{-13} \\, s$\n",
"* $\\Delta z = 0.3 \\, mm$\n",
"* $n_t = 450$ (not enough)\n",
"* $n_r = 200$ (300 necessary)\n",
"\n",
"Stability issues:\n",
"* $P = 2 P_{cr}$\n",
......@@ -255,26 +283,32 @@
"metadata": {},
"outputs": [],
"source": [
"# Maximal charge density along z\n",
"\n",
"listemax = np.array([np.amax(rho[i,:,:]) for i in range(crank.n_z)])\n",
"\n",
"maxi = 736\n",
"maxi = crank.n_z\n",
"\n",
"plt.figure()\n",
"plt.plot(np.real(crank.z_pts[:maxi]), listemax[:maxi])\n",
"plt.ylim(0, 6e22)\n",
"plt.xlim(2.0, 2.3)\n",
"#plt.ylim(0, 6e22)\n",
"plt.xlim(1.75, 3)\n",
"plt.xlabel('Propagation distance (m)')\n",
"plt.ylabel('Charge density ($m^{-3}$)')\n",
"#plt.savefig('charge_kerr_instability.png', dpi=300)\n",
"#plt.savefig('FCN2Posc2_rho.png', dpi=300)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# 2D plot (r,z) of charge density at last date\n",
"\n",
"fig, ax = plt.subplots()\n",
"mesh = ax.pcolormesh(np.real(crank.r_pts), np.real(crank.z_pts), rho[:,:,-1])\n",
"plt.colorbar(mesh, ax=ax)\n",
......@@ -290,8 +324,10 @@
"metadata": {},
"outputs": [],
"source": [
"# Field squared at given z,t along r\n",
"\n",
"plt.figure()\n",
"plt.plot(np.abs(E[4500,:,crank.n_t//2])**2)\n",
"plt.plot(np.abs(E[9800,:,crank.n_t//2])**2)\n",
"plt.show()"
]
},
......@@ -300,6 +336,22 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Field squared at given z,r along t\n",
"\n",
"plt.figure()\n",
"#plt.plot(np.log(np.abs(E[8300,0,:])**2))\n",
"plt.plot(np.abs(E[9800,0,:])**2)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
......@@ -319,7 +371,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.6.8"
}
},
"nbformat": 4,
......
......@@ -3,7 +3,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import numpy as np\n",
......@@ -49,7 +51,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"crank = CrankNicolsonDisp()\n",
......@@ -63,7 +67,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"np.save(\"../HSCN_E.npy\", np.abs(crank.E_matrix))\n",
......@@ -75,7 +81,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"fig, ax = plt.subplots()\n",
......@@ -103,7 +111,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.6.8"
}
},
"nbformat": 4,
......
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