Skip to content

Commit 05d3975

Browse files
authored
Add files via upload
Added some vA/c factors in wave energy calculation.
1 parent 15bdefa commit 05d3975

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/NHDS.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ program NHDS
6565
call calc_xi(xi,1,pol,polz,x,kz,kperp) ! second parameter is index of species
6666
call calc_fluctRj(deltaRj,dUperpx,dUperpy,dUpar,1,pol,polz,x,kz,kperp) ! fifth parameter is index of species
6767

68-
write (*,*) kz,real(x),aimag(x),real(pol),aimag(pol),real(polz),aimag(polz)!,energy,quality
68+
write (*,*) kz,real(x),aimag(x),real(pol),aimag(pol),real(polz),aimag(polz),energy,quality
6969
write (10,*) kz,real(x),aimag(x),real(pol),aimag(pol),real(polz),aimag(polz),energy,quality
7070

7171
! if (i.EQ.10) call write_delta_f(1,kz,x,pol,polz) ! first parameter is index of species

src/waveenergy.f90

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ subroutine waveenergy(energy,x,kz,kperp,gamma_contribution)
120120
energy=energy+1.d0*real(Bk(i))**2+aimag(Bk(i))**2
121121
enddo
122122

123-
energy=energy/(16.d0*M_PI)
123+
energy=energy/(16.d0*M_PI*vAc*vAc)
124124

125125

126126
! Determine the contribution to gamma from all species (see Eq. (4) in Quataert (1998))
@@ -133,10 +133,6 @@ subroutine waveenergy(energy,x,kz,kperp,gamma_contribution)
133133
gamma_contribution(j) = gamma_contribution(j)+ (real(Ek(k))-uniti*aimag(Ek(k)))*chi_a(j,k,i)*Ek(i)
134134
enddo
135135
enddo
136-
gamma_contribution(j) = -xr*gamma_contribution(j) /(4.d0*energy*4.d0*M_PI)
136+
gamma_contribution(j) = -xr*gamma_contribution(j) /(4.d0*vAc*vAc*energy*4.d0*M_PI)
137137
enddo
138138
end subroutine
139-
140-
141-
142-

0 commit comments

Comments
 (0)