ahuora-builder 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. ahuora_builder/__init__.py +0 -0
  2. ahuora_builder/arc_manager.py +33 -0
  3. ahuora_builder/build_state.py +57 -0
  4. ahuora_builder/custom/PIDController.py +494 -0
  5. ahuora_builder/custom/PySMOModel.py +178 -0
  6. ahuora_builder/custom/SimpleEffectivenessHX_DH.py +727 -0
  7. ahuora_builder/custom/__init__.py +0 -0
  8. ahuora_builder/custom/add_initial_dynamics.py +35 -0
  9. ahuora_builder/custom/custom_compressor.py +107 -0
  10. ahuora_builder/custom/custom_cooler.py +33 -0
  11. ahuora_builder/custom/custom_heat_exchanger.py +183 -0
  12. ahuora_builder/custom/custom_heat_exchanger_1d.py +258 -0
  13. ahuora_builder/custom/custom_heater.py +41 -0
  14. ahuora_builder/custom/custom_pressure_changer.py +34 -0
  15. ahuora_builder/custom/custom_pump.py +107 -0
  16. ahuora_builder/custom/custom_separator.py +371 -0
  17. ahuora_builder/custom/custom_tank.py +133 -0
  18. ahuora_builder/custom/custom_turbine.py +132 -0
  19. ahuora_builder/custom/custom_valve.py +300 -0
  20. ahuora_builder/custom/custom_variable.py +29 -0
  21. ahuora_builder/custom/direct_steam_injection.py +371 -0
  22. ahuora_builder/custom/energy/__init__.py +0 -0
  23. ahuora_builder/custom/energy/acBus.py +280 -0
  24. ahuora_builder/custom/energy/ac_property_package.py +279 -0
  25. ahuora_builder/custom/energy/battery.py +170 -0
  26. ahuora_builder/custom/energy/bus.py +182 -0
  27. ahuora_builder/custom/energy/energy_mixer.py +195 -0
  28. ahuora_builder/custom/energy/energy_splitter.py +228 -0
  29. ahuora_builder/custom/energy/grid.py +173 -0
  30. ahuora_builder/custom/energy/hydro.py +169 -0
  31. ahuora_builder/custom/energy/link.py +137 -0
  32. ahuora_builder/custom/energy/load.py +155 -0
  33. ahuora_builder/custom/energy/mainDistributionBoard.py +257 -0
  34. ahuora_builder/custom/energy/power_property_package.py +253 -0
  35. ahuora_builder/custom/energy/solar.py +176 -0
  36. ahuora_builder/custom/energy/storage.py +230 -0
  37. ahuora_builder/custom/energy/storage_wrapper +0 -0
  38. ahuora_builder/custom/energy/tests/__init__.py +0 -0
  39. ahuora_builder/custom/energy/tests/test_bus.py +44 -0
  40. ahuora_builder/custom/energy/tests/test_energy_mixer.py +46 -0
  41. ahuora_builder/custom/energy/tests/test_mdb.py +49 -0
  42. ahuora_builder/custom/energy/transformer.py +187 -0
  43. ahuora_builder/custom/energy/transformer_property_package.py +267 -0
  44. ahuora_builder/custom/energy/transmissionLine.py +228 -0
  45. ahuora_builder/custom/energy/wind.py +206 -0
  46. ahuora_builder/custom/hda_ideal_VLE.py +1341 -0
  47. ahuora_builder/custom/hda_reaction.py +182 -0
  48. ahuora_builder/custom/heat_exchanger_1d_wrapper.py +31 -0
  49. ahuora_builder/custom/integration_block.py +106 -0
  50. ahuora_builder/custom/inverted.py +81 -0
  51. ahuora_builder/custom/performance_curves.py +1 -0
  52. ahuora_builder/custom/reactions/__init__.py +0 -0
  53. ahuora_builder/custom/reactions/hda_stoich.py +10 -0
  54. ahuora_builder/custom/simple_separator.py +680 -0
  55. ahuora_builder/custom/tests/__init__.py +0 -0
  56. ahuora_builder/custom/tests/test_SimpleEffectivenessHX_DH.py +91 -0
  57. ahuora_builder/custom/tests/test_custom_tank.py +70 -0
  58. ahuora_builder/custom/tests/test_direct_steam_injection.py +41 -0
  59. ahuora_builder/custom/tests/test_simple_separator.py +46 -0
  60. ahuora_builder/custom/tests/test_waterpipe.py +46 -0
  61. ahuora_builder/custom/thermal_utility_systems/desuperheater.py +624 -0
  62. ahuora_builder/custom/thermal_utility_systems/header.py +889 -0
  63. ahuora_builder/custom/thermal_utility_systems/simple_heat_pump.py +567 -0
  64. ahuora_builder/custom/thermal_utility_systems/steam_header.py +353 -0
  65. ahuora_builder/custom/thermal_utility_systems/steam_user.py +944 -0
  66. ahuora_builder/custom/thermal_utility_systems/temp.py +349 -0
  67. ahuora_builder/custom/thermal_utility_systems/tests/test_desuperheater.py +142 -0
  68. ahuora_builder/custom/thermal_utility_systems/tests/test_header.py +998 -0
  69. ahuora_builder/custom/thermal_utility_systems/tests/test_ntu_hx.py +129 -0
  70. ahuora_builder/custom/thermal_utility_systems/tests/test_simple_heat_pump.py +120 -0
  71. ahuora_builder/custom/thermal_utility_systems/tests/test_steam_header.py +703 -0
  72. ahuora_builder/custom/thermal_utility_systems/tests/test_steam_user.py +277 -0
  73. ahuora_builder/custom/thermal_utility_systems/tests/test_waterpipe.py +36 -0
  74. ahuora_builder/custom/thermal_utility_systems/tests/test_willans_turbine.py +253 -0
  75. ahuora_builder/custom/thermal_utility_systems/willans_turbine.py +804 -0
  76. ahuora_builder/custom/translator.py +129 -0
  77. ahuora_builder/custom/updated_pressure_changer.py +1404 -0
  78. ahuora_builder/custom/valve_wrapper.py +38 -0
  79. ahuora_builder/custom/water_tank_with_units.py +456 -0
  80. ahuora_builder/diagnostics/__init__.py +0 -0
  81. ahuora_builder/diagnostics/infeasibilities.py +40 -0
  82. ahuora_builder/diagnostics/tests/__init__.py +0 -0
  83. ahuora_builder/diagnostics/tests/test_infeasibilities.py +28 -0
  84. ahuora_builder/flowsheet_manager.py +542 -0
  85. ahuora_builder/flowsheet_manager_type.py +20 -0
  86. ahuora_builder/generate_python_file.py +440 -0
  87. ahuora_builder/methods/BlockContext.py +84 -0
  88. ahuora_builder/methods/__init__.py +0 -0
  89. ahuora_builder/methods/adapter.py +355 -0
  90. ahuora_builder/methods/adapter_library.py +549 -0
  91. ahuora_builder/methods/adapter_methods.py +80 -0
  92. ahuora_builder/methods/expression_parsing.py +105 -0
  93. ahuora_builder/methods/load_unit_model.py +147 -0
  94. ahuora_builder/methods/slice_manipulation.py +7 -0
  95. ahuora_builder/methods/tests/__init__.py +0 -0
  96. ahuora_builder/methods/tests/test_expression_parsing.py +15 -0
  97. ahuora_builder/methods/units_handler.py +129 -0
  98. ahuora_builder/ml_wizard.py +101 -0
  99. ahuora_builder/port_manager.py +20 -0
  100. ahuora_builder/properties_manager.py +44 -0
  101. ahuora_builder/property_package_manager.py +78 -0
  102. ahuora_builder/solver.py +38 -0
  103. ahuora_builder/tear_manager.py +98 -0
  104. ahuora_builder/tests/__init__.py +0 -0
  105. ahuora_builder/tests/test_generate_python_file/__init__.py +0 -0
  106. ahuora_builder/tests/test_generate_python_file/configurations/compressor_generated.py +63 -0
  107. ahuora_builder/tests/test_generate_python_file/configurations/heat_exchanger_generated.py +70 -0
  108. ahuora_builder/tests/test_generate_python_file/configurations/pump_generated.py +84 -0
  109. ahuora_builder/tests/test_generate_python_file/configurations/recycle_generated.py +73 -0
  110. ahuora_builder/tests/test_generate_python_file/test_generate_python_file.py +108 -0
  111. ahuora_builder/tests/test_solver/__init__.py +0 -0
  112. ahuora_builder/tests/test_solver/configurations/BT_PR.json +59 -0
  113. ahuora_builder/tests/test_solver/configurations/BT_PR_solved.json +59 -0
  114. ahuora_builder/tests/test_solver/configurations/bus.json +99 -0
  115. ahuora_builder/tests/test_solver/configurations/bus_solved.json +50 -0
  116. ahuora_builder/tests/test_solver/configurations/compound_separator.json +377 -0
  117. ahuora_builder/tests/test_solver/configurations/compound_separator_solved.json +374 -0
  118. ahuora_builder/tests/test_solver/configurations/compressor.json +38 -0
  119. ahuora_builder/tests/test_solver/configurations/compressor_solved.json +68 -0
  120. ahuora_builder/tests/test_solver/configurations/constraints.json +44 -0
  121. ahuora_builder/tests/test_solver/configurations/constraints_solved.json +59 -0
  122. ahuora_builder/tests/test_solver/configurations/control.json +39 -0
  123. ahuora_builder/tests/test_solver/configurations/control_solved.json +68 -0
  124. ahuora_builder/tests/test_solver/configurations/dynamic_tank.json +733 -0
  125. ahuora_builder/tests/test_solver/configurations/dynamic_tank_solved.json +846 -0
  126. ahuora_builder/tests/test_solver/configurations/elimination.json +39 -0
  127. ahuora_builder/tests/test_solver/configurations/elimination_solved.json +68 -0
  128. ahuora_builder/tests/test_solver/configurations/expressions.json +68 -0
  129. ahuora_builder/tests/test_solver/configurations/expressions_solved.json +104 -0
  130. ahuora_builder/tests/test_solver/configurations/header.json +1192 -0
  131. ahuora_builder/tests/test_solver/configurations/header_solved.json +761 -0
  132. ahuora_builder/tests/test_solver/configurations/heat_exchanger.json +63 -0
  133. ahuora_builder/tests/test_solver/configurations/heat_exchanger_solved.json +104 -0
  134. ahuora_builder/tests/test_solver/configurations/heat_pump.json +137 -0
  135. ahuora_builder/tests/test_solver/configurations/heat_pump_solved.json +104 -0
  136. ahuora_builder/tests/test_solver/configurations/machine_learning.json +2156 -0
  137. ahuora_builder/tests/test_solver/configurations/machine_learning_solved.json +266 -0
  138. ahuora_builder/tests/test_solver/configurations/mass_flow_tear.json +77 -0
  139. ahuora_builder/tests/test_solver/configurations/mass_flow_tear_solved.json +68 -0
  140. ahuora_builder/tests/test_solver/configurations/milk_heater.json +521 -0
  141. ahuora_builder/tests/test_solver/configurations/milk_heater_solved.json +311 -0
  142. ahuora_builder/tests/test_solver/configurations/mixer.json +44 -0
  143. ahuora_builder/tests/test_solver/configurations/mixer_solved.json +86 -0
  144. ahuora_builder/tests/test_solver/configurations/optimization.json +62 -0
  145. ahuora_builder/tests/test_solver/configurations/optimization_solved.json +59 -0
  146. ahuora_builder/tests/test_solver/configurations/propane_heat_pump.json +167 -0
  147. ahuora_builder/tests/test_solver/configurations/propane_heat_pump_solved.json +158 -0
  148. ahuora_builder/tests/test_solver/configurations/propane_recycle.json +141 -0
  149. ahuora_builder/tests/test_solver/configurations/propane_recycle_solved.json +104 -0
  150. ahuora_builder/tests/test_solver/configurations/pump.json +64 -0
  151. ahuora_builder/tests/test_solver/configurations/pump_solved.json +59 -0
  152. ahuora_builder/tests/test_solver/configurations/pump_unit_conversions.json +63 -0
  153. ahuora_builder/tests/test_solver/configurations/recycle.json +49 -0
  154. ahuora_builder/tests/test_solver/configurations/recycle_solved.json +50 -0
  155. ahuora_builder/tests/test_solver/configurations/sb_vapor_frac.json +29 -0
  156. ahuora_builder/tests/test_solver/configurations/sb_vapor_frac_solved.json +29 -0
  157. ahuora_builder/tests/test_solver/configurations/solar.json +67 -0
  158. ahuora_builder/tests/test_solver/configurations/solar_solved.json +50 -0
  159. ahuora_builder/tests/test_solver/configurations/vapor_frac_target.json +67 -0
  160. ahuora_builder/tests/test_solver/configurations/vapor_frac_target_solved.json +68 -0
  161. ahuora_builder/tests/test_solver/test_solve_models.py +250 -0
  162. ahuora_builder/timing.py +65 -0
  163. ahuora_builder/types/__init__.py +1 -0
  164. ahuora_builder/unit_model_manager.py +48 -0
  165. ahuora_builder-0.1.0.dist-info/METADATA +14 -0
  166. ahuora_builder-0.1.0.dist-info/RECORD +167 -0
  167. ahuora_builder-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,311 @@
1
+ {
2
+ "id": 6,
3
+ "properties": [
4
+ {
5
+ "id": 907,
6
+ "name": "fs.Heater 1_81.control_volume.heat[0.0]",
7
+ "value": [
8
+ 1000.0
9
+ ],
10
+ "unit": "kg*m**2/s**3",
11
+ "unknown_units": false
12
+ },
13
+ {
14
+ "id": 908,
15
+ "name": "fs.Heater 1_81.control_volume.deltaP[0.0]",
16
+ "value": [
17
+ -0.0
18
+ ],
19
+ "unit": "kg/m/s**2",
20
+ "unknown_units": false
21
+ },
22
+ {
23
+ "id": 918,
24
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].flow_mol",
25
+ "value": [
26
+ 1.0
27
+ ],
28
+ "unit": "mol/s",
29
+ "unknown_units": false
30
+ },
31
+ {
32
+ "id": 920,
33
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].pressure",
34
+ "value": [
35
+ 100000.0
36
+ ],
37
+ "unit": "kg/m/s**2",
38
+ "unknown_units": false
39
+ },
40
+ {
41
+ "id": 923,
42
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].enth_mass",
43
+ "value": [
44
+ 3057.6918858953495
45
+ ],
46
+ "unit": "m**2/s**2",
47
+ "unknown_units": false
48
+ },
49
+ {
50
+ "id": 922,
51
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].enth_mol",
52
+ "value": [
53
+ 382.2348770798459
54
+ ],
55
+ "unit": "kg*m**2/mol/s**2",
56
+ "unknown_units": false
57
+ },
58
+ {
59
+ "id": 943,
60
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].mole_frac_comp[milk_solid]",
61
+ "value": [
62
+ 0.5
63
+ ],
64
+ "unit": "dimensionless",
65
+ "unknown_units": false
66
+ },
67
+ {
68
+ "id": 953,
69
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].mole_frac_comp[water]",
70
+ "value": [
71
+ 0.5
72
+ ],
73
+ "unit": "dimensionless",
74
+ "unknown_units": false
75
+ },
76
+ {
77
+ "id": 944,
78
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].mole_frac_phase_comp[Liq,milk_solid]",
79
+ "value": [
80
+ 0.5000000034115836
81
+ ],
82
+ "unit": "dimensionless",
83
+ "unknown_units": false
84
+ },
85
+ {
86
+ "id": 954,
87
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].mole_frac_phase_comp[Liq,water]",
88
+ "value": [
89
+ 0.4999999965884165
90
+ ],
91
+ "unit": "dimensionless",
92
+ "unknown_units": false
93
+ },
94
+ {
95
+ "id": 955,
96
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].mole_frac_phase_comp[Vap,water]",
97
+ "value": [
98
+ 1.0
99
+ ],
100
+ "unit": "dimensionless",
101
+ "unknown_units": false
102
+ },
103
+ {
104
+ "id": 919,
105
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].temperature",
106
+ "value": [
107
+ 283.15
108
+ ],
109
+ "unit": "K",
110
+ "unknown_units": false
111
+ },
112
+ {
113
+ "id": 921,
114
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].vapor_frac",
115
+ "value": [
116
+ 6.8231670002584646e-09
117
+ ],
118
+ "unit": "dimensionless",
119
+ "unknown_units": false
120
+ },
121
+ {
122
+ "id": 917,
123
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].flow_mass",
124
+ "value": [
125
+ 0.12500765000000003
126
+ ],
127
+ "unit": "kg/s",
128
+ "unknown_units": false
129
+ },
130
+ {
131
+ "id": 927,
132
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].flow_vol",
133
+ "value": [
134
+ 1.8036011030733355e-05
135
+ ],
136
+ "unit": "m**3/s",
137
+ "unknown_units": false
138
+ },
139
+ {
140
+ "id": 925,
141
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].entr_mass",
142
+ "value": [
143
+ 10.941738003673342
144
+ ],
145
+ "unit": "m**2/K/s**2",
146
+ "unknown_units": false
147
+ },
148
+ {
149
+ "id": 924,
150
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].entr_mol",
151
+ "value": [
152
+ 1.3678009547548962
153
+ ],
154
+ "unit": "kg*m**2/K/mol/s**2",
155
+ "unknown_units": false
156
+ },
157
+ {
158
+ "id": 926,
159
+ "name": "fs.Heater 1_81.control_volume.properties_in[0.0].total_energy_flow",
160
+ "value": [
161
+ 382.2348770798459
162
+ ],
163
+ "unit": "kg*m**2/s**3",
164
+ "unknown_units": false
165
+ },
166
+ {
167
+ "id": 929,
168
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].flow_mol",
169
+ "value": [
170
+ 1.0
171
+ ],
172
+ "unit": "mol/s",
173
+ "unknown_units": false
174
+ },
175
+ {
176
+ "id": 931,
177
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].pressure",
178
+ "value": [
179
+ 100000.0
180
+ ],
181
+ "unit": "kg/m/s**2",
182
+ "unknown_units": false
183
+ },
184
+ {
185
+ "id": 934,
186
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].enth_mass",
187
+ "value": [
188
+ 11057.202315857086
189
+ ],
190
+ "unit": "m**2/s**2",
191
+ "unknown_units": false
192
+ },
193
+ {
194
+ "id": 933,
195
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].enth_mol",
196
+ "value": [
197
+ 1382.2348770798521
198
+ ],
199
+ "unit": "kg*m**2/mol/s**2",
200
+ "unknown_units": false
201
+ },
202
+ {
203
+ "id": 946,
204
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].mole_frac_comp[milk_solid]",
205
+ "value": [
206
+ 0.5
207
+ ],
208
+ "unit": "dimensionless",
209
+ "unknown_units": false
210
+ },
211
+ {
212
+ "id": 956,
213
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].mole_frac_comp[water]",
214
+ "value": [
215
+ 0.5
216
+ ],
217
+ "unit": "dimensionless",
218
+ "unknown_units": false
219
+ },
220
+ {
221
+ "id": 947,
222
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].mole_frac_phase_comp[Liq,milk_solid]",
223
+ "value": [
224
+ 0.5000000044653424
225
+ ],
226
+ "unit": "dimensionless",
227
+ "unknown_units": false
228
+ },
229
+ {
230
+ "id": 957,
231
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].mole_frac_phase_comp[Liq,water]",
232
+ "value": [
233
+ 0.49999999553465746
234
+ ],
235
+ "unit": "dimensionless",
236
+ "unknown_units": false
237
+ },
238
+ {
239
+ "id": 958,
240
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].mole_frac_phase_comp[Vap,water]",
241
+ "value": [
242
+ 0.9999999999999999
243
+ ],
244
+ "unit": "dimensionless",
245
+ "unknown_units": false
246
+ },
247
+ {
248
+ "id": 930,
249
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].temperature",
250
+ "value": [
251
+ 309.4379246415793
252
+ ],
253
+ "unit": "K",
254
+ "unknown_units": false
255
+ },
256
+ {
257
+ "id": 932,
258
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].vapor_frac",
259
+ "value": [
260
+ 8.93068483647511e-09
261
+ ],
262
+ "unit": "dimensionless",
263
+ "unknown_units": false
264
+ },
265
+ {
266
+ "id": 928,
267
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].flow_mass",
268
+ "value": [
269
+ 0.12500765
270
+ ],
271
+ "unit": "kg/s",
272
+ "unknown_units": false
273
+ },
274
+ {
275
+ "id": 938,
276
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].flow_vol",
277
+ "value": [
278
+ 1.8160038679207507e-05
279
+ ],
280
+ "unit": "m**3/s",
281
+ "unknown_units": false
282
+ },
283
+ {
284
+ "id": 936,
285
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].entr_mass",
286
+ "value": [
287
+ 37.958564261059266
288
+ ],
289
+ "unit": "m**2/K/s**2",
290
+ "unknown_units": false
291
+ },
292
+ {
293
+ "id": 935,
294
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].entr_mol",
295
+ "value": [
296
+ 4.745110915649005
297
+ ],
298
+ "unit": "kg*m**2/K/mol/s**2",
299
+ "unknown_units": false
300
+ },
301
+ {
302
+ "id": 937,
303
+ "name": "fs.Heater 1_81.control_volume.properties_out[0.0].total_energy_flow",
304
+ "value": [
305
+ 1382.2348770798521
306
+ ],
307
+ "unit": "kg*m**2/s**3",
308
+ "unknown_units": false
309
+ }
310
+ ]
311
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "id": 0,
3
+ "name": "mixer_test",
4
+ "dynamic": false,
5
+ "property_packages": [],
6
+ "unit_models": [
7
+ {
8
+ "id": 8,
9
+ "type": "mixer",
10
+ "name": "Mixer-1",
11
+ "args": {
12
+ "property_package": -1
13
+ },
14
+ "properties": {},
15
+ "ports": {
16
+ "inlet_1": {
17
+ "id": 1,
18
+ "properties": {
19
+ "pressure": { "data": [ { "id": 1, "value": 100000 } ], "unit": "Pa" },
20
+ "flow_mol": { "data": [ { "id": 2, "value": 10 } ], "unit": "mol/s" },
21
+ "enth_mol": { "data": [ { "id": 3, "value": 30 } ], "unit": "J/mol" }
22
+ }
23
+ },
24
+ "inlet_2": {
25
+ "id": 2,
26
+ "properties": {
27
+ "pressure": { "data": [ { "id": 4, "value": 100000 } ], "unit": "Pa" },
28
+ "flow_mol": { "data": [ { "id": 5, "value": 20 } ], "unit": "mol/s" },
29
+ "enth_mol": { "data": [ { "id": 6, "value": 60 } ], "unit": "J/mol" }
30
+ }
31
+ },
32
+ "outlet": {
33
+ "id": 3,
34
+ "properties": {
35
+ "pressure": { "data": [ { "id": 7 } ] },
36
+ "flow_mol": { "data": [ { "id": 8 } ] },
37
+ "enth_mol": { "data": [ { "id": 9 } ] }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ ],
43
+ "arcs": []
44
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "id": 0,
3
+ "properties": [
4
+ {
5
+ "id": 1,
6
+ "name": "fs.Mixer-1_8.inlet_1_state[0.0].pressure",
7
+ "value": [
8
+ 100000.0
9
+ ],
10
+ "unit": "Pa",
11
+ "unknown_units": false
12
+ },
13
+ {
14
+ "id": 2,
15
+ "name": "fs.Mixer-1_8.inlet_1_state[0.0].flow_mol",
16
+ "value": [
17
+ 10.0
18
+ ],
19
+ "unit": "mol/s",
20
+ "unknown_units": false
21
+ },
22
+ {
23
+ "id": 3,
24
+ "name": "fs.Mixer-1_8.inlet_1_state[0.0].enth_mol",
25
+ "value": [
26
+ 30.0
27
+ ],
28
+ "unit": "J/mol",
29
+ "unknown_units": false
30
+ },
31
+ {
32
+ "id": 4,
33
+ "name": "fs.Mixer-1_8.inlet_2_state[0.0].pressure",
34
+ "value": [
35
+ 100000.0
36
+ ],
37
+ "unit": "Pa",
38
+ "unknown_units": false
39
+ },
40
+ {
41
+ "id": 5,
42
+ "name": "fs.Mixer-1_8.inlet_2_state[0.0].flow_mol",
43
+ "value": [
44
+ 20.0
45
+ ],
46
+ "unit": "mol/s",
47
+ "unknown_units": false
48
+ },
49
+ {
50
+ "id": 6,
51
+ "name": "fs.Mixer-1_8.inlet_2_state[0.0].enth_mol",
52
+ "value": [
53
+ 60.0
54
+ ],
55
+ "unit": "J/mol",
56
+ "unknown_units": false
57
+ },
58
+ {
59
+ "id": 7,
60
+ "name": "fs.Mixer-1_8.mixed_state[0.0].pressure",
61
+ "value": [
62
+ 99999.9995
63
+ ],
64
+ "unit": "Pa",
65
+ "unknown_units": false
66
+ },
67
+ {
68
+ "id": 8,
69
+ "name": "fs.Mixer-1_8.mixed_state[0.0].flow_mol",
70
+ "value": [
71
+ 30.0
72
+ ],
73
+ "unit": "mol/s",
74
+ "unknown_units": false
75
+ },
76
+ {
77
+ "id": 9,
78
+ "name": "fs.Mixer-1_8.mixed_state[0.0].enth_mol",
79
+ "value": [
80
+ 50.00000000057014
81
+ ],
82
+ "unit": "J/mol",
83
+ "unknown_units": false
84
+ }
85
+ ]
86
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "id": 0,
3
+ "name": "optimization_test",
4
+ "description": "tests optimizing an expression",
5
+ "dynamic": false,
6
+ "property_packages": [],
7
+ "unit_models": [
8
+ {
9
+ "id": 3,
10
+ "type": "compressor",
11
+ "name": "Compressor1",
12
+ "args": {
13
+ "property_package": -1
14
+ },
15
+ "properties": {
16
+ "deltaP": { "data": [ { "id": 1, "value": 50000 } ], "unit": "Pa" },
17
+ "efficiency_isentropic": { "data": [ { "id": 2, "value": 0.9 } ], "unit": null }
18
+ },
19
+ "ports": {
20
+ "inlet": {
21
+ "id": 1,
22
+ "properties": {
23
+ "pressure": { "data": [ { "id": 3, "value": 100000 } ], "unit": "Pa" },
24
+ "temperature": { "data": [ { "id": 4, "value": 300 } ], "unit": "degC" },
25
+ "flow_mol": { "data": [ { "id": 5, "value": 1 } ], "unit": "mol/s" }
26
+ }
27
+ },
28
+ "outlet": {
29
+ "id": 2,
30
+ "properties": {}
31
+ }
32
+ }
33
+ }
34
+ ],
35
+ "arcs": [],
36
+ "expressions": [
37
+ {
38
+ "id": 6,
39
+ "name": "Expression to optimize. We unfix both variables and expressions here to test both.",
40
+ "expression": "0.5 - id_2 ^ 2"
41
+ }
42
+ ],
43
+ "optimizations": [
44
+ {
45
+ "objective": 6,
46
+ "sense": "maximize",
47
+ "unfixed_variables": [{
48
+ "id":2,
49
+ "lower_bound": 0.1 ,
50
+ "upper_bound": 1
51
+ },{
52
+ "id":6,
53
+ "lower_bound": -1000 ,
54
+ "upper_bound": 1000000
55
+ },{
56
+ "id":4,
57
+ "lower_bound": 299 ,
58
+ "upper_bound": 300
59
+ }]
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "id": 0,
3
+ "properties": [
4
+ {
5
+ "id": 1,
6
+ "name": "fs.Compressor1_3.control_volume.deltaP[0.0]",
7
+ "value": [
8
+ 50000.0
9
+ ],
10
+ "unit": "kg/m/s**2",
11
+ "unknown_units": false
12
+ },
13
+ {
14
+ "id": 2,
15
+ "name": "fs.Compressor1_3.efficiency_isentropic[0.0]",
16
+ "value": [
17
+ 0.10000000348739019
18
+ ],
19
+ "unit": "dimensionless",
20
+ "unknown_units": false
21
+ },
22
+ {
23
+ "id": 3,
24
+ "name": "fs.Compressor1_3.control_volume.properties_in[0.0].pressure",
25
+ "value": [
26
+ 100000.0
27
+ ],
28
+ "unit": "Pa",
29
+ "unknown_units": false
30
+ },
31
+ {
32
+ "id": 4,
33
+ "name": "fs.Compressor1_3.control_volume.properties_in[0.0].temperature",
34
+ "value": [
35
+ 299.51385967408487
36
+ ],
37
+ "unit": "K",
38
+ "unknown_units": false
39
+ },
40
+ {
41
+ "id": 5,
42
+ "name": "fs.Compressor1_3.control_volume.properties_in[0.0].flow_mol",
43
+ "value": [
44
+ 1.0
45
+ ],
46
+ "unit": "mol/s",
47
+ "unknown_units": false
48
+ },
49
+ {
50
+ "id": 6,
51
+ "name": "fs.'Expression to optimize. We unfix both variables and expressions here to test both._6'",
52
+ "value": [
53
+ 0.48999999930252197
54
+ ],
55
+ "unit": "dimensionless",
56
+ "unknown_units": true
57
+ }
58
+ ]
59
+ }