# Towards Semi-Automatic Generation of a Steady State Digital Twin of a Brownfield Process Plant
## 4 Case Study
Step 5 of the methodology in Section 3.1 involves a modeler making manual finalizations to the model in Figure 14 according to expert modelling knowledge that could not be captured as generally valid rules, such as the ones in Table 1. In the selected simulation tool, i.e., Balas(r), there are two different kind of calculation modules available for simulating a normal tank. The more complicated calculation module can be used to simulate a storage tank with several inflows and outflows, an overflow, and a makeup stream. This calculation module is used for simulating buffer tanks. During the simulated steady state, this buffer tank constantly provides a fixed outflow requested by the receiving module located after the buffer tank. If the required amount of flow is not available, the buffer tank provides the missing part through the makeup stream (port #2). The makeup stream may be connected to another tank or e.g., to the freshwater system. If the inflows of the buffer  
Figure 10: Graph representation of the information extracted from the digitalized P&ID. Figure 9: P&ID of the case process. tank exceed the required outflow, the surplus is led to the overflow stream (port #1) which may be connected to another tank or alternatively to the drain. In the case example, the buffer tanks \"B400\" and \"B100\" are simulated using this calculation module. The case process is initially filled up with fresh tap water through the makeup stream (\"Makeup1\") of the makeup tank \"B400\". Also, if there are any leaks in the system, the makeup flow to cover the leaks is taken from the tap water line (\"Water in\"). The valve \"FCV102\" is the receiving module that requests a specific flow from the tank \"B100\". If the inflow to the tank \"B100\" from the tank \"B300\" through the valve \"PCV501\" is not sufficient, the tank \"B100\" requests makeup from the makeup tank \"B400\", and not from the fresh water system (\"Makeup source 2\"), as simulated in Figure 7:0 This change of the makeup stream source was done manually based on the expertise of the modeler. Figure 7:1 The result of processing the graph in Figure 10 with the algorithm in Figure 7:2 All binary valves are removed. Figure 7:3 The result of processing the graph in Figure 11 with the algorithm in Figure 7:4 The tank with an internal heater is presented by adding the heater to the outgoing flow of the tank. \begin{table}
\begin{tabular}{c c} \hline \hline
**NodeName** & **Symbol** \\ \hline B-400 & MDTank\#1 \\ Source1 & Terminal in \\ B-100 & MDTank\#1 \\ Source2 & Terminal in \\ B-300 & MDTank\#1 \\ Source3 & Terminal in \\ B-200 & MDTank\#1 \\ Source4 & Terminal in \\ P-200 & Pump \\ P-100 & Pump \\ H4 & Valve \\ ES-E100 & Heater/cooler\#1 \\ N15 & Splitter \\ N26 & Splitter \\ N27 & Valve \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Components (i.e., symbol in Balas®) of the steady state model  
Figure 13: Visualization of the Balas® model specified in Tables 2 and 3. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Source** & **SourcePort** & **Target** & **TargetPort** \\ \hline Source1 & 1 & B-400 & 2 \\ B-400 & 1 & drain & 0 \\ Source2 & 1 & B-100 & 2 \\ B-100 & 1 & drain & 0 \\ Source3 & 1 & B-300 & 2 \\ B-300 & 1 & drain & 0 \\ Source4 & 1 & B-200 & 2 \\ B-200 & 1 & drain & 0 \\ B-200 & 3 & P-200 & 1 \\ B-400 & 3 & B-100 & 3 \\ I4 & 2 & B-100 & 4 \\ N15 & 1 & I4 & 1 \\ B-300 & 3 & N15 & 3 \\ N15 & 2 & B-200 & 4 \\ P-100 & 2 & N27 & 1 \\ N27 & 2 & N26 & 3 \\ N26 & 1 & B-200 & 5 \\ N26 & 2 & B-400 & 4 \\ ES-E100 & 2 & P-100 & 1 \\ P-200 & 2 & B-300 & 4 \\ B-100 & 5 & ES-E100 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Flows of the steady state model. The strings in ‘Source’ and ‘Target’ columns refer to symbol names in the ‘NodeName’ column of Table 2.  
The simplified calculation module can be used to simulate a storage tank with several inflows and one outflow. The module mixes the inflows together and provides one outflow.