diff --git a/documentation/proc-pages/physics-models/pulsed-plant.md b/documentation/proc-pages/physics-models/pulsed-plant.md index c57f751e1..39370ec4c 100644 --- a/documentation/proc-pages/physics-models/pulsed-plant.md +++ b/documentation/proc-pages/physics-models/pulsed-plant.md @@ -31,9 +31,9 @@ but this is not taken ito account. In the steady-state scenario (`i_pulsed_plant` = 0), the plasma current ramp-up time `t_current_ramp_up` is determined as follows. -- If `tohsin` = 0, the rate of change of plasma current is 0.5 MA/s. The PF coil ramp time `t_precharge` +- If `i_t_current_ramp_up` = 0, the rate of change of plasma current is 0.5 MA/s. The PF coil ramp time `t_precharge` and shutdown time `t_ramp_down` are (arbitrarily) set equal to `t_current_ramp_up`. -- If `tohsin` $\neq$ 0, the plasma current ramp-up time `t_current_ramp_up` = `tohsin`, and the PF coil ramp +- If `i_t_current_ramp_up` $\neq$ 0, the plasma current ramp-up time `t_current_ramp_up`, and the PF coil ramp and shutdown times are input parameters. In the pulsed scenario, (`i_pulsed_plant` = 1), the plasma current ramp-up time `t_current_ramp_up` is an input, and it diff --git a/process/physics.py b/process/physics.py index 04f93a017..eadcc389b 100644 --- a/process/physics.py +++ b/process/physics.py @@ -1689,14 +1689,12 @@ def physics(self): # Set PF coil ramp times if pulse_variables.i_pulsed_plant != 1: - if times_variables.tohsin == 0.0e0: + if times_variables.i_t_current_ramp_up == 0: times_variables.t_current_ramp_up = ( physics_variables.plasma_current / 5.0e5 ) times_variables.t_precharge = times_variables.t_current_ramp_up times_variables.t_ramp_down = times_variables.t_current_ramp_up - else: - times_variables.t_current_ramp_up = times_variables.tohsin else: if times_variables.pulsetimings == 0.0e0: diff --git a/source/fortran/input.f90 b/source/fortran/input.f90 index 0f3d0d130..fbd69fe1a 100644 --- a/source/fortran/input.f90 +++ b/source/fortran/input.f90 @@ -345,7 +345,7 @@ subroutine parse_input_file(in_file,out_file,show_changes) len_tf_bus use times_variables, only: t_current_ramp_up, pulsetimings, t_ramp_down, t_fusion_ramp, t_precharge, t_burn, & - t_between_pulse, tohsin + t_between_pulse, i_t_current_ramp_up use vacuum_variables, only: dwell_pump, pbase, tn, pumpspeedfactor, & initialpressure, outgasfactor, prdiv, pumpspeedmax, rat, outgasindex, & pumpareafraction, ntype, vacuum_model, pumptp @@ -1126,8 +1126,8 @@ subroutine parse_input_file(in_file,out_file,show_changes) case ('t_current_ramp_up') call parse_real_variable('t_current_ramp_up', t_current_ramp_up, 0.0D0, 1.0D4, & 'Plasma current ramp-up time for current init (s)') - case ('tohsin') - call parse_real_variable('tohsin', tohsin, 0.0D0, 1.0D4, & + case ('i_t_current_ramp_up') + call parse_int_variable('i_t_current_ramp_up', i_t_current_ramp_up, 0, 1, & 'Switch for t_current_ramp_up calculation') case ('t_ramp_down') call parse_real_variable('t_ramp_down', t_ramp_down, 0.0D0, 1.0D4, & diff --git a/source/fortran/times_variables.f90 b/source/fortran/times_variables.f90 index fccf9a329..96daf7385 100644 --- a/source/fortran/times_variables.f90 +++ b/source/fortran/times_variables.f90 @@ -51,11 +51,11 @@ module times_variables !! time for plasma current to ramp up to approx. full value (s) (calculated if `i_pulsed_plant=0`) !! (`iteration variable 65`) - real(dp) :: tohsin + integer :: i_t_current_ramp_up !! Switch for plasma current ramp-up time (if i_pulsed_plant=0): !! !! - = 0, t_current_ramp_up = t_precharge = t_ramp_down = Ip(MA)/0.5 - !! - <>0, t_current_ramp_up = tohsin; t_precharge, t_ramp_down are input + !! - = 1, t_current_ramp_up, t_precharge, t_ramp_down are input real(dp) :: t_pulse_repetition !! pulse length = t_current_ramp_up + t_fusion_ramp + t_burn + t_ramp_down @@ -93,7 +93,7 @@ subroutine init_times_variables 't_burn ', & 't_ramp_down ' /) t_current_ramp_up = 30.0D0 - tohsin = 0.0D0 + i_t_current_ramp_up = 0 t_pulse_repetition = 0.0D0 t_ramp_down = 15.0D0 t_precharge = 15.0D0