Project 4a: Dispersion Relation for R- and L-Waves in Magnetized Plasmas
Before anything else, we need to change to the stored notebook's directory, which contains input files for the PIC simulator.
cd /notebooks/r-and-l-mode-dispersion
In this project, we are going to look at the dispersion relation for electromagnetic waves in a uniform magnetic field.
In this project, you will study the accuracy of the dispersion relation we derived in class for waves that propagate along a constant magnetic field.
In class we began by stating that we are interested in waves with frequencies at or near the plasma frequency so that we can assume the ion motion is not important. We let the magnetic field point in the direction, . We also assume the wave moves in the direction, . Under these conditions we found that there are two types of waves:
For both waves, , , and (transverse waves).
The dispersion relations are:
In this project you will study the spectrum of waves that exist in a magnetized plasma. The constant magnetic field will point in the direction ( ). You will simulate a uniform plasma in which each plasma electron is initialized with positions (only in or what we call ). Each electron is also initialized with velocities ( , , )=( , , ) or momentum ( , , ) from a Maxwellian in each direction. The particles then begin to move in the self-consistent fields that their current and charge density produce:
- The length of the simulation window is .
- The simulation will run for a time .
- The simulation uses 50,000 particles.
We will have and .
1. R-wave and L-wave dispersion relations
Here you can look at the dispersion relation of the R-wave and L-wave and the frequencies described above. Just enter and and re-run the cell below:
############# # here we specify the plasma conditions wp=1 wc=0.5 ############# from scipy.optimize import fsolve import numpy as np import matplotlib.pyplot as plt %matplotlib inline #first we define the range of k's of interest, "k" here means "ck" karray=np.arange(0,10,0.05) nk=karray.shape[0] def rwave_disp(w,omegap,omegac,ck): ratio=omegac/omegap y=(ck*ck)/(omegap*omegap) - (w*w)/(omegap*omegap) + 1/(1-wc/w) return y def lwave_disp(w,omegap,omegac,ck): ratio=omegac/omegap y=(ck*ck)/(omegap*omegap) - (w*w)/(omegap*omegap) + 1/(1+wc/w) return y wR=0.5*(wc+np.sqrt(4*wp*wp+wc*wc)) wL=0.5*(np.sqrt(4*wp*wp+wc*wc)-wc) warrayL=np.zeros(karray.shape[0]); warrayR1=np.zeros(karray.shape[0]); warrayR2=np.zeros(karray.shape[0]); wLarray=np.zeros(karray.shape[0]); wR1array=np.zeros(karray.shape[0]); wR2array=np.zeros(karray.shape[0]); #wHarray=np.zeros(karray.shape[0]) wLarray[:]=wL wR1array[:]=0.01 wR2array[:]=wR #wHarray[:]=np.sqrt(wp*wp+wc*wc) warrayL[0]=wL warrayR1[0]=0.01 warrayR2[0]=wR for ik in range(1,nk): warrayR2[ik]=fsolve(rwave_disp,warrayR2[ik-1],args=(wp,wc,karray[ik])) warrayR1[ik]=fsolve(rwave_disp,warrayR1[ik-1],args=(wp,wc,karray[ik])) warrayL[ik]=fsolve(lwave_disp,warrayL[ik-1],args=(wp,wc,karray[ik])) plt.plot(karray,warrayR1,'r',label='R-wave dispersion') plt.plot(karray,warrayR2,'r') plt.plot(karray,warrayL,'b',label='L-wave dispersion') plt.plot(karray,wR2array,'r--',label='$\omega_R$') plt.plot(karray,wLarray,'b--',label='$\omega_L$') plt.plot(karray, karray,'g--',label='$\omega/k=c$') plt.xlabel('wave number $[ck/\omega_{pe}]$') plt.ylabel('frequency $[\omega_{pe}]$') plt.title('R wave dispersion relation') plt.legend() plt.xlim([karray[0],karray[nk-1]]) plt.ylim([0,5])#karray[nk-1]+1.0]) plt.legend(loc=0, fontsize=8) plt.show()
2. Simulations with a Particle-in-Cell Code
In this project you simulate plasmas with similar conditions as in Project 1a, 2a, and 3a.
Each plasma electron is initialized with positions (only in or what we call ) such that the density is uniform. The ions are initialized at the same positions but they have an infinite mass. Each electron is also initialized with velocities ( , , ) or momentum ( , , ) from a Maxwellian in each direction. The particles then begin to move in the self-consistent fields that their current and charge density produce.
- The length of the plasmas is 50
- The simulation will run for a time 400 .
- The simulation uses 50,000 particles.
You will be looking at plots of the electric field in the and directions ( and ), which correspond to R- and L-waves. You will also be looking at electric fields in the direction ( ) which correspond to fundamental plasma oscillations.
2.1. The following lines must always be executed before running anything else.
Reminder: Hit Shift+Enter to run a cell, or select the cell and click on the "Run" button in the top menu bar
import osiris %matplotlib inline
3. Run cases in which and .
dirname = 'therm-b05-rl' osiris.runosiris(rundir=dirname,inputfile='therm-b05-rl.txt')
dirname = 'therm-b20-rl' osiris.runosiris(rundir=dirname,inputfile='therm-b20-rl.txt')
4. Case for which .
After the simulation is finished, plot at (run the next cell).
- Do you see any evidence of a coherent wave?
- Does the plot make sense?
dirname = 'therm-b05-rl' osiris.field(rundir=dirname, dataset='e2', time=100)
Next, plot at (i.e., at cell=100).
- Do you see any evidence of a coherent wave?
- Does the plot make sense?
dirname = 'therm-b05-rl' osiris.field(rundir=dirname, dataset='e2', space=100)
Next, in the following two cells, we are going to plot . This is generated by taking and Fourier analyzing in both position and time.
- with wavenumber in units of [k] = :
dirname = 'therm-b05-rl' osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,15], vth = 0.1, b0_mag=0.5, vmin=-5, vmax=2, plot_or=3) osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,15], vth = 0.1, b0_mag=0.5, vmin=-5, vmax=2, plot_or=3, show_theory=True)
- Do these plots make sense?
- with wavenumber in units of [k] = :
dirname = 'therm-b05-rl' osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,25], vmin=-5, vmax=2, vth = 0.02, b0_mag=0.5, plot_or=2) osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,25], vmin=-5, vmax=2, vth = 0.02, b0_mag=0.5, plot_or=2, show_theory=True)
- Why do the plots for and look similar?
dirname = 'therm-b05-rl' osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,25], vmin=-5, vmax=2, vth=0.02, b0_mag=0.5, plot_or=1) osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,25], vmin=-5, vmax=2, vth=0.02, b0_mag=0.5, plot_or=1, show_theory=True)
- Why is this curve nearly = ?
- The curve bends down for large because of numerical not physical reasons. So it should actually look like the Bohm-Gross dispersion relation.
5. Case for which .
dirname = 'therm-b20-rl' osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,15], vmin=-5, vmax=2, vth = 0.1, b0_mag=2.0, plot_or=3) osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,15], vmin=-5, vmax=2, vth = 0.1, b0_mag=2.0, plot_or=3, show_theory=True)
- Which mode has phase velocities closer to the speed of light?
dirname = 'therm-b20-rl' osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,15], vmin=-5, vmax=2, vth=0.02, b0_mag=2.0, plot_or=2) osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,15], vmin=-5, vmax=2, vth=0.02, b0_mag=2.0, plot_or=2, show_theory=True)
- Is larger than in all cases?
dirname = 'therm-b20-rl' osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,25], vmin=-5, vmax=2, vth = 0.005, b0_mag=2.0, plot_or=1) osiris.plot_wk_rl(rundir=dirname, wlim=[0,5], klim=[0,25], vmin=-5, vmax=2, vth = 0.005, b0_mag=2.0, plot_or=1, show_theory=True)
- What are you learning about the behavior of curves near the resonces?