jorek2_radiative.f90 1.68 KB
Newer Older
Fabian Wieschollek's avatar
Alles  
Fabian Wieschollek committed
1 2 3 4 5 6 7 8 9 10
program Radiative

  use mod_openadas
  use mod_non_coronal
  implicit none

  type(adf11_all)                  :: adas
  type(non_coronal)                :: ncor
  character(len=128)               :: outputname
  character(len=5)                 :: ADASname
Fabian Wieschollek's avatar
Fabian Wieschollek committed
11
  real*8                           :: tstep, ftime, temperature, density_plasma, density_imp, t_rad, t_equi, t_pres
Fabian Wieschollek's avatar
Alles  
Fabian Wieschollek committed
12
  real*8, dimension(3)             :: C_cooling
Fabian Wieschollek's avatar
Fabian Wieschollek committed
13 14 15
  integer                          :: step, nout, ierr, unit
  logical                          :: line_zero
  character(len=16), dimension(OUTPUT_MAX) :: output_commands
Fabian Wieschollek's avatar
Alles  
Fabian Wieschollek committed
16

Fabian Wieschollek's avatar
Fabian Wieschollek committed
17
  namelist /input/ outputname, output_commands, ADASname, &
Fabian Wieschollek's avatar
Alles  
Fabian Wieschollek committed
18
                 tstep, ftime, temperature, density_plasma, density_imp, t_rad, t_equi, &
Fabian Wieschollek's avatar
Fabian Wieschollek committed
19
                 C_cooling, nout, line_zero, t_pres, unit
Fabian Wieschollek's avatar
Alles  
Fabian Wieschollek committed
20 21 22 23 24


! --- Prepare the evolution
write(*,*) '#### Prepare Evolution #####'
read(5,input)
Fabian Wieschollek's avatar
Fabian Wieschollek committed
25 26
adas     = read_adf11(ADASname)                                                                    ! ADAS Data for choosen Impurity
ncor     = non_coronal(adas,temperature,density_plasma,density_imp,t_rad,t_equi,t_pres,C_cooling)  ! Non-Coronal-Type
Fabian Wieschollek's avatar
Alles  
Fabian Wieschollek committed
27 28 29 30 31



! --- Output first line for stime = 0
open(20,file=outputname)
Fabian Wieschollek's avatar
Fabian Wieschollek committed
32 33 34 35
call ncor%output_header(20,output_commands)
if ( line_zero .eq. .true. ) then
  call ncor%output(20,output_commands,unit) 
end if
Fabian Wieschollek's avatar
Alles  
Fabian Wieschollek committed
36 37 38 39 40 41 42 43



! --- Start the Evolution
write(*,*) '##### Start Evolution #####'
write(*,*) '##### #Steps:',int(ftime/tstep),'####'
write(*,*) '##### #Lines:',int(ftime/tstep)/nout,'###'

Fabian Wieschollek's avatar
Fabian Wieschollek committed
44

Fabian Wieschollek's avatar
Alles  
Fabian Wieschollek committed
45 46 47 48
do step=1,int(ftime/tstep)
  ! --- Time step
  call ncor%update(tstep)
  ! --- Output
Fabian Wieschollek's avatar
Fabian Wieschollek committed
49
  if ( int(mod(step,nout)) .eq. 0 )  call ncor%output(20,output_commands,unit)
Fabian Wieschollek's avatar
Alles  
Fabian Wieschollek committed
50 51 52 53 54 55
end do



close (20)
end program Radiative