Skip to content

exhaust

Module for plasma exhaust calculations and analysis.

PlasmaExhaust

Bases: Model

Class to hold plasma exhaust calculations for plasma processing.

Source code in process/models/physics/exhaust.py
 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
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
class PlasmaExhaust(Model):
    """Class to hold plasma exhaust calculations for plasma processing."""

    def __init__(self):
        self.outfile = constants.NOUT
        self.mfile = constants.MFILE

    def run(self):
        """This model isn't run."""

    def output(self):
        """Output plasma exhaust results to the output file."""
        po.oheadr(self.outfile, "Plasma Exhaust")
        po.ovarre(
            self.outfile,
            "Plasma separatrix power (Pₛₑₚ) (MW)",
            "(p_plasma_separatrix_mw)",
            physics_variables.p_plasma_separatrix_mw,
            "OP ",
        )

        if physics_variables.p_plasma_separatrix_mw <= 0.001e0:
            logger.error(
                "Possible problem with high radiation power, forcing "
                "p_plasma_separatrix_mw to odd values. "
                f"{physics_variables.p_plasma_separatrix_mw=}"
            )
            po.oblnkl(self.outfile)
            po.ocmmnt(
                self.outfile, "  BEWARE: possible problem with high radiation power"
            )
            po.ocmmnt(self.outfile, "          Power into divertor zone is unrealistic;")
            po.ocmmnt(self.outfile, "          divertor calculations will be nonsense#")
            po.ocmmnt(
                self.outfile, "  Set constraint 17 (Radiation fraction upper limit)."
            )
            po.oblnkl(self.outfile)

        if self.data.divertor.n_divertors == 2:
            # Double null divertor configuration
            po.ovarre(
                self.outfile,
                "Plasma separatrix power over major radius (Pₛₑₚ / R₀) (MW/m) "
                "(On peak divertor)",
                "(p_plasma_separatrix_rmajor_mw)",
                physics_variables.p_plasma_separatrix_rmajor_mw,
                "OP ",
            )
            po.ovarre(
                self.outfile,
                "EU-DEMO divertor protection re-attachment metric (PₛₑₚBₜ / q₉₅AR₀) "
                "(MWT/m) (On peak divertor)",
                "(p_div_bt_q_aspect_rmajor_mw)",
                physics_variables.p_div_bt_q_aspect_rmajor_mw,
                "OP ",
            )
        else:
            # Single null divertor configuration
            po.ovarre(
                self.outfile,
                "Plasma separatrix power over major radius (Pₛₑₚ / R₀) (MW/m)",
                "(p_plasma_separatrix_rmajor_mw)",
                physics_variables.p_plasma_separatrix_rmajor_mw,
                "OP ",
            )
            po.ovarre(
                self.outfile,
                "EU-DEMO divertor protection re-attachment metric (PₛₑₚBₜ / q₉₅AR₀) "
                "(MWT/m)",
                "(p_div_bt_q_aspect_rmajor_mw)",
                physics_variables.p_div_bt_q_aspect_rmajor_mw,
                "OP ",
            )

        po.oblnkl(self.outfile)

    @staticmethod
    def calculate_separatrix_power(
        f_p_alpha_plasma_deposited: float,
        p_alpha_total_mw: float,
        p_non_alpha_charged_mw: float,
        p_hcd_injected_total_mw: float,
        p_plasma_ohmic_mw: float,
        p_plasma_rad_mw: float,
    ) -> float:
        """
        Calculate the power crossing the separatrix (P_sep).

        Parameters
        ----------
        f_p_alpha_plasma_deposited : float
            Fraction of alpha power deposited in plasma.
        p_alpha_total_mw : float
            Total alpha power produced (MW).
        p_non_alpha_charged_mw : float
            Power from non-alpha charged particles (MW).
        p_hcd_injected_total_mw : float
            Total power injected by heating and current drive (MW).
        p_plasma_ohmic_mw : float
            Ohmic heating power (MW).
        p_plasma_rad_mw : float
            Radiated power from plasma (MW).

        Returns
        -------
        float
            Power crossing the separatrix (MW).
        """
        return (
            f_p_alpha_plasma_deposited * p_alpha_total_mw
            + p_non_alpha_charged_mw
            + p_hcd_injected_total_mw
            + p_plasma_ohmic_mw
            - p_plasma_rad_mw
        )

    @staticmethod
    def calculate_psep_over_r_metric(
        p_plasma_separatrix_mw: float, rmajor: float
    ) -> float:
        """
        Calculate the power crossing the separatrix per unit major radius (P_sep/R).

        Parameters
        ----------
        p_plasma_separatrix_mw : float
            Power crossing the separatrix (MW).
        rmajor : float
            Plasma major radius (m).

        Returns
        -------
        float
            Power crossing the separatrix per unit major radius (MW/m).
        """
        return p_plasma_separatrix_mw / rmajor

    @staticmethod
    def calculate_eu_demo_re_attachment_metric(
        p_plasma_separatrix_mw: float,
        b_plasma_toroidal_on_axis: float,
        q95: float,
        aspect: float,
        rmajor: float,
    ) -> float:
        """Calculate the EU DEMO divertor protection re-attachment metric for plasma
        exhaust.

        Parameters
        ----------
        p_plasma_separatrix_mw : float
            Power crossing the separatrix (MW).
        b_plasma_toroidal_on_axis : float
            Toroidal magnetic field on axis (T).
        q95 : float
            Safety factor at 95% flux surface.
        aspect : float
            Aspect ratio of the plasma.
        rmajor : float
            Plasma major radius (m).

        Returns
        -------
        float
            EU DEMO re-attachment metric (MW T /m).

        References
        ----------
        - M. Siccinio, G. Federici, R. Kembleton, H. Lux, F. Maviglia, and J. Morris,
          "Figure of merit for divertor protection in the preliminary design of the
          EU-DEMO reactor," Nuclear Fusion, vol. 59, no. 10, pp. 106026-106026,
          Jul. 2019, doi: https://doi.org/10.1088/1741-4326/ab3153.

        - H. Zohm et al.,
          "A stepladder approach to a tokamak fusion power plant,"
          Nuclear Fusion, vol. 57, no. 8, pp. 086002-086002, May 2017,
          doi: https://doi.org/10.1088/1741-4326/aa739e.
        """
        return (p_plasma_separatrix_mw * b_plasma_toroidal_on_axis) / (
            q95 * aspect * rmajor
        )

outfile = constants.NOUT instance-attribute

mfile = constants.MFILE instance-attribute

run()

This model isn't run.

Source code in process/models/physics/exhaust.py
20
21
def run(self):
    """This model isn't run."""

output()

Output plasma exhaust results to the output file.

Source code in process/models/physics/exhaust.py
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
def output(self):
    """Output plasma exhaust results to the output file."""
    po.oheadr(self.outfile, "Plasma Exhaust")
    po.ovarre(
        self.outfile,
        "Plasma separatrix power (Pₛₑₚ) (MW)",
        "(p_plasma_separatrix_mw)",
        physics_variables.p_plasma_separatrix_mw,
        "OP ",
    )

    if physics_variables.p_plasma_separatrix_mw <= 0.001e0:
        logger.error(
            "Possible problem with high radiation power, forcing "
            "p_plasma_separatrix_mw to odd values. "
            f"{physics_variables.p_plasma_separatrix_mw=}"
        )
        po.oblnkl(self.outfile)
        po.ocmmnt(
            self.outfile, "  BEWARE: possible problem with high radiation power"
        )
        po.ocmmnt(self.outfile, "          Power into divertor zone is unrealistic;")
        po.ocmmnt(self.outfile, "          divertor calculations will be nonsense#")
        po.ocmmnt(
            self.outfile, "  Set constraint 17 (Radiation fraction upper limit)."
        )
        po.oblnkl(self.outfile)

    if self.data.divertor.n_divertors == 2:
        # Double null divertor configuration
        po.ovarre(
            self.outfile,
            "Plasma separatrix power over major radius (Pₛₑₚ / R₀) (MW/m) "
            "(On peak divertor)",
            "(p_plasma_separatrix_rmajor_mw)",
            physics_variables.p_plasma_separatrix_rmajor_mw,
            "OP ",
        )
        po.ovarre(
            self.outfile,
            "EU-DEMO divertor protection re-attachment metric (PₛₑₚBₜ / q₉₅AR₀) "
            "(MWT/m) (On peak divertor)",
            "(p_div_bt_q_aspect_rmajor_mw)",
            physics_variables.p_div_bt_q_aspect_rmajor_mw,
            "OP ",
        )
    else:
        # Single null divertor configuration
        po.ovarre(
            self.outfile,
            "Plasma separatrix power over major radius (Pₛₑₚ / R₀) (MW/m)",
            "(p_plasma_separatrix_rmajor_mw)",
            physics_variables.p_plasma_separatrix_rmajor_mw,
            "OP ",
        )
        po.ovarre(
            self.outfile,
            "EU-DEMO divertor protection re-attachment metric (PₛₑₚBₜ / q₉₅AR₀) "
            "(MWT/m)",
            "(p_div_bt_q_aspect_rmajor_mw)",
            physics_variables.p_div_bt_q_aspect_rmajor_mw,
            "OP ",
        )

    po.oblnkl(self.outfile)

calculate_separatrix_power(f_p_alpha_plasma_deposited, p_alpha_total_mw, p_non_alpha_charged_mw, p_hcd_injected_total_mw, p_plasma_ohmic_mw, p_plasma_rad_mw) staticmethod

Calculate the power crossing the separatrix (P_sep).

Parameters:

Name Type Description Default
f_p_alpha_plasma_deposited float

Fraction of alpha power deposited in plasma.

required
p_alpha_total_mw float

Total alpha power produced (MW).

required
p_non_alpha_charged_mw float

Power from non-alpha charged particles (MW).

required
p_hcd_injected_total_mw float

Total power injected by heating and current drive (MW).

required
p_plasma_ohmic_mw float

Ohmic heating power (MW).

required
p_plasma_rad_mw float

Radiated power from plasma (MW).

required

Returns:

Type Description
float

Power crossing the separatrix (MW).

Source code in process/models/physics/exhaust.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
@staticmethod
def calculate_separatrix_power(
    f_p_alpha_plasma_deposited: float,
    p_alpha_total_mw: float,
    p_non_alpha_charged_mw: float,
    p_hcd_injected_total_mw: float,
    p_plasma_ohmic_mw: float,
    p_plasma_rad_mw: float,
) -> float:
    """
    Calculate the power crossing the separatrix (P_sep).

    Parameters
    ----------
    f_p_alpha_plasma_deposited : float
        Fraction of alpha power deposited in plasma.
    p_alpha_total_mw : float
        Total alpha power produced (MW).
    p_non_alpha_charged_mw : float
        Power from non-alpha charged particles (MW).
    p_hcd_injected_total_mw : float
        Total power injected by heating and current drive (MW).
    p_plasma_ohmic_mw : float
        Ohmic heating power (MW).
    p_plasma_rad_mw : float
        Radiated power from plasma (MW).

    Returns
    -------
    float
        Power crossing the separatrix (MW).
    """
    return (
        f_p_alpha_plasma_deposited * p_alpha_total_mw
        + p_non_alpha_charged_mw
        + p_hcd_injected_total_mw
        + p_plasma_ohmic_mw
        - p_plasma_rad_mw
    )

calculate_psep_over_r_metric(p_plasma_separatrix_mw, rmajor) staticmethod

Calculate the power crossing the separatrix per unit major radius (P_sep/R).

Parameters:

Name Type Description Default
p_plasma_separatrix_mw float

Power crossing the separatrix (MW).

required
rmajor float

Plasma major radius (m).

required

Returns:

Type Description
float

Power crossing the separatrix per unit major radius (MW/m).

Source code in process/models/physics/exhaust.py
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
@staticmethod
def calculate_psep_over_r_metric(
    p_plasma_separatrix_mw: float, rmajor: float
) -> float:
    """
    Calculate the power crossing the separatrix per unit major radius (P_sep/R).

    Parameters
    ----------
    p_plasma_separatrix_mw : float
        Power crossing the separatrix (MW).
    rmajor : float
        Plasma major radius (m).

    Returns
    -------
    float
        Power crossing the separatrix per unit major radius (MW/m).
    """
    return p_plasma_separatrix_mw / rmajor

calculate_eu_demo_re_attachment_metric(p_plasma_separatrix_mw, b_plasma_toroidal_on_axis, q95, aspect, rmajor) staticmethod

Calculate the EU DEMO divertor protection re-attachment metric for plasma exhaust.

Parameters:

Name Type Description Default
p_plasma_separatrix_mw float

Power crossing the separatrix (MW).

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field on axis (T).

required
q95 float

Safety factor at 95% flux surface.

required
aspect float

Aspect ratio of the plasma.

required
rmajor float

Plasma major radius (m).

required

Returns:

Type Description
float

EU DEMO re-attachment metric (MW T /m).

References
  • M. Siccinio, G. Federici, R. Kembleton, H. Lux, F. Maviglia, and J. Morris, "Figure of merit for divertor protection in the preliminary design of the EU-DEMO reactor," Nuclear Fusion, vol. 59, no. 10, pp. 106026-106026, Jul. 2019, doi: https://doi.org/10.1088/1741-4326/ab3153.

  • H. Zohm et al., "A stepladder approach to a tokamak fusion power plant," Nuclear Fusion, vol. 57, no. 8, pp. 086002-086002, May 2017, doi: https://doi.org/10.1088/1741-4326/aa739e.

Source code in process/models/physics/exhaust.py
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
@staticmethod
def calculate_eu_demo_re_attachment_metric(
    p_plasma_separatrix_mw: float,
    b_plasma_toroidal_on_axis: float,
    q95: float,
    aspect: float,
    rmajor: float,
) -> float:
    """Calculate the EU DEMO divertor protection re-attachment metric for plasma
    exhaust.

    Parameters
    ----------
    p_plasma_separatrix_mw : float
        Power crossing the separatrix (MW).
    b_plasma_toroidal_on_axis : float
        Toroidal magnetic field on axis (T).
    q95 : float
        Safety factor at 95% flux surface.
    aspect : float
        Aspect ratio of the plasma.
    rmajor : float
        Plasma major radius (m).

    Returns
    -------
    float
        EU DEMO re-attachment metric (MW T /m).

    References
    ----------
    - M. Siccinio, G. Federici, R. Kembleton, H. Lux, F. Maviglia, and J. Morris,
      "Figure of merit for divertor protection in the preliminary design of the
      EU-DEMO reactor," Nuclear Fusion, vol. 59, no. 10, pp. 106026-106026,
      Jul. 2019, doi: https://doi.org/10.1088/1741-4326/ab3153.

    - H. Zohm et al.,
      "A stepladder approach to a tokamak fusion power plant,"
      Nuclear Fusion, vol. 57, no. 8, pp. 086002-086002, May 2017,
      doi: https://doi.org/10.1088/1741-4326/aa739e.
    """
    return (p_plasma_separatrix_mw * b_plasma_toroidal_on_axis) / (
        q95 * aspect * rmajor
    )