Paper—Using Virtual Reality for Teaching the Derivation of Conservation Laws in Fluid Mechanics Using Virtual Reality for Teaching the Derivation of Conservation Laws in 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. In the derivation of the fundamental conservation equations theoretical constructs or infinitesimal elements are used, additionally engaging a Taylor expansion of the variables. For undergraduates, this often means that the understanding of the physical interrelationships is left out in the cold. Practical experiments are not possible for clarification, since important quantities in the mathematical formulation can only made visible in experiments with extreme effort or are even inaccessible like theoretical constructs or infinitesimal values. Numerical calculations may be used to show some quantities, but students cannot carry them out for themselves. Therefore, a virtual-reality laboratory for fluid mechanics is created with the software Unreal Engine 4. This enables the students to learn the derivation of conservation laws and to influence the flow in order to experience and examine the basics of theoretical constructs. The results are evaluated in self-assessments, exercises, tutorials associated to the fluid mechanics course, and the results of an exam. Benefits for the use of virtual reality (VR) in teaching conservation laws were ascertained. Keywords—Virtual reality, virtual laboratory, fluid mechanics, fictitious domain, immersive learning


Introduction
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 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. According to [1] engineering students have a limited knowledge of basics in algebra, main mathematical functions, and geometry which results in difficulties in the mathematical thinking processes and mathematical objects. Figure 1 reveals the complexity of the depictions for the case of the derivation of the Navier-Stokes equation, which is one fundamental equation in fluid mechanics. This example is taken from the textbook for engineers [2]. The 6 cubes represent one differential volume element, the authors decided to split it into three directions and into the two types of main-forces friction and inertia. Although the differential volume element is split into 6 sub-elements to improve the clarity, it is probably not intuitively clear to many students which value belongs to which arrow, where the arrows attack geometrically, how the cubes have to be combined or what the cubes and arrows have to do with a real flow.
The derivation of conservation laws on a differential volume element is widely used in physics and the engineering sciences, such as technical mechanics and heat and mass transfer. Especially for engineers, physical laws are treated mathematically in order to allow calculations for optimizations. This usually results in conservation laws being derived from theoretical constructs, the differential volume elements. These are of arbitrary shape and of infinitesimal size and therefore cannot be investigated experimentally. Nevertheless, it would be helpful if the students could directly experiment with the topics covered in the course, which could be done in large-scale engineering courses with virtual experiments [3].
Many students have difficulties in understanding the relationship between the theoretical constructs and reality like real flows when learning the basics. Conservation laws in fluid mechanics usually take a large part in the lecture with the hydrostatic basic equation, the Bernoulli stream filament equation, the Euler equation and the Navier-Stokes equation [4]. Ideally, students should get basic ideas about the behavior of flows and the differential volume elements in the derivation of conservation laws. Thus, the mathematical treatment of flows in teaching does not fail due to representation-related physical imagination difficulties.

Numerical simulations in teaching fluid dynamics
Making physical quantities experimentally visible in the entire flow area is extremely elaborate, if not impossible [5]. Therefore, the flow fields are often 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. Since the computational domain is thereby subdivided into many small volume elements, the method for the explanation of the derivations of conservation laws seems to be suitable at first sight. However, the forces acting on the surface and inside a grid cell are not directly calculated in the calculation method or not accessible and therefore cannot be displayed simply in the software [6].
A teacher carrying out the calculations, could create and present such 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. A student can furthermore not interact and change any configuration to check his understanding. Unfortunately, it is not possible for the students to carry out the simulations independently, as the necessary skills can only be taught in advanced courses. Working with CFD usually requires special software and skills using it such as geometry generation (CAD), meshing, pre-processing and postprocessing. In addition, the correct calculation and interpretation of the correctness of the results and the flow physics is not trivial [7].

Overview and project objective
Students should be able to independently explore some of the basics of fluid physics in a simple way with their own speed and own equipment. Learning at their own speed in virtual experiments has a statistically noticeable advantage in the teaching, as [8] shows by means of applets in different areas of the natural sciences.
In order to illustrate fluid physics as clearly as possible, it should also be possible to display theoretic constructs that are not experimentally accessible, such as differential volume elements and infinitesimal forces. The derivation of the conservation laws should be described in a simple and clear way. According to [9] learning technologies should play a vital role in skill-driven engineering education and to [10] educational technology should focus on simulations, game-based learning, virtual learning environments and virtual worlds as these technologies enable deeper, more complex and contextual understanding for students.
Thus, a virtual, manipulable fluid-mechanical world is created in which free movement is possible. The flow and volumes can thus be viewed from different angles and facilitate three-dimensional imagination. This replaces the passivity of educational film consumption with active action. Previous VR concepts in the field of engineering partly use QUEST3D [11] or the UNITY engine to create threedimensional worlds, such as an educational game in chemical engineering for plant construction [12] or in traffic engineering [13], [14]. There the students were asked to perform multiple-choice tests before and after the game without any feedback on the accuracy of their answers. A positive learning effect was confirmed, as the average score of the students improved by about 10%. In the field of fluid mechanics [15] a GEOGEBRA-based digital learning aid for simple two-dimensional geometries was developed, which also has a positive influence on the learning effect of the students. [16] develops a three-dimensional environment in which dike construction is treated under fluid mechanics aspects. [17] created a virtual laboratory for the teaching of fluid mechanics, in which mainly flow visualizations and the visualization of scalar field variables for the investigation of inertial and friction effects were treated. In contrast to [17] and [18], this paper focuses on a specific mathematical sub-aspect, namely the teaching of differential balancing and derivation of some fundamental equations of fluid mechanics. To this end, the students' perceptions of the benefits of the immersive laboratory in VR, as well as an exam task, are also evaluated.

Realization of the Virtual Reality
This section briefly describes the technical and educational implementation of two examples.

Technical realization
This subsection is an extension of [17]. 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 .exefiles 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 is built in Unreal Engine 4 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 obtained from Matlab or a CFD Software 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 teleportations of objects, is carried out via the programming language C++, for which a graphical programming interface is available in the form of so-called blueprints. These visualize the information flow. Figure 2 shows an example of the code for shrinking a flow tube to its abstraction of a flow filament: 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 pro-gramming skills faster than by directly using C++, which lowers the barrier and eases the development of possibilities to influence the virtual reality environment while using it. The use of typical commercial virtual reality headset such as Oculus Rift can be easily integrated 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 environment. Additionally, a completely unrestricted movement of the user and thus a good overview of the geometrical situation 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. A clear, ordered allocation of the flow variables to the location in a cuboid area must be available in the Unreal Engine. There are two simple possibilities. For simple problems like rigid-body or potential vortexes analytical solutions can be engaged. Matlab can then be used to generate flow variables such as velocity vector fields and pressure fields.
For more complex problems commercial CFD-software like ANSYS ® CFX is used. The three-dimensional flow of incompressible liquids through different geometries like a sectorial jump is calculated. The values of the flow quantities for pressure and the velocity vector are exported, modified and then imported into the Unreal Engine 4.
Therefore, the flow in a cuboid area should already be carried out in the flow simulation. This is made possible by the use of the fictitious-domain method of [19], 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 4.

Educational implementation
The conservation laws dealt with in the basics of fluid mechanics are getting more and more complex, as additional physics is taken into account. In most courses it starts with the hydrostatic base equation. For flowing fluids, the Euler-equation is derived and simplified to the Bernoulli stream filament. Adding friction to the Euler equation leads to the Navier-Stokes equation. Each derivation is therefore based on the previously treated derivations, which inevitably means that parts are repeated.
In the following, specific problems and their solution approach for two examples are discussed. The advantage of VR is besides the better 3d-presentation, that physical limits can be circumvented by programming and thus physically inaccessible constructs, such as differential volume elements in a flow, can be investigated and manipulated. A tubular differential volume element is examined, used in the derivation of the Bernoulli stream filament and the mostly used cubic differential volume elements, used in the derivation of the hydrostatic base equation, Euler equation and Navier-Stokes equation.
Tubular differential volume elements are used in the derivation of the Bernoulli stream filament, which is a frequently used tool in fluid mechanics for quick estimation of simple flows. In its derivation, an area within the flow is considered which, like a pipe, is only flowed through one inlet and one outlet cross-section. This macroscopic flow tube is abstracted as a stream filament, which represents an infinitesimally thin differential volume element, at which the forces are then balanced. A difficulty arises from the abstraction of the flow, because the students have to relate the theoretical construct of the stream filament with a real flow. For this purpose, a vortex flow in a container is used, as this provides a simple overview of an entire flow. A flow tube is stretched out, as shown in Figure 3, left.
From this a piece is cut free, which can also be walked through (see Figure 3, right). For the transition to the theoretical construct, the macroscopic extension is reduced to a filament. The user no longer recognizes any inlet and outlet surfaces, but can now enlarge the filament cross-section by his intervention, whereby it is explained that this is only done for optical reasons, the filament is still infinitesimally thin. streamline with the one-dimensional coordinate direction s (red) and the one-dimensional velocity c (red) and the infinitesimal A problem frequently observed in the course of the lecture is the stream filament's own coordinate system (one-dimensional direction s with the velocity c), which always points in the direction of flow and therefore describes a circular path in the shown vortex. Since the enlarged theoretical construct can be traversed, the coordinate direction is always visible from inside and outside and there is never a direct relation to the Cartesian coordinate system observable. The derivation takes place in the VR environment and in the head up display (HUD, see Figure 4, up) simultaneously. This hybrid representation of 3D (VR environment) and 2D (HUD) information is advantageous here. The 2D abstraction in the HUD for the 3D case can be reviewed directly in the VR environment in case of geometric difficulties. For students with difficulties in the usual two-dimensional abstraction (shown in the HUD), the simplified 3D representation serves as a didactical reduction. Identical colouring of the vectors and variables allows an intuitive comparison as shown in Figure 4, down. For further didactical reduction, the coloured bar in the HUD box makes clear which parts of the derivation are identical to other derivations of conservation laws and where the specific changes are. After the derivation the stream filament can be moved inside the vortex flow with displayed forces. This is done to illustrate the students the connection of the stream filament with a real flow. bottom) and 3D in the VR engine. Down: Identical colouring of areas (green) and normal vectors (red) in HUD and VR speed up understanding. Green bar in box indicates that the slide was an identic part in the derivation of the hydrostatic base equation Cubic differential volume elements are the most common elements. The conservation laws dealt with in the basics of fluid mechanics are getting more and more complex, as additional physics is taken into account. In most courses it starts with the hydrostatic base equation. Since there is no flow here yet, the focus is on the discovery that equal forces on two opposite sides almost completely cancel each other out. This is achieved by giving numerical values (see Figure 5, left). It becomes clear to the student that only the parts not cancelling out each other must be taken into account in the balance. This intuitively motivates the mathematical operation of a Taylor expansion, which is always carried out (see Figure 5, right). To make the derivation as simple as possible, it starts from Newton`s axiom which is known from school. To simplify the illustration, force components can be switched on and off here, and forces can be displayed in only one of the three spatial directions. By the free movement of the volume element after the derivation, different areas in the stagnation point flow can be discovered, in which certain forces dominate and others are quasi non-existent (see Figure 6, left).
The Navier-Stokes equation is the most complex equation taught in the basics of fluid mechanics. The difficulty here can be attributed to the complete lack of visualization of up to 39 forces acting on a cube (see Figure 6, right). In printed illustrations the forces often obscure themselves, which 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 same advantages of the VR environment as in the hydrostatic base equation, Euler equation and Bernoulli stream filament are even more evident: • The hybrid 2D/3D derivation appears systematically with a clear colour assignment between the description and the volume element. • A clear explanation of which parts of the derivation are new.
• To get a better insight complete types of forces or directions can be toggled off and on.
• 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. • Not only the position of the user but also the position of the volume element can then be altered in a real flow, here in a tube with a cross-sectorial jump, see Figure  6, right.

Results
In this section, the use of the virtual environment in teaching is evaluated using a self-assessment and the results of an exam.

Additional material in a learning platform
The VR-environment based derivation of the hydrostatic base equation was downloadable in the electronic learning platform. Several students tested it and some gave a feedback, which is depicted in Figure 7, with the number of votes about the benefit in using VR for the 3d imagination (blue bars) and in understanding the derivation of the hydrostatic base equation (red bars). Although this derivation is the by far simplest, nearly all students gathered a benefit in both aspects. Since the number of votes is almost the same for both cases, it would be obvious to interpret the benefit for the understanding of the basic hydrostatic equation with the better three-dimensional representation and thus also with the embedding in a real situation.

Lecture and exercise
The derivation of a differential volume element for a stream filament was already carried out in the lecture in a conventional way. In the exercise, this was summarized briefly. The flow tube in the VR environment illustrated the theoretical construct. The abstraction to the stream filament was presented directly in front of the students. This was followed by the balancing of the force components in and across the direction of flow, whereby the students were able to recognise the representation 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 derivation (Figure 8). This increase compared to the hydrostatic base equation is reasonable, as a flow and therefore more forces are involved.

Student-guided tutorial groups
The VR-Engine was then used in student-guided tutorial groups. Each tutorial consists of groups of about 20 students with two student teachers und lasts 90 minutes. The students could either use the VR engine on their own devices or form groups. The tutors were there to explain and help and could project the VR visualization onto the wall via beamer and thus explain it to everyone at the same time. Among other things, the students could examine the derivations of the stream filament equation.
After the tutorial, the students were asked about their views on the VR environment. The students were able to give an anonymous assessment. The evaluation of the tutorial with the use of the VR engine with regard to the assessment of the acquisition of academic knowledge is shown in Figure 9. 70 % of N = 86 students considered the VR-tutorial to be very good for acquiring knowledge and 30% good. None of the students voted for an average benefit or found the use of the VR engine to be detrimental to understanding. Usage of VR environment in a tutorial to teach fluid mechanics The self-assessment of the comprehensibility of the VR tutorial is shown in Figure  10. Comparing Figure 9 and Figure 10 leads to the conclusion that students believe that the VR environment has great potential, but that its intuitive comprehensibility can be further improved. This is also obvious compared to the better results in Figure  8, where the creator used the VR environment to demonstrate the physics. The comprehensibility in the VR tutorial

Examination
In the following examination of the course fluid mechanics a question was asked, in which different basics of the Bernoulli stream filament and the connection with the flow tube were addressed. The students were asked to mark on their exam in a standardised questionnaire which tools they used in learning, of which N = 39 were given.
The results are shown in Figure 11. It shows the percentages of the points achieved in this specific task for the group that used the VR environment for the Bernoulli stream filament theory under guidance in exercise and tutorial (blue, N = 11). The red bars describe the results of the other students (control group with N = 28). The total score shows that the VR group achieved a result that was about 20 % points higher. Average points achieved in a specific stream filament related task and total points in exam In order to check whether only the better students have benefited from the additional materials, the total score of the exam is also plotted for both groups. The different points of the specific stream filament task were removed from the total score, whereby this accounted for 3 % of the total score. Thus, the overall results of the groups differ with 7.8 %. Engaging a one-sided heteroscedatic t-test gives a p-value < 0.03 for the specific task and a p-value > 0.18 for the results of the total exam. It can thus be assumed that it is not the better students who automatically benefit more from the VR learning environment but all students equally. N = 3 students used the VR environment without attending an exercise and achieved the worst result with only 11 % of the achievable points. This suggests that the VR environment is not selfexplanatory, as the result in Figures 9 and 10 also suggested, but must be introduced by teaching staff. The task consisted of three parts, which asked for learning contents: 1. Definition and drawing of the geometry of the flow tube 2. Physical and geometrical connection with abstraction to the stream filament 3. Mathematical and physical description of the stream filament specific coordinates s and velocity c. Figure 12 shows the percentage points achieved in the three parts of the task of the specific question and, in comparison, the total points achieved in the task with the VR-group (blue) and the comparison group (red). The greatest differences are to be found in b) (28.8 %) and c) (23.1 %), while in a), with a 13.4 % there is not that difference. The p-values between both groups are a) 0.14, b) 0.027, and c) 0.028, so that the results only differ significantly in b) and c).
In task part a) the learning outcome is the definition of a macroscopic object. The flow tube is easily imaginable as a macroscopic object with a certain size and can be well represented in books, which is why the use of the VR learning environment is not expected to provide much additional benefit here. Both groups performed nearly equally, with a difference of 13 % and a p-value of 0.14. In task part b) the learning outcome is the abstraction of the macroscopic object to a theoretical construct of infinitesimal size. The difference between both groups is 28.8 % with a p-value of 0.027. In the abstraction dealt with here, the VR environment shows the greatest benefit, since the clearly depictable geometric relationships between the flow tube and the stream filament also makes the physical relationships in c) clearer. From this follows the better performance of the VR group (23.1 %, p-value of 0.028), because only with the physical and geometrical understanding the physical-mathematical description and by that the correct usage of the theory can be successful.

Summary and Outlook
In this project, a virtual environment was created in which invisible theoretical constructs like differential volume elements used in the derivation of conservation laws are visualized in real flows. Such theoretical constructs often cause students difficulties at the beginning of their studies, as the connection with real flows is not recognised. Therefore, the abstraction of a volume in a flow to a differential volume element in the VR environment is performed from the ego-perspective in a real flow, in which the student shrinks to a differential size. By means of the represented proportions of the acting forces the students recognise that e.g. pressure forces almost completely cancel each other out. This makes the previously accepted Taylor series development directly understandable, as only the result-forming force difference remains. The student can then move the volume elements freely in the flow and thus examine the ratio of the force components at different points. The flow is always intuitively visualised by flowing particles.
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. 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.
The students' votes show that the VR environment is seen as very conducive to learning new facts and contexts. At the same time, the level of agreement decreases with the required degree of autonomy in dealing with the VR environment. This is also reflected in the exam results, since the use of the VR environment without explanations by teaching staff produced the worst results -here the environment seems to be confusing. The VR environment is therefore, at least in its current state, a suitable tool for presenting complicated geometric and abstract relationships more clearly. However, it does not replace the accompanying teaching.
On the basis of a task in the following exam on fluid mechanics it can be seen with small numbers of cases that the VR environment has no positive influence with simple geometrical connections and definitions. However, with more complicated abstractions it has certainly caused a considerable improvement of the learning effect and this improvement continues in the reproduction of the more complex mathematical-physical connections.
In the following work, the use of the VR environment will be further improved so that it can be better used without external guidance. It will be extended to 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, etc.) 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. In further courses and exams, the benefit is to be further investigated.