Paper—Usage of A Virtual Environment to Improve the Teaching of Fluid Mechanics Usage of A Virtual Environment to Improve the Teaching of Fluid Mechanics

In many fields of study, physical sub-areas are treated mathematically in order to teach students the tools for optimization in their professional lives. This often means that the understanding of the physical interrelationships is left out in the cold. Practical experiments are often unsuitable for clarification, since important quantities in the mathematical formulation cannot be made visible in experiments (or only with extreme effort). Numerical calculations may show these quantities, but students cannot carry them out for themselves. For this purpose, the software Unreal engine 4 is used to create a virtual environment for fluid mechanics and compared with other methods to improve the teaching of the fundamentals of fluid mechanics. The virtual environment enables the students to influence the flow in order to experience and examine the basic physical effects. The results were used and evaluated in exercises and tutorials associated to the fluid mechanics’ course. Benefits for the use of virtual reality (VR) in teaching were ascertained. Keywords—Visualization techniques, virtual reality, virtual laboratory, fluid mechanics, fictitious domain, immersive learning


Introduction
Many influences of fluid mechanics are found in daily life like a flying bird or a curled shot of a football. Students in many engineering fields have to learn the basics of physics of flowing media. Nevertheless, fluid mechanics is a quite complicated field of physics; therefore, it is also related to applied mathematics. For engineers, physical laws are treated mathematically in order to allow calculations for optimizations. For an uncomplicated explanation of the physical background, schematic representations are used in textbooks or classic blackboard lectures. However, these depictions have the disadvantage of projecting reality onto a surface. The transition from three-dimensional to two-dimensional visualization inevitably increases the information density. This also inevitably reduces the accessibility and clarity of the problem considered. In addition, visualization of temporal changes is hardly feasible. Figure 1 reveals the complexity of the depictions for the simple case of a flow around a moving cylinder from a typical textbook for engineers [1].
Ideally, at the beginning of their studies in fluid mechanics, students should get basic ideas about the behavior of flows. Thus, the mathematical treatment of flows in teaching does not fail due to representation-related physical imagination difficulties. Experiments and numerical simulations are suitable for this purpose. The advantages and disadvantages are discussed in the following.

Experiments in teaching fluid dynamics
Experiments to visualize flows require extensive equipment such as a perfused object (see figure 2 a), a pump, a flow medium and a method to visualize the flow. Without complex measuring equipment, only simple results such as visualization of the flowing fluid are obtained. For better visualization, tracers can be added to liquids, usually aluminum tinsel or shell limestone [2]. However, the tracer particles hide each other, so it is only possible to gain information on the movement of the visible particles on the utmost surface of the tracer layer. The movement of the tracers gives an impression of the streamlines and thus of the current flow direction. However, an inexperienced observer, like the students at the beginning of their studies, can hardly recognize the real flow behavior. Therefore, the physical causes of the flow behavior remain unknown. Figure 2 b) shows the flow of water through a sectorial jump. The water is tagged with a rheoscopic liquid for visualization.
Gas flows would be more suitable for visualization of fluid mechanics. In principle, a person could enter a large wind tunnel and make the flows visible with a smoke probe. Here it yields, however, that not the intuitive streamlines but instead the streaklines are made visible, which do not show the present flow behavior but the past of the flow [3]. This makes interpretation of the shown flow even more difficult. In addition, few universities even have a large wind tunnel; in the existing smaller wind tunnels, the experimentally accessible area is restricted by viewing windows. A special difficulty is the teaching of the different types of visualization. Experiments carried out by the students themselves with a simultaneous presentation of all types of visualization would be desirable, as this would enable them to recognize differences and check their own understanding. Unfortunately, the different types of visualization require different experimental parameters regarding the number of particles, their distribution and injection into the flow area and the exposure time, which excludes a simultaneous presentation.
With a simple experimental visualization of the flow, approximate quantitative values of the velocities and the qualitative three-dimensional spatial behavior of the flow are not identifiable. For the understanding of fluid physics, scalar fields such as pressure, density, temperature or shear and thus influences of friction or the rotation of the velocity field can only be determined punctually with great effort from experienced experimenters. A practical course in a conventional laboratory is therefore not suitable for teaching students these basics of fluid physics.
Without a deeper understanding of fluid physics and measurement systems, students can only carry out experiments for flow visualization on the utmost surface by themselves, but cannot interpret these results. One possibility would be fulltime supervised practical courses, where many important physical quantities could not be measured either. As a supplement to lectures or exercises, typically more than 200 students would have to carry out such a laboratory experiment within a week, which is logistically impossible during the lecture period.

Numerical simulations in teaching fluid dynamics
Some disadvantages of the laboratory experiments carried out in reality for beginning students of fluid mechanics can be avoided. In order to make all physical quantities visible in the entire flow area, the flow fields are calculated numerically with CFD (computational fluid dynamics). The results of such CFD simulations are used in lectures and exercises at many universities in order to clarify experimentally inaccessible issues and flow patterns. Usually a teacher carries out the calculations, shows the results in the lecture or exercise, or makes the results digitally available as an educational film. The shown data and the shown perspective of the flow are unchangeable. Thus, the students can only consume without intervening in the film. This passivity in complex situations often causes boredom and thus reduces learning success. Unfortunately, it is hardly possible for students to perform the simulations independently. In addition, the numerical solution of fluid-mechanical problems provides a further explanation on a mathematical-physical level. According to [4], the numerical calculation of flows is organized in five steps, each of which can be extremely challenging for a student studying the fundamentals of fluid mechanics: 1. Defining the flow domain by creating a three-dimensional geometry, for which CAD programs are often used. 2. Partitioning of the flow domain into computational cells, in which the conservation equations for mass and momentum are solved. Here, previous knowledge of physics is necessary to perform the balancing act between computability and computing time using a meshing software. 3. Specification of the properties of the fluid, the flow, the boundary and initial conditions suitable for the flow and geometry and the properties of the solution algorithm using a pre-processing tool. 4. Numerical simulation of the created system of equations. 5. Evaluation of the results in a post-processing software.
According to [5] this is followed by the most difficult step: The critical interpretation of the results obtained. Therefore, according to [4], numerical CFD calculations are difficult to perform for inexperienced users. For students, who are just learning the physical basics, these calculations do not seem to be feasible, also because there is not enough time to get familiar with the different software packages. Therefore, numerical fluid mechanics is only taught in advanced courses.
A providing of ready-to-use solutions of a CFD simulation would only help to a limited extent, since students would have to acquire the skills to control the corresponding software for the postprocessing and could hardly interpret the results on their own. Explanations and comments cannot be integrated a priori into ready-to-use results and would then have to be provided again in a presentation or a video.

Project objective
Students should be able to independently explore some of the basics of fluid physics in a simple way using their own speed and own devices. Learning at your own speed in iJOE -Vol. 16, No. 14, 2020 virtual experiments has a statistical advantage in teaching, as [6] shows using applets in different areas of natural science.
In order to illustrate the fluid physics as clearly as possible, experimentally inaccessible flow parameters should also be presented. A virtual, fluid-mechanical world will be created in which free movement is possible and the flows can be manipulated. The flow can thus be viewed from different angles and the field information of different scalar quantities can be displayed. This replaces the passivity of educational film consumption with active action.
Previous concepts in VR in engineering partly use Quest3D [7] or the Unity engine to create three-dimensional worlds, such as an educational game in chemical engineering for plant construction [8] or in traffic engineering [9], [10]. There, students were asked to do multiple-choice tests before and after playing, with no feedback on the accuracy of their answers. A positive learning effect was confirmed, as the average score of the students improved by about 10 %. Also, the use of a virtual construction site shows an improvement in learning results [11]. In the field of fluid mechanics [12] developed a Geogebra-based digital learning aid for simple two-dimensional geometries, which also has a positive influence on the learning effect of the students. The authors of [13] develop a three-dimensional environment in which dike construction is treated under fluid mechanical aspects. According to our knowledge, a VR environment for fluid mechanics as a virtual laboratory does not yet exist in teaching.

Realization of the Virtual Environment
The flow through a sectorial jump is discussed as an example for a virtual laboratory in a virtual practical course. The commercial software Unreal Engine 4 is used for creating the virtual environment. This software is suitable due to its fast and high-resolution graphic rendering, which is why many current computer games (Unreal Tournament, Fortnite, Mass Effect, ...) have been developed with this engine and use a similar game control, which is thereby already known to many students. A further advantage of the engine is the cost policy of the manufacturer, since the software engine is free for teaching purposes. A large helpful community, the creation of .exe-files and thus stand-alone programs for the operating systems Windows and OS are further benefits.
For the virtual environment, the geometric structure of the laboratory with walls, floors, ceilings, components of the experiment are built in Unreal in the form of static solids and special attributes are assigned to the solids. Global conditions such as illumination and gravity etc., the positioning of the vector fields and particle emitters are carried out, like the game itself, from the first-person perspective. The influence on this basic structure in the game, such as changing the transparency of objects, parameter changes of the flow or teleportation of objects, is carried out via the programming language C++, for which a graphical programming interface is available in the form of socalled blueprints. These visualize the information flow. Figure 3 shows an example of the code for switching the transparency of the viewed geometries: Operators and actuators (boxes) are dragged into the interface and are wired (lines) according to the desired flow of information. This procedure corresponds to programming in LabVIEW, which is already familiar to many engineers. This makes it possible to learn sufficient programming skills faster than by directly using C++, which lowers the barrier and eases the development of possibilities to influence the virtual environment while using it.
The use of typical commercial virtual reality headsets such as Oculus Rift can be integrated easily into the standalone programs. With the limited distribution of these systems to date, the focus in the current state of development is on a run-through, manipulable 3D world. Controlling movement in the virtual laboratory is done using the keyboard for the running direction and the mouse for changing the viewing direction. This game control is well known by many students and already lowers the barrier to use the virtual laboratory. Additionally, a completely unrestricted movement of the user is guaranteed by a flight mode. In order to set up a virtual flow laboratory, the flow variables to be displayed must first be calculated. The commercial CFD-software Ansys CFX is used for this purpose. The three-dimensional flow of incompressible liquids through different geometries like a sectorial jump are calculated. The values of the flow quantities for pressure and the three components of the velocity vector are exported. This data is then imported into the Unreal Engine. A clear, ordered allocation of the flow variables to the location in a cuboid area must be available in the Unreal Engine. Therefore, the flow in a cuboid area must already be carried out in the flow simulation. This is made possible by the use of the fictitious domain of [14], where non-flow areas are approximated by a barely permeable porous medium. Due to this, values for the flow quantities are directly available at locations where no fluid is present but nevertheless needed in Unreal Engine. Parts of the virtual world that have already been created are covered below.

Influence of inertia and friction in a typical geometry
The entire perfused geometry is visible as a closed solid, as shown in figure 4 a). The pipe walls can be switched to a highly transparent material. This visualizes the flow and the pipe geometry at the same time. In order to show the influence of inertia effects streamlines and particles cf. figure 4 b) can be displayed. Velocity fields on a plane, which gets positioned by the player cf. figure 4 c), can also be displayed. A greater influence of the inertia results from pressure gradients for the flow, which can be set in steps. In the present state of development, further influences such as a variation of the properties of the flowing medium (e.g. density) are not yet implemented. Fig. 4. Flow through a pipe with a sectorial jump in virtual reality; a) geometry of the solid pipe b) streamlines and particles inside the pipe c) velocity field and streamlines inside the pipe.

Methods of flow visualization
The impact of the use of VR on teaching is also investigated for flow visualization. Many students have difficulties to differentiate between the three main visualization methods (pathline, streamline and streakline), because differences are only visible for in stationary flows. This is hardly presentable in a book and also difficult to understand in a video, as a student cannot interact and change any configuration to check his understanding. To overcome these limitations, a cross-shaped flow domain with four openings is developed, as shown in figure 5. At any time, the user can close each opening or set it to flow in or out. This results in 81 possible combinations of flow fields, which can be reduced to one static flow field and 9 elementary flow fields, from which all others can be obtained by rotation and mirroring. The user can insert particles individually (pathline, pink to white in figure 5) or permanently at one spatial point (streakline, green), as well as viewing the corresponding velocity and pressure fields with the streamlines (black). The simultaneous display of flowing particles (red dots) supports the understanding of the correlation between the particle movements and the visualization forms. A change of the openings affects the lines differently and thereby reveals the differences between the three methods of visualization. The possibility of performing an arbitrary number of different experiments allows the student to test and rethink their acquired understanding until there are no more discrepancies between the visualization forms displayed and their understanding.

Derivation of conservation laws
Another example that already has been implemented is the derivation of conservation laws on a differential volume element. This method is widely used in the engineering sciences, such as technical mechanics or heat and mass transfer. The difficulty here can be attributed to the complete lack of visualization of up to 36 forces acting on a cube, which are partly shown in figure 6 a) and the balancing of forces in different spatial directions, which often obscure themselves in printed illustrations. This problem can be circumvented in ready-made videos but the lack of possibilities to exert influence reduces the opportunities to check the understanding. In the VR environment, the derivation appears systematically with a clear color assignment between the description and the volume element. Not only the position of the user but also the position of the volume element can then be altered in a "real" flow. Numerical values for all acting forces are displayed together with the balancing equation, which shows a direct benefit and the direct applicability of such a differential approach.

Results
In this section, the creation of the virtual environment and its use in teaching are evaluated.

Comparison of methods to support teaching
After the creation of virtual environments to improve the teaching of the fundamentals of fluid mechanics, a comparison with the creation of other teaching methods can be made. These are depicted in table 1 where differences between experiments, CFD in student use and CFD for the creation of explanatory videos are shown. Before the creation of the virtual environment, the authors already had designed several experiments and produced videos from CFD simulations. The estimation of the independent use of CFD by students results from known introductory periods in supervised bachelor theses using CFD simulations.
In order to gain an understanding of the fluid physics, the visualization or determination of different quantities is essential. In experiments, these are not only limited by the experimental setup but also by the partly non-existent accessibility regarding measurement technology. In CFD simulations all computable variables can be represented, whereas in videos or the VR environment only the implemented variables are available.
When creating experiments and CFD simulations, physics cannot be circumvented and only available measurement technology can be used, which limits the freedom of creation with these methods. In videos and the VR environment, physical principles such as cause and effect can be bypassed and even theoretical constructs can be created.
During operational use, experiments must be maintained and students have to be given extensive support during the experiment. A much greater effort would be the supervision of students who would carry out CFD simulations without any previous knowledge, since the simultaneous supervision of several theses involving CFD simulations is already time consuming. A lower effort is necessary for videos and created VR environments, because necessary explanations and instructions can be easily integrated, which allows autonomous interpretations of the students without supervision during the use.
However, a major drawback is the effort required to create a VR environment, since training in the software and the creation of the VR environment is necessary in addition to the CFD simulations, which provide the basic data. The pure effort to create the environment without the conception and numerical simulations was about 200 h for the first created, pipe with the sectorial jump, about 135 h for the then created environment for flow visualization and about 100 h for the creation of the thread of stream of Bernoulli environment. A learning curve is thus clearly visible and not yet completed. However, the additional effort compared to experiments is relativized because experiments have to be supervised. With typically 40 groups per semester and an average of 2 h experimental time, after two years a similar amount of time is required for real experiments and the additional effort for setting up experiments in a virtual environment. The time needed to design an experiment is not taken into account, as usually the existing experiments are used and would have been replaced by a virtual environment.
Students have little effort in watching the explanatory videos and, due to the familiar controls, in exploring the VR environment. For the independent execution of simple visualization experiments only a small effort is required, whereas the effort for the independent execution of CFD simulations would be extremely high. The possibility for students to intervene in the flow themselves is limited in experiments by the given experimental setup, safety regulations and physics. If the students carry out CFD simulations themselves, they could in principle also change the experimental setup, but the physical limitation would remain. In VR, comparable to an existing experimental setup, only implemented possibilities of influence can be used by the students, but physical limits can be circumvented by programming and thus physically inaccessible constructions, such as differential volume elements in a flow, can be investigated and manipulated. The greater possibilities in a virtual environment stand in contrast to the disadvantage of the greater production effort. In the long run, however, the total effort is lower than for experiments due to the lack of supervision, especially when new experiments are designed.
The following results for the use of the virtual environments are obtained by interviewing the students in the exercise using the online survey tool arsnova.eu and in the tutorial using a tally sheet.

Influence of inertia and friction in a typical geometry
The influence of frictional forces and inertial forces on a flow was explained to the students in the exercise in a conventional way (showing results of numerical simulations with an explanation by the author).
This was to be further detailed in the tutorial. Each tutorial consists of groups of about 20 students with two student teachers. The students had to describe the influences of inertia and friction forces at different inflow velocities and transfer the behavior to further relations of friction forces to inertia forces. Thereby the VR environment was used.
The query in the self-assessment at the end of the tutorials (number of students N = 76) is shown in figure 7 in percentage. While 70 % see a very good or good benefit in the use of VR, approx. 30 % only see a small benefit. No student thought that the use of VR was harmful for his or her understanding. Less than 5 % hardly saw any gain in understanding by the use of VR. The colors are the results for a specific tutorial group. The results for group 8 (grey) might be less representative: students did not have enough laptops and the tutors used a projector (as in the exercise) to explain the physics. Therefore, the results might even be better as depicted.

Methods of flow visualization
Here the difference of the visualization methods pathline, streamline and streakline were addressed, which usually cause severe difficulties for the students to comprehend. The first aim is to compare the use of VR technology with conventional teaching in the exercise. Conventional teaching has been continuously improved since 2006 by using videos, presentations and analogies from e.g. football and nature. Figure 8 shows the result of a self-assessment of competence regarding these visualization methods as blue bars for conventional teaching (N = 95).
About 50 % estimate their competence level such that they can explain at least one visualization form, 50 % have understood at least one visualization form according to their own statements.
After the use of VR in the exercise, where the students had to answer questions about the course of the three visualization forms using an online tool (arsnova.eu) for a given change in flow. There was a clear learning effect, which is shown using orange bars in figure 8 (N = 54). Almost 70 % now attribute an explanatory competence to themselves, 30 % think they have understood at least one form of visualization. The shifting of the distributions within the competence levels is obvious: 90 % of the students who dare to explain have achieved this for all three visualization forms. Nearly 90 % of the students who do not have the confidence to explain, claim to have understood all three forms of visualization. After the assignment in the tutorial (N = 76), a further shift towards a higher level of competence can be seen in figure 9. Almost 99% are confident of making a correct explanation. The reduction of 61% from before to 30% for the explanation of three forms of visualization can possibly be explained with different students in tutorial and exercise or with slightly different formulations of questions. In the exercise, the competence for a "roughly" explanation was asked, in the tutorial, the competence for an explanation was asked.

Derivation of conservation laws
The derivation of a differential volume element for a thread of the current was already carried out in the lecture. In the exercise, this was summarized briefly. The theoretical construct was illustrated by the streamlines of a vortex flow. Their abstraction to the thread of stream of Bernoulli was presented directly in front of the students. Subsequently, the balancing of the force components in and across the flow direction was carried out, whereby the students were able to recognize the differences noticeably faster through the simultaneous display of the two balances in the three-dimensional representation. A query shows (N = 58) that nearly all students (96%) see a good or very good benefit in the use of VR for the derivations (figure 10).

Summary and Outlook
In this project, a virtual environment was created in which flows can be influenced by individual actions of the player. Thus, not only the movement of particles in a flow, but also the velocity fields, pressure fields and visualization forms such as streamlines, streak lines and path lines can be displayed. Different influence possibilities were created: The flow can be influenced by a variation of the pressure gradient and by choosing the functionality of a section between wall, inlet, and outlet. The differential balancing of the forces can be carried out at any point of the flow. Finally, the use of virtual environments preserves the advantages of independently performed CFD simulations and greatly reduces the effort required by the students. In addition, the virtual environment can be used to program arbitrary influencing possibilities for the students Although the fluid mechanical environment is still under construction and thus not free of errors, the surveys of the students indicate a positive effect of VR on the increase in learning and an increase in interest on the topic. Using the environment in the exercise leads to a significant increase in the learning effect, which is further enhanced, if the students use the environment by themselves in the tutorials. In further progress of the project, a feedback effect of the flow on the students will be implemented. This is to be achieved by forced movements, whereby characteristic features of special flows can be experienced directly. These include the displacement effect of a boundary-layer flow or differences between a rigid body vortex (rotational) and a potential vortex (irrotational). The implementation of different basic flows (continuous expansion, constriction, elbow, valve ...) with the possibility to influence material properties of the flowing medium should lead to a virtual practical course, which simplifies the access to fluid mechanics. The influence of using VR in exercises and tutorials on the exam is ought to be examined.