Routine to calculate the inboard, outboard and total volumes of a toroidal shell comprising two elliptical sections author: P J Knight, CCFE, Culham Science Centre rshell : input real : major radius of centre of both ellipses (m) rmini : input real : horizontal distance from rshell to outer edge of inboard elliptical shell (m) rmino : input real : horizontal distance from rshell to inner edge of outboard elliptical shell (m) zminor : input real : vertical internal half-height of shell (m) drin : input real : horiz. thickness of inboard shell at midplane (m) drout : input real : horiz. thickness of outboard shell at midplane (m) dz : input real : vertical thickness of shell at top/bottom (m) vin : output real : volume of inboard section (m3) vout : output real : volume of outboard section (m3) vtot : output real : total volume of shell (m3) This routine calculates the volume of the inboard and outboard sections of a toroidal shell defined by two co-centred semi-ellipses. Each section's internal and external surfaces are in turn defined by two semi-ellipses. The volumes of each section are calculated as the difference in those of the volumes of revolution enclosed by their inner and outer surfaces.
See also eshellarea
Internal CCFE note T&M/PKNIGHT/PROCESS/009, P J Knight:
Surface Area and Volume Calculations for Toroidal Shells
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | rshell | |||
real(kind=dp), | intent(in) | :: | rmini | |||
real(kind=dp), | intent(in) | :: | rmino | |||
real(kind=dp), | intent(in) | :: | zminor | |||
real(kind=dp), | intent(in) | :: | drin | |||
real(kind=dp), | intent(in) | :: | drout | |||
real(kind=dp), | intent(in) | :: | dz | |||
real(kind=dp), | intent(out) | :: | vin | |||
real(kind=dp), | intent(out) | :: | vout | |||
real(kind=dp), | intent(out) | :: | vtot |
subroutine eshellvol(rshell,rmini,rmino,zminor,drin,drout,dz,vin,vout,vtot)
!! Routine to calculate the inboard, outboard and total volumes
!! of a toroidal shell comprising two elliptical sections
!! author: P J Knight, CCFE, Culham Science Centre
!! rshell : input real : major radius of centre of both ellipses (m)
!! rmini : input real : horizontal distance from rshell to outer edge
!! of inboard elliptical shell (m)
!! rmino : input real : horizontal distance from rshell to inner edge
!! of outboard elliptical shell (m)
!! zminor : input real : vertical internal half-height of shell (m)
!! drin : input real : horiz. thickness of inboard shell at midplane (m)
!! drout : input real : horiz. thickness of outboard shell at midplane (m)
!! dz : input real : vertical thickness of shell at top/bottom (m)
!! vin : output real : volume of inboard section (m3)
!! vout : output real : volume of outboard section (m3)
!! vtot : output real : total volume of shell (m3)
!! This routine calculates the volume of the inboard and outboard sections
!! of a toroidal shell defined by two co-centred semi-ellipses.
!! Each section's internal and external surfaces are in turn defined
!! by two semi-ellipses. The volumes of each section are calculated as
!! the difference in those of the volumes of revolution enclosed by their
!! inner and outer surfaces.
!! <P>See also <A HREF="eshellarea.html"><CODE>eshellarea</CODE></A>
!! Internal CCFE note T&M/PKNIGHT/PROCESS/009, P J Knight:
!! Surface Area and Volume Calculations for Toroidal Shells
!
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
use constants, only: pi, twopi
implicit none
! Arguments
real(kind=dp), intent(in) :: rshell, rmini, rmino, zminor, drin, drout, dz
real(kind=dp), intent(out) :: vin, vout, vtot
! Local variables
real(kind=dp) :: a, b, elong, v1, v2
! Global shared variables
! Input: pi,twopi
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! #TODO - Review both equations containing dz and attempt to separate
! top and bottom of vacuum vessel thickness
! See issue #433 for explanation
! Inboard section
! Volume enclosed by outer (higher R) surface of elliptical section
! and the vertical straight line joining its ends
a = rmini ; b = zminor ; elong = b/a
v1 = twopi * elong * (0.5D0*pi*rshell*a*a - 2.0D0/3.0D0*a*a*a)
! Volume enclosed by inner (lower R) surface of elliptical section
! and the vertical straight line joining its ends
a = rmini+drin ; b = zminor+dz ; elong = b/a
v2 = twopi * elong * (0.5D0*pi*rshell*a*a - 2.0D0/3.0D0*a*a*a)
! Volume of inboard section of shell
vin = v2 - v1
! Outboard section
! Volume enclosed by inner (lower R) surface of elliptical section
! and the vertical straight line joining its ends
a = rmino ; b = zminor ; elong = b/a
v1 = twopi * elong * (0.5D0*pi*rshell*a*a + 2.0D0/3.0D0*a*a*a)
! Volume enclosed by outer (higher R) surface of elliptical section
! and the vertical straight line joining its ends
a = rmino+drout ; b = zminor+dz ; elong = b/a
v2 = twopi * elong * (0.5D0*pi*rshell*a*a + 2.0D0/3.0D0*a*a*a)
! Volume of outboard section of shell
vout = v2 - v1
! Total shell volume
vtot = vin + vout
end subroutine eshellvol