Coverage for backend/django/flowsheetInternals/unitops/config/objects/reactor_config.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2026-05-13 02:47 +0000

1from common.config_types import * 

2from common.config_utils import * 

3from ..spec_helpers import * 

4 

5reactor_config: ObjectType = ObjectType( 

6 displayType="CSTR Reactor", 

7 displayName="CSTR Reactor", 

8 

9 ports={ 

10 "inlet": PortType( 

11 displayName="Inlet", 

12 type=ConType.Inlet, 

13 streamName="S" 

14 ), 

15 "outlet": PortType( 

16 many=False, 

17 displayName="Outlet", 

18 type=ConType.Outlet, 

19 default=1, # default number of outlets 

20 minimum=1, # minimum number of outlets 

21 streamName="S" 

22 ), 

23 }, 

24 propertyPackagePorts=default_property_package_ports(), 

25 graphicObject=unitop_graphic(), 

26 indexSets=[], 

27 properties=PropertiesType({ 

28 "volume": PropertyType( 

29 displayName="Volume", 

30 type="numeric", 

31 unitType="volume", 

32 ), 

33 }), 

34 propertySetGroups={ 

35 "default": { 

36 "type": "stateVars", 

37 "displayName": "Properties", 

38 "stateVars": ("volume",), 

39 } 

40 }, 

41 idaes_adapter=UnitModelAdapter( 

42 args=ArgAdapter({ 

43 "property_package": ConstantSchemaAdapter(ReactorPPArgSchema()), 

44 "has_heat_transfer": ConstantArg(False), 

45 "has_heat_of_reaction": ConstantArg(False), 

46 "has_pressure_change": ConstantArg(False), 

47 "has_holdup": ConstantArg(False), 

48 "dynamic": ConstantArg(False), 

49 "reaction_package": ConstantSchemaAdapter(ReactionPPArgSchema()), 

50 }), 

51 properties=SerialisePropertiesAdapter(), 

52 ports=SerialisePortAdapter() 

53 ), 

54)