Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params | |||
real(kind=rp), | intent(in) | :: | v | |||
real(kind=rp), | intent(in) | :: | ne | |||
real(kind=rp), | intent(in) | :: | Te |
function CF_SD(params,v,ne,Te)
TYPE(KORC_PARAMS), INTENT(IN) :: params
REAL(rp), INTENT(IN) :: v
REAL(rp), INTENT(IN) :: ne
REAL(rp), INTENT(IN) :: Te
REAL(rp) :: CF_SD
REAL(rp) :: CF_temp
REAL(rp) :: x
INTEGER :: i
REAL(rp) :: k=5._rp
x = v/VTe(Te)
CF_SD = Gammacee(v,ne,Te)*psi(x)/Te
if (params%bound_electron_model.eq.'HESSLOW') then
CF_temp=CF_SD
if ((cparams_ms%Zj(1).eq.0.0).and. &
(neut_prof.eq.'UNIFORM')) then
CF_temp=CF_temp+CF_SD*cparams_ms%nz(1)/ne* &
(cparams_ms%Zo(1)-cparams_ms%Zj(1))/ &
CLogee(v,ne,Te)*(log(1+h_j(1,v)**k)/k-v**2)
else if ((cparams_ms%Zj(1).eq.0.0).and. &
(neut_prof.eq.'HOLLOW')) then
CF_temp=CF_temp+CF_SD*max(cparams_ms%nz(1)-ne,0._rp)/ne* &
(cparams_ms%Zo(1)-cparams_ms%Zj(1))/ &
CLogee(v,ne,Te)*(log(1+h_j(1,v)**k)/k-v**2)
else
CF_temp=CF_temp+CF_SD*cparams_ms%nz(1)/cparams_ms%ne* &
(cparams_ms%Zo(1)-cparams_ms%Zj(1))/ &
CLogee(v,ne,Te)*(log(1+h_j(1,v)**k)/k-v**2)
endif
do i=2,cparams_ms%num_impurity_species
CF_temp=CF_temp+CF_SD*cparams_ms%nz(i)/cparams_ms%ne* &
(cparams_ms%Zo(i)-cparams_ms%Zj(i))/ &
CLogee(v,ne,Te)*(log(1+h_j(i,v)**k)/k-v**2)
end do
CF_SD=CF_temp
else if (params%bound_electron_model.eq.'ROSENBLUTH') then
CF_temp=CF_SD
do i=1,cparams_ms%num_impurity_species
CF_temp=CF_temp+CF_SD*cparams_ms%nz(i)/cparams_ms%ne* &
(cparams_ms%Zo(i)-cparams_ms%Zj(i))/2._rp
end do
CF_SD=CF_temp
end if
end function CF_SD