ukaea / PROCESS

PROCESS is a systems code at UKAEA that calculates in a self-consistent manner the parameters of a fusion power plant with a specified performance, ensuring that its operating limits are not violated, and with the option to optimise to a given function of these parameters.
https://ukaea.github.io/PROCESS/
MIT License
36 stars 11 forks source link

New module for effective stellarator parameters #967

Closed jonmaddock closed 1 year ago

jonmaddock commented 5 years ago

In GitLab by @jlion on Dec 2, 2019, 10:08

Previously, the coil parameters of the helias5 stellarator were given by the module helias5b_coil_parameters. To introduce a possibility to use also other stellarator configurations I propose a generalization of this by using a new module:

module stellarator_configuration
   !+ad_name  stellarator_configuration_parameters
   !+ad_summ  Module containing defining parameters for a stellarator
   !+ad_type  Module
   !+ad_auth  J Lion, IPP Greifswald
   !+ad_cont  None
   !+ad_args  N/A
   !+ad_desc  This module contains a set of constants that defines a
   !+ad_desc  stellator configuration. Those parameters is based off external
   !+ad_desc  calculations.
   !+ad_prob  None
   !+ad_call  N/A
   !+ad_hist  07/10/19 jlion Initial version
   !+ad_stat  to be checked
   !+ad_docs  tba
   !
   ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   implicit none

   type :: stella_config

      ! Name
      character (len = 20) :: name

      !  Number of coils
      integer symmetry
      !  Coils per module
      integer coilspermodule

      !  Reference Point where all the other variables are determined
      real(kind(1.0D0))  rmajor_ref
      real(kind(1.0D0))  rminor_ref
      real(kind(1.0D0))  aspect_ref
      real(kind(1.0D0))  bt_ref

      !  Coil current needed for 1T on axis at outer radius 1m
      real(kind(1.0D0)) i0
      !  Magnetic field fit parameter a1
      real(kind(1.0D0)) a1
      !  Magnetic field fit parameter a2
      real(kind(1.0D0)) a2
      !  Minimal intercoil distance dmin/Rmax
      real(kind(1.0D0)) dmin
      !  Inductivity
      real(kind(1.0D0)) inductivity
      !  Coil surface
      real(kind(1.0D0)) coilsurface
      !  Total coil length
      real(kind(1.0D0)) coillength
      !  Port size in toroidal direction
      real(kind(1.0D0)) max_portsize_width
      !  Average minor Coil Radius (as r/R) to get it dimensionless.
      real(kind(1.0D0)) coil_epsilon 
      !  The ratio of the coil to plasma radius.
      real(kind(1.0D0)) coil_to_plasma_radius

      !  The maximal coil height at reference point.
      real(kind(1.0D0)) maximal_coil_height

      !  1 volume parameter. It scales according to r*R^2
      real(kind(1.0D0)) vr2r
      !  1 surface parameter
      real(kind(1.0D0)) surface 

   end type stella_config

   ! Overload fortran constructor
   interface stella_config
      procedure :: new_stella_config
   end interface stella_config

contains

   type(stella_config) function new_stella_config(index)
      integer, intent(in) :: index

      select case (index)
         case(1)
            ! Helias5 Machine
            new_stella_config%name = "Helias 5b"
            ! Reference point where all the other variables are determined from
            ! Plasma outer radius
            new_stella_config%rmajor_ref = 22.0D0
            new_stella_config%aspect_ref = 12.5D0  
            new_stella_config%rminor_ref = 22.0D0/12.5D0
            new_stella_config%bt_ref = 5.6D0

            new_stella_config%symmetry = 5
            new_stella_config%coilspermodule = 10
            new_stella_config%a1 = 0.712D0
            new_stella_config%a2 = 0.027D0
            new_stella_config%volume = 19.816D0  ! This value is for Helias 5
            new_stella_config%dmin = 0.84D0
            new_stella_config%max_portsize_width = 2.12D0 

            new_stella_config%surface= 49.228D0 ! Plasma Surface

            new_stella_config%maximal_coil_height = 12.7 ! [m] Full height max point to min point

            new_stella_config%coilsurface = 4817.7D0 ! Coil surface, dimensionfull. At reference point

            new_stella_config%coil_epsilon = 4.7D0 / 22.46D0

            new_stella_config%coillength = 1681.0D0 ! Central filament length of machine with outer radius 1m.

            new_stella_config%coil_to_plasma_radius = 22.46D0/22.0D0 ! Approximately

            new_stella_config%I0 = 13.06D0/5.6D0/22.46D0 ! Coil Current needed to produce 1T on axis in [MA] at outer radius 1m
            new_stella_config%inductivity = 1655.76D-6/22.0D0* 12.5D0**2 ! Inductivity/R*A^2 in muH/m
            ! Here one could check if a vmec file should be used to calculate
            ! vr2r and vr3. I see no reason for that though..
         !case(2)
            ! Helias4 Machine
         !case(3)
            ! Helias3 Machine
         case default
            ! Return some error here. The index is not implemented yet.
            write(*,*)'ERROR in initialization of stellarator config'
            write(*,*)'ERROR in initialization of stellarator config'
      end select

   end function new_stella_config

end module stellarator_configuration

This module will be used for changes in the stcoil subroutine (#tba) and is used for changes in stgeom already (#965).

jonmaddock commented 4 years ago

In GitLab by @jlion on Jan 31, 2020, 13:27

closed