This simulation uses the Modelica modeling language to model two identical tanks connect together by a pipe. The platform used is OpenModelica and the components are from an ‘under development’ library that aims to be a simpler to use alternative to the modelica fluid library.
The tanks are 25 m high and have a radius of 2 m, the pipe is 5 m long and has a radius of 2.5 cm. The OpenModelica diagram of this system is sown in figure 1 below.
Tank 1 has an initial liquid level of 20 m and Tank 2 has no liquid, a level of 0 m. At t=0 the liquid starts to flow from Tank 1 to Tank 2 through the pipe. The results, presented in the figure 2 below, show that it takes approximately 150 seconds for the tank levels to practically equalise. The level that the tanks equalise to is half the initial height, 10 m, since the tanks are of the same radius or cross sectional area.
One of the benefits of computer based modeling and simulation is that you can run experiments and try different configurations relatively quickly and inexpensively. For example we can see what heights the tanks will equalise at and how long they take to equalise if Tank 2 had a radius that was a half of the radius of Tank 1. These results are presented in figure 2 below and show that the tanks take approximately 80 seconds to equalise at a height of 16 m.
Presented was a relatively simple model to demonstrate the power of modelica and the progress with the custom fluid library. Please leave comments, if there are any, and feel free to contact me if you have any questions or concerns.