Skip to content

Commit

Permalink
Working on signs
Browse files Browse the repository at this point in the history
  • Loading branch information
jcandy committed Oct 28, 2024
1 parent 874a72b commit d6dfa41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions cgyro/src/cgyro_globalshear.F90
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ subroutine cgyro_globalshear(ij)
! ExB shear
h1 = omega_eb_base*itor*h_x(iccj+llnt,ivc,itor)
! beta_star shear
h1 = h1-omega_sbeta(iccj+llnt,ivc,itor)*cap_h_c(iccj+llnt,ivc,itor)
h1 = h1+omega_sbeta(iccj+llnt,ivc,itor)*cap_h_c(iccj+llnt,ivc,itor)
! omega_star shear
h1 = h1-sum(omega_ss(:,iccj+llnt,ivc,itor)*field(:,iccj+llnt,itor))
h1 = h1+sum(omega_ss(:,iccj+llnt,ivc,itor)*field(:,iccj+llnt,itor))
else
h1 = 0.0
endif
Expand All @@ -61,9 +61,9 @@ subroutine cgyro_globalshear(ij)
! ExB shear
h2 = omega_eb_base*itor*h_x(iccj-llnt,ivc,itor)
! beta_star shear
h2 = h2-omega_sbeta(iccj-llnt,ivc,itor)*cap_h_c(iccj-llnt,ivc,itor)
h2 = h2+omega_sbeta(iccj-llnt,ivc,itor)*cap_h_c(iccj-llnt,ivc,itor)
! omega_star shear
h2 = h2-sum(omega_ss(:,iccj-llnt,ivc,itor)*field(:,iccj-llnt,itor))
h2 = h2+sum(omega_ss(:,iccj-llnt,ivc,itor)*field(:,iccj-llnt,itor))
else
h2 = 0.0
endif
Expand Down
11 changes: 6 additions & 5 deletions cgyro/src/cgyro_init_arrays.F90
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,10 @@ subroutine cgyro_init_arrays
+ abs(omega_rot_edrift_r(it)))

! omega_star
carg = -i_c*k_theta_base*itor*rho*(dlnndr(is)+dlntdr(is)*(energy(ie)-1.5)) &
-i_c*k_theta_base*itor*rho*(vel2(ie)*xi(ix)/vth(is) &
*omega_gammap(it)) -i_c*k_theta_base*itor*rho*omega_rot_star(it,is)
carg = &
-i_c*k_theta_base*itor*rho*(dlnndr(is)+dlntdr(is)*(energy(ie)-1.5)) &
-i_c*k_theta_base*itor*rho*(vel2(ie)*xi(ix)/vth(is)*omega_gammap(it)) &
-i_c*k_theta_base*itor*rho*omega_rot_star(it,is)

omega_s(:,ic,iv_loc,itor) = carg*jvec_c(:,ic,iv_loc,itor)

Expand All @@ -462,9 +463,9 @@ subroutine cgyro_init_arrays
sm = sdlnndr(is)+sdlntdr(is)*(energy(ie)-1.5)

! generalized beta/drift shear (acts on H)
sb = sbeta(is)*energy(ie)/bmag(it)**2
sb = -sbeta(is)*energy(ie)*xi(ix)**2/bmag(it)**3

arg = -k_theta_base*itor*length/(2*pi)
arg = k_theta_base*itor*length/(2*pi)

omega_ss(:,ic,iv_loc,itor) = arg*sm*jvec_c(:,ic,iv_loc,itor)
omega_sbeta(ic,iv_loc,itor) = arg*sb
Expand Down

0 comments on commit d6dfa41

Please sign in to comment.