Skip to content

ivc_functions

Module containing functions common to multiple in vessel components

calculate_pipe_bend_radius(i_ps, radius_fw_channel, b_bz_liq)

Set the pipe bend radius based on the coolant type.

Parameters:

Name Type Description Default
i_ps int

switch for primary or secondary coolant

required
radius_fw_channel float

radius of first wall cooling channels [m]

required
b_bz_liq float

radial width of the rectangular cooling channel [m] for long poloidal sections of blanket breeding zone

required
Source code in process/models/engineering/ivc_functions.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
def calculate_pipe_bend_radius(i_ps: int, radius_fw_channel: float, b_bz_liq: float):
    """Set the pipe bend radius based on the coolant type.

    Parameters
    ----------
    i_ps : int
        switch for primary or secondary coolant
    radius_fw_channel: float
        radius of first wall cooling channels [m]
    b_bz_liq: float
        radial width of the rectangular cooling channel [m]
        for long poloidal sections of blanket breeding zone

    """
    # If primary coolant or secondary coolant (See DCLL)
    radius_pipe_90_deg_bend = (3 * radius_fw_channel) if (i_ps == 1) else b_bz_liq
    radius_pipe_180_deg_bend = radius_pipe_90_deg_bend / 2

    return radius_pipe_90_deg_bend, radius_pipe_180_deg_bend

pumping_powers_as_fractions(f_p_fw_coolant_pump_total_heat, f_p_blkt_coolant_pump_total_heat, f_p_shld_coolant_pump_total_heat, f_p_div_coolant_pump_total_heat, p_fw_nuclear_heat_total_mw, psurffwi, psurffwo, p_blkt_nuclear_heat_total_mw, p_shld_nuclear_heat_mw, p_cp_shield_nuclear_heat_mw, p_plasma_separatrix_mw, p_div_nuclear_heat_total_mw, p_div_rad_total_mw)

Calculate mechanical pumping powers as fractions of thermal power in each component.

Parameters:

Name Type Description Default
f_p_fw_coolant_pump_total_heat float

Fraction for FW coolant pump.

required
f_p_blkt_coolant_pump_total_heat float

Fraction for blanket coolant pump.

required
f_p_shld_coolant_pump_total_heat float

Fraction for shield coolant pump.

required
f_p_div_coolant_pump_total_heat float

Fraction for divertor coolant pump.

required
p_fw_nuclear_heat_total_mw float

Total FW nuclear heating (MW).

required
psurffwi float

Inboard FW surface heating (MW).

required
psurffwo float

Outboard FW surface heating (MW).

required
p_blkt_nuclear_heat_total_mw float

Total blanket nuclear heating (MW).

required
p_shld_nuclear_heat_mw float

Shield nuclear heating (MW).

required
p_cp_shield_nuclear_heat_mw float

CP shield nuclear heating (MW).

required
p_plasma_separatrix_mw float

Plasma separatrix power (MW).

required
p_div_nuclear_heat_total_mw float

Divertor nuclear heating (MW).

required
p_div_rad_total_mw float

Divertor radiative power (MW).

required

Returns:

Type Description
tuple[float, float, float, float]

Tuple of pumping powers (MW) for FW, blanket, shield, and divertor.

Source code in process/models/engineering/ivc_functions.py
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
def pumping_powers_as_fractions(
    f_p_fw_coolant_pump_total_heat: float,
    f_p_blkt_coolant_pump_total_heat: float,
    f_p_shld_coolant_pump_total_heat: float,
    f_p_div_coolant_pump_total_heat: float,
    p_fw_nuclear_heat_total_mw: float,
    psurffwi: float,
    psurffwo: float,
    p_blkt_nuclear_heat_total_mw: float,
    p_shld_nuclear_heat_mw: float,
    p_cp_shield_nuclear_heat_mw: float,
    p_plasma_separatrix_mw: float,
    p_div_nuclear_heat_total_mw: float,
    p_div_rad_total_mw: float,
) -> tuple[float, float, float, float]:
    """Calculate mechanical pumping powers as fractions of thermal power in each component.

    Parameters
    ----------
    f_p_fw_coolant_pump_total_heat : float
        Fraction for FW coolant pump.
    f_p_blkt_coolant_pump_total_heat : float
        Fraction for blanket coolant pump.
    f_p_shld_coolant_pump_total_heat : float
        Fraction for shield coolant pump.
    f_p_div_coolant_pump_total_heat : float
        Fraction for divertor coolant pump.
    p_fw_nuclear_heat_total_mw : float
        Total FW nuclear heating (MW).
    psurffwi : float
        Inboard FW surface heating (MW).
    psurffwo : float
        Outboard FW surface heating (MW).
    p_blkt_nuclear_heat_total_mw : float
        Total blanket nuclear heating (MW).
    p_shld_nuclear_heat_mw : float
        Shield nuclear heating (MW).
    p_cp_shield_nuclear_heat_mw : float
        CP shield nuclear heating (MW).
    p_plasma_separatrix_mw : float
        Plasma separatrix power (MW).
    p_div_nuclear_heat_total_mw : float
        Divertor nuclear heating (MW).
    p_div_rad_total_mw : float
        Divertor radiative power (MW).

    Returns
    -------
    tuple[float, float, float, float]
        Tuple of pumping powers (MW) for FW, blanket, shield, and divertor.
    """
    p_fw_coolant_pump_mw = f_p_fw_coolant_pump_total_heat * (
        p_fw_nuclear_heat_total_mw + psurffwi + psurffwo
    )
    p_blkt_coolant_pump_mw = (
        f_p_blkt_coolant_pump_total_heat * p_blkt_nuclear_heat_total_mw
    )
    p_shld_coolant_pump_mw = f_p_shld_coolant_pump_total_heat * (
        p_shld_nuclear_heat_mw + p_cp_shield_nuclear_heat_mw
    )
    p_div_coolant_pump_mw = f_p_div_coolant_pump_total_heat * (
        p_plasma_separatrix_mw + p_div_nuclear_heat_total_mw + p_div_rad_total_mw
    )
    return (
        p_fw_coolant_pump_mw,
        p_blkt_coolant_pump_mw,
        p_shld_coolant_pump_mw,
        p_div_coolant_pump_mw,
    )

eshellarea(rshell, rmini, rmino, zminor)

Routine to calculate the inboard, outboard and total surface areas of a toroidal shell comprising two elliptical sections

Parameters:

Name Type Description Default
rshell float

major radius of centre of both ellipses [m]

required
rmini float

horizontal distance from rshell to inboard elliptical shell [m]

required
rmino float

horizontal distance from rshell to outboard elliptical shell [m]

required
zminor float

vertical internal half-height of shell [m]

required

Returns:

Type Description
tuple[float, float, float]

Tuple containing: - ain: Surface area of inboard straight section (m²) - aout: Surface area of outboard curved section (m²) - atot: Total surface area of shell (m²)

Source code in process/models/engineering/ivc_functions.py
 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
def eshellarea(rshell, rmini, rmino, zminor):
    """Routine to calculate the inboard, outboard and total surface areas
    of a toroidal shell comprising two elliptical sections

    Parameters
    ----------
    rshell : float
        major radius of centre of both ellipses [m]
    rmini : float
        horizontal distance from rshell to inboard elliptical shell [m]
    rmino : float
        horizontal distance from rshell to outboard elliptical shell [m]
    zminor : float
        vertical internal half-height of shell [m]

    Returns
    -------
    tuple[float, float, float]
        Tuple containing:
        - ain: Surface area of inboard straight section (m²)
        - aout: Surface area of outboard curved section (m²)
        - atot: Total surface area of shell (m²)
    """
    # Inboard section
    elong = zminor / rmini
    ain = 2.0 * np.pi * elong * (np.pi * rshell * rmini - 2.0 * rmini * rmini)

    # Outboard section
    elong = zminor / rmino
    aout = 2.0 * np.pi * elong * (np.pi * rshell * rmino + 2.0 * rmino * rmino)

    return ain, aout, ain + aout

dshellarea(rmajor, rminor, zminor)

Calculate the inboard, outboard, and total surface areas of a D-shaped toroidal shell.

The inboard section is assumed to be a cylinder. The outboard section is defined by a semi-ellipse, centred on the major radius of the inboard section.

Parameters:

Name Type Description Default
rmajor float

Major radius of inboard straight section (m)

required
rminor float

Horizontal width of shell (m)

required
zminor float

Vertical half-height of shell (m)

required

Returns:

Type Description
tuple[float, float, float]

Tuple containing: - ain: Surface area of inboard straight section (m²) - aout: Surface area of outboard curved section (m²) - atot: Total surface area of shell (m²)

Source code in process/models/engineering/ivc_functions.py
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
def dshellarea(
    rmajor: float, rminor: float, zminor: float
) -> tuple[float, float, float]:
    """Calculate the inboard, outboard, and total surface areas of a D-shaped toroidal shell.

    The inboard section is assumed to be a cylinder.
    The outboard section is defined by a semi-ellipse, centred on the major radius of the inboard section.

    Parameters
    ----------
    rmajor : float
        Major radius of inboard straight section (m)
    rminor : float
        Horizontal width of shell (m)
    zminor : float
        Vertical half-height of shell (m)

    Returns
    -------
    tuple[float, float, float]
        Tuple containing:
        - ain: Surface area of inboard straight section (m²)
        - aout: Surface area of outboard curved section (m²)
        - atot: Total surface area of shell (m²)
    """
    # Area of inboard cylindrical shell
    ain = 4.0 * zminor * np.pi * rmajor

    # Area of elliptical outboard section
    elong = zminor / rminor
    aout = 2.0 * np.pi * elong * (np.pi * rmajor * rminor + 2.0 * rminor * rminor)

    return ain, aout, ain + aout

eshellvol(rshell, rmini, rmino, zminor, drin, drout, dz)

Routine to calculate the inboard, outboard and total volumes of a toroidal shell comprising two elliptical sections

This routine calculates the volume of the inboard and outboard sections of a toroidal shell defined by two co-centred semi-ellipses. Each section's internal and external surfaces are in turn defined by two semi-ellipses. The volumes of each section are calculated as the difference in those of the volumes of revolution enclosed by their inner and outer surfaces.

Parameters:

Name Type Description Default
rshell

major radius of centre of both ellipses (m)

required
rmini

horizontal distance from rshell to outer edge of inboard elliptical shell (m)

required
rmino

horizontal distance from rshell to inner edge of outboard elliptical shell (m)

required
zminor

vertical internal half-height of shell (m)

required
drin

horiz. thickness of inboard shell at midplane (m)

required
drout

horiz. thickness of outboard shell at midplane (m)

required
dz

vertical thickness of shell at top/bottom (m)

required

Returns:

Name Type Description
vin

volume of inboard section (m3)

vout

volume of outboard section (m3)

vtot

total volume of shell (m3)

-------
Source code in process/models/engineering/ivc_functions.py
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
def eshellvol(rshell, rmini, rmino, zminor, drin, drout, dz):
    """Routine to calculate the inboard, outboard and total volumes
    of a toroidal shell comprising two elliptical sections

    This routine calculates the volume of the inboard and outboard sections
    of a toroidal shell defined by two co-centred semi-ellipses.
    Each section's internal and external surfaces are in turn defined
    by two semi-ellipses. The volumes of each section are calculated as
    the difference in those of the volumes of revolution enclosed by their
    inner and outer surfaces.

    Parameters
    ----------
    rshell :
        major radius of centre of both ellipses (m)
    rmini :
        horizontal distance from rshell to outer edge of inboard elliptical shell (m)
    rmino :
        horizontal distance from rshell to inner edge of outboard elliptical shell (m)
    zminor :
        vertical internal half-height of shell (m)
    drin :
        horiz. thickness of inboard shell at midplane (m)
    drout :
        horiz. thickness of outboard shell at midplane (m)
    dz :
        vertical thickness of shell at top/bottom (m)

    Returns
    -------
    vin :
        volume of inboard section (m3)
    vout:
        volume of outboard section (m3)
    vtot:
        total volume of shell (m3)
    -------
    """
    # Inboard section

    # Volume enclosed by outer (higher R) surface of elliptical section
    # and the vertical straight line joining its ends
    a = rmini
    b = zminor
    elong = b / a
    v1 = 2.0 * np.pi * elong * (0.5 * np.pi * rshell * a**2 - (2.0 / 3.0) * a**3)

    # Volume enclosed by inner (lower R) surface of elliptical section
    # and the vertical straight line joining its ends
    a = rmini + drin
    b = zminor + dz
    elong = b / a
    v2 = 2.0 * np.pi * elong * (0.5 * np.pi * rshell * a**2 - (2.0 / 3.0) * a**3)

    # Volume of inboard section of shell
    vin = v2 - v1

    # Outboard section

    # Volume enclosed by inner (lower R) surface of elliptical section
    # and the vertical straight line joining its ends
    a = rmino
    b = zminor
    elong = b / a
    v1 = 2.0 * np.pi * elong * (0.5 * np.pi * rshell * a**2 + (2.0 / 3.0) * a**3)

    # Volume enclosed by outer (higher R) surface of elliptical section
    # and the vertical straight line joining its ends
    a = rmino + drout
    b = zminor + dz
    elong = b / a
    v2 = 2.0 * np.pi * elong * (0.5 * np.pi * rshell * a**2 + (2.0 / 3.0) * a**3)

    # Volume of outboard section of shell
    vout = v2 - v1

    return vin, vout, vin + vout

dshellvol(rmajor, rminor, zminor, drin, drout, dz)

Routine to calculate the inboard, outboard and total volumes of a D-shaped toroidal shell

This routine calculates the volume of the inboard and outboard sections of a D-shaped toroidal shell defined by the above input parameters. The inboard section is assumed to be a cylinder of uniform thickness. The outboard section's internal and external surfaces are defined by two semi-ellipses, centred on the outer edge of the inboard section; its volume is calculated as the difference in those of the volumes of revolution enclosed by the two surfaces.

Parameters:

Name Type Description Default
rmajor

major radius to outer point of inboardstraight section of shell (m)

required
rminor

horizontal internal width of shell (m)

required
zminor

vertical internal half-height of shell (m)

required
drin

horiz. thickness of inboard shell at midplane (m)

required
drout

horiz. thickness of outboard shell at midplane (m)

required
dz

vertical thickness of shell at top/bottom (m)

required

Returns:

Name Type Description
vin

volume of inboard straight section (m3)

vout

volume of outboard curved section (m3)

vtot

total volume of shell (m3)

Source code in process/models/engineering/ivc_functions.py
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
def dshellvol(rmajor, rminor, zminor, drin, drout, dz):
    """Routine to calculate the inboard, outboard and total volumes
    of a D-shaped toroidal shell

    This routine calculates the volume of the inboard and outboard sections
    of a D-shaped toroidal shell defined by the above input parameters.
    The inboard section is assumed to be a cylinder of uniform thickness.
    The outboard section's internal and external surfaces are defined
    by two semi-ellipses, centred on the outer edge of the inboard section;
    its volume is calculated as the difference in those of the volumes of
    revolution enclosed by the two surfaces.

    Parameters
    ----------
    rmajor :
        major radius to outer point of inboardstraight section of shell (m)
    rminor :
        horizontal internal width of shell (m)
    zminor :
        vertical internal half-height of shell (m)
    drin :
        horiz. thickness of inboard shell at midplane (m)
    drout :
        horiz. thickness of outboard shell at midplane (m)
    dz :
        vertical thickness of shell at top/bottom (m)

    Returns
    -------
    vin :
        volume of inboard straight section (m3)
    vout:
        volume of outboard curved section (m3)
    vtot:
        total volume of shell (m3)

    """
    # Volume of inboard cylindrical shell
    vin = 2.0 * (zminor + dz) * np.pi * (rmajor**2 - (rmajor - drin) ** 2)

    # Volume enclosed by inner surface of elliptical outboard section
    # and the vertical straight line joining its ends
    a = rminor
    b = zminor
    elong = b / a
    v1 = 2.0 * np.pi * elong * (0.5 * np.pi * rmajor * a**2 + (2.0 / 3.0) * a**3)

    # Volume enclosed by outer surface of elliptical outboard section
    # and the vertical straight line joining its ends
    a = rminor + drout
    b = zminor + dz
    elong = b / a
    v2 = 2.0 * np.pi * elong * (0.5 * np.pi * rmajor * a**2 + (2.0 / 3.0) * a**3)

    # Volume of elliptical outboard shell
    vout = v2 - v1

    return vin, vout, vin + vout