processforge 0.2.34__tar.gz → 0.2.38__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.
Potentially problematic release.
This version of processforge might be problematic. Click here for more details.
- {processforge-0.2.34 → processforge-0.2.38}/PKG-INFO +36 -18
- processforge-0.2.38/README.md +82 -0
- {processforge-0.2.34 → processforge-0.2.38}/pyproject.toml +1 -3
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge.egg-info/PKG-INFO +36 -18
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge.egg-info/SOURCES.txt +0 -1
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge.egg-info/requires.txt +0 -2
- processforge-0.2.34/README.md +0 -62
- processforge-0.2.34/flowsheets/custom/simple_hyrdaulic_scheme.json +0 -202
- {processforge-0.2.34 → processforge-0.2.38}/LICENSE +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/MANIFEST.in +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/flowsheets/closed-loop-chain.json +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/flowsheets/festim/hydrogen_transport_1d.json +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/flowsheets/hydraulic-chain.json +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/flowsheets/openmc/msre_eigenvalue.json +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/setup.cfg +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/__main__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/_schema.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/analysis/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/analysis/dof.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/compose.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/backends/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/backends/base.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/backends/casadi_backend.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/backends/pyomo_backend.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/backends/scipy_backend.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/flowsheet.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/jacobian.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/mixin.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/solver.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/stream_var.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/units/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/units/flash_eo.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/units/heater_eo.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/units/pipes_eo.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/units/pump_eo.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/units/strainer_eo.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/eo/units/valve_eo.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/flowsheet.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/fmu/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/fmu/_fmi_vars.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/fmu/builder.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/fmu/slave_template.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/lock.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/modelica/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/modelica/mo_writer.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/modelica/omc_runner.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/modelica/transpiler.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/modelica/unit_equations.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/pcl/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/pcl/compiler.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/pcl/namespace.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/provenance.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/base.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/base_jacobian_mixin.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/cantera_jacobian.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/cantera_provider.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/coolprop_provider.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/festim_provider.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/jacobian_contributor.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/manager.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/modelica_jacobian.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/modelica_provider.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/openmc_provider.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/reference_state_registry.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/providers/registry.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/result.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/schemas/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/schemas/flowsheet_schema.json +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/schemas/openmc/openmc_model.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/simulate.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/solver.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/state.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/thermo.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/types.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/cstr.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/flash.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/heater.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/pfr.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/pipes.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/provider_mixin.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/pump.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/registry.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/solver.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/solver_unit.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/strainer.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/tank.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/units/valve.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/utils/__init__.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/utils/flowsheet_diagram.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/utils/mermaid_diagram.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/utils/topology.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/utils/unit_consistency.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/utils/validate_flowsheet.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge/utils/validation.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge.egg-info/dependency_links.txt +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge.egg-info/entry_points.txt +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/src/processforge.egg-info/top_level.txt +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/tests/test_festim_provider.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/tests/test_init.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/tests/test_providers.py +0 -0
- {processforge-0.2.34 → processforge-0.2.38}/tests/test_state.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: processforge
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.38
|
|
4
4
|
Summary: A Python-based process simulation framework for chemical engineering applications.
|
|
5
5
|
Author-email: Processforge Team <team@processforge.dev>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -29,8 +29,6 @@ Requires-Dist: graphviz>=0.20
|
|
|
29
29
|
Requires-Dist: pandas>=2.2
|
|
30
30
|
Requires-Dist: zarr>=3.0
|
|
31
31
|
Requires-Dist: coolprop>=7.2.0
|
|
32
|
-
Requires-Dist: pi>=0.1.2
|
|
33
|
-
Requires-Dist: pip>=26.1.2
|
|
34
32
|
Provides-Extra: eo
|
|
35
33
|
Requires-Dist: pyomo>=6.7; extra == "eo"
|
|
36
34
|
Provides-Extra: eo-casadi
|
|
@@ -66,38 +64,58 @@ A lightweight Python framework for process simulation, coupling hydraulic, therm
|
|
|
66
64
|
|
|
67
65
|
## Install
|
|
68
66
|
|
|
67
|
+
Install the `pf` command-line tool with [uv](https://docs.astral.sh/uv/):
|
|
68
|
+
|
|
69
69
|
```bash
|
|
70
|
-
uv
|
|
70
|
+
uv tool install processforge
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
For CoolProp-backed units:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
uv
|
|
76
|
+
uv tool install "processforge[coolprop]"
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
Optional solver backends:
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
uv
|
|
83
|
-
uv
|
|
84
|
-
uv
|
|
82
|
+
uv tool install "processforge[eo]"
|
|
83
|
+
uv tool install "processforge[eo-casadi]"
|
|
84
|
+
uv tool install "processforge[modelica]"
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
## Quick start
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
1. **Install the tool**
|
|
90
90
|
|
|
91
|
-
```bash
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
pf apply flowsheets/hydraulic-chain.json
|
|
95
|
-
```
|
|
96
|
-
For flowsheets with Tank units, use `run` to solve with the SM solver. For direct run mode (for dynamic flowsheets with Tank units), use `run`:
|
|
91
|
+
```bash
|
|
92
|
+
uv tool install processforge
|
|
93
|
+
```
|
|
97
94
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
```
|
|
95
|
+
2. **Download an example flowsheet**
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
curl -O https://raw.githubusercontent.com/urjanova/processforge/master/flowsheets/hydraulic-chain.json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
3. **Initialize, plan, and apply**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pf init
|
|
105
|
+
pf plan hydraulic-chain.json
|
|
106
|
+
pf apply hydraulic-chain.json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`plan` validates the flowsheet (schema, DOF, units) without running the solver; `apply` solves it and stores a snapshot.
|
|
110
|
+
|
|
111
|
+
4. **Look at the output**
|
|
112
|
+
|
|
113
|
+
`pf apply` writes results under `outputs/`:
|
|
114
|
+
- `*_results.zarr` — simulation results store
|
|
115
|
+
- `*_validation.xlsx` — validation report
|
|
116
|
+
- `*.pfstate/` — versioned snapshot store with a `latest` pointer
|
|
117
|
+
|
|
118
|
+
For flowsheets with Tank units (dynamic), use `pf run` instead of `pf apply` to solve with the SM solver.
|
|
101
119
|
|
|
102
120
|
## Python API
|
|
103
121
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Processforge
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
A lightweight Python framework for process simulation, coupling hydraulic, thermal, and reactor workflows.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Install the `pf` command-line tool with [uv](https://docs.astral.sh/uv/):
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv tool install processforge
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For CoolProp-backed units:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
uv tool install "processforge[coolprop]"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Optional solver backends:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uv tool install "processforge[eo]"
|
|
25
|
+
uv tool install "processforge[eo-casadi]"
|
|
26
|
+
uv tool install "processforge[modelica]"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Quick start
|
|
30
|
+
|
|
31
|
+
1. **Install the tool**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uv tool install processforge
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2. **Download an example flowsheet**
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
curl -O https://raw.githubusercontent.com/urjanova/processforge/master/flowsheets/hydraulic-chain.json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. **Initialize, plan, and apply**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pf init
|
|
47
|
+
pf plan hydraulic-chain.json
|
|
48
|
+
pf apply hydraulic-chain.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`plan` validates the flowsheet (schema, DOF, units) without running the solver; `apply` solves it and stores a snapshot.
|
|
52
|
+
|
|
53
|
+
4. **Look at the output**
|
|
54
|
+
|
|
55
|
+
`pf apply` writes results under `outputs/`:
|
|
56
|
+
- `*_results.zarr` — simulation results store
|
|
57
|
+
- `*_validation.xlsx` — validation report
|
|
58
|
+
- `*.pfstate/` — versioned snapshot store with a `latest` pointer
|
|
59
|
+
|
|
60
|
+
For flowsheets with Tank units (dynamic), use `pf run` instead of `pf apply` to solve with the SM solver.
|
|
61
|
+
|
|
62
|
+
## Python API
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from processforge import EOFlowsheet, validate_flowsheet
|
|
66
|
+
config = validate_flowsheet("flowsheets/hydraulic-chain.json")
|
|
67
|
+
fs = EOFlowsheet(config, backend="scipy")
|
|
68
|
+
results = fs.run()
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Usage and Docker
|
|
72
|
+
Processforge is also available as Docker images, and can be run in the cloud. See the [usage guide](docs/usage.md) for CLI commands, workflows, Docker, and cloud notes.
|
|
73
|
+
|
|
74
|
+
## Flowsheets
|
|
75
|
+
The core of Processforge is the flowsheet JSON format, which defines materials, units, and recycle rules. See below for more information on the formats and example flowsheets.
|
|
76
|
+
- [docs/flowsheets.md](docs/flowsheets.md) : flowsheet JSON format, materials, units, and recycle rules
|
|
77
|
+
- [flowsheets/](flowsheets/) : example flowsheets shipped with the repo
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
BSD 3-Clause License
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "processforge"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.38"
|
|
8
8
|
description = "A Python-based process simulation framework for chemical engineering applications."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "BSD-3-Clause"
|
|
@@ -35,8 +35,6 @@ dependencies = [
|
|
|
35
35
|
"pandas>=2.2",
|
|
36
36
|
"zarr>=3.0",
|
|
37
37
|
"coolprop>=7.2.0",
|
|
38
|
-
"pi>=0.1.2",
|
|
39
|
-
"pip>=26.1.2",
|
|
40
38
|
]
|
|
41
39
|
|
|
42
40
|
[project.optional-dependencies]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: processforge
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.38
|
|
4
4
|
Summary: A Python-based process simulation framework for chemical engineering applications.
|
|
5
5
|
Author-email: Processforge Team <team@processforge.dev>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -29,8 +29,6 @@ Requires-Dist: graphviz>=0.20
|
|
|
29
29
|
Requires-Dist: pandas>=2.2
|
|
30
30
|
Requires-Dist: zarr>=3.0
|
|
31
31
|
Requires-Dist: coolprop>=7.2.0
|
|
32
|
-
Requires-Dist: pi>=0.1.2
|
|
33
|
-
Requires-Dist: pip>=26.1.2
|
|
34
32
|
Provides-Extra: eo
|
|
35
33
|
Requires-Dist: pyomo>=6.7; extra == "eo"
|
|
36
34
|
Provides-Extra: eo-casadi
|
|
@@ -66,38 +64,58 @@ A lightweight Python framework for process simulation, coupling hydraulic, therm
|
|
|
66
64
|
|
|
67
65
|
## Install
|
|
68
66
|
|
|
67
|
+
Install the `pf` command-line tool with [uv](https://docs.astral.sh/uv/):
|
|
68
|
+
|
|
69
69
|
```bash
|
|
70
|
-
uv
|
|
70
|
+
uv tool install processforge
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
For CoolProp-backed units:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
uv
|
|
76
|
+
uv tool install "processforge[coolprop]"
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
Optional solver backends:
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
uv
|
|
83
|
-
uv
|
|
84
|
-
uv
|
|
82
|
+
uv tool install "processforge[eo]"
|
|
83
|
+
uv tool install "processforge[eo-casadi]"
|
|
84
|
+
uv tool install "processforge[modelica]"
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
## Quick start
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
1. **Install the tool**
|
|
90
90
|
|
|
91
|
-
```bash
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
pf apply flowsheets/hydraulic-chain.json
|
|
95
|
-
```
|
|
96
|
-
For flowsheets with Tank units, use `run` to solve with the SM solver. For direct run mode (for dynamic flowsheets with Tank units), use `run`:
|
|
91
|
+
```bash
|
|
92
|
+
uv tool install processforge
|
|
93
|
+
```
|
|
97
94
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
```
|
|
95
|
+
2. **Download an example flowsheet**
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
curl -O https://raw.githubusercontent.com/urjanova/processforge/master/flowsheets/hydraulic-chain.json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
3. **Initialize, plan, and apply**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pf init
|
|
105
|
+
pf plan hydraulic-chain.json
|
|
106
|
+
pf apply hydraulic-chain.json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`plan` validates the flowsheet (schema, DOF, units) without running the solver; `apply` solves it and stores a snapshot.
|
|
110
|
+
|
|
111
|
+
4. **Look at the output**
|
|
112
|
+
|
|
113
|
+
`pf apply` writes results under `outputs/`:
|
|
114
|
+
- `*_results.zarr` — simulation results store
|
|
115
|
+
- `*_validation.xlsx` — validation report
|
|
116
|
+
- `*.pfstate/` — versioned snapshot store with a `latest` pointer
|
|
117
|
+
|
|
118
|
+
For flowsheets with Tank units (dynamic), use `pf run` instead of `pf apply` to solve with the SM solver.
|
|
101
119
|
|
|
102
120
|
## Python API
|
|
103
121
|
|
processforge-0.2.34/README.md
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# Processforge
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
A lightweight Python framework for process simulation, coupling hydraulic, thermal, and reactor workflows.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
uv add processforge
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For CoolProp-backed units:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
uv add "processforge[coolprop]"
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Optional solver backends:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
uv add "processforge[eo]"
|
|
23
|
-
uv add "processforge[eo-casadi]"
|
|
24
|
-
uv add "processforge[modelica]"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Quick start
|
|
28
|
-
|
|
29
|
-
Use `plan` to validate and preview changes, then `apply` to solve and store a snapshot. For flowsheets without Tank units, use `apply` to solve with the EO solver.
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
pf init
|
|
33
|
-
pf plan flowsheets/hydraulic-chain.json
|
|
34
|
-
pf apply flowsheets/hydraulic-chain.json
|
|
35
|
-
```
|
|
36
|
-
For flowsheets with Tank units, use `run` to solve with the SM solver. For direct run mode (for dynamic flowsheets with Tank units), use `run`:
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
pf run flowsheets/hydraulic-chain.json
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Python API
|
|
43
|
-
|
|
44
|
-
```python
|
|
45
|
-
from processforge import EOFlowsheet, validate_flowsheet
|
|
46
|
-
config = validate_flowsheet("flowsheets/hydraulic-chain.json")
|
|
47
|
-
fs = EOFlowsheet(config, backend="scipy")
|
|
48
|
-
results = fs.run()
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Usage and Docker
|
|
52
|
-
Processforge is also available as Docker images, and can be run in the cloud. See the [usage guide](docs/usage.md) for CLI commands, workflows, Docker, and cloud notes.
|
|
53
|
-
|
|
54
|
-
## Flowsheets
|
|
55
|
-
The core of Processforge is the flowsheet JSON format, which defines materials, units, and recycle rules. See below for more information on the formats and example flowsheets.
|
|
56
|
-
- [docs/flowsheets.md](docs/flowsheets.md) : flowsheet JSON format, materials, units, and recycle rules
|
|
57
|
-
- [flowsheets/](flowsheets/) : example flowsheets shipped with the repo
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## License
|
|
61
|
-
|
|
62
|
-
BSD 3-Clause License
|
|
@@ -1,202 +0,0 @@
|
|
|
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
|
-
"deltaP": 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
|
-
"deltaP": 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
|
-
"deltaP": 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
|
-
}
|
|
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.2.34 → processforge-0.2.38}/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.2.34 → processforge-0.2.38}/src/processforge/providers/jacobian_contributor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{processforge-0.2.34 → processforge-0.2.38}/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
|