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
3 changes: 2 additions & 1 deletion process/data_structure/blanket_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
"""

from dataclasses import dataclass
from enum import IntEnum
from enum import IntEnum, unique


@unique
class BlktModelTypes(IntEnum):
"""Enum for blanket model types. `i_blanket_type`"""

Expand Down
3 changes: 2 additions & 1 deletion process/data_structure/buildings_variables.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Module containing variables for the buildings models"""

from dataclasses import dataclass
from enum import IntEnum
from enum import IntEnum, unique


@unique
class BuildingsModel(IntEnum):
"""Enum for building size estimation models, controlled by
`i_bldgs_size` in `BuildingsData`.
Expand Down
3 changes: 2 additions & 1 deletion process/data_structure/cost_variables.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Module containing variables for the costs models"""

from dataclasses import dataclass, field
from enum import IntEnum
from enum import IntEnum, unique


@unique
class CostModels(IntEnum):
"""Enum for cost model selection"""

Expand Down
3 changes: 2 additions & 1 deletion process/data_structure/divertor_variables.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Module containing variables for the divertor models"""

from dataclasses import dataclass
from enum import IntEnum
from enum import IntEnum, unique


@unique
class DivertorHeatLoadModel(IntEnum):
"""Divertor heat load model enumeration, controlled' by `i_div_heat_load`"""

Expand Down
5 changes: 4 additions & 1 deletion process/data_structure/numerics.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"""Module containing variables for the numerics"""

from dataclasses import dataclass, field
from enum import IntEnum
from enum import IntEnum, unique
from types import DynamicClassAttribute

import numpy as np

from process.core.solver.iteration_variables import ITERATION_VARIABLES


@unique
class SolverOutputCondition(IntEnum):
"""Enum for the possible conditions that can be returned by the solvers.
This is for the `ifail` condition.
Expand Down Expand Up @@ -40,6 +41,7 @@ class SolverOutputCondition(IntEnum):
"""No feasible solution or bad approximation of Hessian (in VMCON only)."""


@unique
class PROCESSRunMode(IntEnum):
"""Enumeration of the available PROCESS run modes, which determine the behaviour
of the code in various places. This is controlled by the `i_process_run_mode` variable
Expand Down Expand Up @@ -85,6 +87,7 @@ def description(self):
return self._description_


@unique
class FiguresOfMerit(IntEnum):
"""Enumeration of the available figures of merit (FoM) that can be used as
objective functions for optimisation in PROCESS.
Expand Down
3 changes: 2 additions & 1 deletion process/data_structure/pfcoil_variables.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
"""Module containing variables for the PF coil models"""

from dataclasses import dataclass, field
from enum import IntEnum
from enum import IntEnum, unique

import numpy as np


@unique
class PFConductorModel(IntEnum):
"""Enumeration for PF conductor models.
Controlled via `i_pf_conductor`
Expand Down
6 changes: 6 additions & 0 deletions process/data_structure/physics_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np


@unique
class OutbordSOLPowerDecayLengthModel(IntEnum):
"""Enum for outboard scrape off layer power decay length models with descriptions."""

Expand Down Expand Up @@ -35,27 +36,31 @@ def __new__(cls, value: int, description: str):
return obj


@unique
class CurrentProfileIndexModel(IntEnum):
"""Enum for current profile index models."""

USER_INPUT = 0
WESSON = 1


@unique
class PlasmaIgnitionModel(IntEnum):
"""Enum for plasma ignition models."""

NON_IGNITED = 0
IGNITED = 1


@unique
class DivertorNumberModels(IntEnum):
"""Enum for divertor number models. `i_single_null` is the index for this enum."""

DOUBLE_NULL = 0
SINGLE_NULL = 1


@unique
class ConfinementMode(IntEnum):
"""Enum for plasma confinement mode"""

Expand Down Expand Up @@ -377,6 +382,7 @@ def __new__(cls, value: int, full_name: str, mode: ConfinementMode = None):
return obj


@unique
class ConfinementRadiationLossModel(IntEnum):
"""Confinement radiation loss model types"""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Module containing variables for the superconducting TF coil models"""

from dataclasses import dataclass
from enum import IntEnum
from enum import IntEnum, unique


@unique
class TFWPIntegerTurnType(IntEnum):
"""TF winding pack integer turn type, controlled via the `i_tf_turns_integer`
variable.
Expand Down
3 changes: 2 additions & 1 deletion process/data_structure/vacuum_variables.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Module containing variables for the vacuum vessel models"""

from dataclasses import dataclass
from enum import IntEnum
from enum import IntEnum, unique


@unique
class VacuumPumpType(IntEnum):
"""Enum for vacuum pump types. Controlled via `i_vacuum_pump_type` in `VacuumData`."""

Expand Down
3 changes: 2 additions & 1 deletion process/models/availability.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
import math
from enum import IntEnum
from enum import IntEnum, unique
from types import DynamicClassAttribute

from scipy.special import comb as combinations
Expand All @@ -16,6 +16,7 @@
logger = logging.getLogger(__name__)


@unique
class AvailabilityModel(IntEnum):
"""Enum for availability models"""

Expand Down
3 changes: 2 additions & 1 deletion process/models/blankets/blanket_library.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Library containing routines that can be shared by the blanket modules."""

import logging
from enum import IntEnum
from enum import IntEnum, unique

import numpy as np

Expand Down Expand Up @@ -44,6 +44,7 @@
# FCI Flow Channel Insert


@unique
class FWBlktCoolantLoopTypes(IntEnum):
"""Enumeration for first wall and blanket coolant loop types.
`i_fw_blkt_shared_coolant`.
Expand Down
3 changes: 2 additions & 1 deletion process/models/build.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Module containing routines for build calculations"""

import logging
from enum import IntEnum
from enum import IntEnum, unique

import numpy as np

Expand All @@ -23,6 +23,7 @@
logger = logging.getLogger(__name__)


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

Expand Down
3 changes: 2 additions & 1 deletion process/models/engineering/pumping.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"""Engineering models for pumping system analysis."""

import logging
from enum import IntEnum
from enum import IntEnum, unique
from types import DynamicClassAttribute

import numpy as np


@unique
class CoolantType(IntEnum):
"""Enum for coolant types."""

Expand Down
3 changes: 2 additions & 1 deletion process/models/pfcoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
import math
from dataclasses import dataclass
from enum import IntEnum
from enum import IntEnum, unique

import numba
import numpy as np
Expand Down Expand Up @@ -42,6 +42,7 @@
N_CS_STRESS_PROFILE_POINTS = 20


@unique
class PFLocationTypes(IntEnum):
"""Enum for PF coil location types."""

Expand Down
3 changes: 2 additions & 1 deletion process/models/physics/bootstrap_current.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import logging
from enum import IntEnum
from enum import IntEnum, unique
from types import DynamicClassAttribute
from typing import TYPE_CHECKING

Expand All @@ -23,6 +23,7 @@
logger = logging.getLogger(__name__)


@unique
class BootstrapCurrentFractionModel(IntEnum):
"""Bootstrap plasma current fraction (f_BS) model types"""

Expand Down
4 changes: 3 additions & 1 deletion process/models/physics/current_drive.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Module for current drive physics models and heating method types."""

import logging
from enum import IntEnum
from enum import IntEnum, unique
from types import DynamicClassAttribute

import numpy as np
Expand All @@ -18,6 +18,7 @@
logger = logging.getLogger(__name__)


@unique
class CurrentDriveMethodType(IntEnum):
"""Enum for heating and current drive method types"""

Expand All @@ -41,6 +42,7 @@ def abbreviation(self):
return self._abbreviation_


@unique
class CurrentDriveModel(IntEnum):
"""Heating and current drive models for use in current drive calculations"""

Expand Down
3 changes: 2 additions & 1 deletion process/models/physics/density_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

import logging
from enum import IntEnum
from enum import IntEnum, unique
from types import DynamicClassAttribute

import numpy as np
Expand All @@ -19,6 +19,7 @@
logger = logging.getLogger(__name__)


@unique
class DensityLimitModel(IntEnum):
"""Electron density model types"""

Expand Down
3 changes: 2 additions & 1 deletion process/models/physics/l_h_transition.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Module for plasma L-H and L-I transition power threshold calculations."""

import logging
from enum import IntEnum
from enum import IntEnum, unique

from process.core import constants
from process.core import process_output as po
Expand All @@ -10,6 +10,7 @@
logger = logging.getLogger(__name__)


@unique
class PlasmaConfinementTransitionModel(IntEnum):
"""Enum for plasma L -> H and L -> I transition power threshold models."""

Expand Down
5 changes: 4 additions & 1 deletion process/models/physics/physics.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import logging
import math
from enum import IntEnum
from enum import IntEnum, unique
from types import DynamicClassAttribute
from typing import TYPE_CHECKING

Expand Down Expand Up @@ -3665,6 +3665,7 @@ def reinke_tsep(b_plasma_toroidal_on_axis, flh, qstar, rmajor, eps, fgw, kappa,
)


@unique
class BetaNormMaxModel(IntEnum):
"""Beta norm max (β_N_max) model types"""

Expand All @@ -3688,6 +3689,7 @@ def full_name(self):
return self._full_name_


@unique
class BetaComponentLimits(IntEnum):
"""Beta component to apply limit types"""

Expand Down Expand Up @@ -4679,6 +4681,7 @@ def output_beta_information(self):
po.oblnkl(self.outfile)


@unique
class IndInternalNormModel(IntEnum):
"""Normalised internal inductance (lᵢ) model types"""

Expand Down
4 changes: 3 additions & 1 deletion process/models/physics/plasma_current.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

import logging
from enum import IntEnum
from enum import IntEnum, unique
from types import DynamicClassAttribute

import numba as nb
Expand All @@ -21,6 +21,7 @@
logger = logging.getLogger(__name__)


@unique
class PlasmaCurrentModel(IntEnum):
"""Enumeration of plasma current scaling models available for calculations.

Expand Down Expand Up @@ -1016,6 +1017,7 @@ def calculate_current_coefficient_fiesta(
return 0.538 * (1.0 + 2.440 * eps**2.736) * kappa**2.154 * triang**0.060


@unique
class PlasmaDiamagneticCurrentModel(IntEnum):
"""Enum for plasma diamagnetic current method types"""

Expand Down
Loading
Loading