Fluid transient analysis by the method of characteristics using an object-oriented simulation tool. Issue 6 (5th November 2022) - Pérez, Ramón; Dormido, Sebastián
Abstract: This paper presents the development of an efficient, interactive and fully extendable computer code to analyse hydraulic transients – water hammer – using a generic object-oriented modelling and simulation (OOMS) tool to simplify and shorten the development process. OOMS tools provide continuous simulation features by means of ordinary differential equation (ODE) and differential algebraic equation (DAE) solvers, and discrete simulation features by means of event handling algorithms. Previous OOMS tool applications to simulate fluid flow in pipe networks primarily used semi-discrete methods with continuous solvers. A novel aspect of this work is the application of the method of characteristics (MOC) using the discrete simulation features of the OOMS tool. When compared to a code developed with an OOMS tool using a semi-discrete method and to commercial software that uses the MOC, the new code shows much higher accuracy and performance than the former and is similar to the latter in accuracy and calculation time. It has a graphical user interface, and its modularity makes it easily extendable with new components and algorithms. An academic version is available on github. HIGHLIGHTS: Physical modeling languages (PMLs), such as Modelica and EcosimPro, shorten the development of simulation software. PMLs rely on generic solvers, which are not efficient for specific problems (e.g. hydraulic transients). The purpose of the research is to enable the implementation of ad hoc solvers using PMLs. Results show the feasibility of the new approach and its applicability to hydraulic transients Graphical Abstract