Corrections to Z naming and iteration model
This commit is contained in:
parent
052a4dc05e
commit
af63194cb2
2 changed files with 22 additions and 24 deletions
|
|
@ -29,6 +29,14 @@ module output
|
||||||
|
|
||||||
end subroutine setTimeFormat
|
end subroutine setTimeFormat
|
||||||
|
|
||||||
|
function setZFormat(Z) result(ZString)
|
||||||
|
real(dp), intent(in):: Z
|
||||||
|
character(len=4):: ZString
|
||||||
|
|
||||||
|
write(ZString, '(F4.1)') Z
|
||||||
|
|
||||||
|
end function setZFormat
|
||||||
|
|
||||||
subroutine createPath()
|
subroutine createPath()
|
||||||
character(8) :: date_now
|
character(8) :: date_now
|
||||||
character(10) :: time_now
|
character(10) :: time_now
|
||||||
|
|
@ -57,16 +65,13 @@ module output
|
||||||
character(:), allocatable:: filename
|
character(:), allocatable:: filename
|
||||||
integer:: i, j
|
integer:: i, j
|
||||||
character(len=10):: timeString
|
character(len=10):: timeString
|
||||||
character(len=10) :: ZString
|
character(len=4) :: ZString
|
||||||
|
|
||||||
do j = 1, nz
|
do j = 1, nz
|
||||||
write (timeString, formatTime) t
|
write (timeString, formatTime) t
|
||||||
write(ZString, '(F6.3)') Z_list(j)
|
ZString = setZFormat(Z_list(j))
|
||||||
ZString = adjustl(trim(ZString))
|
|
||||||
|
|
||||||
ZString = adjustl(ZString)
|
filename = 'time_' // trim(timeString) // '_Z_' // trim(adjustl(ZString)) // '_f_i.csv'
|
||||||
ZString = ZString(:index(ZString // '.', '.') - 1) // ZString(index(ZString, '.') + 1:)
|
|
||||||
filename = 'time_' // trim(timeString) // '_Z' // trim(ZString) // '_f_i.csv'
|
|
||||||
write (*, '(A, A)') 'Writing: ', filename
|
write (*, '(A, A)') 'Writing: ', filename
|
||||||
|
|
||||||
open(unit=dataF_id, file=pathOutput // filename)
|
open(unit=dataF_id, file=pathOutput // filename)
|
||||||
|
|
@ -142,16 +147,13 @@ module output
|
||||||
integer:: i
|
integer:: i
|
||||||
integer:: j
|
integer:: j
|
||||||
character(len=10):: timeString
|
character(len=10):: timeString
|
||||||
character(len=10) :: ZString
|
character(len=4) :: ZString
|
||||||
|
|
||||||
do j = 1, nz
|
do j = 1, nz
|
||||||
write (timeString, formatTime) t
|
write (timeString, formatTime) t
|
||||||
write(ZString, '(F6.3)') Z_list(j)
|
ZString = setZFormat(Z_list(j))
|
||||||
ZString = adjustl(trim(ZString))
|
|
||||||
|
|
||||||
ZString = adjustl(ZString)
|
filename = 'time_' // trim(timeString) // '_Z_' // trim(adjustl(ZString)) // '_mom_i.csv'
|
||||||
ZString = ZString(:index(ZString // '.', '.') - 1) // ZString(index(ZString, '.') + 1:)
|
|
||||||
filename = 'time_' // trim(timeString) // '_Z' // trim(ZString) // '_mom_i.csv'
|
|
||||||
write (*, '(A, A)') 'Writing: ', filename
|
write (*, '(A, A)') 'Writing: ', filename
|
||||||
|
|
||||||
open(unit=dataPhi_id, file=pathOutput//filename)
|
open(unit=dataPhi_id, file=pathOutput//filename)
|
||||||
|
|
@ -275,17 +277,14 @@ module output
|
||||||
character(:), allocatable:: filename
|
character(:), allocatable:: filename
|
||||||
integer:: i, j
|
integer:: i, j
|
||||||
character(len=10):: timeString
|
character(len=10):: timeString
|
||||||
character(len=10) :: ZString
|
character(len=4) :: ZString
|
||||||
|
|
||||||
|
|
||||||
do j = 1, nz
|
do j = 1, nz
|
||||||
write (timeString, formatTime) t
|
write (timeString, formatTime) t
|
||||||
write(ZString, '(F6.3)') Z_list(j)
|
ZString = setZFormat(Z_list(j))
|
||||||
ZString = adjustl(trim(ZString))
|
|
||||||
|
|
||||||
ZString = adjustl(ZString)
|
filename = 'time_' // trim(timeString) // '_Z_' // trim(adjustl(ZString)) // '_fCum_i.csv'
|
||||||
ZString = ZString(:index(ZString // '.', '.') - 1) // ZString(index(ZString, '.') + 1:)
|
|
||||||
filename = 'time_' // trim(timeString) // '_Z' // trim(ZString) // '_fCum_i.csv'
|
|
||||||
write (*, '(A, A)') 'Writing: ', filename
|
write (*, '(A, A)') 'Writing: ', filename
|
||||||
|
|
||||||
open(unit=dataCum_id, file=pathOutput // filename)
|
open(unit=dataCum_id, file=pathOutput // filename)
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ program VlaPlEx
|
||||||
rCum_index = minloc(abs(r - rCum), 1)
|
rCum_index = minloc(abs(r - rCum), 1)
|
||||||
|
|
||||||
v0 =-0.5e1_dp*c_s
|
v0 =-0.5e1_dp*c_s
|
||||||
vf = 1.0e1_dp*c_s
|
vf = 1.5e1_dp*c_s
|
||||||
dv = 2.0e-1_dp
|
dv = 2.0e-1_dp
|
||||||
nv = nint((vf - v0) / dv) + 1
|
nv = nint((vf - v0) / dv) + 1
|
||||||
dv = (vf - v0) / float(nv-1)
|
dv = (vf - v0) / float(nv-1)
|
||||||
|
|
@ -146,8 +146,7 @@ program VlaPlEx
|
||||||
end if
|
end if
|
||||||
|
|
||||||
t0 = 0.0_dp
|
t0 = 0.0_dp
|
||||||
tf = 2.0e-7_dp / t_ref
|
tf = 3.0e-7_dp / t_ref
|
||||||
! tf = 1.0e1_dp * (rf - r0) / c_s
|
|
||||||
dt = 5.0e-2_dp*dr/c_s
|
dt = 5.0e-2_dp*dr/c_s
|
||||||
nt = nint((tf - t0) / dt)
|
nt = nint((tf - t0) / dt)
|
||||||
dt = (tf - t0) / float(nt)
|
dt = (tf - t0) / float(nt)
|
||||||
|
|
@ -268,9 +267,9 @@ program VlaPlEx
|
||||||
do while (Zave_bc - Zave_bc_old > 0.1_dp)
|
do while (Zave_bc - Zave_bc_old > 0.1_dp)
|
||||||
Zave_bc_old = Zave_bc
|
Zave_bc_old = Zave_bc
|
||||||
call TtoZne%get(Temp_bc, Zave_bc * n_bc, Zave_bc)
|
call TtoZne%get(Temp_bc, Zave_bc * n_bc, Zave_bc)
|
||||||
|
end do
|
||||||
z_inj = minloc(abs(Z_list - Zave_bc),1)
|
z_inj = minloc(abs(Z_list - Zave_bc),1)
|
||||||
Zave_bc = Z_list(z_inj)
|
Zave_bc = Z_list(z_inj)
|
||||||
end do
|
|
||||||
u_bc = sqrt(Zave_bc * Temp_bc)
|
u_bc = sqrt(Zave_bc * Temp_bc)
|
||||||
call writeOutputBoundary(t, dt, n_bc, u_bc, Temp_bc, Zave_bc)
|
call writeOutputBoundary(t, dt, n_bc, u_bc, Temp_bc, Zave_bc)
|
||||||
|
|
||||||
|
|
@ -364,7 +363,7 @@ program VlaPlEx
|
||||||
! n_e = sum_ni(1) * exp((phi- phi0) / T_e) ! Isothermal (Boltzmann)
|
! n_e = sum_ni(1) * exp((phi- phi0) / T_e) ! Isothermal (Boltzmann)
|
||||||
n_e = sum_ni(1) * (1.0_dp + (gamma_e - 1.0_dp)/gamma_e*(phi-phi0)/T_e)**gamma_e_exp !Polytropic
|
n_e = sum_ni(1) * (1.0_dp + (gamma_e - 1.0_dp)/gamma_e*(phi-phi0)/T_e)**gamma_e_exp !Polytropic
|
||||||
! Diagonal matrix for Newton integration scheme
|
! Diagonal matrix for Newton integration scheme
|
||||||
! db_dphi = n_e / T_e ! Isotropic
|
! db_dphi = n_e / T_e ! Isothermal (Boltzmann)
|
||||||
db_dphi = sum_ni(1) / (gamma_e * T_e) * &
|
db_dphi = sum_ni(1) / (gamma_e * T_e) * &
|
||||||
(1.0_dp + (gamma_e - 1.0_dp)/gamma_e*(phi-phi0)/T_e)**gamma_e_dexp !Polytropic
|
(1.0_dp + (gamma_e - 1.0_dp)/gamma_e*(phi-phi0)/T_e)**gamma_e_dexp !Polytropic
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue