processforge 0.3.12__tar.gz → 0.3.14__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.3.12/src/processforge.egg-info → processforge-0.3.14}/PKG-INFO +1 -1
- processforge-0.3.14/flowsheets/custom/crimson/MUWS_HB.json +216 -0
- processforge-0.3.14/flowsheets/custom/simple_hyrdaulic_scheme.json +202 -0
- {processforge-0.3.12 → processforge-0.3.14}/pyproject.toml +1 -1
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/__init__.py +1 -1
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/festim_provider.py +42 -8
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/schemas/festim/festim_model.py +1 -1
- {processforge-0.3.12 → processforge-0.3.14/src/processforge.egg-info}/PKG-INFO +1 -1
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge.egg-info/SOURCES.txt +2 -0
- {processforge-0.3.12 → processforge-0.3.14}/tests/test_festim_provider.py +69 -3
- {processforge-0.3.12 → processforge-0.3.14}/LICENSE +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/MANIFEST.in +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/README.md +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/flowsheets/closed-loop-chain.json +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/flowsheets/festim/hydrogen_transport_1d.json +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/flowsheets/festim/tds_tungsten.json +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/flowsheets/hydraulic-chain.json +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/flowsheets/openmc/msre_eigenvalue.json +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/setup.cfg +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/__main__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/_schema.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/analysis/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/analysis/dof.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/api/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/api/serve.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/apply.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/common.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/diagram.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/display.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/export_fmu.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/export_modelica.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/init.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/plan.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/run.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/cli/validate.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/compose.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/backends/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/backends/base.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/backends/casadi_backend.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/backends/pyomo_backend.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/backends/scipy_backend.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/flowsheet.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/jacobian.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/mixin.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/solver.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/stream_var.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/units/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/units/flash_eo.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/units/heater_eo.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/units/pipes_eo.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/units/pump_eo.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/units/strainer_eo.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/eo/units/valve_eo.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/flowsheet.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/fmu/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/fmu/_fmi_vars.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/fmu/builder.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/fmu/slave_template.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/lock.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/modelica/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/modelica/mo_writer.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/modelica/omc_runner.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/modelica/transpiler.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/modelica/unit_equations.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/output_collector.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/pcl/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/pcl/compiler.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/pcl/namespace.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/persistence/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/persistence/archive.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/persistence/artifact_store.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/provenance.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/base.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/base_jacobian_mixin.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/cantera_jacobian.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/cantera_provider.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/container_client.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/coolprop_provider.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/jacobian_contributor.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/manager.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/modelica_jacobian.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/modelica_provider.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/openmc_provider.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/reference_state_registry.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/registry.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/quantity.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/result.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/result_schema.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/schemas/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/schemas/flowsheet_schema.json +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/schemas/openmc/openmc_model.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/simulate.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/solver.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/state.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/thermo.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/types.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/base.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/cstr.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/flash.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/heater.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/pfr.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/pipes.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/pump.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/registry.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/solver_unit.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/strainer.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/tank.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/units/valve.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/utils/__init__.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/utils/flowsheet_diagram.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/utils/mermaid_diagram.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/utils/s3_upload.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/utils/topology.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/utils/unit_consistency.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/utils/validate_flowsheet.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge/utils/validation.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge.egg-info/dependency_links.txt +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge.egg-info/entry_points.txt +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge.egg-info/requires.txt +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/src/processforge.egg-info/top_level.txt +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/tests/test_cli.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/tests/test_festim_schema.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/tests/test_init.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/tests/test_openmc_provider.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/tests/test_providers.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/tests/test_s3_upload.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/tests/test_state.py +0 -0
- {processforge-0.3.12 → processforge-0.3.14}/tests/test_types.py +0 -0
|
@@ -0,0 +1,216 @@
|
|
|
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
|
+
|
|
31
|
+
"tank_1": {
|
|
32
|
+
"type": "Tank",
|
|
33
|
+
"in": ["feed", "recycle_to_tank"],
|
|
34
|
+
"out": "after_tank_1",
|
|
35
|
+
"outlet_flow": 1.0,
|
|
36
|
+
"initial_n": {
|
|
37
|
+
"Benzene": 9.0,
|
|
38
|
+
"Toluene": 1.0
|
|
39
|
+
},
|
|
40
|
+
"initial_T": 298.15,
|
|
41
|
+
"P": 101325,
|
|
42
|
+
"duty": 0.0,
|
|
43
|
+
"material": 1
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
"pipe_1": {
|
|
47
|
+
"type": "Pipes",
|
|
48
|
+
"in": "after_tank_1",
|
|
49
|
+
"out": "after_pipe_1",
|
|
50
|
+
"delta_p": 1000.0,
|
|
51
|
+
"diameter": 0.05,
|
|
52
|
+
"material": 2
|
|
53
|
+
},
|
|
54
|
+
"global_valve_1": {
|
|
55
|
+
"type": "Valve",
|
|
56
|
+
"in": "after_pipe_1",
|
|
57
|
+
"out": "after_global_valve_1",
|
|
58
|
+
"opening": 50,
|
|
59
|
+
"pressure_ratio": 0.5,
|
|
60
|
+
"q_flowrate": 50,
|
|
61
|
+
"material": 2
|
|
62
|
+
},
|
|
63
|
+
"pipe_2": {
|
|
64
|
+
"type": "Pipes",
|
|
65
|
+
"in": "after_global_valve_1",
|
|
66
|
+
"out": "after_pipe_2",
|
|
67
|
+
"delta_p": 1000.0,
|
|
68
|
+
"diameter": 0.05,
|
|
69
|
+
"material": 2
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
"low_pressure_pump":{
|
|
73
|
+
"type": "Pump",
|
|
74
|
+
"in": "after_pipe_2",
|
|
75
|
+
"out": "after_low_pressure_pump",
|
|
76
|
+
"q_flowrate": 4,
|
|
77
|
+
"head": 57,
|
|
78
|
+
"efficiency": 36,
|
|
79
|
+
"power": 1.3,
|
|
80
|
+
"cap": 2.5,
|
|
81
|
+
"motor_rating": 370,
|
|
82
|
+
"design_press": 6,
|
|
83
|
+
"material": 2,
|
|
84
|
+
"delta_p": 1000.0
|
|
85
|
+
},
|
|
86
|
+
"pipe_3": {
|
|
87
|
+
"type": "Pipes",
|
|
88
|
+
"in": "after_low_pressure_pump",
|
|
89
|
+
"out": "after_pipe_3",
|
|
90
|
+
"delta_p": 1000.0,
|
|
91
|
+
"diameter": 0.05,
|
|
92
|
+
"material": 2
|
|
93
|
+
},
|
|
94
|
+
"non_return_valve_1": {
|
|
95
|
+
"type": "Valve",
|
|
96
|
+
"in": "after_pipe_3",
|
|
97
|
+
"out": "after_non_return_valve_1",
|
|
98
|
+
"q_flowrate": 4,
|
|
99
|
+
"pressure_ratio": 0.5,
|
|
100
|
+
"pressure_drop": 0.72,
|
|
101
|
+
"material": 2
|
|
102
|
+
},
|
|
103
|
+
"pipe_4": {
|
|
104
|
+
"type": "Pipes",
|
|
105
|
+
"in": "after_non_return_valve_1",
|
|
106
|
+
"out": "after_pipe_4",
|
|
107
|
+
"delta_p": 1000.0,
|
|
108
|
+
"diameter": 0.05,
|
|
109
|
+
"material": 2
|
|
110
|
+
},
|
|
111
|
+
"strainer": {
|
|
112
|
+
"type": "Strainer",
|
|
113
|
+
"in": "after_pipe_4",
|
|
114
|
+
"out": "after_strainer",
|
|
115
|
+
"q_flowrate": 4,
|
|
116
|
+
"pressure_drop": 0.192,
|
|
117
|
+
"material": 2,
|
|
118
|
+
"delta_p": 1000.0
|
|
119
|
+
},
|
|
120
|
+
"pipe_5": {
|
|
121
|
+
"type": "Pipes",
|
|
122
|
+
"in": "after_strainer",
|
|
123
|
+
"out": "after_pipe_5",
|
|
124
|
+
"delta_p": 1000.0,
|
|
125
|
+
"diameter": 0.05,
|
|
126
|
+
"material": 2
|
|
127
|
+
},
|
|
128
|
+
"global_valve_2": {
|
|
129
|
+
"type": "Valve",
|
|
130
|
+
"in": "after_pipe_5",
|
|
131
|
+
"out": "after_global_valve_2",
|
|
132
|
+
"opening": 50,
|
|
133
|
+
"q_flowrate": 50,
|
|
134
|
+
"material": 2,
|
|
135
|
+
"pressure_ratio": 0.5
|
|
136
|
+
},
|
|
137
|
+
"pipe_6": {
|
|
138
|
+
"type": "Pipes",
|
|
139
|
+
"in": "after_global_valve_2",
|
|
140
|
+
"out": "after_pipe_6",
|
|
141
|
+
"delta_p": 1000.0,
|
|
142
|
+
"diameter": 0.05,
|
|
143
|
+
"material": 2
|
|
144
|
+
},
|
|
145
|
+
"high_pressure_pump":{
|
|
146
|
+
"type": "Pump",
|
|
147
|
+
"in": "after_pipe_6",
|
|
148
|
+
"out": "after_high_pressure_pump",
|
|
149
|
+
"q_flowrate": 35,
|
|
150
|
+
"head": 32,
|
|
151
|
+
"efficiency": 25,
|
|
152
|
+
"power": 4.75,
|
|
153
|
+
"cap": 600,
|
|
154
|
+
"discharge_press": 50,
|
|
155
|
+
"motor_rating": 7.5,
|
|
156
|
+
"relief_press": 200,
|
|
157
|
+
"material": 2,
|
|
158
|
+
"delta_p": 1000.0
|
|
159
|
+
},
|
|
160
|
+
"pipe_7": {
|
|
161
|
+
"type": "Pipes",
|
|
162
|
+
"in": "after_high_pressure_pump",
|
|
163
|
+
"out": "after_pipe_7",
|
|
164
|
+
"delta_p": 1000.0,
|
|
165
|
+
"diameter": 0.05,
|
|
166
|
+
"material": 2
|
|
167
|
+
},
|
|
168
|
+
"non_return_valve_2": {
|
|
169
|
+
"type": "Valve",
|
|
170
|
+
"in": "after_pipe_7",
|
|
171
|
+
"out": "after_non_return_valve_2",
|
|
172
|
+
"q_flowrate": 4,
|
|
173
|
+
"pressure_drop": 0.72,
|
|
174
|
+
"material": 2,
|
|
175
|
+
"pressure_ratio": 0.5
|
|
176
|
+
},
|
|
177
|
+
"pipe_8": {
|
|
178
|
+
"type": "Pipes",
|
|
179
|
+
"in": "after_non_return_valve_2",
|
|
180
|
+
"out": "after_pipe_8",
|
|
181
|
+
"delta_p": 1000.0,
|
|
182
|
+
"diameter": 0.05,
|
|
183
|
+
"material": 2
|
|
184
|
+
},
|
|
185
|
+
"global_valve_3": {
|
|
186
|
+
"type": "Valve",
|
|
187
|
+
"in": "after_pipe_8",
|
|
188
|
+
"out": "after_valve_3",
|
|
189
|
+
"opening": 50,
|
|
190
|
+
"q_flowrate": 50,
|
|
191
|
+
"material": 2,
|
|
192
|
+
"pressure_ratio": 0.5
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
"pipe_9": {
|
|
197
|
+
"type": "Pipes",
|
|
198
|
+
"in": "after_valve_3",
|
|
199
|
+
"out": "recycle_to_tank",
|
|
200
|
+
"delta_p": 1000.0,
|
|
201
|
+
"diameter": 0.08,
|
|
202
|
+
"material": 2
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
},
|
|
206
|
+
"simulation": {
|
|
207
|
+
"mode": "dynamic",
|
|
208
|
+
"t0": 0.0,
|
|
209
|
+
"tf": 17.0,
|
|
210
|
+
"dt": 1.0,
|
|
211
|
+
"backend": "scipy"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"name": "Hydraulic Chain Example",
|
|
4
|
+
"description": "A two-pump, one-valve, one-strainer steady-state hydraulic system.",
|
|
5
|
+
"version": "2.0"
|
|
6
|
+
},
|
|
7
|
+
"providers": {
|
|
8
|
+
"coolprop": {
|
|
9
|
+
"type": "coolprop"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"materials": {
|
|
13
|
+
"Benzene": {
|
|
14
|
+
"id": 1
|
|
15
|
+
},
|
|
16
|
+
"Toluene": {
|
|
17
|
+
"id": 2
|
|
18
|
+
},
|
|
19
|
+
"Steel": {
|
|
20
|
+
"id": 3
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"material_mixes": {
|
|
24
|
+
"Benzene_Toluene_Mix": {
|
|
25
|
+
"friendly_material_mix_id": 1,
|
|
26
|
+
"percent_type": "ao",
|
|
27
|
+
"components": [
|
|
28
|
+
{"name": "Benzene", "fraction": 0.8},
|
|
29
|
+
{"name": "Toluene", "fraction": 0.2}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"streams": {
|
|
34
|
+
"feed": {
|
|
35
|
+
"T": 298.15,
|
|
36
|
+
"P": 101325,
|
|
37
|
+
"flowrate": 38,
|
|
38
|
+
"material_mix": 1
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"units": {
|
|
42
|
+
"pipe_1": {
|
|
43
|
+
"type": "Pipes",
|
|
44
|
+
"in": "feed",
|
|
45
|
+
"out": "after_pipe_1",
|
|
46
|
+
"delta_p": 1000.0,
|
|
47
|
+
"diameter": 0.040,
|
|
48
|
+
"material": 3
|
|
49
|
+
},
|
|
50
|
+
"valve_1": {
|
|
51
|
+
"type": "Valve",
|
|
52
|
+
"in": "after_pipe_1",
|
|
53
|
+
"out": "after_valve_1",
|
|
54
|
+
"pressure_ratio": 0.5,
|
|
55
|
+
"material": 3
|
|
56
|
+
},
|
|
57
|
+
"pipe_2": {
|
|
58
|
+
"type": "Pipes",
|
|
59
|
+
"in": "after_valve_1",
|
|
60
|
+
"out": "after_pipe_2",
|
|
61
|
+
"delta_p": 1000.0,
|
|
62
|
+
"diameter": 0.08,
|
|
63
|
+
"material": 3
|
|
64
|
+
},
|
|
65
|
+
"pump_1": {
|
|
66
|
+
"type": "Pump",
|
|
67
|
+
"in": "after_pipe_2",
|
|
68
|
+
"out": "after_pump_1",
|
|
69
|
+
"delta_p": 600000.0,
|
|
70
|
+
"efficiency": 0.75,
|
|
71
|
+
"material": 3
|
|
72
|
+
},
|
|
73
|
+
"pipe_3": {
|
|
74
|
+
"type": "Pipes",
|
|
75
|
+
"in": "after_pump_1",
|
|
76
|
+
"out": "after_pipe_3",
|
|
77
|
+
"delta_p": 1000.0,
|
|
78
|
+
"diameter": 0.08,
|
|
79
|
+
"material": 3
|
|
80
|
+
},
|
|
81
|
+
"strainer_1": {
|
|
82
|
+
"type": "Strainer",
|
|
83
|
+
"in": "after_pipe_3",
|
|
84
|
+
"out": "after_strainer_1",
|
|
85
|
+
"delta_p": 5000.0,
|
|
86
|
+
"material": 3
|
|
87
|
+
},
|
|
88
|
+
"pipe_4": {
|
|
89
|
+
"type": "Pipes",
|
|
90
|
+
"in": "after_strainer_1",
|
|
91
|
+
"out": "after_pipe_4",
|
|
92
|
+
"delta_p": 1000.0,
|
|
93
|
+
"diameter": 0.08,
|
|
94
|
+
"material": 3
|
|
95
|
+
},
|
|
96
|
+
"pipe_1a": {
|
|
97
|
+
"type": "Pipes",
|
|
98
|
+
"in": "after_strainer_1",
|
|
99
|
+
"out": "after_pipe_1a",
|
|
100
|
+
"delta_p": 1000.0,
|
|
101
|
+
"diameter": 0.08,
|
|
102
|
+
"material": 3
|
|
103
|
+
},
|
|
104
|
+
"valve_1a": {
|
|
105
|
+
"type": "Valve",
|
|
106
|
+
"in": "after_pipe_1a",
|
|
107
|
+
"out": "after_valve_1a",
|
|
108
|
+
"pressure_ratio": 0.5,
|
|
109
|
+
"material": 3
|
|
110
|
+
},
|
|
111
|
+
"pipe_2a": {
|
|
112
|
+
"type": "Pipes",
|
|
113
|
+
"in": "after_valve_1a",
|
|
114
|
+
"out": "after_pipe_2a",
|
|
115
|
+
"delta_p": 1000.0,
|
|
116
|
+
"diameter": 0.08,
|
|
117
|
+
"material": 3
|
|
118
|
+
},
|
|
119
|
+
"valve_2": {
|
|
120
|
+
"type": "Valve",
|
|
121
|
+
"in": "after_pipe_4",
|
|
122
|
+
"out": "after_valve_2",
|
|
123
|
+
"pressure_ratio": 0.5,
|
|
124
|
+
"material": 3
|
|
125
|
+
},
|
|
126
|
+
"pipe_5": {
|
|
127
|
+
"type": "Pipes",
|
|
128
|
+
"in": "after_valve_2",
|
|
129
|
+
"out": "after_pipe_5",
|
|
130
|
+
"delta_p": 1000.0,
|
|
131
|
+
"diameter": 0.08,
|
|
132
|
+
"material": 3
|
|
133
|
+
},
|
|
134
|
+
"pump_2": {
|
|
135
|
+
"type": "Pump",
|
|
136
|
+
"in": "after_pipe_5",
|
|
137
|
+
"out": "after_pump_2",
|
|
138
|
+
"delta_p": 600000.0,
|
|
139
|
+
"efficiency": 0.75,
|
|
140
|
+
"material": 3
|
|
141
|
+
},
|
|
142
|
+
"pipe_6": {
|
|
143
|
+
"type": "Pipes",
|
|
144
|
+
"in": "after_pump_2",
|
|
145
|
+
"out": "after_pipe_6",
|
|
146
|
+
"delta_p": 1000.0,
|
|
147
|
+
"diameter": 0.08,
|
|
148
|
+
"material": 3
|
|
149
|
+
},
|
|
150
|
+
"valve_3": {
|
|
151
|
+
"type": "Valve",
|
|
152
|
+
"in": "after_pipe_6",
|
|
153
|
+
"out": "after_valve_3",
|
|
154
|
+
"pressure_ratio": 0.5,
|
|
155
|
+
"material": 3
|
|
156
|
+
},
|
|
157
|
+
"pipe_7": {
|
|
158
|
+
"type": "Pipes",
|
|
159
|
+
"in": "after_valve_3",
|
|
160
|
+
"out": "after_pipe_7",
|
|
161
|
+
"delta_p": 1000.0,
|
|
162
|
+
"diameter": 0.08,
|
|
163
|
+
"material": 3
|
|
164
|
+
},
|
|
165
|
+
"valve_4": {
|
|
166
|
+
"type": "Valve",
|
|
167
|
+
"in": "after_pipe_7",
|
|
168
|
+
"out": "after_valve_4",
|
|
169
|
+
"pressure_ratio": 0.5,
|
|
170
|
+
"material": 3
|
|
171
|
+
},
|
|
172
|
+
"pipe_8": {
|
|
173
|
+
"type": "Pipes",
|
|
174
|
+
"in": "after_valve_4",
|
|
175
|
+
"out": "after_pipe_8",
|
|
176
|
+
"delta_p": 1000.0,
|
|
177
|
+
"diameter": 0.08,
|
|
178
|
+
"material": 3
|
|
179
|
+
},
|
|
180
|
+
"valve_5": {
|
|
181
|
+
"type": "Valve",
|
|
182
|
+
"in": ["after_pipe_8","after_pipe_2a"],
|
|
183
|
+
"out": "after_valve_5",
|
|
184
|
+
"pressure_ratio": 0.5,
|
|
185
|
+
"material": 3
|
|
186
|
+
},
|
|
187
|
+
"pipe_9": {
|
|
188
|
+
"type": "Pipes",
|
|
189
|
+
"in": "after_valve_5",
|
|
190
|
+
"out": "after_pipe_9",
|
|
191
|
+
"delta_p": 1000.0,
|
|
192
|
+
"diameter": 0.025,
|
|
193
|
+
"material": 3
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
},
|
|
197
|
+
"simulation": {
|
|
198
|
+
"mode":"dynamic",
|
|
199
|
+
"t_final": 20,
|
|
200
|
+
"t_step": 1
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "processforge"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.14"
|
|
8
8
|
description = "A Python-based process simulation framework for chemical engineering applications."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "BSD-3-Clause"
|
|
@@ -154,20 +154,54 @@ class FestimBuildHelpers:
|
|
|
154
154
|
provider), which is what lets tests substitute a ``fake_festim``.
|
|
155
155
|
"""
|
|
156
156
|
|
|
157
|
+
# Optional FESTIM material properties read from ``extra``. FESTIM accepts
|
|
158
|
+
# ``None`` for all of these *except* ``solubility_law`` (its setter raises on
|
|
159
|
+
# ``None``), so that one needs a real default. Every field missing from
|
|
160
|
+
# ``extra`` is logged as a WARNING so users know a default was applied.
|
|
161
|
+
_MATERIAL_FIELD_DEFAULTS = {
|
|
162
|
+
"solubility_law": "none",
|
|
163
|
+
"K_S_0": None,
|
|
164
|
+
"E_K_S": None,
|
|
165
|
+
"thermal_conductivity": None,
|
|
166
|
+
"density": None,
|
|
167
|
+
"heat_capacity": None,
|
|
168
|
+
}
|
|
169
|
+
|
|
157
170
|
@staticmethod
|
|
158
171
|
def build_material(festim, mat_name: str, mat_def: "MaterialDef"):
|
|
159
172
|
"""Construct a ``festim.Material`` from a flowsheet ``MaterialDef``."""
|
|
160
173
|
extra = mat_def.extra or {}
|
|
174
|
+
for field, default in FestimBuildHelpers._MATERIAL_FIELD_DEFAULTS.items():
|
|
175
|
+
if field not in extra:
|
|
176
|
+
logger.warning(
|
|
177
|
+
f"FestimProvider: material '{mat_name}' is missing "
|
|
178
|
+
f"'extra.{field}'; defaulting to {default!r}."
|
|
179
|
+
)
|
|
161
180
|
return festim.Material(
|
|
162
181
|
D_0=extra["D_0"],
|
|
163
182
|
E_D=extra["E_D"],
|
|
164
|
-
K_S_0=extra.get(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
183
|
+
K_S_0=extra.get(
|
|
184
|
+
"K_S_0", FestimBuildHelpers._MATERIAL_FIELD_DEFAULTS["K_S_0"]
|
|
185
|
+
),
|
|
186
|
+
E_K_S=extra.get(
|
|
187
|
+
"E_K_S", FestimBuildHelpers._MATERIAL_FIELD_DEFAULTS["E_K_S"]
|
|
188
|
+
),
|
|
189
|
+
thermal_conductivity=extra.get(
|
|
190
|
+
"thermal_conductivity",
|
|
191
|
+
FestimBuildHelpers._MATERIAL_FIELD_DEFAULTS["thermal_conductivity"],
|
|
192
|
+
),
|
|
193
|
+
density=extra.get(
|
|
194
|
+
"density", FestimBuildHelpers._MATERIAL_FIELD_DEFAULTS["density"]
|
|
195
|
+
),
|
|
196
|
+
heat_capacity=extra.get(
|
|
197
|
+
"heat_capacity",
|
|
198
|
+
FestimBuildHelpers._MATERIAL_FIELD_DEFAULTS["heat_capacity"],
|
|
199
|
+
),
|
|
169
200
|
name=mat_name,
|
|
170
|
-
solubility_law=extra.get(
|
|
201
|
+
solubility_law=extra.get(
|
|
202
|
+
"solubility_law",
|
|
203
|
+
FestimBuildHelpers._MATERIAL_FIELD_DEFAULTS["solubility_law"],
|
|
204
|
+
),
|
|
171
205
|
)
|
|
172
206
|
|
|
173
207
|
@staticmethod
|
|
@@ -235,7 +269,7 @@ class FestimBuildHelpers:
|
|
|
235
269
|
|
|
236
270
|
@staticmethod
|
|
237
271
|
def build_reactions(festim, model: FestimModel, all_map: dict, volume_map: dict):
|
|
238
|
-
"""Construct ``festim.
|
|
272
|
+
"""Construct ``festim.Reaction`` objects."""
|
|
239
273
|
reactions = []
|
|
240
274
|
for r in model.reactions:
|
|
241
275
|
reactant = [all_map[name] for name in r.reactant]
|
|
@@ -251,7 +285,7 @@ class FestimBuildHelpers:
|
|
|
251
285
|
p_0=r.p_0,
|
|
252
286
|
E_p=r.E_p,
|
|
253
287
|
)
|
|
254
|
-
reactions.append(festim.
|
|
288
|
+
reactions.append(festim.Reaction(**kwargs))
|
|
255
289
|
return reactions
|
|
256
290
|
|
|
257
291
|
@staticmethod
|
|
@@ -5,7 +5,7 @@ and the runtime ``FestimProvider``. They mirror the constructor signatures of
|
|
|
5
5
|
the FESTIM 2.0 API (see ``flowsheets/festim/FESTIM-main/src/festim``)::
|
|
6
6
|
|
|
7
7
|
Mesh1D, Material, Species, ImplicitSpecies, VolumeSubdomain1D,
|
|
8
|
-
SurfaceSubdomain1D,
|
|
8
|
+
SurfaceSubdomain1D, Reaction, ParticleSource,
|
|
9
9
|
FixedConcentrationBC, ParticleFluxBC, SievertsBC, HenrysBC,
|
|
10
10
|
Settings, Stepsize, SurfaceFlux, TotalVolume, Profile1DExport
|
|
11
11
|
|
|
@@ -4,6 +4,8 @@ README.md
|
|
|
4
4
|
pyproject.toml
|
|
5
5
|
flowsheets/closed-loop-chain.json
|
|
6
6
|
flowsheets/hydraulic-chain.json
|
|
7
|
+
flowsheets/custom/simple_hyrdaulic_scheme.json
|
|
8
|
+
flowsheets/custom/crimson/MUWS_HB.json
|
|
7
9
|
flowsheets/festim/hydrogen_transport_1d.json
|
|
8
10
|
flowsheets/festim/tds_tungsten.json
|
|
9
11
|
flowsheets/openmc/msre_eigenvalue.json
|
|
@@ -52,12 +52,15 @@ class _FakeMaterial:
|
|
|
52
52
|
density=None,
|
|
53
53
|
heat_capacity=None,
|
|
54
54
|
name=None,
|
|
55
|
-
solubility_law=
|
|
55
|
+
solubility_law="none",
|
|
56
56
|
):
|
|
57
57
|
self.D_0 = D_0
|
|
58
58
|
self.E_D = E_D
|
|
59
59
|
self.K_S_0 = K_S_0
|
|
60
60
|
self.E_K_S = E_K_S
|
|
61
|
+
self.thermal_conductivity = thermal_conductivity
|
|
62
|
+
self.density = density
|
|
63
|
+
self.heat_capacity = heat_capacity
|
|
61
64
|
self.name = name
|
|
62
65
|
self.solubility_law = solubility_law
|
|
63
66
|
|
|
@@ -91,7 +94,7 @@ class _FakeSurfaceSubdomain1D:
|
|
|
91
94
|
self.x = x
|
|
92
95
|
|
|
93
96
|
|
|
94
|
-
class
|
|
97
|
+
class _FakeReaction:
|
|
95
98
|
def __init__(self, reactant, k_0, E_k, volume, product=None, p_0=None, E_p=None):
|
|
96
99
|
self.reactant = reactant
|
|
97
100
|
self.k_0 = k_0
|
|
@@ -251,7 +254,7 @@ def make_fake_festim() -> types.ModuleType:
|
|
|
251
254
|
mod.ImplicitSpecies = _FakeImplicitSpecies
|
|
252
255
|
mod.VolumeSubdomain1D = _FakeVolumeSubdomain1D
|
|
253
256
|
mod.SurfaceSubdomain1D = _FakeSurfaceSubdomain1D
|
|
254
|
-
mod.
|
|
257
|
+
mod.Reaction = _FakeReaction
|
|
255
258
|
mod.ParticleSource = _FakeParticleSource
|
|
256
259
|
mod.InitialConcentration = _FakeInitialConcentration
|
|
257
260
|
mod.FixedConcentrationBC = _FakeFixedConcentrationBC
|
|
@@ -354,6 +357,69 @@ class TestFestimMaterialValidation:
|
|
|
354
357
|
errors = FestimProvider.validate_material("steel", mat_def, unit_cfg)
|
|
355
358
|
assert errors == []
|
|
356
359
|
|
|
360
|
+
def test_build_material_without_solubility_law(self, fake_festim):
|
|
361
|
+
from processforge.providers.festim_provider import FestimBuildHelpers
|
|
362
|
+
|
|
363
|
+
mat = FestimBuildHelpers.build_material(
|
|
364
|
+
fake_festim,
|
|
365
|
+
"tungsten",
|
|
366
|
+
MaterialDef(id=1, extra={"D_0": 4.1e-7, "E_D": 0.39}),
|
|
367
|
+
)
|
|
368
|
+
assert mat.D_0 == 4.1e-7
|
|
369
|
+
assert mat.E_D == 0.39
|
|
370
|
+
# No solubility_law key was passed, so FESTIM applies its own NONE default
|
|
371
|
+
# (the fake defaults to "none" and rejects None).
|
|
372
|
+
assert mat.solubility_law == "none"
|
|
373
|
+
|
|
374
|
+
def test_build_material_passes_solubility_law(self, fake_festim):
|
|
375
|
+
from processforge.providers.festim_provider import FestimBuildHelpers
|
|
376
|
+
|
|
377
|
+
mat = FestimBuildHelpers.build_material(
|
|
378
|
+
fake_festim,
|
|
379
|
+
"tungsten",
|
|
380
|
+
MaterialDef(
|
|
381
|
+
id=1, extra={"D_0": 4.1e-7, "E_D": 0.39, "solubility_law": "sievert"}
|
|
382
|
+
),
|
|
383
|
+
)
|
|
384
|
+
assert mat.solubility_law == "sievert"
|
|
385
|
+
|
|
386
|
+
def test_build_material_warns_on_missing_optional_fields(self, fake_festim):
|
|
387
|
+
from loguru import logger
|
|
388
|
+
|
|
389
|
+
from processforge.providers.festim_provider import FestimBuildHelpers
|
|
390
|
+
|
|
391
|
+
captured = []
|
|
392
|
+
hid = logger.add(lambda m: captured.append(m), level="WARNING")
|
|
393
|
+
try:
|
|
394
|
+
mat = FestimBuildHelpers.build_material(
|
|
395
|
+
fake_festim,
|
|
396
|
+
"tungsten",
|
|
397
|
+
MaterialDef(id=1, extra={"D_0": 4.1e-7, "E_D": 0.39}),
|
|
398
|
+
)
|
|
399
|
+
finally:
|
|
400
|
+
logger.remove(hid)
|
|
401
|
+
|
|
402
|
+
# Defaults applied for every missing optional field.
|
|
403
|
+
assert mat.solubility_law == "none"
|
|
404
|
+
assert mat.K_S_0 is None
|
|
405
|
+
assert mat.E_K_S is None
|
|
406
|
+
assert mat.thermal_conductivity is None
|
|
407
|
+
assert mat.density is None
|
|
408
|
+
assert mat.heat_capacity is None
|
|
409
|
+
|
|
410
|
+
# A WARNING was emitted for each missing optional field.
|
|
411
|
+
for field in (
|
|
412
|
+
"solubility_law",
|
|
413
|
+
"K_S_0",
|
|
414
|
+
"E_K_S",
|
|
415
|
+
"thermal_conductivity",
|
|
416
|
+
"density",
|
|
417
|
+
"heat_capacity",
|
|
418
|
+
):
|
|
419
|
+
assert any(
|
|
420
|
+
f"extra.{field}" in m and "defaulting to" in m for m in captured
|
|
421
|
+
), f"expected warning for missing {field}; got: {captured}"
|
|
422
|
+
|
|
357
423
|
def test_missing_D_0(self):
|
|
358
424
|
from processforge.providers.festim_provider import FestimProvider
|
|
359
425
|
from processforge.types import UnitConfig
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/base_jacobian_mixin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/jacobian_contributor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{processforge-0.3.12 → processforge-0.3.14}/src/processforge/providers/reference_state_registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|