6 #include "sll_working_precision.h"
7 #include "sll_errors.h"
20 sll_real64 :: a = 0._f64
21 sll_real64 :: rbar = 0.5_f64
22 sll_real64 :: rhobar = 1._f64
23 sll_real64 :: kr = 0._f64
24 sll_real64 :: wr = 1._f64
25 sll_real64 :: tibar = 1._f64
26 sll_real64 :: kti = 0._f64
27 sll_real64 :: wti = 1._f64
28 sll_real64 :: tebar = 1._f64
29 sll_real64 :: kte = 0._f64
30 sll_real64 :: wte = 1._f64
48 sll_int32,
intent(in) :: input_file
51 sll_real64 :: a, rbar, rhobar, kr, omegar, tibar, kti, omegati, tebar, kte, omegate
53 namelist /profile_parameters/ a, rbar, rhobar, kr, omegar, tibar, kti, omegati, tebar, kte, omegate
55 read(input_file, profile_parameters,iostat=io_stat)
57 if (io_stat /= 0)
then
89 sll_real64,
intent(in) :: r
91 rho_0 = self%rhobar * exp( -self%kr*self%wr*tanh(self%a*(r-self%rbar)/self%wr) )
98 sll_real64,
intent(in) :: r
100 drho_0 = -self%kr/(cosh(self%a*(r-self%rbar)/self%wr)**2) *self%rho_0(r)
106 sll_real64,
intent(in) :: r
108 t_i = self%tibar*(1._f64-self%kti*self%wti*tanh(self%a*(r-self%rbar)/self%wti) )
110 if(
t_i< 0._f64)
then
111 sll_error(
'T_i',
'error in temperature in T_i')
118 sll_real64,
intent(in) :: r
120 dt_i = -self%tibar*self%kti/cosh(self%a*(r-self%rbar)/self%wti)**2
128 sll_real64,
intent(in) :: r
130 t_e = self%tebar * exp( -self%kte*self%wte*tanh(self%a*(r-self%rbar)/self%wte) )
131 if(
t_e< 0._f64)
then
132 sll_error(
'T_e',
'error in temperature in T_e')
140 sll_real64,
intent(in) :: r
Fortran module where set some physical and mathematical constants.
real(kind=f64), parameter, public sll_p_pi
real(kind=f64), parameter, public sll_p_twopi
functions for initial profile of the particle distribution function
real(kind=f64) function rho_0(self, r)
real(kind=f64) function t_i(self, r)
real(kind=f64) function dt_i(self, r)
real(kind=f64) function radial_distrib(self, r)
subroutine init_profile_functions(self, input_file)
real(kind=f64) function drho_0(self, r)
real(kind=f64) function t_e(self, r)