How nukleon84/pyflowsheet works
Pyflowsheet is a Python toolkit for constructing and rendering process-flow diagrams from code. The main workflow is to create a flowsheet, add unit operations and annotations, connect ports with streams, route those streams automatically or manually, then draw through a rendering context. The graph preserves the documented unit-operation, vessel-internals, and annotation capabilities. Relationships among unsampled specialized operations are shown as capability branches; detailed rendering and routing internals are represented only where supported by excerpts or README statements.
Main entry points: unitoperation.py Unit operations · flowsheet.py Flowsheet · svgcontext.py SVG context · stream.py Stream
Components 18
Diagram model
- Flowsheet
pyflowsheet/core/flowsheet.py - Unit operations
pyflowsheet/core/unitoperation.py - Ports
pyflowsheet/core/port.py - Enums and alignment
pyflowsheet/core/enums.py
Process equipment
- Basic process units
pyflowsheet/unitoperations - Vessel
pyflowsheet/unitoperations/vessel.py - Distillation column
pyflowsheet/unitoperations/distillation.py - Heat exchangers
pyflowsheet/unitoperations/heatexchanger.py - Plate exchanger
pyflowsheet/unitoperations/platehex.py - Vessel internals
pyflowsheet/internals
Streams and routing
- Stream
pyflowsheet/core/stream.py - Pathfinder
pyflowsheet/core/pathfinder.py
Rendering and annotations
- SVG context
pyflowsheet/backends/svgcontext.py - Bitmap context
pyflowsheet/backends/bitmapcontext.py - Text annotations
pyflowsheet/annotations/textelement.py - Figure annotation
pyflowsheet/annotations/figure.py - Table annotation
pyflowsheet/annotations/table.py
Other components
- Process engineer
Connections 25
- Process engineer → Flowsheet: constructs
- Process engineer → Basic process units: adds equipment
- Process engineer → Stream: connects ports
- Flowsheet → Stream: creates streams
pyflowsheet/core/flowsheet.py - Flowsheet → Unit operations: draws units
pyflowsheet/core/flowsheet.py - Flowsheet → Text annotations: draws annotations
pyflowsheet/core/flowsheet.py - Stream → Pathfinder: routes automatically
pyflowsheet/core/stream.py - Stream → Ports: reads endpoints
pyflowsheet/core/stream.py - Unit operations → Vessel internals: draws internals
pyflowsheet/core/unitoperation.py - Vessel → Vessel internals: accepts internals
- Distillation column → Vessel internals: accepts internals
pyflowsheet/unitoperations/distillation.py - Basic process units → Unit operations: extends base
pyflowsheet/unitoperations/blackbox.py - Vessel → Unit operations: extends base
pyflowsheet/unitoperations/vessel.py - Distillation column → Unit operations: extends base
pyflowsheet/unitoperations/distillation.py - Heat exchangers → Unit operations: extends base
pyflowsheet/unitoperations/heatexchanger.py - Plate exchanger → Unit operations: extends base
pyflowsheet/unitoperations/platehex.py - Vessel → Ports: defines ports
pyflowsheet/unitoperations/vessel.py - Distillation column → Ports: defines ports
pyflowsheet/unitoperations/distillation.py - Plate exchanger → Ports: defines ports
pyflowsheet/unitoperations/platehex.py - Plate exchanger → Enums and alignment: uses flow pattern
pyflowsheet/unitoperations/platehex.py - Flowsheet → SVG context: draws through context
- Flowsheet → Bitmap context: draws through context
- SVG context → Text annotations: renders text
- SVG context → Figure annotation: renders figure
- SVG context → Table annotation: renders table