Package neqsim.process.processmodel.diagram
package neqsim.process.processmodel.diagram
Professional Process Flow Diagram (PFD) generation for NeqSim.
This package provides a layout intelligence layer for generating oil & gas industry-standard process flow diagrams from NeqSim process simulations.
Key Features
- Industry-standard layout - Left-to-right flow with vertical phase stratification
- Gravity-based positioning - Gas at top, oil in middle, water at bottom
- Phase-aware styling - Streams colored by vapor/liquid fraction
- Equipment semantics - Separator outlets correctly positioned
- DEXPI integration - Import P&ID data and generate diagrams
- Professional appearance - Industry-standard shapes and colors
- Multiple detail levels - MINIMAL, STANDARD, DETAILED, DEBUG
- Deterministic output - Same model always produces same diagram
Quick Start
// Create a process diagram from a ProcessSystem
ProcessDiagramExporter exporter = new ProcessDiagramExporter(processSystem);
// Configure (optional)
exporter.setTitle("Gas Processing Plant").setDetailLevel(DiagramDetailLevel.STANDARD)
.setShowStreamValues(true);
// Export to DOT format (text)
String dot = exporter.toDOT();
// Export to SVG (requires Graphviz installed)
exporter.exportSVG(Path.of("diagram.svg"));
// Export directly from ProcessSystem
String dot = processSystem.toDOT();
DEXPI Integration
// Import DEXPI P&ID and create diagram
ProcessDiagramExporter exporter =
DexpiDiagramBridge.importAndCreateExporter(Paths.get("plant.xml"));
exporter.exportDOT(Paths.get("diagram.dot"));
// Full round-trip: DEXPI to simulate to diagram to DEXPI
DexpiDiagramBridge.roundTrip(Paths.get("input.xml"), Paths.get("diagram.dot"),
Paths.get("output.xml"));
Architecture
ProcessDiagramExporter- Main exporter classPFDLayoutPolicy- Layout intelligence layerEquipmentRole- Equipment role classificationDiagramDetailLevel- Detail level enumerationEquipmentVisualStyle- Visual stylingDexpiDiagramBridge- DEXPI integration bridge
Layout Philosophy
Professional PFDs follow industry conventions:
- Left-to-right flow - Feed streams enter left, products exit right
- Vertical phase zones - Gas top, oil middle, water bottom
- Equipment semantics - Separators have positioned outlets by phase
- Stable layout - Same model produces same diagram every time
- Version:
- 1.0
- Author:
- NeqSim
- See Also:
-
ClassDescriptionBridge between DEXPI XML data exchange and PFD visualization.Defines the level of detail to include in process flow diagrams.Defines the visual style for process flow diagrams.Classifies process equipment by its functional role in the process.Defines visual styling for process equipment in PFD diagrams.Layout intelligence layer for generating professional oil & gas PFDs.Vertical phase zone for gravity-based positioning.Horizontal process position for left-to-right flow convention.Separator outlet type for proper positioning.Stream phase classification based on vapor/liquid fraction.Exports ProcessSystem as professional oil & gas style process flow diagrams.