constraint_eqn_085 Subroutine

public subroutine constraint_eqn_085(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)

Author : S Kahn args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation constraining the centerpost (CP) lifetime Depending on the chosen option : i_cp_lifetime - 0 : The CP full power year lifelime is set by the user (cplife_input) - 1 : The CP lifelime is equal to the divertor one - 2 : The CP lifetime is equal to the breeding blankets one - 3 : The CP lifetime is equal to the plant one #=# availability #=#=# consistency Logic change during pre-factoring: err, symbol, units will be assigned only if present. cplife : input real : calculated CP full power year lifetime (years) bktlife : input real : calculated first wall/blanket power year lifetime (years) divlife : input real : calculated divertor power year lifetime (years) i_cp_lifetime : input integer : switch chosing which plant element the CP the CP lifetime must equate

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(out) :: tmp_cc
real(kind=dp), intent(out) :: tmp_con
real(kind=dp), intent(out) :: tmp_err
character(len=1), intent(out) :: tmp_symbol
character(len=10), intent(out) :: tmp_units

Constraints output


Contents

Source Code


Source Code

   subroutine constraint_eqn_085(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
      !! Author : S Kahn
      !! args : output structure : residual error; constraint value;
      !! residual error in physical units; output string; units string
      !! Equation constraining the centerpost (CP) lifetime
      !! Depending on the chosen option : i_cp_lifetime
      !!  - 0 : The CP full power year lifelime is set by the user (cplife_input)
      !!  - 1 : The CP lifelime is equal to the divertor one
      !!  - 2 : The CP lifetime is equal to the breeding blankets one
      !!  - 3 : The CP lifetime is equal to the plant one
      !! #=# availability
      !! #=#=# consistency
      !! Logic change during pre-factoring: err, symbol, units will be assigned
      !! only if present.
      !! cplife : input real : calculated CP full power year lifetime (years)
      !! bktlife : input real : calculated first wall/blanket power year lifetime (years)
      !! divlife : input real : calculated divertor  power year lifetime (years)
      !! i_cp_lifetime : input integer : switch chosing which plant element the CP
      !!                                 the CP lifetime must equate
      use cost_variables, only : cplife, divlife, cplife_input, &
         tlife, i_cp_lifetime
      use fwbs_variables, only : bktlife

      implicit none

            real(dp), intent(out) :: tmp_cc
      real(dp), intent(out) :: tmp_con
      real(dp), intent(out) :: tmp_err
      character(len=1), intent(out) :: tmp_symbol
      character(len=10), intent(out) :: tmp_units
      !! Constraints output


      ! The CP lifetime is equal to the the divertor one
      if  ( i_cp_lifetime == 0 ) then
         tmp_cc = 1.0D0 - cplife/cplife_input

      else if ( i_cp_lifetime == 1 ) then
         tmp_cc = 1.0D0 - cplife/divlife

      ! The CP lifetime is equal to the tritium breeding blankets / FW one
      else if ( i_cp_lifetime == 2 ) then
         tmp_cc = 1.0D0 - cplife/bktlife

      ! The CP lifetime is equal to the
      else if ( i_cp_lifetime == 3 ) then
         tmp_cc = 1.0D0 - cplife/tlife
      end if

      tmp_con = divlife * (1.0D0 - tmp_cc)
      tmp_err = divlife * tmp_cc
      tmp_symbol = '='
      tmp_units = 'years'

   end subroutine constraint_eqn_085