# tehseen-khan/simula architecture

> Architecture diagram of the GitHub repository tehseen-khan/simula, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tehseen-khan/simula
- Repository: https://github.com/tehseen-khan/simula

## Overview

DWSIM is a chemical-process simulator: users construct a flowsheet, configure process and reaction models, run steady-state or dynamic simulations, and inspect or optimize results. The tree shows desktop entry points and editors, an automation API, storage and cloud services, plus plotting and numerical libraries. The excerpts establish several editor-to-model interactions, but do not expose the central solver or full flowsheet lifecycle; those connections are therefore not inferred. Unexcerpted capabilities are represented only where the tree supports their paths.

Main entry points: [`DWSIM.UI.Desktop.Editors/Charts/ChartManager.cs`](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/Charts/ChartManager.cs) (Chart manager), [`DWSIM.UI.Desktop.Forms/Forms/Flowsheet/Flowsheet.eto.cs`](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Forms/Forms/Flowsheet/Flowsheet.eto.cs) (Flowsheet editor), [`DWSIM.UI.Desktop.Editors/Reactions/ReactionsManager.cs`](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/Reactions/ReactionsManager.cs) (Reaction manager), [`DWSIM.UI.Desktop.Editors/LogicalBlocks/ControllerPanel.cs`](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/LogicalBlocks/ControllerPanel.cs) (Controller panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop experience"]
  node_desktop["Desktop application<br/>[Program.cs]"]
  node_flowsheetui["Flowsheet editor<br/>[Flowsheet.eto.cs]"]
  node_charts["Chart manager<br/>[ChartManager.cs]"]
  node_plotrender["Plot renderer<br/>[OxyPlot.cs]"]
end

subgraph group_model["Process modeling"]
  node_reactionui["Reaction manager"]
  node_materialui["Material stream editor<br/>[MaterialStream.cs]"]
  node_unitui["Unit operation editors<br/>[General.cs]"]
  node_thermo["Property packages"]
end

subgraph group_compute["Simulation tools"]
  node_dynamics["Dynamics manager"]
  node_controller["Controller panel<br/>[ControllerPanel.cs]"]
  node_scripts["Script manager<br/>[ScriptManager.cs]"]
  node_optimization["Flowsheet analysis<br/>[FlowsheetAnalysis]"]
  node_solver["Flowsheet solver<br/>[Flowsheet2.cs]"]
end

subgraph group_platform["Integration and storage"]
  node_automation["Automation API<br/>[Automation.cs]"]
  node_filedb[("File database")]
  node_cloudauth["Cloud authentication<br/>[AuthService.cs]"]
  node_cloudfiles["Cloud file upload"]
end

node_user(("Process engineer"))

node_user -->|"uses"| node_desktop
node_scripts -->|"runs script"| node_solver
node_reactionui -.->|"updates reactions"| node_flowsheetui
node_charts -.->|"reads chart data"| node_flowsheetui
node_charts -.->|"renders plots"| node_plotrender
node_controller -.->|"runs controller tuning"| node_optimization

click node_desktop "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop/Program.cs"
click node_flowsheetui "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Forms/Forms/Flowsheet/Flowsheet.eto.cs"
click node_reactionui "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/Reactions/ReactionsManager.cs"
click node_materialui "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/MaterialStream/MaterialStream.cs"
click node_unitui "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/UnitOperations/General.cs"
click node_thermo "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Thermodynamics.ThermoC/ThermoCPropertyPackage.cs"
click node_automation "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Automation/Automation.cs"
click node_dynamics "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/Dynamics/DynamicsManagerControl.cs"
click node_controller "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/LogicalBlocks/ControllerPanel.cs"
click node_scripts "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/ScriptManager/ScriptManager.cs"
click node_charts "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/Charts/ChartManager.cs"
click node_optimization "https://github.com/tehseen-khan/simula/tree/windows/DWSIM.UI.Desktop.Editors/FlowsheetAnalysis"
click node_filedb "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.FileStorage/FileDatabaseProvider.cs"
click node_cloudauth "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Simulate365/Services/AuthService.cs"
click node_cloudfiles "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Simulate365/Services/FileUploaderService.cs"
click node_plotrender "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.DrawingTools.SkiaSharp.Extended/Renderers/OxyPlot.cs"
click node_solver "https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Automation/Flowsheet2.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop,node_flowsheetui,node_charts,node_plotrender toneBlue
class node_reactionui,node_materialui,node_unitui,node_thermo toneAmber
class node_dynamics,node_controller,node_scripts,node_optimization,node_solver toneMint
class node_automation,node_filedb,node_cloudauth,node_cloudfiles toneRose
class node_user toneIndigo
```

## Components

### Desktop experience

- [Desktop application](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop/Program.cs): `DWSIM.UI.Desktop/Program.cs`
- [Flowsheet editor](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Forms/Forms/Flowsheet/Flowsheet.eto.cs): `DWSIM.UI.Desktop.Forms/Forms/Flowsheet/Flowsheet.eto.cs`
- [Chart manager](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/Charts/ChartManager.cs): `DWSIM.UI.Desktop.Editors/Charts/ChartManager.cs`
- [Plot renderer](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.DrawingTools.SkiaSharp.Extended/Renderers/OxyPlot.cs): `DWSIM.DrawingTools.SkiaSharp.Extended/Renderers/OxyPlot.cs`

### Process modeling

- [Reaction manager](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/Reactions/ReactionsManager.cs): `DWSIM.UI.Desktop.Editors/Reactions/ReactionsManager.cs`
- [Material stream editor](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/MaterialStream/MaterialStream.cs): `DWSIM.UI.Desktop.Editors/MaterialStream/MaterialStream.cs`
- [Unit operation editors](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/UnitOperations/General.cs): `DWSIM.UI.Desktop.Editors/UnitOperations/General.cs`
- [Property packages](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Thermodynamics.ThermoC/ThermoCPropertyPackage.cs): `DWSIM.Thermodynamics.ThermoC/ThermoCPropertyPackage.cs`

### Simulation tools

- [Dynamics manager](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/Dynamics/DynamicsManagerControl.cs): `DWSIM.UI.Desktop.Editors/Dynamics/DynamicsManagerControl.cs`
- [Controller panel](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/LogicalBlocks/ControllerPanel.cs): `DWSIM.UI.Desktop.Editors/LogicalBlocks/ControllerPanel.cs`
- [Script manager](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.UI.Desktop.Editors/ScriptManager/ScriptManager.cs): `DWSIM.UI.Desktop.Editors/ScriptManager/ScriptManager.cs`
- [Flowsheet analysis](https://github.com/tehseen-khan/simula/tree/windows/DWSIM.UI.Desktop.Editors/FlowsheetAnalysis): `DWSIM.UI.Desktop.Editors/FlowsheetAnalysis`
- [Flowsheet solver](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Automation/Flowsheet2.cs): `DWSIM.Automation/Flowsheet2.cs`

### Integration and storage

- [Automation API](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Automation/Automation.cs): `DWSIM.Automation/Automation.cs`
- [File database](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.FileStorage/FileDatabaseProvider.cs): `DWSIM.FileStorage/FileDatabaseProvider.cs`
- [Cloud authentication](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Simulate365/Services/AuthService.cs): `DWSIM.Simulate365/Services/AuthService.cs`
- [Cloud file upload](https://github.com/tehseen-khan/simula/blob/windows/DWSIM.Simulate365/Services/FileUploaderService.cs): `DWSIM.Simulate365/Services/FileUploaderService.cs`

### Other components

- **Process engineer**

## Connections

- Process engineer → Desktop application: uses
- Script manager → Flowsheet solver: runs script (evidence: `DWSIM.UI.Desktop.Editors/ScriptManager/ScriptManager.cs`)
- Reaction manager → Flowsheet editor: updates reactions
- Chart manager → Flowsheet editor: reads chart data
- Chart manager → Plot renderer: renders plots
- Controller panel → Flowsheet analysis: runs controller tuning (evidence: `DWSIM.UI.Desktop.Editors/LogicalBlocks/ControllerPanel.cs`)
