Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions process/models/blankets/blanket_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
physics_variables,
primary_pumping_variables,
)
from process.models.build import FwBlktVVShape

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -71,7 +72,10 @@ def component_volumes(self):
)

# D-shaped blanket and shield
if physics_variables.itart == 1 or fwbs_variables.i_fw_blkt_vv_shape == 1:
if (
physics_variables.itart == 1
or fwbs_variables.i_fw_blkt_vv_shape == FwBlktVVShape.D_SHAPED
):
(
build_variables.a_blkt_inboard_surface_full_coverage,
build_variables.a_blkt_outboard_surface_full_coverage,
Expand Down Expand Up @@ -884,7 +888,10 @@ def set_blanket_module_geometry(self):
fwbs_variables.n_blkt_inboard_modules_poloidal = 1
fwbs_variables.n_blkt_outboard_modules_poloidal = 1

if physics_variables.itart == 1 or fwbs_variables.i_fw_blkt_vv_shape == 1:
if (
physics_variables.itart == 1
or fwbs_variables.i_fw_blkt_vv_shape == FwBlktVVShape.D_SHAPED
):
blanket_library.len_blkt_inboard_segment_poloidal = self.calculate_dshaped_inboard_blkt_segment_poloidal(
dz_blkt_half=blanket_library.dz_blkt_half,
n_blkt_inboard_modules_poloidal=fwbs_variables.n_blkt_inboard_modules_poloidal,
Expand Down
8 changes: 8 additions & 0 deletions process/models/build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
from enum import IntEnum

import numpy as np

Expand Down Expand Up @@ -26,6 +27,13 @@
logger = logging.getLogger(__name__)


class FwBlktVVShape(IntEnum):
"""Enum for first wall, blanket, and vacuum vessel shape options."""

D_SHAPED = 1
ELLIPTICAL_SHAPED = 2


class Build(Model):
def __init__(self):
self.outfile = constants.NOUT
Expand Down
6 changes: 5 additions & 1 deletion process/models/fw.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
dshellarea,
eshellarea,
)
from process.models.build import FwBlktVVShape

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -53,7 +54,10 @@ def run(self):
dr_fw_outboard=build_variables.dr_fw_outboard,
)

if physics_variables.itart == 1 or fwbs_variables.i_fw_blkt_vv_shape == 1:
if (
physics_variables.itart == 1
or fwbs_variables.i_fw_blkt_vv_shape == FwBlktVVShape.D_SHAPED
):
(
first_wall_variables.a_fw_inboard_full_coverage,
first_wall_variables.a_fw_outboard_full_coverage,
Expand Down
6 changes: 5 additions & 1 deletion process/models/shield.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
eshellarea,
eshellvol,
)
from process.models.build import FwBlktVVShape

logger = logging.getLogger(__name__)

Expand All @@ -40,7 +41,10 @@ def run(self):
dz_blkt_upper=build_variables.dz_blkt_upper,
)
# D-shaped blanket and shield
if physics_variables.itart == 1 or fwbs_variables.i_fw_blkt_vv_shape == 1:
if (
physics_variables.itart == 1
or fwbs_variables.i_fw_blkt_vv_shape == FwBlktVVShape.D_SHAPED
):
(
build_variables.a_shld_inboard_surface,
build_variables.a_shld_outboard_surface,
Expand Down
6 changes: 5 additions & 1 deletion process/models/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
vacuum_variables,
)
from process.models.blankets.blanket_library import dshellvol, eshellvol
from process.models.build import FwBlktVVShape

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -740,7 +741,10 @@ def run(self):
dr_fw_outboard=build_variables.dr_fw_outboard,
)
# D-shaped blanket and shield
if physics_variables.itart == 1 or fwbs_variables.i_fw_blkt_vv_shape == 1:
if (
physics_variables.itart == 1
or fwbs_variables.i_fw_blkt_vv_shape == FwBlktVVShape.D_SHAPED
):
(
blanket_library.vol_vv_inboard,
blanket_library.vol_vv_outboard,
Expand Down
Loading