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
 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
 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
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)",
            self.data.physics.p_plasma_separatrix_mw,
            "OP ",
        )

        if self.data.physics.p_plasma_separatrix_mw <= 0.001e0:
            logger.error(
                "Possible problem with high radiation power, forcing "
                "p_plasma_separatrix_mw to odd values. "
                f"{self.data.physics.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)",
                self.data.physics.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)",
                self.data.physics.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)",
                self.data.physics.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)",
                self.data.physics.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ₛₑₚ).

        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ₛₑₚ / R₀).

        Parameters
        ----------
        p_plasma_separatrix_mw : float
            Power crossing the separatrix (Pₛₑₚ) [MW].
        rmajor : float
            Plasma major radius (R₀) [m].

        Returns
        -------
        float
            Power crossing the separatrix per unit major radius (Pₛₑₚ / R₀) [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 (PₛₑₚBₜ / q₉₅AR₀).

        Parameters
        ----------
        p_plasma_separatrix_mw : float
            Power crossing the separatrix (Pₛₑₚ) [MW].
        b_plasma_toroidal_on_axis : float
            Toroidal magnetic field on axis (Bₜ) [T].
        q95 : float
            Safety factor at 95% flux surface (q₉₅).
        aspect : float
            Aspect ratio of the plasma (A).
        rmajor : float
            Plasma major radius (R₀) [m].

        Returns
        -------
        float
            EU DEMO re-attachment metric (PₛₑₚBₜ / q₉₅AR₀) [MW T /m].

        References
        ----------
        [1] 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.

        [2] 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
        )

    @staticmethod
    def calculate_radiation_fraction(
        p_plasma_rad_mw: float, p_plasma_heating_mw: float
    ) -> float:
        """
        Calculate the radiation fraction of the plasma.

        Parameters
        ----------
        p_plasma_rad_mw : float
            Radiated power from plasma (MW).
        p_plasma_heating_mw : float
            Total plasma heating power (MW).

        Returns
        -------
        float
            Radiation fraction of the plasma.
        """
        if p_plasma_heating_mw == 0:
            logger.warning(
                "Total plasma heating power is zero, "
                "cannot calculate radiation fraction."
            )
            return 0.0

        return p_plasma_rad_mw / p_plasma_heating_mw

outfile = constants.NOUT instance-attribute

mfile = constants.MFILE instance-attribute

run()

This model isn't run.

Source code in process/models/physics/exhaust.py
19
20
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
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
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)",
        self.data.physics.p_plasma_separatrix_mw,
        "OP ",
    )

    if self.data.physics.p_plasma_separatrix_mw <= 0.001e0:
        logger.error(
            "Possible problem with high radiation power, forcing "
            "p_plasma_separatrix_mw to odd values. "
            f"{self.data.physics.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)",
            self.data.physics.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)",
            self.data.physics.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)",
            self.data.physics.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)",
            self.data.physics.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ₛₑₚ).

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
 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
@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ₛₑₚ).

    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ₛₑₚ / R₀).

Parameters:

Name Type Description Default
p_plasma_separatrix_mw float

Power crossing the separatrix (Pₛₑₚ) [MW].

required
rmajor float

Plasma major radius (R₀) [m].

required

Returns:

Type Description
float

Power crossing the separatrix per unit major radius (Pₛₑₚ / R₀) [MW/m].

Source code in process/models/physics/exhaust.py
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@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ₛₑₚ / R₀).

    Parameters
    ----------
    p_plasma_separatrix_mw : float
        Power crossing the separatrix (Pₛₑₚ) [MW].
    rmajor : float
        Plasma major radius (R₀) [m].

    Returns
    -------
    float
        Power crossing the separatrix per unit major radius (Pₛₑₚ / R₀) [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 (PₛₑₚBₜ / q₉₅AR₀).

Parameters:

Name Type Description Default
p_plasma_separatrix_mw float

Power crossing the separatrix (Pₛₑₚ) [MW].

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field on axis (Bₜ) [T].

required
q95 float

Safety factor at 95% flux surface (q₉₅).

required
aspect float

Aspect ratio of the plasma (A).

required
rmajor float

Plasma major radius (R₀) [m].

required

Returns:

Type Description
float

EU DEMO re-attachment metric (PₛₑₚBₜ / q₉₅AR₀) [MW T /m].

References

[1] 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.

[2] 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
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
@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 (PₛₑₚBₜ / q₉₅AR₀).

    Parameters
    ----------
    p_plasma_separatrix_mw : float
        Power crossing the separatrix (Pₛₑₚ) [MW].
    b_plasma_toroidal_on_axis : float
        Toroidal magnetic field on axis (Bₜ) [T].
    q95 : float
        Safety factor at 95% flux surface (q₉₅).
    aspect : float
        Aspect ratio of the plasma (A).
    rmajor : float
        Plasma major radius (R₀) [m].

    Returns
    -------
    float
        EU DEMO re-attachment metric (PₛₑₚBₜ / q₉₅AR₀) [MW T /m].

    References
    ----------
    [1] 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.

    [2] 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
    )

calculate_radiation_fraction(p_plasma_rad_mw, p_plasma_heating_mw) staticmethod

Calculate the radiation fraction of the plasma.

Parameters:

Name Type Description Default
p_plasma_rad_mw float

Radiated power from plasma (MW).

required
p_plasma_heating_mw float

Total plasma heating power (MW).

required

Returns:

Type Description
float

Radiation fraction of the plasma.

Source code in process/models/physics/exhaust.py
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
@staticmethod
def calculate_radiation_fraction(
    p_plasma_rad_mw: float, p_plasma_heating_mw: float
) -> float:
    """
    Calculate the radiation fraction of the plasma.

    Parameters
    ----------
    p_plasma_rad_mw : float
        Radiated power from plasma (MW).
    p_plasma_heating_mw : float
        Total plasma heating power (MW).

    Returns
    -------
    float
        Radiation fraction of the plasma.
    """
    if p_plasma_heating_mw == 0:
        logger.warning(
            "Total plasma heating power is zero, "
            "cannot calculate radiation fraction."
        )
        return 0.0

    return p_plasma_rad_mw / p_plasma_heating_mw