n_e as boundary condition

Now n_e is given as the density at the boundary and n_i at the boundary
is calculated once Z is known.

This aims to eliminate the iterative process.
This commit is contained in:
Jorge Gonzalez 2025-04-10 08:49:01 +02:00
commit 0c27b98e2e
6 changed files with 38 additions and 38 deletions

View file

@ -175,13 +175,13 @@ module output
end do
end subroutine writeOutputMom
subroutine writeOutputBoundary(t, dt, n, u, Temp, Zinj)
subroutine writeOutputBoundary(t, dt, n, u, Temp, Z_Tne, 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, Zinj
real(dp), intent(in):: n, u, Temp, Z_Tne, Zinj
character(len=6), parameter:: filename = 'bc.csv'
logical:: res
@ -189,14 +189,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)','Zinj'
write(dataBC_id, '(A,5(' // formatSep // ',A))') 't (s)', 'n_i (m^-3)', 'u_i (m s^-1)', 'T_i (eV)', 'Zinj','Z_Tne'
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, Zinj
write(dataBC_id, '(' // formatFloat // ',5('// formatSep // ',' // formatFloat // '))') &
t*dt*t_ref, n*n_ref, u*u_ref, Temp*Temp_ref/eV_to_K, Zinj, Z_Tne
close(dataBC_id)