-
Notifications
You must be signed in to change notification settings - Fork 36
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Developing processes in neqsim in python and java should be as simple as possible and prevent bugs in setting up models.
Describe the solution you'd like
In the process system class of neqsim :
https://github.com/equinor/neqsim/blob/master/src/main/java/neqsim/process/processmodel/ProcessSystem.java
I want to add a way to do something like this:
SystemInterface fluid1 = new SystemSrkEos();
fluid1.addComponent("methane", 1.0);
ProcessSystem process1 = new ProcessSystem();
Stream stream1 = process1.addUnit("stream_1", "Stream");
stream1.setFluid(fluid1);
stream1.setTemperature(20.0, "C");
stream1.setFlowRate(100.0, "kg/hr");
stream1.setPressure(30.0, "bara");
ThrottlingValve valve1 = process1.addUnit("Valve 1", "ThrottlingValve");
valve1.setInletStream(stream1);
valve1.setOutletPressure(10.0, "bara");
process1 .run()
process1.validateConnections();
process1.checkMassBalance();
and
`valve_1 = `process1.addUnit("Valve 1", neqsim.process.equipment.EquipmentEnum.Valve)
Were neqsim.process.equipment.EquipmentEnum.Valve can be a enum type or a factory for equipment.
All equipment defined in neqsim should be able to be made (eg. streams, compressors, pumps. etx.). The equipment classes are defined under:
https://github.com/equinor/neqsim/tree/master/src/main/java/neqsim/process/equipment
✨ Improvements in ProcessSystem
New flexible addUnit methods in ProcessSystem:
- Units can now be added by either providing a custom name or letting NeqSim generate a default name automatically.
- Overloaded methods accept both
Stringequipment type names and a newEquipmentEnumfor type-safe equipment selection.
Automatic and standardized naming:
- If a user does not provide a unit name, the system generates a lowercase-first, type-based unique name like
stream_1,throttlingValve_1,separator_1. - This ensures all unit names are consistent, readable, and unique inside each
ProcessSystem.
Automatic stream connection:
- When adding a new unit, NeqSim now automatically connects the previous unit's outlet stream to the new unit’s inlet stream if possible.
- This reduces manual setup work, makes scripting faster, and simplifies the creation of long process chains.
Support for structured process descriptions:
- With these changes, it is now easier to build processes dynamically from YAML or JSON files.
- This paves the way for LLM-based process generation and automatic setup from high-level user descriptions.
Support for diagram generation:
- Process flows can be easily exported to Graphviz DOT or Mermaid.js formats to create clean flow diagrams for documentation, visualization, or educational use.
📋 Summary of Improvements
| Improvement | Description | Status |
|---|---|---|
Flexible addUnit methods |
Add units by name or auto-generate names | ✅ |
EquipmentEnum support |
Type-safe equipment selection | ✅ |
| Automatic unit naming | Lowercase-first, unique naming (stream_1, throttlingValve_1, etc.) |
✅ |
| Automatic stream connection | Auto-connect outlet to next inlet | ✅ |
| Structured process description support | YAML/JSON-based dynamic process creation | ✅ |
| Process flow diagram export | Generate Graphviz DOT or Mermaid.js diagrams | ✅ |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request