The focus of the paper is on demonstrating how it is possible to automate complex CFD simulations using scripting language around and within the structure of the CFD command files. To illustrate this, the concept of an atmospheric pollution case is used and, more specifically, that of a water treatment plant. The code that is used is CFX-5 with PERL as a scripting ‘language’.
The simulation of the factory atmospheric environment and its fluctuating conditions are fully automated. The simulation is based on a pre-defined generic CFD model, for which initial conditions, boundary conditions and source terms of atmospheric pollutant release are written automatically by the scripts using data recorded by measuring devices and stored on computers every half an hour as the simulation runs. When the correct amount of time has elapsed, the simulation pauses and the script updates the set-up using the newly recorded data. It then proceeds further, restarting from the appropriate result files. At each pause, a HTML report is also produced, which contains pictures of the area and summary tables. If a suitable criterion is defined in the post-treatment algorithm, such as a critical concentration for example, an alarm bell can be started, so that the technician knows the simulation has found a potential problem within the large domain that is thus monitored.
The implications of this work are numerous. Firstly, non-CFD experts can run and use results from a CFD simulation without having to implement the models, run the simulation or fully understand the intricacy of the physics and mathematics that it contains. Going further, it is even possible to parametrize the generic model set-up, e.g. the domain dimensions or the location of emission sources, to make the case more flexible. Running the application remotely is also possible, using a web browser to submit the necessary input to the CFD code. Secondly, a very wide area can be monitored numerically, which would not be commercially viable with physical devices and field monitoring campaigns. Thirdly, such a simulation can be used to learn the general behaviour of, and the potential problems associated with, the region of interest and eventually set up a response plan to any given situation known to cause discomfort or form a health hazard to the neighbourhood. This feedback can be used to improve the operation of the plant and its safety, but also to enhance the model set-up for future simulations.