Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params | |||
real(kind=rp), | intent(in) | :: | v |
function CF(params,v)
TYPE(KORC_PARAMS), INTENT(IN) :: params
REAL(rp), INTENT(IN) :: v
REAL(rp) :: CF
REAL(rp) :: CF_temp
REAL(rp) :: x
INTEGER :: i
REAL(rp) :: k=5._rp
x = v/cparams_ss%VTe
if ((.not.cparams_ms%LargeCollisions).or. &
(.not.(cparams_ss%P%ne_profile(1:6).eq.'RE-EVO'))) then
CF = cparams_ss%Gammac*psi(x)/cparams_ss%Te
else
CF = cparams_ms%Gammac_min*psi(x)/cparams_ss%Te
endif
if (params%bound_electron_model.eq.'HESSLOW') then
CF_temp=CF
do i=1,cparams_ms%num_impurity_species
if ((.not.cparams_ms%LargeCollisions).or. &
(.not.(cparams_ss%P%ne_profile(1:6).eq.'RE-EVO'))) then
CF_temp=CF_temp+CF*cparams_ms%nz(i)/cparams_ms%ne* &
(cparams_ms%Zo(i)-cparams_ms%Zj(i))/ &
CLogee(v,cparams_ss%ne,cparams_ss%Te)* &
(log(1+h_j(i,v)**k)/k-v**2)
else
CF_temp=CF_temp+CF*cparams_ms%nz(i)/cparams_ss%P%n_ne* &
(cparams_ms%Zo(i)-cparams_ms%Zj(i))/ &
CLogee(v,cparams_ss%P%n_ne,cparams_ss%Te)* &
(log(1+h_j(i,v)**k)/k-v**2)
end if
end do
CF=CF_temp
else if (params%bound_electron_model.eq.'ROSENBLUTH') then
CF_temp=CF
do i=1,cparams_ms%num_impurity_species
CF_temp=CF_temp+CF*cparams_ms%nz(i)/cparams_ms%ne* &
(cparams_ms%Zo(i)-cparams_ms%Zj(i))/2._rp
end do
CF=CF_temp
end if
end function CF