Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
Dispersion.m File Reference

Go to the source code of this file.

Functions

 fclose (file)
 imagesc (kaxis(k_start:k_end) *r_Larmor, waxis(w_start:w_end)/w_ci, log10(abs(Fourier(w_start:w_end, k_start:k_end))))
 colorbar ()
 set (gca, 'YDir', 'normal')
hold on text ('Interpreter', 'tex')
 xlabel ('{\itk}{\cdot}{\itr}_L')
 ylabel ('\omega/\omega_{ci}')
 plot (kaxis(k_start:k_end) *r_Larmor, vA *kaxis(k_start:k_end))
 sqrt (1.0+vA *vA/(c *c))) % Ion-acoustic wave cS
 plot (kaxis(k_start:k_end) *r_Larmor, kaxis(k_start:k_end) *cS)
 sqrt (1.0+kaxis.*kaxis *Ldebye2))
 plot (kaxis(k_start:k_end) *r_Larmor, kaxis(k_start:k_end) *sqrt(kb *Temperature/mp)/w_ci)
Magnetosonic wave plot (kaxis(k_start:k_end) *r_Larmor, kaxis(k_start:k_end) *sqrt((cS *cS+vA *vA)))
 plot (kaxis, kaxis *3 *dw *sqrt((cS *cS+vA *vA)))
 plot (kaxis, kaxis *4 *dw *sqrt((cS *cS+vA *vA)))
 plot (kaxis(k_start:k_end) *r_Larmor, 3)
 plot (kaxis(k_start:k_end) *r_Larmor, 4)
 plot (kaxis(k_start:k_end) *r_Larmor, w_lh/w_ci)
Ion plasma frequency plot (kaxis(k_start:k_end), w_pi)

Variables

clf ASCII Vlasiator =load('LDZ2_QPerp_Bxt.dat')
 Real =Vlasiator(:,:)
 Matsize =size(Real)
 lines =Matsize(1)
 cols =Matsize(2)
Binary file = fopen('Dispersion/LDZ2_QPerp_rhot.bin')
Dropping the last two numbers
 window = hamming(lines)'
for i
end Partial plotting k_start = 2
 k_end = 500
 w_start = 1
 w_end = 500
Parameters length =2.5e8
 ncells =cols
 dx =length/ncells
 dt =0.04
 Temperature =1.0e5
 B0 = 1.001249e-9
 density = 1.0e3
Constants c = 299792458.0
 kb = 1.3806505e-23
 mp = 1.67262171e-27
 me = 9.1093826e-31
 q = 1.60217653e-19
 mu0 = 4*pi()*1.0e-7
 epsilon0 = 8.85418781762e-12
 gamma = 5.0/3.0
 v_th = sqrt(2.0 * kb * Temperature / mp)
 w_ci = q*B0/mp
 r_Larmor = v_th / w_ci
 Fourier =fft2(Real)
 dk =2*pi() / (cols * dx)
 kaxis =0:dk:cols*dk
 dw =2*pi() / (lines * dt)
 waxis =0:dw:lines*dw
Alfvén wave vA = B0 / sqrt(mu0*density*mp)
 kaxis2 = kaxis.*kaxis
 kaxis4 = kaxis2.*kaxis2
 de2 = 5314^2
 one = ones(1, cols + 1, 'double')
 omega2Val = 0.5 * (kaxis2 ./ (one + kaxis2 * de2) .* (2.0*one + kaxis2 ./ (one + kaxis2 * de2)) - sqrt(kaxis4 ./ ((one + kaxis2*de2).*(one + kaxis2*de2).*(one + kaxis2*de2)) .* (4.0*kaxis2 + kaxis4 ./ (one + kaxis2 * de2))))
 Ldebye2 = epsilon0 * kb * Temperature / (density * q * q)
kaxis, kaxis *2 *dw *sqrt((cS *cS+vA *vAplot )()
Numerical propagation V = dx/dt
Ion lower hybrid frequency w_ce = q*B0/me
 w_pi = sqrt(density * q^2 / (mp * epsilon0))
 w_pe = sqrt(density * q^2 / (me * epsilon0))
 w_lh = sqrt((w_pi^2 + w_ci^2) / (1 + w_pe^2 / w_ce^2))

Function Documentation

◆ colorbar()

colorbar ( )

◆ fclose()

fclose ( file )
Here is the caller graph for this function:

◆ imagesc()

imagesc ( kaxis(k_start:k_end) * r_Larmor,
waxis(w_start:w_end)/ w_ci,
log10(abs(Fourier(w_start:w_end, k_start:k_end)))  )

◆ plot() [1/10]

plot ( kaxis(k_start:k_end) * r_Larmor,
3  )

◆ plot() [2/10]

plot ( kaxis(k_start:k_end) * r_Larmor,
4  )

◆ plot() [3/10]

plot ( kaxis(k_start:k_end) * r_Larmor,
kaxis(k_start:k_end) * cS )

◆ plot() [4/10]

Magnetosonic wave plot ( kaxis(k_start:k_end) * r_Larmor,
kaxis(k_start:k_end) *sqrt((cS *cS+vA *vA))  )

◆ plot() [5/10]

plot ( kaxis(k_start:k_end) * r_Larmor,
kaxis(k_start:k_end) *sqrt(kb *Temperature/mp)/ w_ci )

◆ plot() [6/10]

plot ( kaxis(k_start:k_end) * r_Larmor,
vA * kaxisk_start:k_end )
Here is the call graph for this function:

◆ plot() [7/10]

plot ( kaxis(k_start:k_end) * r_Larmor,
w_lh/ w_ci )

◆ plot() [8/10]

Ion plasma frequency plot ( kaxis(k_start:k_end) ,
w_pi  )

◆ plot() [9/10]

plot ( kaxis ,
kaxis *3 *dw * sqrt(cS *cS+vA *vA) )

◆ plot() [10/10]

plot ( kaxis ,
kaxis *4 *dw * sqrt(cS *cS+vA *vA) )

◆ set()

set ( gca ,
'YDir' ,
'normal'  )
Here is the caller graph for this function:

◆ sqrt() [1/2]

sqrt ( 1.0+kaxis.*kaxis * Ldebye2)

◆ sqrt() [2/2]

sqrt ( 1.0+vA *vA/ c *c)

◆ text()

hold on text ( 'Interpreter' ,
'tex'  )
Here is the caller graph for this function:

◆ xlabel()

xlabel ( '{\itk}{\cdot}{\itr}_L' )

◆ ylabel()

ylabel ( '\omega/\omega_{ci}' )

Variable Documentation

◆ B0

B0 = 1.001249e-9

Definition at line 41 of file Dispersion.m.

◆ c

Constants c = 299792458.0

Definition at line 45 of file Dispersion.m.

◆ cols

cols =Matsize(2)

Definition at line 8 of file Dispersion.m.

◆ de2

de2 = 5314^2

Definition at line 80 of file Dispersion.m.

◆ density

density = 1.0e3

Definition at line 42 of file Dispersion.m.

◆ dk

dk =2*pi() / (cols * dx)

Definition at line 61 of file Dispersion.m.

◆ dt

dt =0.04

Definition at line 39 of file Dispersion.m.

◆ dw

dw =2*pi() / (lines * dt)

Definition at line 64 of file Dispersion.m.

◆ dx

Definition at line 38 of file Dispersion.m.

◆ epsilon0

epsilon0 = 8.85418781762e-12

Definition at line 51 of file Dispersion.m.

◆ file

Binary file = fopen('Dispersion/LDZ2_QPerp_rhot.bin')

Definition at line 11 of file Dispersion.m.

◆ Fourier

Fourier =fft2(Real)

Definition at line 59 of file Dispersion.m.

◆ gamma

gamma = 5.0/3.0

Definition at line 52 of file Dispersion.m.

◆ i

const int i
Initial value:
=1:cols
Real(:,i) = Real(:, i) .* window
window
Definition Dispersion.m:22
for i
Definition Dispersion.m:24
cols
Definition Dispersion.m:8
float Real
Definition definitions.h:41

Definition at line 24 of file Dispersion.m.

◆ k_end

k_end = 500

Definition at line 31 of file Dispersion.m.

◆ k_start

end Partial plotting k_start = 2

Definition at line 30 of file Dispersion.m.

◆ kaxis

kaxis =0:dk:cols*dk

Definition at line 62 of file Dispersion.m.

◆ kaxis2

kaxis2 = kaxis.*kaxis

Definition at line 78 of file Dispersion.m.

◆ kaxis4

kaxis4 = kaxis2.*kaxis2

Definition at line 79 of file Dispersion.m.

◆ kb

kb = 1.3806505e-23

Definition at line 46 of file Dispersion.m.

◆ Ldebye2

Ldebye2 = epsilon0 * kb * Temperature / (density * q * q)

Definition at line 87 of file Dispersion.m.

◆ length

Parameters length =2.5e8

Definition at line 36 of file Dispersion.m.

◆ lines

Using the last two numbers for format lines =Matsize(1)

Definition at line 7 of file Dispersion.m.

◆ Matsize

Matsize =size(Real)

Definition at line 6 of file Dispersion.m.

◆ me

me = 9.1093826e-31

Definition at line 48 of file Dispersion.m.

◆ mp

mp = 1.67262171e-27

Definition at line 47 of file Dispersion.m.

◆ mu0

mu0 = 4*pi()*1.0e-7

Definition at line 50 of file Dispersion.m.

◆ ncells

ncells =cols

Definition at line 37 of file Dispersion.m.

◆ numbers

Dropping the last two numbers

Definition at line 17 of file Dispersion.m.

◆ omega2Val

omega2Val = 0.5 * (kaxis2 ./ (one + kaxis2 * de2) .* (2.0*one + kaxis2 ./ (one + kaxis2 * de2)) - sqrt(kaxis4 ./ ((one + kaxis2*de2).*(one + kaxis2*de2).*(one + kaxis2*de2)) .* (4.0*kaxis2 + kaxis4 ./ (one + kaxis2 * de2))))

Definition at line 82 of file Dispersion.m.

◆ one

one = ones(1, cols + 1, 'double')

Definition at line 81 of file Dispersion.m.

◆ plot

Langmuir wave Light plot(kaxis, kaxis *dw *c) plot % Ion cyclotron frequency plot(kaxis(k_start(kaxis(k_start:k_end) *r_Larmor, 2) ( )
static

Definition at line 92 of file Dispersion.m.

◆ q

q = 1.60217653e-19

Definition at line 49 of file Dispersion.m.

◆ r_Larmor

r_Larmor = v_th / w_ci

Definition at line 56 of file Dispersion.m.

◆ Real

Truncating the first line away Real =Vlasiator(:,:)

Definition at line 5 of file Dispersion.m.

◆ Temperature

Temperature =1.0e5

Definition at line 40 of file Dispersion.m.

◆ V

Numerical propagation V = dx/dt

Definition at line 98 of file Dispersion.m.

◆ v_th

v_th = sqrt(2.0 * kb * Temperature / mp)

Definition at line 54 of file Dispersion.m.

◆ vA

Alfvén wave vA = B0 / sqrt(mu0*density*mp)

Definition at line 77 of file Dispersion.m.

◆ Vlasiator

Vlasiator =load('LDZ2_QPerp_Bxt.dat')

Definition at line 4 of file Dispersion.m.

◆ w_ce

Ion lower hybrid frequency w_ce = q*B0/me

Definition at line 113 of file Dispersion.m.

◆ w_ci

w_ci = q*B0/mp

Definition at line 55 of file Dispersion.m.

◆ w_end

w_end = 500

Definition at line 33 of file Dispersion.m.

◆ w_lh

w_lh = sqrt((w_pi^2 + w_ci^2) / (1 + w_pe^2 / w_ce^2))

Definition at line 116 of file Dispersion.m.

◆ w_pe

w_pe = sqrt(density * q^2 / (me * epsilon0))

Definition at line 115 of file Dispersion.m.

◆ w_pi

w_pi = sqrt(density * q^2 / (mp * epsilon0))

Definition at line 114 of file Dispersion.m.

◆ w_start

w_start = 1

Definition at line 32 of file Dispersion.m.

◆ waxis

waxis =0:dw:lines*dw

Definition at line 65 of file Dispersion.m.

◆ window

window = hamming(lines)'

Definition at line 22 of file Dispersion.m.