Skip to content

Commit

Permalink
Starting Alfven diagnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
jcandy committed Oct 2, 2024
1 parent 410b4bb commit 7c8bc4d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion f2py/pygacode/cgyro/data_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def plot_freq(self,xin):

# set normalizations
t = self.getnorm(xin['norm'])

#======================================
# Omega
ax = fig.add_subplot(121)
Expand All @@ -70,6 +70,13 @@ def plot_freq(self,xin):
ax.set_xlim([0,t[-1]])
#======================================

# Alfven diagnostic
rho = sum(self.mass*self.dens)
betae = self.betae_unit/self.b_gs2**2
v_A = np.sqrt(2/(betae*rho))
w_TAE = v_A/(2*self.q*self.rmaj)
ax.plot([0,t[-1]],[w_TAE,w_TAE],linestyle='--')

#======================================
# Gamma
ax = fig.add_subplot(122)
Expand Down

0 comments on commit 7c8bc4d

Please sign in to comment.