Coverage for backend/flowsheetInternals/unitops/config/config_base.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2025-11-06 23:27 +0000

1from core.auxiliary.enums import SimulationObjectClass as Objects 

2from common.config_types import * 

3from common.config_utils import * 

4from .objects import * 

5 

6 

7configuration: ConfigBaseType = { 

8 Objects.DecisionNode: decision_node_config, 

9 Objects.Stream: stream_config, 

10 Objects.HumidAirStream: humid_air_stream_config, 

11 Objects.Pump: pump_config, 

12 Objects.Compressor: compressor_config, 

13 Objects.Cooler: cooler_config, 

14 Objects.Valve: valve_config, 

15 Objects.Turbine: turbine_config, 

16 Objects.WillansTurbine: willans_turbine_config, 

17 Objects.PlTurbine: pl_willans_config, 

18 Objects.DtsTurbine: d_tsat_willans_config, 

19 Objects.BsTurbine: bs_willans_config, 

20 Objects.CsTurbine: cs_willans_config, 

21 Objects.Heater: heater_config, 

22 Objects.Tank: tank_config, 

23 Objects.Recycle: recycle_config, 

24 Objects.Mixer: mixer_config, 

25 Objects.Splitter: splitter_config, 

26 Objects.Header: header_config, 

27 Objects.PhaseSeparator: phase_seperator_config, 

28 Objects.EnergyStream: energy_stream_config, 

29 Objects.acStream: ac_stream_config, 

30 Objects.TransformerStream: transformer_stream_config, 

31 Objects.CompoundSeparator: compound_seperator_config, 

32 Objects.HeatExchanger: heat_exchanger_config, 

33 Objects.HeatPump: heat_pump_config, 

34 Objects.Group: group_config, 

35 Objects.MachineLearningBlock: machine_learning_block_config, 

36 Objects.Link: link_config, 

37 Objects.Grid: grid_config, 

38 Objects.Boiler: boiler_config, 

39 Objects.Solar: solar_config, 

40 Objects.Hydro: hydro_config, 

41 Objects.Wind: wind_config, 

42 Objects.energy_mixer: energy_mixer_config, 

43 Objects.Bus: bus_config, 

44 Objects.Storage: energy_storage_config, 

45 Objects.acBus: ac_bus_config, 

46 Objects.transmissionLine: transmission_line_config, 

47 Objects.Load: generic_load_config, 

48 Objects.Transformer:transformer_config, 

49 Objects.Convertor: convertor_config, 

50 Objects.DirectSteamInjection: direct_steam_injection_config, 

51 Objects.Translator: translator_config, 

52 Objects.RCT_CSTR: reactor_config, 

53 Objects.Stoich_HDA: stoich_hda_config, 

54 Objects.pid_controller: pid_controller_config, 

55 Objects.custom_variable: custom_variable_config, 

56 Objects.Integration: integration_config, 

57 Objects.EnergySplitter: energy_splitter_config, 

58 Objects.MDB: mdb_config, 

59 Objects.SimpleHeader: simple_header_config, 

60 Objects.SteamUser: steam_user_config, 

61 Objects.DeSuperheater: desuperheater_config, 

62 Objects.NTUHeatExchanger: ntu_heat_exchanger_config, 

63 Objects.WaterPipe: waterpipe_config, 

64 Objects.LumpedCapacitanceHeatExchanger: lumped_capacitance_heat_exchanger_config, 

65 Objects.HeatExchanger1D: heat_exchanger_1d_config, 

66 #Objects.Deferrable: deferrable_config, 

67 #Objects.HeatPump: heatpump_config, 

68} 

69 

70stream_classes = [key for [key, value] in list(configuration.items()) if value.is_stream] 

71unitop_classes = set(SimulationObjectClass.values).difference(stream_classes + [SimulationObjectClass.Group])