processforge 0.4.1__tar.gz → 0.4.3__tar.gz
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.
- {processforge-0.4.1/src/processforge.egg-info → processforge-0.4.3}/PKG-INFO +1 -1
- processforge-0.4.3/flowsheets/custom/crimson/simple_water_system.json +172 -0
- {processforge-0.4.1 → processforge-0.4.3}/pyproject.toml +1 -1
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/__init__.py +1 -1
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/runs.py +40 -13
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/flowsheet.py +27 -14
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/result.py +33 -9
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/types.py +1 -1
- {processforge-0.4.1 → processforge-0.4.3/src/processforge.egg-info}/PKG-INFO +1 -1
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge.egg-info/SOURCES.txt +1 -0
- processforge-0.4.3/tests/test_result_zarr.py +158 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_runs_command.py +85 -14
- processforge-0.4.1/tests/test_result_zarr.py +0 -73
- {processforge-0.4.1 → processforge-0.4.3}/LICENSE +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/MANIFEST.in +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/README.md +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/flowsheets/closed-loop-chain.json +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/flowsheets/coupled/msre_coupled.json +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/flowsheets/custom/crimson/MUWS_HB.json +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/flowsheets/custom/simple_hyrdaulic_scheme.json +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/flowsheets/festim/hydrogen_transport_1d.json +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/flowsheets/festim/tds_tungsten.json +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/flowsheets/hydraulic-chain.json +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/flowsheets/openmc/msre_eigenvalue.json +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/setup.cfg +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/__main__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/_schema.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/analysis/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/analysis/dof.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/api/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/api/serve.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/apply.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/common.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/diagram.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/display.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/export_fmu.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/export_modelica.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/init.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/persist.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/plan.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/run.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/cli/validate.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/compose.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/coupling.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/backends/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/backends/base.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/backends/casadi_backend.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/backends/pyomo_backend.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/backends/scipy_backend.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/flowsheet.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/jacobian.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/mixin.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/solver.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/stream_var.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/units/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/units/flash_eo.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/units/heater_eo.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/units/pipes_eo.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/units/pump_eo.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/units/strainer_eo.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/eo/units/valve_eo.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/fmu/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/fmu/_fmi_vars.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/fmu/builder.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/fmu/interface.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/fmu/slave_template.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/lock.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/modelica/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/modelica/mo_writer.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/modelica/omc_runner.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/modelica/transpiler.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/modelica/unit_equations.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/output_collector.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/pathsim/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/pathsim/adapter.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/pcl/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/pcl/compiler.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/pcl/namespace.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/persistence/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/persistence/archive.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/persistence/artifact_store.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/provenance.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/base.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/base_jacobian_mixin.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/cantera_jacobian.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/cantera_provider.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/container_client.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/coolprop_provider.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/errors.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/festim_provider.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/jacobian_contributor.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/manager.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/modelica_jacobian.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/modelica_provider.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/openmc_provider.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/reference_state_registry.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/providers/registry.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/quantity.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/result_schema.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/schemas/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/schemas/festim/festim_model.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/schemas/flowsheet_schema.json +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/schemas/openmc/openmc_model.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/simulate.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/solver.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/state.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/thermo.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/base.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/cstr.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/flash.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/heater.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/pfr.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/pipes.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/pump.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/registry.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/solver_unit.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/strainer.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/tank.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/units/valve.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/utils/__init__.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/utils/flowsheet_diagram.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/utils/mermaid_diagram.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/utils/s3_upload.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/utils/topology.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/utils/unit_consistency.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/utils/validate_flowsheet.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge/utils/validation.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge.egg-info/dependency_links.txt +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge.egg-info/entry_points.txt +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge.egg-info/requires.txt +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/src/processforge.egg-info/top_level.txt +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_cli.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_container_client.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_coupling.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_display.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_festim_provider.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_festim_schema.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_fmu_solverunit.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_init.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_openmc_provider.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_pathsim_adapter.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_persist.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_provider_errors.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_providers.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_s3_upload.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_state.py +0 -0
- {processforge-0.4.1 → processforge-0.4.3}/tests/test_types.py +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"name": "Make-up Water System",
|
|
4
|
+
"description": "A two-pump, five-valve, one-strainer, one tank steady-state make-up water system.",
|
|
5
|
+
"version": "2.0"
|
|
6
|
+
},
|
|
7
|
+
"providers": {
|
|
8
|
+
"coolprop": {
|
|
9
|
+
"type": "coolprop"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"materials": {
|
|
13
|
+
"Water": {
|
|
14
|
+
"id": 1
|
|
15
|
+
},
|
|
16
|
+
"Steel": {
|
|
17
|
+
"id": 2
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"streams": {
|
|
21
|
+
"feed": {
|
|
22
|
+
"T": 313.00,
|
|
23
|
+
"P": 101325,
|
|
24
|
+
"flowrate": 1,
|
|
25
|
+
"z": { "Water": 1.0 }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
"units": {
|
|
30
|
+
"tank_1": {
|
|
31
|
+
"type": "Tank",
|
|
32
|
+
"in": ["feed"],
|
|
33
|
+
"out": ["tank_1_to_pipe1", "tank_1_to_pipe2"],
|
|
34
|
+
"outlet_flow": 1.0,
|
|
35
|
+
"initial_n": {
|
|
36
|
+
"Water": 1.0
|
|
37
|
+
},
|
|
38
|
+
"initial_T": 298.15,
|
|
39
|
+
"P": 101325,
|
|
40
|
+
"material": 1
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
"pipe_1": {
|
|
45
|
+
"type": "Pipes",
|
|
46
|
+
"in": "tank_1_to_pipe1",
|
|
47
|
+
"out": "after_pipe_1",
|
|
48
|
+
"delta_p": 1000.0,
|
|
49
|
+
"diameter": 0.05,
|
|
50
|
+
"material": 2
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
"low_pressure_pump":{
|
|
56
|
+
"type": "Pump",
|
|
57
|
+
"in": "after_pipe_1",
|
|
58
|
+
"out": "after_low_pressure_pump",
|
|
59
|
+
"q_flowrate": 4,
|
|
60
|
+
"head": 57,
|
|
61
|
+
"efficiency": 36,
|
|
62
|
+
"power": 1.3,
|
|
63
|
+
"cap": 2.5,
|
|
64
|
+
"motor_rating": 370,
|
|
65
|
+
"design_press": 6,
|
|
66
|
+
"material": 2,
|
|
67
|
+
"delta_p": 1000.0
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
"pipe_2": {
|
|
71
|
+
"type": "Pipes",
|
|
72
|
+
"in": "tank_1_to_pipe2",
|
|
73
|
+
"out": "after_pipe_2",
|
|
74
|
+
"delta_p": 1000.0,
|
|
75
|
+
"diameter": 0.05,
|
|
76
|
+
"material": 2
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
"pipe_3": {
|
|
80
|
+
"type": "Pipes",
|
|
81
|
+
"in": "after_low_pressure_pump",
|
|
82
|
+
"out": "after_pipe_3",
|
|
83
|
+
"delta_p": 1000.0,
|
|
84
|
+
"diameter": 0.05,
|
|
85
|
+
"material": 2
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
"drain_valve_1": {
|
|
90
|
+
"type": "Valve",
|
|
91
|
+
"in": "after_pipe_2",
|
|
92
|
+
"out": "after_drain_valve_1",
|
|
93
|
+
"opening": 50,
|
|
94
|
+
"q_flowrate": 50,
|
|
95
|
+
"material": 2,
|
|
96
|
+
"pressure_ratio": 0.5
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
"make_up_valve_1": {
|
|
100
|
+
"type": "Valve",
|
|
101
|
+
"in": "after_pipe_3",
|
|
102
|
+
"out": "after_make_up_valve_1",
|
|
103
|
+
"opening": 50,
|
|
104
|
+
"q_flowrate": 50,
|
|
105
|
+
"material": 2,
|
|
106
|
+
"pressure_ratio": 0.5
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
"pipe_4": {
|
|
110
|
+
"type": "Pipes",
|
|
111
|
+
"in": "after_make_up_valve_1",
|
|
112
|
+
"out": "after_pipe_4",
|
|
113
|
+
"delta_p": 1000.0,
|
|
114
|
+
"diameter": 0.05,
|
|
115
|
+
"material": 2
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
"pipe_5": {
|
|
119
|
+
"type": "Pipes",
|
|
120
|
+
"in": "after_drain_valve_1",
|
|
121
|
+
"out": "after_pipe_5",
|
|
122
|
+
"delta_p": 1000.0,
|
|
123
|
+
"diameter": 0.05,
|
|
124
|
+
"material": 2
|
|
125
|
+
},
|
|
126
|
+
"tank_2": {
|
|
127
|
+
"type": "Tank",
|
|
128
|
+
"in": ["after_pipe_4", "after_pipe_5"],
|
|
129
|
+
"out": "after_tank_2",
|
|
130
|
+
"outlet_flow": 1.0,
|
|
131
|
+
"initial_n": {
|
|
132
|
+
"Water": 1.0
|
|
133
|
+
},
|
|
134
|
+
"initial_T": 298.15,
|
|
135
|
+
"P": 101325,
|
|
136
|
+
"material": 1
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
"pipe_6": {
|
|
140
|
+
"type": "Pipes",
|
|
141
|
+
"in": "after_tank_2",
|
|
142
|
+
"out": "after_pipe_6",
|
|
143
|
+
"delta_p": 1000.0,
|
|
144
|
+
"diameter": 0.05,
|
|
145
|
+
"material": 2
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
"manual_drain_valve": {
|
|
152
|
+
"type": "Valve",
|
|
153
|
+
"in": "after_pipe_6",
|
|
154
|
+
"out": "after_manual_drain_valve",
|
|
155
|
+
"opening": 50,
|
|
156
|
+
"q_flowrate": 50,
|
|
157
|
+
"material": 2,
|
|
158
|
+
"pressure_ratio": 0.5
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
},
|
|
162
|
+
"simulation": {
|
|
163
|
+
"mode": "dynamic",
|
|
164
|
+
"t0": 0.0,
|
|
165
|
+
"tf": 20.0,
|
|
166
|
+
"dt": 1.0,
|
|
167
|
+
"backend": "scipy"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "processforge"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.3"
|
|
8
8
|
description = "A Python-based process simulation framework for chemical engineering applications."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "BSD-3-Clause"
|
|
@@ -11,7 +11,16 @@ from loguru import logger
|
|
|
11
11
|
|
|
12
12
|
from .common import flowsheet_basename, output_root
|
|
13
13
|
from ..persistence.archive import ProcessStateArchive
|
|
14
|
-
from ..result import
|
|
14
|
+
from ..result import (
|
|
15
|
+
_fmt_scientific,
|
|
16
|
+
_one_line_summary,
|
|
17
|
+
_scalar_from_sequence,
|
|
18
|
+
summarize_zarr_store,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
# Fixed column widths for the compact single-run stream table.
|
|
22
|
+
STREAM_COL_WIDTH = 28
|
|
23
|
+
VAR_COL_WIDTH = 10
|
|
15
24
|
|
|
16
25
|
|
|
17
26
|
def _humanize_timestamp(ts: str) -> str:
|
|
@@ -42,8 +51,8 @@ def _artifact_status(artifact: dict) -> str:
|
|
|
42
51
|
return "missing"
|
|
43
52
|
|
|
44
53
|
|
|
45
|
-
def
|
|
46
|
-
"""Format a
|
|
54
|
+
def _format_run_compact(manifest, summary: dict) -> str:
|
|
55
|
+
"""Format a compact, human-readable result summary for a single run."""
|
|
47
56
|
lines = [
|
|
48
57
|
f"Run: {manifest.run_id}",
|
|
49
58
|
f"Timestamp: {manifest.timestamp}",
|
|
@@ -61,17 +70,25 @@ def _format_run_details(manifest, summary: dict) -> str:
|
|
|
61
70
|
status = eo.get("status", "")
|
|
62
71
|
lines.append(f"{name} ({engine} / {sim_type}) [{status}]")
|
|
63
72
|
for fname, fdata in eo.get("fields", {}).items():
|
|
64
|
-
val = _fmt_scientific(fdata.get("value"))
|
|
73
|
+
val = _fmt_scientific(_scalar_from_sequence(fdata.get("value")))
|
|
65
74
|
unit = fdata.get("unit", "")
|
|
66
75
|
std = fdata.get("std_dev")
|
|
67
76
|
if std is not None:
|
|
68
|
-
lines.append(
|
|
77
|
+
lines.append(
|
|
78
|
+
f" {fname}: {val} ± {_fmt_scientific(std)} {unit}".strip()
|
|
79
|
+
)
|
|
69
80
|
else:
|
|
70
81
|
lines.append(f" {fname}: {val} {unit}".strip())
|
|
71
82
|
if eo.get("attrs") and not eo.get("fields"):
|
|
72
83
|
for k, v in eo["attrs"].items():
|
|
73
|
-
if not k.startswith("_") and k not in (
|
|
74
|
-
|
|
84
|
+
if not k.startswith("_") and k not in (
|
|
85
|
+
"engine",
|
|
86
|
+
"sim_type",
|
|
87
|
+
"status",
|
|
88
|
+
):
|
|
89
|
+
lines.append(
|
|
90
|
+
f" {k}: {_fmt_scientific(_scalar_from_sequence(v))}"
|
|
91
|
+
)
|
|
75
92
|
lines.append("")
|
|
76
93
|
else:
|
|
77
94
|
lines.append(" (no solver/engine outputs)")
|
|
@@ -79,25 +96,33 @@ def _format_run_details(manifest, summary: dict) -> str:
|
|
|
79
96
|
|
|
80
97
|
streams = summary.get("streams", {})
|
|
81
98
|
if streams:
|
|
82
|
-
lines.append("Streams:")
|
|
99
|
+
lines.append("Streams (final timestep):")
|
|
83
100
|
all_vars: set[str] = set()
|
|
84
101
|
for sdata in streams.values():
|
|
85
102
|
all_vars.update(sdata.get("variables", []))
|
|
86
103
|
all_vars = sorted(all_vars)
|
|
87
104
|
|
|
88
|
-
header_parts = ["stream".ljust(
|
|
105
|
+
header_parts = ["stream".ljust(STREAM_COL_WIDTH)] + [
|
|
106
|
+
v.rjust(VAR_COL_WIDTH) for v in all_vars
|
|
107
|
+
]
|
|
89
108
|
lines.append(" " + " ".join(header_parts))
|
|
90
109
|
lines.append(" " + "-" * len(" ".join(header_parts)))
|
|
91
110
|
for sname in sorted(streams):
|
|
92
111
|
sdata = streams[sname]
|
|
93
112
|
fields = sdata.get("fields", {})
|
|
94
|
-
|
|
113
|
+
display_name = sname[:STREAM_COL_WIDTH]
|
|
114
|
+
row = [display_name.ljust(STREAM_COL_WIDTH)]
|
|
95
115
|
for var in all_vars:
|
|
96
116
|
fdata = fields.get(var, {})
|
|
97
117
|
val = fdata.get("value")
|
|
98
|
-
row.append(
|
|
118
|
+
row.append(
|
|
119
|
+
_fmt_scientific(_scalar_from_sequence(val)).rjust(VAR_COL_WIDTH)
|
|
120
|
+
)
|
|
99
121
|
lines.append(" " + " ".join(row))
|
|
100
122
|
lines.append("")
|
|
123
|
+
else:
|
|
124
|
+
lines.append("Streams: none")
|
|
125
|
+
lines.append("")
|
|
101
126
|
|
|
102
127
|
artifacts = summary.get("artifacts", [])
|
|
103
128
|
if artifacts:
|
|
@@ -106,7 +131,9 @@ def _format_run_details(manifest, summary: dict) -> str:
|
|
|
106
131
|
name = art.get("name", "unknown")
|
|
107
132
|
kind = art.get("kind", "")
|
|
108
133
|
status = _artifact_status(art)
|
|
109
|
-
loc =
|
|
134
|
+
loc = (
|
|
135
|
+
art.get("local_path") or (art.get("remote_uris") or ["no location"])[0]
|
|
136
|
+
)
|
|
110
137
|
lines.append(f" [{kind}] {name}: {status} ({loc})")
|
|
111
138
|
else:
|
|
112
139
|
lines.append("Artifacts: none")
|
|
@@ -170,7 +197,7 @@ def runs(
|
|
|
170
197
|
manifest = archive.load_run(resolved_id)
|
|
171
198
|
summary = summarize_zarr_store(zarr_path)
|
|
172
199
|
summary["_zarr_path"] = zarr_path
|
|
173
|
-
typer.echo(
|
|
200
|
+
typer.echo(_format_run_compact(manifest, summary))
|
|
174
201
|
return
|
|
175
202
|
|
|
176
203
|
# List all runs with a one-line summary.
|
|
@@ -835,6 +835,27 @@ class Flowsheet:
|
|
|
835
835
|
) from exc
|
|
836
836
|
return stream_ts
|
|
837
837
|
|
|
838
|
+
@staticmethod
|
|
839
|
+
def _store_dynamic_outlet(results: dict, cfg: dict, sol) -> None:
|
|
840
|
+
"""Store a unit's dynamic solution into the result streams.
|
|
841
|
+
|
|
842
|
+
Handles the three outlet conventions supported by the framework:
|
|
843
|
+
* ``out`` is a string -> single outlet stream.
|
|
844
|
+
* ``out`` is a list of strings -> broadcast the same solution to each.
|
|
845
|
+
* ``retentate_out`` / ``permeate_out`` -> split the solution by key.
|
|
846
|
+
"""
|
|
847
|
+
if "out" in cfg:
|
|
848
|
+
out_val = cfg["out"]
|
|
849
|
+
if isinstance(out_val, list):
|
|
850
|
+
for stream_name in out_val:
|
|
851
|
+
results[stream_name] = sol
|
|
852
|
+
else:
|
|
853
|
+
results[out_val] = sol
|
|
854
|
+
else:
|
|
855
|
+
for out_key in ["retentate_out", "permeate_out"]:
|
|
856
|
+
if out_key in cfg and out_key in sol:
|
|
857
|
+
results[cfg[out_key]] = sol[out_key]
|
|
858
|
+
|
|
838
859
|
def _run_dynamic_sequential(self, solver, processing_order, results, t_eval, num_steps, start_time, end_time):
|
|
839
860
|
"""Standard sequential dynamic simulation for non-recycle flowsheets."""
|
|
840
861
|
# Process units in topological order
|
|
@@ -842,7 +863,6 @@ class Flowsheet:
|
|
|
842
863
|
unit = self.units[unit_name]
|
|
843
864
|
cfg = self.config["units"][unit_name]
|
|
844
865
|
inlet_name = cfg["in"]
|
|
845
|
-
outlets = self._get_unit_outlets(unit_name)
|
|
846
866
|
if isinstance(inlet_name, list):
|
|
847
867
|
inlet_stream_ts = self._merge_inlet_timeseries(inlet_name, results, num_steps, t_eval)
|
|
848
868
|
else:
|
|
@@ -853,23 +873,13 @@ class Flowsheet:
|
|
|
853
873
|
sol = unit.run_dynamic(
|
|
854
874
|
inlet_stream_ts, (start_time, end_time), t_eval, solver
|
|
855
875
|
)
|
|
856
|
-
|
|
857
|
-
results[outlets[0]] = sol
|
|
858
|
-
else:
|
|
859
|
-
for out_key, stream_name in zip(["retentate_out", "permeate_out"], outlets):
|
|
860
|
-
if out_key in sol:
|
|
861
|
-
results[stream_name] = sol[out_key]
|
|
876
|
+
self._store_dynamic_outlet(results, cfg, sol)
|
|
862
877
|
else:
|
|
863
878
|
logger.debug(f"Processing static unit {unit_name} dynamically")
|
|
864
879
|
sol = self._process_static_unit(
|
|
865
880
|
unit, inlet_stream_ts, t_eval, num_steps
|
|
866
881
|
)
|
|
867
|
-
|
|
868
|
-
results[outlets[0]] = sol
|
|
869
|
-
else:
|
|
870
|
-
for out_key, stream_name in zip(["retentate_out", "permeate_out"], outlets):
|
|
871
|
-
if out_key in sol:
|
|
872
|
-
results[stream_name] = sol[out_key]
|
|
882
|
+
self._store_dynamic_outlet(results, cfg, sol)
|
|
873
883
|
|
|
874
884
|
self.results = results
|
|
875
885
|
logger.info("Dynamic simulation completed")
|
|
@@ -981,7 +991,10 @@ class Flowsheet:
|
|
|
981
991
|
|
|
982
992
|
# Store results for this timestep
|
|
983
993
|
if "out" in cfg:
|
|
984
|
-
|
|
994
|
+
out_val = cfg["out"]
|
|
995
|
+
targets = out_val if isinstance(out_val, list) else [out_val]
|
|
996
|
+
for stream_name in targets:
|
|
997
|
+
self._store_snapshot_in_timeseries(results, stream_name, outlet_snapshot, step, components)
|
|
985
998
|
else:
|
|
986
999
|
for out_key in ["retentate_out", "permeate_out"]:
|
|
987
1000
|
if out_key in cfg and out_key in outlet_snapshot:
|
|
@@ -44,7 +44,15 @@ def _store_stream(stream_group, stream_data):
|
|
|
44
44
|
if value:
|
|
45
45
|
stream_group.attrs["composition"] = sorted(value)
|
|
46
46
|
continue
|
|
47
|
-
|
|
47
|
+
arr = _ensure_array(value)
|
|
48
|
+
if arr.dtype.kind == "U":
|
|
49
|
+
# Use Zarr's stable variable-length UTF-8 dtype instead of
|
|
50
|
+
# numpy fixed-length unicode, which maps to the unstable
|
|
51
|
+
# FixedLengthUTF32 V3 dtype.
|
|
52
|
+
zarr_arr = stream_group.create_array(key, shape=arr.shape, dtype=str)
|
|
53
|
+
zarr_arr[:] = arr
|
|
54
|
+
else:
|
|
55
|
+
stream_group.create_array(key, data=arr)
|
|
48
56
|
|
|
49
57
|
|
|
50
58
|
def _store_solver_unit(group, data):
|
|
@@ -136,6 +144,8 @@ def _store_run_info(root, run_info: RunInfo | dict) -> None:
|
|
|
136
144
|
|
|
137
145
|
def _friendly_dtype(dt: str) -> str:
|
|
138
146
|
dtype = str(dt)
|
|
147
|
+
if "StringDType" in dtype:
|
|
148
|
+
return "str"
|
|
139
149
|
if dtype.startswith(("<U", "|U")) or dtype.startswith(("<S", "|S")):
|
|
140
150
|
return "str"
|
|
141
151
|
return dtype
|
|
@@ -179,8 +189,15 @@ def _build_schema(root) -> ResultSchema:
|
|
|
179
189
|
if "run_info" in root:
|
|
180
190
|
ri = root["run_info"]
|
|
181
191
|
prov = {}
|
|
182
|
-
for key in (
|
|
183
|
-
|
|
192
|
+
for key in (
|
|
193
|
+
"git_hash",
|
|
194
|
+
"timestamp",
|
|
195
|
+
"mode",
|
|
196
|
+
"backend",
|
|
197
|
+
"python_version",
|
|
198
|
+
"platform",
|
|
199
|
+
"processforge_version",
|
|
200
|
+
):
|
|
184
201
|
if key in ri.attrs:
|
|
185
202
|
prov[key] = ri.attrs[key]
|
|
186
203
|
if key == "processforge_version":
|
|
@@ -216,7 +233,9 @@ def _write_schema_s3(s3_uri, storage_options):
|
|
|
216
233
|
logger.debug(f"Wrote schema to {schema_uri}")
|
|
217
234
|
|
|
218
235
|
|
|
219
|
-
def save_results_zarr(
|
|
236
|
+
def save_results_zarr(
|
|
237
|
+
results, fname="results.zarr", run_info: RunInfo | dict | None = None
|
|
238
|
+
):
|
|
220
239
|
"""Persist simulation results in a Zarr directory.
|
|
221
240
|
|
|
222
241
|
Args:
|
|
@@ -447,7 +466,9 @@ def _convert_value(value):
|
|
|
447
466
|
if isinstance(value, np.ndarray):
|
|
448
467
|
if value.size == 0:
|
|
449
468
|
return ""
|
|
450
|
-
|
|
469
|
+
if value.size == 1:
|
|
470
|
+
return _convert_value(value.item())
|
|
471
|
+
return [_convert_value(v) for v in value.tolist()]
|
|
451
472
|
if isinstance(value, np.generic):
|
|
452
473
|
return value.item()
|
|
453
474
|
return value
|
|
@@ -623,14 +644,17 @@ def _one_line_summary(summary: dict) -> str:
|
|
|
623
644
|
|
|
624
645
|
|
|
625
646
|
def _fmt_scientific(value) -> str:
|
|
626
|
-
"""Format a scalar numerically; fall back to its string representation.
|
|
647
|
+
"""Format a scalar numerically; fall back to its string representation.
|
|
648
|
+
|
|
649
|
+
Values outside [1e-3, 1e9) are shown in scientific notation; values inside
|
|
650
|
+
use fixed-point with comma thousands separators for readability.
|
|
651
|
+
"""
|
|
627
652
|
if value is None:
|
|
628
653
|
return ""
|
|
629
654
|
try:
|
|
630
655
|
f = float(value)
|
|
631
|
-
if abs(f) >=
|
|
656
|
+
if abs(f) >= 1e9 or (abs(f) < 1e-3 and abs(f) > 0):
|
|
632
657
|
return f"{f:.3e}"
|
|
633
|
-
return f"{f
|
|
658
|
+
return f"{f:,.4f}"
|
|
634
659
|
except (TypeError, ValueError):
|
|
635
660
|
return str(value)
|
|
636
|
-
|
|
@@ -85,7 +85,7 @@ class UnitConfig(BaseModel):
|
|
|
85
85
|
material: Optional[int] = None
|
|
86
86
|
provider: Optional[str] = None
|
|
87
87
|
inlets: list = [] # JSON "in" key (stream feeds)
|
|
88
|
-
out: Optional[str] = None
|
|
88
|
+
out: Optional[Union[str, list[str]]] = None
|
|
89
89
|
retentate_out: Optional[str] = None
|
|
90
90
|
permeate_out: Optional[str] = None
|
|
91
91
|
sim_type: Optional[str] = None
|
|
@@ -7,6 +7,7 @@ flowsheets/hydraulic-chain.json
|
|
|
7
7
|
flowsheets/coupled/msre_coupled.json
|
|
8
8
|
flowsheets/custom/simple_hyrdaulic_scheme.json
|
|
9
9
|
flowsheets/custom/crimson/MUWS_HB.json
|
|
10
|
+
flowsheets/custom/crimson/simple_water_system.json
|
|
10
11
|
flowsheets/festim/hydrogen_transport_1d.json
|
|
11
12
|
flowsheets/festim/tds_tungsten.json
|
|
12
13
|
flowsheets/openmc/msre_eigenvalue.json
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"""Tests for ``save_results_zarr`` handling of EngineOutput / StreamOutput."""
|
|
2
|
+
import json
|
|
3
|
+
import os
|
|
4
|
+
import tempfile
|
|
5
|
+
import warnings
|
|
6
|
+
|
|
7
|
+
import zarr
|
|
8
|
+
|
|
9
|
+
import numpy as np
|
|
10
|
+
|
|
11
|
+
from processforge.result import _convert_value, save_results_zarr, summarize_zarr_store
|
|
12
|
+
from processforge.types import (
|
|
13
|
+
EngineOutput,
|
|
14
|
+
OutputArtifact,
|
|
15
|
+
OutputField,
|
|
16
|
+
Quantity,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _make_openmc_eo(remote: bool) -> EngineOutput:
|
|
21
|
+
art = OutputArtifact(
|
|
22
|
+
name="statepoint",
|
|
23
|
+
kind="h5",
|
|
24
|
+
local_path=None if remote else "/data/openmc/msre_run/statepoint.h5",
|
|
25
|
+
remote_uris=["s3://bucket/prefix/statepoint.h5"] if remote else [],
|
|
26
|
+
source="remote" if remote else "local",
|
|
27
|
+
)
|
|
28
|
+
return EngineOutput(
|
|
29
|
+
engine="openmc",
|
|
30
|
+
sim_type="eigenvalue_reactor",
|
|
31
|
+
status="completed",
|
|
32
|
+
fields=[
|
|
33
|
+
OutputField(
|
|
34
|
+
name="k_eff",
|
|
35
|
+
quantity=Quantity(value=1.05, unit=""),
|
|
36
|
+
kind="scalar",
|
|
37
|
+
source="keff",
|
|
38
|
+
)
|
|
39
|
+
],
|
|
40
|
+
artifacts=[art],
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_save_results_zarr_engine_output_remote_artifact():
|
|
45
|
+
eo = _make_openmc_eo(remote=True)
|
|
46
|
+
with tempfile.TemporaryDirectory() as d:
|
|
47
|
+
path = os.path.join(d, "results.zarr")
|
|
48
|
+
save_results_zarr({"openmc_solver": eo}, path)
|
|
49
|
+
|
|
50
|
+
store = zarr.storage.LocalStore(path)
|
|
51
|
+
root = zarr.open_group(store=store, mode="r")
|
|
52
|
+
|
|
53
|
+
assert "openmc_solver" in root
|
|
54
|
+
g = root["openmc_solver"]
|
|
55
|
+
assert g.attrs["engine"] == "openmc"
|
|
56
|
+
assert "k_eff" in g.array_keys()
|
|
57
|
+
assert g["k_eff"].attrs["source"] == "keff"
|
|
58
|
+
|
|
59
|
+
assert "artifacts" in g
|
|
60
|
+
assert "statepoint" in g["artifacts"].attrs
|
|
61
|
+
dumped = json.loads(g["artifacts"].attrs["statepoint"])
|
|
62
|
+
assert dumped["remote_uris"] == ["s3://bucket/prefix/statepoint.h5"]
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def test_save_results_zarr_engine_output_local_artifact():
|
|
66
|
+
eo = _make_openmc_eo(remote=False)
|
|
67
|
+
with tempfile.TemporaryDirectory() as d:
|
|
68
|
+
path = os.path.join(d, "results.zarr")
|
|
69
|
+
save_results_zarr({"openmc_solver": eo}, path)
|
|
70
|
+
|
|
71
|
+
store = zarr.storage.LocalStore(path)
|
|
72
|
+
root = zarr.open_group(store=store, mode="r")
|
|
73
|
+
g = root["openmc_solver"]
|
|
74
|
+
dumped = json.loads(g["artifacts"].attrs["statepoint"])
|
|
75
|
+
assert dumped["local_path"] == "/data/openmc/msre_run/statepoint.h5"
|
|
76
|
+
assert dumped["source"] == "local"
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def test_save_results_zarr_string_fields_use_stable_utf8():
|
|
80
|
+
"""String stream fields (e.g. 'unit') must not use unstable FixedLengthUTF32."""
|
|
81
|
+
results = {
|
|
82
|
+
"after_pipe_1": {
|
|
83
|
+
"T": 313.0,
|
|
84
|
+
"P": 101325.0,
|
|
85
|
+
"flowrate": 1.0,
|
|
86
|
+
"z": {"Water": 1.0},
|
|
87
|
+
"unit": "Pipes",
|
|
88
|
+
},
|
|
89
|
+
"after_low_pressure_pump": {
|
|
90
|
+
"T": 313.0,
|
|
91
|
+
"P": 102325.0,
|
|
92
|
+
"flowrate": 1.0,
|
|
93
|
+
"z": {"Water": 1.0},
|
|
94
|
+
"unit": "Pump",
|
|
95
|
+
},
|
|
96
|
+
}
|
|
97
|
+
with tempfile.TemporaryDirectory() as d:
|
|
98
|
+
path = os.path.join(d, "results.zarr")
|
|
99
|
+
with warnings.catch_warnings(record=True) as caught:
|
|
100
|
+
warnings.simplefilter("always")
|
|
101
|
+
save_results_zarr(results, path)
|
|
102
|
+
|
|
103
|
+
unstable = [
|
|
104
|
+
w for w in caught
|
|
105
|
+
if "FixedLengthUTF32" in str(w.message)
|
|
106
|
+
and w.category.__name__ == "UnstableSpecificationWarning"
|
|
107
|
+
]
|
|
108
|
+
assert not unstable
|
|
109
|
+
|
|
110
|
+
store = zarr.storage.LocalStore(path)
|
|
111
|
+
root = zarr.open_group(store=store, mode="r")
|
|
112
|
+
|
|
113
|
+
assert root["after_pipe_1"]["unit"][:] == "Pipes"
|
|
114
|
+
assert root["after_low_pressure_pump"]["unit"][:] == "Pump"
|
|
115
|
+
|
|
116
|
+
schema_path = path + ".schema.json"
|
|
117
|
+
with open(schema_path, encoding="utf-8") as f:
|
|
118
|
+
schema = json.load(f)
|
|
119
|
+
assert schema["streams"]["after_pipe_1"]["dtypes"]["unit"] == "str"
|
|
120
|
+
assert schema["streams"]["after_low_pressure_pump"]["dtypes"]["unit"] == "str"
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def test_convert_value_empty_array():
|
|
124
|
+
assert _convert_value(np.array([])) == ""
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def test_convert_value_scalar_array():
|
|
128
|
+
assert _convert_value(np.array([3.14])) == 3.14
|
|
129
|
+
assert _convert_value(np.array(2.0)) == 2.0
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def test_convert_value_multi_element_array():
|
|
133
|
+
arr = np.array([1.0, 2.0, 3.0])
|
|
134
|
+
assert _convert_value(arr) == [1.0, 2.0, 3.0]
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def test_convert_value_nested_arrays():
|
|
138
|
+
arr = np.array([[1.0, 2.0], [3.0, 4.0]])
|
|
139
|
+
assert _convert_value(arr) == [[1.0, 2.0], [3.0, 4.0]]
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def test_summarize_zarr_store_handles_multi_element_stream():
|
|
143
|
+
results = {
|
|
144
|
+
"after_drain_valve_1": {
|
|
145
|
+
"T": np.array([313.0, 313.0, 313.0]),
|
|
146
|
+
"P": np.array([50162.5, 50162.5, 50162.5]),
|
|
147
|
+
"flowrate": np.array([1.0, 1.0, 1.0]),
|
|
148
|
+
"z": {"Water": np.array([1.0, 1.0, 1.0])},
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
with tempfile.TemporaryDirectory() as d:
|
|
152
|
+
path = os.path.join(d, "results.zarr")
|
|
153
|
+
save_results_zarr(results, path)
|
|
154
|
+
summary = summarize_zarr_store(path)
|
|
155
|
+
assert summary["present"]
|
|
156
|
+
stream = summary["streams"]["after_drain_valve_1"]
|
|
157
|
+
assert stream["fields"]["P"]["value"] == [50162.5, 50162.5, 50162.5]
|
|
158
|
+
assert stream["fields"]["T"]["value"] == [313.0, 313.0, 313.0]
|