Skip to content

Commit

Permalink
Renamed tohsin to i_t_current_ramp_up (#3558)
Browse files Browse the repository at this point in the history
* Renamed tohsin to i_t_current_ramp_up

* Replaced obsolete variable
  • Loading branch information
j-a-foster authored Feb 24, 2025
1 parent 5e922d7 commit 8966166
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions documentation/proc-pages/physics-models/pulsed-plant.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions process/physics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions source/fortran/input.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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, &
Expand Down
6 changes: 3 additions & 3 deletions source/fortran/times_variables.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8966166

Please sign in to comment.