-
Notifications
You must be signed in to change notification settings - Fork 0
/
1D_disp.py
executable file
·38 lines (31 loc) · 874 Bytes
/
1D_disp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /usr/bin/env python
import matplotlib.pyplot as plt
from numpy import pi, deg2rad, linspace
from boris_lib import vomega
# material parameters
Ms = 139260.5752
H = 55704.230082
L = 5.1e-06
gamma = 35185.83772
alpha = 3.1e-16
theta = deg2rad(90.0)
trans_n = 0.0
mp = [Ms, H, L, gamma, alpha, theta, trans_n]
phi = deg2rad(45.0)
# k_max = no of nodes*minimum k for sample width W
W = 0.0013
k0 = pi/W
k_max = 100.0*k0
plt.subplot(111)
plt.title('1D Dispersion')
plt.xlabel('Wavevector (1/cm)')
plt.ylabel('Frequency (GHz)')
plt.grid(True)
nsteps = 100
k_BV = linspace(0,k_max,nsteps)
k_DE = linspace(0,k_max,nsteps)
k_user = linspace(0,k_max,nsteps)
# we plot k in 1/cm and omega in GHz
plt.plot(10**-2*k_BV,10**-9*vomega(k_BV,0.0,mp),'b-',10**-2*k_DE,10**-9*vomega(k_DE,pi/2,mp),'r-', 10**-2*k_user,10**-9*vomega(k_user,phi,mp),'k-')
plt.tight_layout()
plt.show()