Skip to content

Commit

Permalink
Set width of ionization source back to value in master branch so that…
Browse files Browse the repository at this point in the history
… Harrison Thompson tests pass.
  • Loading branch information
mrhardman committed Nov 6, 2023
1 parent f453962 commit 417441e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/ionization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ function constant_ionization_source!(f_out, vpa, vperp, z, r, moments, compositi
# e.g., width=0.15. Possibly narrower widths would require more vpa
# resolution, which then causes crashes due to overshoots giving
# negative f??
width = 1.0
zwidth = 0.25
rwidth = 0.25
vperpwidth = 1.0
width = 0.5
vperpwidth = 0.5
rwidth = 0.5
if vperp.n > 1
prefac = 1.0/vperpwidth^2
vperpprefac = 1.0/vperpwidth^2
else
prefac = 1.0
vperpprefac = 1.0
end
# loop below relies on vperp[1] = 0 when vperp.n = 1
@loop_s_r is ir begin
Expand All @@ -58,7 +57,7 @@ function constant_ionization_source!(f_out, vpa, vperp, z, r, moments, compositi
prefactor = 1.0
end
@loop_vperp_vpa ivperp ivpa begin
vperpfac = exp( - (vperp.grid[ivperp]/vperpwidth)^2)
vperpfac = vperpprefac*exp( - (vperp.grid[ivperp]/vperpwidth)^2)
f_out[ivpa,ivperp,iz,ir,is] += dt*rfac*vperpfac*collisions.ionization/width*prefactor*exp(-(vpa.scratch[ivpa]/width)^2)
end
end
Expand Down

0 comments on commit 417441e

Please sign in to comment.