Keywords

1 Introduction

Virtual reality (VR) mimics the real environment through an advanced human-computer interface, which enables users of interactive software and hardware to be translated into an imaginary place simulating their physical presence. Researchers used the term VR first in the 1960s, discussing the employment of aiding tools, such as Head Mounted Display (HMD) and special glasses, improving the interactive VR experience [13].

Although there are more and more applications of VR in several contexts, its use in education and training as well as in other sectors different from the video game industry represent a challenge [10, 29]. Among such contexts there are medical education field [15, 25], in which a virtual simulation of surgical operations can improve the skills of medical students without risk to patients; for mesh painting combined with human computer interaction [2]; in the computer science field, for the software system and complex data structure comprehension [3, 4, 8]; for the learning of the combined arms and to train soldiers to shoot [17]; in the flight and vehicular simulation application [7] etc. VR has been used also in primary education [27] in which the immersion in 3D environment, the interaction with the 3D objects and the involvement in the virtual world exploration can play an important rule for the education process.

In the educational sector, the VR applications can be divided into two main categories, e.g., non-immersive and immersive [30]. In particular, in the non-immersive category, the user’s visualization is through a “window”, represented by the flat screen of a computer, and through either conventional computer peripheral devices (e.g., mouse or keyboard) or advanced devices similar to the ones used in the real control (e.g., machine operation consoles or vehicle control cockpits). In the immersive category, instead, the user’s interaction occurs through different types of devices, such as the HMD and the CAVE (Cave Automatic Virtual Environment). Both non-immersive and immersive VR can provide learners with a safe and monitored virtual environment, in which to develop their skills without the real-world, sometimes dangerous consequences. These environments present a scientific concept to students in situations that cannot be entirely and perfectly recreated in reality, making studying even more interesting and sometimes producing faster learning results.

In hydraulic engineering education, practical experience in the field is an essential part of the learning where the students can better understand some physical phenomena and improve research methods and analysis techniques explained during the frontal lesson. However, such field activities are not always possible because some university courses have limited duration and are mainly taught in the winter season when the weather conditions impair the regular performance of practical classes. In addition, such activities can involve a large number of students who, when monitored by only one teacher, can get easily distracted and acquire incorrect or inaccurate concepts. Finally, the open-air activities can sometimes be dangerous and thus limit the possibility of integrating traditional classes with field practice. Additional difficulties are due to the use of sophisticated equipment, complex measurement techniques, and lack of territorial knowledge. In order to overcome these issues, and in support of the physical laboratory of the Basilicata University School of Engineering, a virtual reconstruction of a river is proposed for introducing hydraulic engineering students to the measuring methodologies of the fluid discharge in an open channel cross-section.

2 Related Work

In engineering education field, the most common VR application is based on 3D Virtual Laboratories (3D-VLs), which substitute some practical classes and reduce the difficulties related to traditional educational methods, such as the danger of using products or machines, overcrowding, and timetable schedule availability of laboratories. Therefore, 3D-VLs allow students to obtain an experience very close to the real one and, in some cases, results similar to those gained in the real environment, with the opportunity of continuously evaluating the learning process. In fact, students increase their knowledge and skills through the technical practice and improve their comprehension of abstract concepts and complex three-dimensional graphics, as well as production, manufacturing, operative, and assembly processes [9]. A good example of the above-mentioned experiences is a study by Messner et al.  [18], in which the undergraduate students of Architectural Engineering were even able to plan the construction of a nuclear power plant without much knowledge and within a very short time frame (1 h), thanks to a CAVE-like projection system that allowed increasing visualisation capacities, usually restricted in the traditional planning techniques.

In 2008, a virtual learning platform, complementary to a physical one, was developed at the Department of Chemical Engineering of Oregon State University, including an advanced 3D graphical user interface, an instructor Web interface with integrated assessment tools, and a database server [14], aimed at explaining and analysing the chemical vapour deposition.

Villar-Zafra et al.  [32] developed a multiplatform virtual laboratory to easily describe the dynamical behaviour of the magnetic levitation, an interesting process in control engineering which, due to its instability and nonlinearity, could be explained only through analytical modelling. Different experiments were performed and, in all of them, the students could see the levitating ball movements in real time. Abdulwahed and Nagy [1], at Loughborough University, UK, implemented a Process Control Virtual Laboratory (PCVL) based on an Armfield PCT40 tank filling process, which combines the three access modes (Hands-On, Virtual, and Remote) in one unifying software package (the TriLab). In this way, the students were introduced to the principles of control engineering, such as the main components and instruments of a feedback loop, the concept of open-loop control, feedback control, PID (Proportional-Integral- Derivative) control, and PID tuning. Considering the opinion of both students and teachers, Vergara et al.  [31] presented a 3D interactive virtual laboratory including a universal testing machine for enhancing the learning of mechanical characterisation of materials. Dinis et al.  [6] developed an immersive VR prototype interface that allowed students of the Integrated Master’s in Civil Engineering to automatically edit Building Information Modelling (BIM) elements, linking game engine input and BIM authoring software. Despite the increase of VR laboratories in the engineering field, there is still little mention of its employment in the hydraulic engineering educational branch. In fact, most studies have been performed on the process of developing schematic diagram-based 2D virtual hydraulic circuits and 3D virtual hydraulic equipment, mainly aimed at supporting courseware to facilitate the physical experiment teaching practice [11, 33], or on the flood events management through AR-VR applications [21, 22] in support to mobile workforces. None of the mentioned studies focussed on the virtual recreation of a real hydraulic laboratory. Therefore, the present paper proposes a new VR application based on the virtual reconstruction of a natural environment, such as the river, allowing the improvement of engineering students’ performance during hydraulic field practice aimed at the monitoring and control of open channel flows. This new technology application, in support of traditional practical classes, managed to increase the students’ motivation and improve their skills, and simultaneously reduce the costs, time, and potential dangers that continuous physical experiments would involve.

3 Background

The proposed tool was developed through the well known Unity 3D game engine and the head-mounted display (HMD) Oculus Rift. The scene Graph is based on a GameObjects hierarchy. In particular, each GameObject has a spatial position and orientation and can be connected with one or more scripts, sound, textures, animations, 3D models, etc. The available programming languages are C# and JavaScript. In our application we use C#. Unity 3D allows modifying the script’s variable at run-time through its editor user interface allowing to visualize quickly and easily the effect of these changes. In this way, it is possible to modify such values without having to specify them in the code. In order to keep the compatibility with other HMD devices such as HTC Vive, the virtual reality visualization and interaction was developed using the SteamVR SDK version 2.0. In particular, in such SteamVR version was introduced an abstraction layer between Unity 3D and the hardware. The one-to-one hardware mapping of the input system was replaced with an action based system. Such a system is oriented to user actions rather than the buttons to press. SteamVR is able to detect what are the inputs to use for a specific action. The SteamVR actions configuration is browser-based and all changes are stored in several JSON files. SteamVR is used as Unity 3D plugin which contains a set of scripts useful to manage the sensors of the devices.

The VR scene visualization is possible through the Oculus Rift which consists of an OLED panel for each eye with \(1080 \times 1200\) as resolution. Each panel has a refresh rate of 90 Hz and 110\(^{\circ }\) as a field of view which is well adapted to the user’s field of view. Oculus Rift has rotational and positional tracking on 6 degrees of freedom, in order to well manage the tracking of the user through the Oculus’s Constellation tracking system [28]. Constellation is the positional tracking system of the HMD based on infrared tracking sensors. It is possible to configure the real world user space called room scale [26] by using three or more constellation sensors. For our work, we used only two constellation sensors because we obtain a good tracking precision in our context keeping the scene always in front of the user. To interact with the VR scene we use the Oculus Touch motion controller. Each controller is based on 6 degrees of freedom and is associated with a specific user hand. The controllers are tracked through the Constellation system and are shown in the VR scene. Each controller can detect the fingers user gestures during the gaming time. Moreover through the controllers the user can move across the scene for along distances using the analog thumbstick.

Fig. 1.
figure 1

River Flow Instruments. From left to right: the first sensor is called SonTek Flow Tracker which is able to measure the river water speed and depth; graduated rod for depth measurements; meter tape, useful to measure the cross-section; the hammer and pickets useful to mark the river banks and support the cross-section measurement; finally the last instrument is the Current Meter which is able to measure the river water speed.

To simulate the river flow measurements we created the 3D models of the instruments by using Autodesk 3D Studio Max 2019 and Adobe Photoshop CC 2018. In particular, we created a 3D model of SonTek Flow Tracker ultrasound sensor, Current Meter, Meter Tape, Hammer, Pickets and Graduated Rod as shown in Fig. 1. The models were created inspired by the original instruments.

4 Learning River Flow

In general, in the water sector, the quantitative monitoring of rivers is an essential step for environmental purposes both for addressing mid and long-term surveillance and control activities and for civil protection aims in terms of flood forecasting and risk mitigation [19]. In particular, for hydraulic engineering students, the use of such measuring techniques allows them to understand the importance of accurate monitoring activities and the survey modalities of input data for numerical and analytical modelling of fluvial phenomena [12, 20, 24]. VLs improve the students’ operational abilities and the mastering of certain skills, which would normally require numerous field experiments and repetitive training. Therefore, the virtual experiment can be the advance test of the physical experiment, ensuring a higher success rate of future practical operations. Another advantage of VR interaction is that the one-to-one teaching-learning relationship, in which students are the active part, lets them take initiative and manage the practice more autonomously. The evaluation of water discharge is introduced during the course through the use of standard techniques, according to the rules ISO 748/1997Footnote 1 and ISO 1100-2/1998Footnote 2 and through the use of simple (current meters) towards complex (acoustic and laser sensors) equipment. Operatively, computations require dividing the section areas into several verticals and a further subdivision of each vertical into discrete points, in order to evaluate the mean velocity of the flow along each vertical. The number of verticals and the distribution inside the cross section is chosen according to the section width, riverbed geometry, and flow regimes and characteristics, while the measurement points are fixed according to the measurement methodology used, that is, at the ford or from the bridge. The main objective of this measuring technique is to obtain a correct evaluation of the mean velocity for each vertical, which is related to a reliable reconstruction of flow field obtained through velocity point measurements in several marks of open channel cross sections, generally distributed from the bottom up to the free surface flow. Depending on the velocity measure points, the mean velocity and, subsequently, the water discharge are calculated [23].

The tool here developed allows the student to perform the above-mentioned operations in detail, by acting in the safe and monitored recreated virtual environment. In fact, thanks to this VR experience carried out indoors, the students can learn to move around a natural channel, working more safely and reducing risks of accidents. Besides, such virtual laboratory requires relatively small space and, thus, fewer expenses since only a computer, a software, and a VR device are needed, compared to the traditional field experience which includes even transportation costs. Other reduced difficulties are those related to the equipment wear and tear due to the continuous use during experiments. Last but not least, this tool could increase the learners’ interest, by combining education with pleasure and making knowledge fun.

5 The StreamFlowVR Tool

Our proposed VR tool try to replicate the liquid river flow measurements procedures [16] in the open canals. In particular the measurement procedure is based on the international standards ISO 748/1997 (See footnote 1) and ISO 1100-2/1998 (See footnote 2). These standards involves several steps: (i) choice of the measurement zone; (ii) measurement the cross-section; (iii) the choice of measuring verticals; (iv) depth measurement of each individual canal; (v) speed measurement on each vertical.

5.1 Measurement Zone

Although the virtual scene represents a simulated reality, we have tried to respect as much as possible the instructions in the international standards ISO 748/1997 (See footnote 1) and ISO 1100-2/1998 (See footnote 2). In particular, the choice of the measurement zone depends on several factors: one of the most important is the straightness of the canal and the cross-section must be uniform with a slope that is able to minimize irregularities present in water speed distribution. To obtain a realistic measurement developed the landscape through the Unity 3D terrain editor. The editor allows defining the banks of the canal in a stable and well-defined manner so as to ensure a constant condition during the measurements. Figure 2 shows the virtual scene, in particular as explained in the standards, the water movement direction must be orthogonal to the cross-section and the water flow must be regular.

Fig. 2.
figure 2

The virtual scene. The bigger picture represents the section and the arrows show the water movement direction. The bottom left image represents the cross-section and the bottom right image represent a full overview of the scene in isometric visual.

The water was developed through a particular Unity 3D asset called AQUAS which allows creating a very realistic water simulation of the rivers and lakes. AQUAS allows to manage the water movement and its direction and also allows to manage the physical features of water such as small, medium and large waves tiling, speed and refraction. It is possible to change the deep water colour, the shore fade, the shore and depth transparency, the flow speed and direction, etc. The vegetation, trees and grass are developed by using a Unity 3D asset called Vegetation Studio, in particular, the trees are developed by using the speed tree plugin and consist of a set of conifers and broad-leaved trees and the grasses are mainly allium, fern, dune and rustic grass. Vegetation allows to increase the realism of the scene but we have been careful not to add vegetation to the river as explained in the standards. In fact, the cross-section must be entirely visible in width and should not be obstructed by trees, aquatic plants and other obstacles. AQUAS allows to manage the depth of water and ensure that it is sufficient for the immersion of the measuring instruments.

5.2 Measurement the Cross-Section

As suggest from standards, whenever the canal is not very wide, the width can be measured using a metric rope or a graduated wire. Instead, when the canal is very wide, the cross-section has to measured by using optical or electronic distance meters.

Fig. 3.
figure 3

An example of cross-section measurement. On the river banks are placed the pickets and the meter tape define the length of the cross-section.

Our tool allows measuring the river cross-section by focusing on a canal not too wide. As shown in Fig. 3, the user uses two pickets and a hammer to define the measurement area. To accomplish this task, the user grabs a picket with a hand and through the other hand grab the hammer and hit the top of the picket. Such part of the picket is represented through a white cylinder and when it collides with the hammer a trigger is activated. Through this trigger, the picket is translated on its local vertical axis penetrating into the terrain. When the user touches the objects, they are highlighted in yellow colour and when the objects are used in the wrong way, their highlights turn red until they are positioned correctly. As shown in Fig. 4 the user has to place the pickets with the tip toward the terrain. The pickets must be in a vertical position to be correct and the highlight colour will turn green. After the user has stuck the pickets in the terrain on the banks of the river, he can use a graduated rod composed of two interactive elements: ring and the main body. Such elements are connected through a textured cable. On the texture, the centimetres and meters are represented in textual form and in real-world scale. To simulate a real functioning of the meter tape we use a simple cable Unity 3D asset and define a new material and texture for the cable that represents a simple meter. We use a dynamic texture mapping in order to visualize the pieces of texture corresponding to the centimeters displayed on the meter tape, as the cable extends. When the visualized texture is greater then one meter the texture will be repeated one time for each visualized meter.

Fig. 4.
figure 4

The red border image represents the wrong way to place the instrument by the user while the green border image represents the correct way. The yellow border represents the hand over detection on the instrument. (Color figure online)

In this way, the user can read the width of the river cross-section such as if he was really on a river.

5.3 Verticals Measurements

Choice of verticals is made in order to perform depth and speed measurement of the canal. Standards suggests considering the verticals close together, especially for the depth measurement, to define accurately the vertical section profile of the canal. Each vertical was measured considering its horizontal distance respect a fixed reference point placed on a bank of the canal in relation with the cross-section. Typically the distance among the verticals must not be greater than one-twentieth of the width of the section. For canals not too wide, with a regular profile, the number of verticals can be reduced. The virtual reality system allows the user to mark the vertical points by using white spheres. The spheres can be placed along the cross-section following the metric rope using the button of the Oculus Touch controller.

Depth Measurement of Individual Canals. River depth can be measured using several types of instruments, such as a rod, rope probes or other instruments. Generally, the rods were used when the canals are not too deep. Since our approach is based on the teaching of measurement methodology, we considered an ideal scenario in VR as a shallow canal. Our system allows measuring the depth on the verticals by using a graduated rod. In particular, such rod can be immersed in the water by the user along the verticals and the measurements are detected through a well-defined pipeline in the standards.

Fig. 5.
figure 5

Depth of water measurement. The image shows the correct position of the graduated rod for depth measurements. (Color figure online)

When the user grabs the rod, the highlight that wraps it turns red. When the user place in a correct vertical position the rod, its highlight colour turn green as shown in the Fig. 5. By using a Unity 3D script we detect when the rod collides with the terrain by blocking penetration and the depth value can be identified precisely.

Speed Measurement of Verticals. Water speed measurement is typically taken with depth measurement, especially in the unstable river bed. When the two measurements were taken at two different times, the water speed measurements have to be taken by using a sufficient number of verticals, with well defined horizontal distance based on the standards. To take the water speed we developed a 3D model of the Current Meter (see Fig. 1), that is composed of a height adjustable rod and a propeller. The real instrument sends an impulse signal to the console, which is generated from each revolution of the propeller through a permanent magnet. Through the console is possible to set a measurement timer. The console of the current meter shows the number of revolutions per second of the propeller and convert them in the speed measurement through a standard formula: \(v = nk + \varDelta \) where n is the number of revolutions per second and \(k, \varDelta \) are experimental constants based on the diameter and the step of the propeller and the typology of the measurement. This 3D model consists of a hierarchy of meshes and was designed from an original one. In particular, two cylinders are placed one inside the other and the second one can slide inside the first one allowing to stretch the rod to which the sensor is attached. In the 3D model hierarchy, the propeller is a child of the sensor and the propeller can rotate when it touches the water. The measurement starts when the user sets the timer and presses the start button of the console. The console was developed by using a parallelepiped and using a photo of the real console as texture.

Fig. 6.
figure 6

An example of water speed measurement. Placed in the water there is a Current Meter and the user is holding the console with the current timer.

The developed procedure can simulate a real measurement methodology as shown in Fig. 6. The standards defines how to place the instrument during the speed measurement. In particular, the instrument must be placed in a vertical position with the axes parallel to the water movement direction. The instrument must be placed before the measurement and maintained in a vertical position through the rod. To give the user the feeling of accuracy we used a red highlight when the user wrongs the position and green highlight when the user places the instrument in a correct position. Also, in this case, the instrument was brought in a virtual world through a 3D model developed based on the real instrument.

5.4 Ultrasound Sensor

The last developed instrument is an Ultrasound Sensor. Such a sensor is based on a SonTek FlowTracker instrument to detect the speed and the depth of the river water. Through the sensor is possible to detect the water speed while with the graduated rod that represents the principal support of the sensor, is possible to detect the water depth. The real sensor consists of a transmitter and two or three probe receivers in relation to the measurement of 2D or 3D speed components. The sensor measures the water speed through a physical principle called Doppler effect. The transmitter generates a sound pulse with a known frequency, which is propagated through the water perpendicular to the axis of the instrument. The sound pulse is propagated through the measurement volume and is reflected in any direction from the particles contained in the volume itself. Only the sound pulse reflected towards the reception beams is captured by the receivers. The sensor is characterized by a system which performs the signal modulation and converts sound signals into electrical signals. These signals are sent through a high-frequency cable to the console that converts them into digital signals.

Fig. 7.
figure 7

Ultrasound Sensor is placed in the water in the correct position. The user sets the timer and takes the river water speed through the console button. The depth can be seen through the rod of the 3D object. (Color figure online)

Also, in this case, the 3D model is a hierarchical model and consists of a base, two rods, one of which is extendable by the user and a sensor. The sensor is attached to the extendable rod in order to allow the user to change the vertical position of the sensor. From the console, the user chooses the speed measurement and set the timer as can be seen in the Fig. 7. In order to simplify the usability in VR we developed only some function of the real flow tracker. As for the other instruments to detect the correct position we used the green highlight and to detect the wrong position we used the red highlight.

6 Conclusions

We have presented a VR tool useful teaching and learning of the liquid flow measurement based on international standards ISO 748/1997 (See footnote 1) and ISO 1100-2/1998 (See footnote 2). The system was developed using the Unity 3D game engine. This system was thought for hydraulic engineer students, and to validate our proposal the next step of our research will consist of experimentation. Such experimentation involves the students of the hydraulic engineer course of the University of Basilicata, in particular, the students with a theoretical background due to the attendance of the hydraulic classroom lessons. The participants will be divided into two groups. A first group will go on the real river to learn as take a fluvial measurement with a practical approach under the guidance of Professor and using the real measurement instruments. The second group will try on the lab the StreamFlowVR tool to take a fluvial measurement in a simulated river in VR scenario. After the simulated practical lesson also the second group will go on the real river to learn and use the real instrument always under the guidance of Professor. Both groups will report their feelings through a survey and there will be an evaluation of the student’s behaviour on the real river to understand whether an effective improvement in learning the river flow measurements was achieved, thanks to the support of the VR. The final goal of our research is to demonstrate that the use of VR is a valid approach to teaching in the hydraulic context in order to learn and practice the river flow measurements in a safe and risk-free environment. An interesting idea could be to create a serious game that emphasizes the added pedagogical value of fun and competition [5]. In future, this approach can also be used by institutions specializing in river monitoring as a support for the training of their employees.