Skip to content

initialization

st_init()

Routine to initialise the variables relevant to stellarators

This routine initialises the variables relevant to stellarators. Many of these may override the values set in routine

Source code in process/models/stellarator/initialization.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
def st_init():
    """Routine to initialise the variables relevant to stellarators

    This routine initialises the variables relevant to stellarators.
    Many of these may override the values set in routine

    """
    if stellarator_variables.istell == 0:
        return

    numerics.boundu[0] = 40.0  # allow higher aspect ratio

    # These lines switch off tokamak specifics (solenoid, pf coils, pulses etc.).
    # Are they still up to date? (26/07/22 JL)

    # Build quantities

    build_variables.dr_cs = 0.0
    build_variables.iohcl = 0
    pfcoil_variables.f_z_cs_tf_internal = 0.0
    build_variables.dr_cs_tf_gap = 0.0
    build_variables.f_dr_tf_outboard_inboard = 1.0

    #  Physics quantities

    physics_variables.i_plasma_pedestal = 0
    physics_variables.beta_norm_max = 0.0
    physics_variables.kappa95 = 1.0
    physics_variables.triang = 0.0
    physics_variables.q95 = 1.03

    #  Turn off current drive

    current_drive_variables.i_hcd_calculations = 0

    #  Times for different phases

    times_variables.t_plant_pulse_coil_precharge = 0.0
    times_variables.t_plant_pulse_plasma_current_ramp_up = 0.0
    times_variables.t_plant_pulse_burn = 3.15576e7  # one year
    times_variables.t_plant_pulse_plasma_current_ramp_down = 0.0
    times_variables.t_plant_pulse_plasma_present = (
        times_variables.t_plant_pulse_plasma_current_ramp_up
        + times_variables.t_plant_pulse_fusion_ramp
        + times_variables.t_plant_pulse_burn
        + times_variables.t_plant_pulse_plasma_current_ramp_down
    )
    times_variables.t_plant_pulse_no_burn = (
        times_variables.t_plant_pulse_coil_precharge
        + times_variables.t_plant_pulse_plasma_current_ramp_up
        + times_variables.t_plant_pulse_plasma_current_ramp_down
        + times_variables.t_plant_pulse_dwell
        + times_variables.t_plant_pulse_fusion_ramp
    )
    times_variables.t_plant_pulse_total = (
        times_variables.t_plant_pulse_coil_precharge
        + times_variables.t_plant_pulse_plasma_current_ramp_up
        + times_variables.t_plant_pulse_fusion_ramp
        + times_variables.t_plant_pulse_burn
        + times_variables.t_plant_pulse_plasma_current_ramp_down
        + times_variables.t_plant_pulse_dwell
    )