Calculate the blanket, shield or vacuum vessel half-height Based on blanket_half_height, shield_half_height, vv_half_height original author: J. Morris, CCFE, Culham Science Centre author: G. Graham, CCFE, Culham Science Centre
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | icomponent |
function component_half_height(icomponent)
!! Calculate the blanket, shield or vacuum vessel half-height
!! Based on blanket_half_height, shield_half_height, vv_half_height
!! original author: J. Morris, CCFE, Culham Science Centre
!! author: G. Graham, CCFE, Culham Science Centre
!
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
use build_variables, only: hmax, vgap_xpoint_divertor, vgap_vv_thermalshield, blnktth, shldtth, scrapli, scraplo, &
fwith, fwoth, d_vv_bot, d_vv_top
use physics_variables, only: rminor, kappa, idivrt
use divertor_variables, only: divfix
implicit none
! Input variables
integer, intent(in) :: icomponent
! icomponent - blnkt=0, shld=1, vv=2
! Local variables
real(dp) :: hbot, htop
! Return variable
real(dp) :: component_half_height
! Calculate component internal lower half-height (m)
! Blanket
if (icomponent==0) hbot = rminor*kappa + vgap_xpoint_divertor + divfix - blnktth
! Sheild
if (icomponent==1) hbot = rminor*kappa + vgap_xpoint_divertor + divfix
! Vacuum vessel
if (icomponent==2) hbot = hmax - vgap_vv_thermalshield - d_vv_bot
! Calculate component internal upper half-height (m)
! If a double null machine then symmetric
if (idivrt == 2) then
htop = hbot
else
! Blanket
htop = rminor*kappa + 0.5D0*(scrapli+scraplo + fwith+fwoth)
! Shield
if (icomponent==1) htop = htop + blnktth
! Vacuum Vessel
if (icomponent==2) htop = htop + blnktth + shldtth
end if
! Average of top and bottom (m)
component_half_height = 0.5D0*(htop + hbot)
end function component_half_height