dshellvol Subroutine

public subroutine dshellvol(rmajor, rminor, zminor, drin, drout, dz, vin, vout, vtot)

Uses

Routine to calculate the inboard, outboard and total volumes of a D-shaped toroidal shell author: P J Knight, CCFE, Culham Science Centre rmajor : input real : major radius to outer point of inboard straight section of shell (m) rminor : input real : horizontal internal width of 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 straight section (m3) vout : output real : volume of outboard curved section (m3) vtot : output real : total volume of shell (m3) This routine calculates the volume of the inboard and outboard sections of a D-shaped toroidal shell defined by the above input parameters. The inboard section is assumed to be a cylinder of uniform thickness. The outboard section's internal and external surfaces are defined by two semi-ellipses, centred on the outer edge of the inboard section; its volume is calculated as the difference in those of the volumes of revolution enclosed by the two surfaces.

See also dshellarea Internal CCFE note T&M/PKNIGHT/PROCESS/009, P J Knight: Surface Area and Volume Calculations for Toroidal Shells

Arguments

Type IntentOptional AttributesName
real(kind=double), intent(in) :: rmajor
real(kind=double), intent(in) :: rminor
real(kind=double), intent(in) :: zminor
real(kind=double), intent(in) :: drin
real(kind=double), intent(in) :: drout
real(kind=double), intent(in) :: dz
real(kind=double), intent(out) :: vin
real(kind=double), intent(out) :: vout
real(kind=double), intent(out) :: vtot

Contents

Source Code


Source Code

  subroutine dshellvol(rmajor,rminor,zminor,drin,drout,dz,vin,vout,vtot)

    !! Routine to calculate the inboard, outboard and total volumes
    !! of a D-shaped toroidal shell
    !! author: P J Knight, CCFE, Culham Science Centre
    !! rmajor : input real : major radius to outer point of inboard
    !! straight section of shell (m)
    !! rminor : input real : horizontal internal width of 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 straight section (m3)
    !! vout   : output real : volume of outboard curved section (m3)
    !! vtot   : output real : total volume of shell (m3)
    !! This routine calculates the volume of the inboard and outboard sections
    !! of a D-shaped toroidal shell defined by the above input parameters.
    !! The inboard section is assumed to be a cylinder of uniform thickness.
    !! The outboard section's internal and external surfaces are defined
    !! by two semi-ellipses, centred on the outer edge of the inboard section;
    !! its volume is calculated as the difference in those of the volumes of
    !! revolution enclosed by the two surfaces.
    !! <P>See also <A HREF="dshellarea.html"><CODE>dshellarea</CODE></A>
    !! Internal CCFE note T&amp;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=double), intent(in) :: rmajor, rminor, zminor, drin, drout, dz
    real(kind=double), intent(out) :: vin, vout, vtot

    !  Local variables
    real(kind=double) :: 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

    !  Volume of inboard cylindrical shell
    vin = 2.0D0*(zminor+dz) * pi*(rmajor**2 - (rmajor-drin)**2)

    !  Volume enclosed by inner surface of elliptical outboard section
    !  and the vertical straight line joining its ends
    a = rminor ; b = zminor ; elong = b/a
    v1 = twopi * elong * (0.5D0*pi*rmajor*a*a + 2.0D0/3.0D0*a*a*a)

    !  Volume enclosed by outer surface of elliptical outboard section
    !  and the vertical straight line joining its ends
    a = rminor+drout ; b = zminor+dz ; elong = b/a
    v2 = twopi * elong * (0.5D0*pi*rmajor*a*a + 2.0D0/3.0D0*a*a*a)

    !  Volume of elliptical outboard shell
    vout = v2 - v1

    !  Total shell volume
    vtot = vin + vout

  end subroutine dshellvol