Coverage for backend/django/flowsheetInternals/unitops/config/objects/reverse_osmosis_0d_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 

5 

6reverse_osmosis_0d_config: ObjectType = ObjectType( 

7 displayType="Reverse Osmosis (0D)", 

8 displayName="Reverse Osmosis (0D)", 

9 ports={ 

10 "inlet": PortType( 

11 many=False, 

12 displayName="Inlet", 

13 type=ConType.Inlet, 

14 default=1, 

15 streamName="S" 

16 ), 

17 "retentate": PortType( 

18 many=False, 

19 displayName="Retentate", 

20 type=ConType.Outlet, 

21 default=1, 

22 streamName="Retentate S" 

23 ), 

24 "permeate": PortType( 

25 many=False, 

26 displayName="Permeate", 

27 type=ConType.Outlet, 

28 default=1, 

29 streamName="Permeate S" 

30 ) 

31 }, 

32 propertyPackagePorts={ 

33 "": ["inlet", "retentate", "permeate"] 

34 }, 

35 graphicObject=unitop_graphic(), 

36 properties=PropertiesType({ 

37 "A_comp": PropertyType( 

38 displayName="Membrane Water Permeability (A)", 

39 type="numeric", 

40 unitType="solventPermeability", 

41 ), 

42 "B_comp": PropertyType( 

43 displayName="Membrane Salt Permeability (B)", 

44 type="numeric", 

45 unitType="velocity", 

46 ), 

47 "permeate.pressure": PropertyType( 

48 displayName="Permeate Pressure", 

49 type="numeric", 

50 unitType="pressure", 

51 ), 

52 "area": PropertyType( 

53 displayName="Membrane Area", 

54 type="numeric", 

55 unitType="area", 

56 ), 

57 "feed_side.spacer_porosity": PropertyType( 

58 displayName="Feed Spacer Porosity", 

59 type="numeric", 

60 unitType="ratio", 

61 ), 

62 "feed_side.channel_height": PropertyType( 

63 displayName="Feed Channel Height", 

64 type="numeric", 

65 unitType="distance", 

66 ), 

67 "length": PropertyType( 

68 displayName="Membrane Length", 

69 type="numeric", 

70 unitType="distance", 

71 ), 

72 "width": PropertyType( 

73 displayName="Membrane Width", 

74 type="numeric", 

75 unitType="distance", 

76 ), 

77 "feed_side.N_Re": PropertyType( 

78 displayName="Inlet Reynolds Number", 

79 type="numeric", 

80 unitType="dimensionless", 

81 ), 

82 "recovery_vol_phase": PropertyType( 

83 displayName="Volumetric Recovery", 

84 type="numeric", 

85 unitType="ratio", 

86 ), 

87 "recovery_mass_phase_comp": PropertyType( 

88 displayName="Mass Recovery", 

89 type="numeric", 

90 unitType="ratio", 

91 ), 

92 "rejection_phase_comp": PropertyType( 

93 displayName="Observed Solute Rejection", 

94 type="numeric", 

95 unitType="ratio", 

96 ), 

97 "flux_mass_phase_comp_avg": PropertyType( 

98 displayName="Average Mass Flux", 

99 type="numeric", 

100 unitType="massflow", 

101 ), 

102 "over_pressure_ratio": PropertyType( 

103 displayName="Over Pressure Ratio", 

104 type="numeric", 

105 unitType="ratio", 

106 ), 

107 }), 

108 propertySetGroups={ 

109 "default": { 

110 "type": "stateVars", 

111 "displayName": "Properties", 

112 "stateVars": ( 

113 "A_comp", 

114 "B_comp", 

115 "permeate.pressure", 

116 "area", 

117 "feed_side.spacer_porosity", 

118 "feed_side.channel_height", 

119 "length", 

120 ), 

121 } 

122 }, 

123 keyProperties=[ 

124 "recovery_vol_phase", 

125 "recovery_mass_phase_comp", 

126 "rejection_phase_comp", 

127 "flux_mass_phase_comp_avg", 

128 "over_pressure_ratio", 

129 ], 

130 idaes_adapter=UnitModelAdapter( 

131 args=ArgAdapter({ 

132 "property_package": PropertyPackageAdapter(), 

133 }), 

134 properties=SerialisePropertiesAdapter(), 

135 ports=SerialisePortAdapter() 

136 ), 

137)