bluemira.codes.process.api ========================== .. py:module:: bluemira.codes.process.api .. autoapi-nested-parse:: PROCESS api Attributes ---------- .. autoapisummary:: bluemira.codes.process.api.OBS_VARS bluemira.codes.process.api.ENABLED Classes ------- .. autoapisummary:: bluemira.codes.process.api.MFile bluemira.codes.process.api.InDat bluemira.codes.process.api._INVariable bluemira.codes.process.api.Impurities Functions --------- .. autoapisummary:: bluemira.codes.process.api.update_obsolete_vars bluemira.codes.process.api._nested_check Module Contents --------------- .. py:class:: MFile(filename) Dummy MFile Class. Replaced by PROCESS import if PROCESS installed. .. py:attribute:: filename .. py:class:: InDat(filename) Dummy InDat Class. Replaced by PROCESS import if PROCESS installed. .. py:attribute:: filename .. py:data:: OBS_VARS .. py:data:: ENABLED :value: True .. py:class:: _INVariable Process io.in_dat.INVariable replica Used to simulate what process does to input variables for the InDat input file writer This allows the defaults to imitate the same format as PROCESS' InDat even if PROCESS isn't installed. Therefore they will work the same in all cases and we dont always need to be able to read a PROCESS input file. .. py:attribute:: name :type: str .. py:attribute:: _value :type: float | list | dict .. py:attribute:: v_type :type: TypeVar('InVarValueType') .. py:attribute:: parameter_group :type: str .. py:attribute:: comment :type: str .. py:property:: get_value :type: float | list | dict Return value in correct format .. py:property:: value :type: str | list | dict Return the string of a value if not a Dict or a List .. py:class:: Impurities Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: bluemira.codes.process.api.Impurities :parts: 1 :private-bases: PROCESS impurities Enum .. py:attribute:: H .. py:attribute:: He .. py:attribute:: Be .. py:attribute:: C .. py:attribute:: N .. py:attribute:: O .. py:attribute:: Ne .. py:attribute:: Si .. py:attribute:: Ar .. py:attribute:: Fe .. py:attribute:: Ni .. py:attribute:: Kr .. py:attribute:: Xe .. py:attribute:: W .. py:method:: files() -> dict[str, pathlib.Path] Get PROCESS impurity data file path :returns: The available file paths :raises CodesError: Impurity directory not found .. py:method:: id() :returns: The variable string for impurity fraction .. py:method:: read_impurity_files(filetype: collections.abc.Sequence[Literal['lz', 'z2', 'z']]) -> tuple[list[process.impurity_radiation.ImpurityDataHeader], Ellipsis] :returns: Contents of impurity data files .. py:function:: update_obsolete_vars(process_map_name: str) -> str | list[str] | None Check if the bluemira variable is up to date using the OBS_VAR dict. If the PROCESS variable name has been updated in the installed version this function will provide the updated variable name. :param process_map_name: PROCESS variable name. :returns: PROCESS variable names valid for the install (if OBS_VAR is updated correctly). Returns a list if an obsolete variable has been split into more than one new variable (e.g., a thermal shield thickness is split into ib/ob thickness). Returns `None` if there is no alternative. .. py:function:: _nested_check(process_name) Recursively checks for obsolete variable names :returns: The newest process name