constraint_eqn_039 Subroutine

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

Equation for first wall temperature upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for first wall temperature upper limit #=# fwbs #=#=# ftpeak, temp_fw_max and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftpeak : input real : f-value for first wall peak temperature temp_fw_max : input real : maximum temperature of first wall material (K) (i_thermal_electric_conversion>1) temp_fw_peak : input real : peak first wall temperature (K)

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

Contents

Source Code


Source Code

   subroutine constraint_eqn_039(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
      !! Equation for first wall temperature upper limit
      !! author: P B Lloyd, CCFE, Culham Science Centre
      !! args : output structure : residual error; constraint value;
      !! residual error in physical units; output string; units string
      !! Equation for first wall temperature upper limit
      !! #=# fwbs
      !! #=#=# ftpeak, temp_fw_max
      !! and hence also optional here.
      !! Logic change during pre-factoring: err, symbol, units will be assigned only if present.
      !! ftpeak : input real : f-value for first wall peak temperature
      !! temp_fw_max : input real : maximum temperature of first wall material (K) (i_thermal_electric_conversion>1)
      !! temp_fw_peak : input real : peak first wall temperature (K)
      use constraint_variables, only: ftpeak
      use fwbs_variables, only: temp_fw_max, temp_fw_peak
      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

      ! If the temperature peak == 0 then report an error
      if (temp_fw_peak < 1.0D0) call report_error(5)
      tmp_cc =  temp_fw_peak/temp_fw_max - 1.0D0 * ftpeak
      tmp_con = temp_fw_max * (1.0D0 - tmp_cc)
      tmp_err = temp_fw_peak * tmp_cc
      tmp_symbol = '<'
      tmp_units = 'K'

   end subroutine constraint_eqn_039