Add BC plotting routine

This commit is contained in:
JHendrikx 2025-02-10 12:19:23 +01:00
commit 13fa6c7efd
3 changed files with 41 additions and 7 deletions

View file

@ -146,9 +146,9 @@ module output
write(dataPhi_id, '('//formatFloat//')') t*dt*t_ref
write(dataPhi_id, '(A)') "Z"
write(dataPhi_id, '('//formatFloat//')') Z_list(j)
write(dataPhi_id, '(A,4('//formatSep//',A))') "r (m)","n_i (m^-3)","u_i (m s^-1)", "T_i (eV)"
write(dataPhi_id, '(A,3('//formatSep//',A))') "r (m)","n_i (m^-3)","u_i (m s^-1)", "T_i (eV)"
do i = 1, nr
write(dataPhi_id, '('//formatFloat//',4('//formatSep //','//formatFloat//'))') &
write(dataPhi_id, '('//formatFloat//',3('//formatSep //','//formatFloat//'))') &
r(i)*L_ref, &
n_i(j,i)*n_ref, &
u_i(j,i)*u_ref, &
@ -160,13 +160,13 @@ module output
end do
end subroutine writeOutputMom
subroutine writeOutputBoundary(t, dt, n, u, Temp, Z)
subroutine writeOutputBoundary(t, dt, n, u, Temp, TtoZ, Zinj)
use constantParameters, only: eV_to_K
use referenceValues, only: t_ref, n_ref, u_ref, Temp_ref
integer, intent(in):: t
real(dp), intent(in):: dt
real(dp), intent(in):: n, u, Temp, Z
real(dp), intent(in):: n, u, Temp, TtoZ, Zinj
character(len=6), parameter:: filename = 'bc.csv'
logical:: res
@ -174,14 +174,14 @@ module output
if (.not. res) then
write (*, '(A, A)') 'Writing: ', filename
open(unit=dataBC_id, file=pathOutput // filename, action='write', position='append')
write(dataBC_id, '(A,4(' // formatSep // ',A))') 't (s)', 'n (m^-3)', 'u (m s^-1)', 'T (eV)', 'Z'
write(dataBC_id, '(A,5(' // formatSep // ',A))') 't (s)', 'n (m^-3)', 'u (m s^-1)', 'T (eV)', 'TtoZ','Zinj'
close(dataBC_id)
end if
open(unit=dataBC_id, file=pathOutput // filename, action='write', position='append')
write(dataBC_id, '(' // formatFloat // ',4('// formatSep // ',' // formatFloat // '))') &
t*dt*t_ref, n*n_ref, u*u_ref, Temp*Temp_ref/eV_to_K, Z
write(dataBC_id, '(' // formatFloat // ',5('// formatSep // ',' // formatFloat // '))') &
t*dt*t_ref, n*n_ref, u*u_ref, Temp*Temp_ref/eV_to_K, TtoZ, Zinj
close(dataBC_id)