Commit d76b5e04 authored by Fabian Wieschollek's avatar Fabian Wieschollek

Greater Changes!

parent 6ebc5841
&input
ADASname = '89_ar' ! Argon
outputname = 'CE-argon.dat'
output_commands = 'Te', 'fractions', 'L_rad', '<Z>', 'Z_eff' !Temperature for x-axis
line_zero = .f.
unit = 1
nout = 1
tstep = 1.0d-1 ! Go in timesteps of 0.1 i.e. 0.1 eV
ftime = 10000 ! Final time, where Te=10keV
temperature = 2.013320969d-5 ! Begin with 1 eV initially
density_plasma = 1.d0 ! For ne=1.d20
density_imp = 1.d1
t_rad = 1.d99 ! Turn off radiative cooling terms
t_equi = -1.d99 ! Assume coronal equilibrium from the beginning
t_pres = 1.d99 ! Turn off adiabatic terms, keep densities
C_cooling(1) = -2.013320969d-5 ! Increase temperature by 1 eV per time unit
C_cooling(2) = 0.d0 ! Start cooling from the beginning
C_cooling(3) = 1.d-5 ! Stop cooling, if Te < ...
/
#####################################################
+++++++ OPTIONS FOR OUTPUT_COMMANDS (UP TO 10) ++++++
#####################################################
't' > time
'Te' > temperature
'ne' > electron density
'fractions' > fractions of imp*
'ion_rate' > ionization rates*
'ion_rate' > recomb rates*
'Z_eff' > effectice Z
'<Z>' > avergaed Z
'L_rad' > radiation rate
'P_rad' > radiated P density
'log10_Te' > log10(Te/K)
'log10_ne' > log10(ne/m3)
* creates Z+1 columns for each charge state!
#####################################################
&input &input
outputname = 'lithiumtest.dat' ! Name of outputfile
ADASname = '96_li' ! Prefix of ADAS files ADASname = '96_li' ! Prefix of ADAS files
outputname = 'Li-Example.dat' ! Name of outputfile
output_commands = 't', 'Te', 'ne' 'fractions' ! output commands, see commands.README
line_zero = .t. ! Print line for t=0 with initial conidtions?
unit = 1 ! 0: JOREK-units 1: SI-units with eV for Th 2: SI-units with K for Th
nout = 100 ! Output every
tstep = 0.01d0 ! Timestep tstep = 0.01d0 ! Timestep
ftime = 10000.d0 ! Final time ftime = 10000.d0 ! Final time
nout = 100 ! Output every
temperature = 0.04d0 ! Initial electron temperature (everything in JOREK-units, central_density=1.d0) temperature = 0.04d0 ! Initial electron temperature (everything in JOREK-units, central_density=1.d0)
density_plasma = 1.d0 ! Plasma ion density density_plasma = 1.d0 ! Plasma ion density
density_imp = 1.d-1 ! Impurity ion density density_imp = 1.d-1 ! Impurity ion density
t_rad = 0.d00 ! Turn on radiative cooling term after t_rad = -1.d00 ! Turn on radiative cooling term after
t_equi = 1.d99 ! Assume coronal equilibrium after t_equi = 1.d99 ! Assume coronal equilibrium after
t_pres = -1.d00 ! Assume adiabatic, evolve densities consistently after
C_cooling(1) = 9.d-6 ! Linear Cooling rate dT/dt C_cooling(1) = 9.d-6 ! Linear Cooling rate dT/dt
C_cooling(2) = 1.d3 ! Start cooling after ... C_cooling(2) = 1.d3 ! Start cooling after ...
......
...@@ -8,28 +8,31 @@ program Radiative ...@@ -8,28 +8,31 @@ program Radiative
type(non_coronal) :: ncor type(non_coronal) :: ncor
character(len=128) :: outputname character(len=128) :: outputname
character(len=5) :: ADASname character(len=5) :: ADASname
real*8 :: tstep, ftime, temperature, density_plasma, density_imp, t_rad, t_equi real*8 :: tstep, ftime, temperature, density_plasma, density_imp, t_rad, t_equi, t_pres
real*8, dimension(3) :: C_cooling real*8, dimension(3) :: C_cooling
integer :: step, nout, ierr integer :: step, nout, ierr, unit
logical :: line_zero
character(len=16), dimension(OUTPUT_MAX) :: output_commands
namelist /input/ outputname, ADASname, & namelist /input/ outputname, output_commands, ADASname, &
tstep, ftime, temperature, density_plasma, density_imp, t_rad, t_equi, & tstep, ftime, temperature, density_plasma, density_imp, t_rad, t_equi, &
C_cooling, nout C_cooling, nout, line_zero, t_pres, unit
! --- Prepare the evolution ! --- Prepare the evolution
write(*,*) '#### Prepare Evolution #####' write(*,*) '#### Prepare Evolution #####'
read(5,input) read(5,input)
adas = read_adf11(ADASname) ! ADAS Data for choosen Impurity adas = read_adf11(ADASname) ! ADAS Data for choosen Impurity
ncor = non_coronal(adas,temperature,density_plasma,density_imp,t_rad,t_equi,C_cooling) ! Non-Coronal-Type ncor = non_coronal(adas,temperature,density_plasma,density_imp,t_rad,t_equi,t_pres,C_cooling) ! Non-Coronal-Type
! --- Output first line for stime = 0 ! --- Output first line for stime = 0
open(20,file=outputname) open(20,file=outputname)
call ncor%output_header(20) call ncor%output_header(20,output_commands)
call ncor%output(20) if ( line_zero .eq. .true. ) then
call ncor%output(20,output_commands,unit)
end if
...@@ -38,11 +41,12 @@ write(*,*) '##### Start Evolution #####' ...@@ -38,11 +41,12 @@ write(*,*) '##### Start Evolution #####'
write(*,*) '##### #Steps:',int(ftime/tstep),'####' write(*,*) '##### #Steps:',int(ftime/tstep),'####'
write(*,*) '##### #Lines:',int(ftime/tstep)/nout,'###' write(*,*) '##### #Lines:',int(ftime/tstep)/nout,'###'
do step=1,int(ftime/tstep) do step=1,int(ftime/tstep)
! --- Time step ! --- Time step
call ncor%update(tstep) call ncor%update(tstep)
! --- Output ! --- Output
if ( int(mod(step,nout)) .eq. 0 ) call ncor%output(20) if ( int(mod(step,nout)) .eq. 0 ) call ncor%output(20,output_commands,unit)
end do end do
......
This diff is collapsed.
...@@ -16,4 +16,6 @@ module constants ...@@ -16,4 +16,6 @@ module constants
real*8, parameter :: MOLE_NUMBER = 6.02214076d23 !< The Avogadro constant real*8, parameter :: MOLE_NUMBER = 6.02214076d23 !< The Avogadro constant
real*8, parameter :: sqrt_mu0_rho0 = 6.483638667465844d-007 real*8, parameter :: sqrt_mu0_rho0 = 6.483638667465844d-007
integer, parameter :: OUTPUT_MAX = 10
end module constants end module constants
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment