New input options and fCUm now calculates the number of ions passing by (to plot dN/dE easily
This commit is contained in:
parent
6e07067faa
commit
f25abb3213
15 changed files with 169 additions and 27 deletions
|
|
@ -62,8 +62,10 @@ program VlaPlEx
|
|||
real(dp), allocatable, dimension(:,:):: fCum_i
|
||||
real(dp):: rCum
|
||||
integer:: rCum_index
|
||||
real(dp):: outputStep
|
||||
character(:), allocatable:: folder
|
||||
|
||||
character(len=128) arg
|
||||
character(len=128):: arg
|
||||
|
||||
CALL get_command_argument(1, arg)
|
||||
if (arg == '') then
|
||||
|
|
@ -74,11 +76,12 @@ program VlaPlEx
|
|||
inputFile = trim(arg)
|
||||
call openInputFile()
|
||||
call readReference()
|
||||
call readParallel(nThreads)
|
||||
call readGrid(r0, rf, dr, v0, vf, nv)
|
||||
call readOutput(folder, outputStep)
|
||||
call readTime(t0, tf, CFL)
|
||||
call readDetector(rCum)
|
||||
call readBoundary(boundaryConditions)
|
||||
nThreads = 16
|
||||
call readZ(Zlist, nz, Tene_to_Z)
|
||||
call closeInputFile()
|
||||
|
||||
|
|
@ -113,7 +116,7 @@ program VlaPlEx
|
|||
nt = nint((tf - t0) / dt)
|
||||
dt = (tf - t0) / float(nt)
|
||||
|
||||
everyOutput = nint(1.0e-9_dp/t_ref/dt)
|
||||
everyOutput = nint(outputStep/t_ref/dt)
|
||||
if (everyOutput == 0) then
|
||||
everyOutput = 1
|
||||
|
||||
|
|
@ -192,7 +195,7 @@ program VlaPlEx
|
|||
f0 = 0.0_dp
|
||||
|
||||
! Output initial values
|
||||
call createPath()
|
||||
call createPath(folder)
|
||||
call setTimeFormat(nt)
|
||||
t = 0
|
||||
call writeOutputRef()
|
||||
|
|
@ -386,7 +389,7 @@ program VlaPlEx
|
|||
if (all(n_i(iz,:) < n_epsilon) .and. iz .ne. z_inj) then
|
||||
cycle
|
||||
end if
|
||||
fCum_i(iz,:) = fCum_i(iz,:) + f_i_old(iz,rCum_index,:)
|
||||
fCum_i(iz,:) = fCum_i(iz,:) + f_i_old(iz,rCum_index,:)*dt*(v+dv/2.0)*dv
|
||||
end do
|
||||
! Write output
|
||||
if (mod(t,everyOutput) == 0 .or. t == nt) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue