{'fraction_non_alphanumeric': 0.020861593152158662, 'fraction_numerical': 0.003367790822770008, 'mean_word_length': 5.385902031063321, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design and Development of Water Supply and Drainage Virtual Simulation Training System

Traditional practical teaching of water supply and drainage is often faced with problems such as limited faculty and course time, easy worn-out of equipment and safety risk in practical training, which brings many inconveniences to schools, teachers and students. In order to make up for the shortage of traditional water supply and drainage practical training teaching, the teaching environment and the process was simulated by virtual reality technology, and a virtual simulation training system for water supply and drainage was developed. Taking the course project of steel pipe threading as an example, this paper shows the construction situation of manual and electric steel pipe threading project, systematically explains the principle involved in the virtual training system of water supply and drainage, emphatically expounds the key technologies, and the implementation scheme was given.


Introduction
Water supply and drainage science is a professional discipline with comprehensive and practical characteristics, and practical training occupies a very important position in this subject. The technical content that the students of water supply and drainage science related majors need to master include steel pipe threading, pipeline connection, water supply and drainage Piping system layout and hydraulic test, sanitary appliance installation, fire protection system layout and installation, etc. In the process of practical training, various professional instruments will be needed. Taking the steel pipe threading as an example, different sizes of steel pipes are required for different construction projects, and different equipment will be used for different methods, such as cutting with pipe cutter, hacksaw cutting, grinding wheel cutting machine. The threading is also divided into manual stranding, electric threader and thread lathe processing, etc. For schools, there are a large number of students, so that each practical training needs to consume a lot of teaching resources. The school are often faced with problems such as equipment aging, shortage of quantity, maintenance and repair [1]. In addition, the traditional practice teaching will be restricted by time and space. Limited course time, venue, equipment and teacher resources make it difficult for all students to master various construction details and specifications within the course time. In the face of those equipment, such as electric threader, pipe cutters, hacksaws, there are also various unexpected safety risks in training. Virtual reality technology can solve these problems to a certain extent. Virtual reality is an emerging technology field formed by the integration of computer graphics, human-computer interaction, artificial intelligence and other related technologies. It can simulate real scenes or objects by computers, which has three characteristics of immersion, interaction and imagination [2]. In this paper, a virtual experimental program is developed based on Unity3d platform, which provides students with a virtual operation platform for construction training. Under this platform, students can simulate the construction process and operate various virtual equipment anytime and anywhere through the Internet, thus improving the efficiency, maintainability and safety of the construction engineering experiment teaching [3].

Application status of virtual simulation teaching in engineering specialty
The development of computer virtual simulation technology provides a brand-new way for construction teaching of engineering majors, which can not only solve the problem of limited time and space and resources, but also improve the safety of students in the process of practical training. Using the virtual simulation platform for practical training, students can interact with the virtual system in the scene close to the real construction environment, and complete the complete construction training. In addition, through the knowledge explanation in the system, students can get the corresponding theoretical knowledge guidance, which means, while improving the efficiency of construction training, students can strengthen the combination of engineering theory and engineering practice. Virtual simulation technology can not only increase students' hands-on operation opportunities, but also improve students' autonomous learning ability, cultivate students' independent thinking mode, and ensure the cultivation of high-quality applied talents in water supply and drainage [4].
In 2018, the Chinese government decided to implement the "Six Excellence and One Top" program 2.0, of which the "Golden Course Construction" program includes the construction of about 1,500 statelevel first-class virtual simulation courses. Virtual simulation course can enable students to have immersive experience in the simulation scene and receive more complete, detailed and targeted teaching, which is a new teaching mode of "intelligence + education".
During pandemic situation, especially COVID-19, the advantages of virtual simulation teaching were further reflected [5]. During the epidemic, most students receive online education at home, while traditional online education is mostly based on teacher explanations and displaying videos, pictures, and text. Students cannot carry out construction operations in person. Virtual simulation teaching allows students to conduct practical training at home.
Currently in China, virtual simulation teaching has been actually applied to engineering construction teaching. For example, Harbin Institute of Technology has developed a virtual simulation experimental teaching network platform under the perspective of engineering education, and the construction machinery virtual simulation experiment teaching platform designed by China University of Petroleum [6][7]. However, the current platforms do not subdivide different projects of water supply and drainage major, nor do for practical training teaching of courses, and lack professional operation guidance in the practical training process. This paper will design the content of practical training courses for different construction projects of water supply and drainage major.

System design idea
According to the practical training requirements of water supply and drainage construction and the characteristics of virtual simulation technology, the overall design idea of the system is determined as follows: 1) The practical training project has the function of scene roaming, so it is necessary to collect data, model the selected practical training site environment and required equipment, and restore the site. By using the immersive characteristics of virtual reality technology, students can immerse themselves in training in an environment close to the real operation site (Model Layer). 2) The virtual practical training course should have strong interaction, so that students can simulate the construction process in the virtual environment through interactive operation, with animation display, to deepen the understanding and mastery of the construction process (Simulation Layer). 3) The system needs a graphic interface for operating instructions and knowledge points to provide students with full operation guidance, helping them quickly master the relevant core knowledge and operational essentials, improving the ease of use of the platform, and assisting students to complete the whole training (View & Interaction Layer). 4) The practical training system should be able to operated on a stand-alone computer and be published on the relevant network platform to facilitate students' learning at any time. To sum up, this project obtains the basic structure diagram of virtual simulation practical training system for water supply and drainage as shown in Figure 1.

The overall structure of the system
The virtual simulation training system of water supply and drainage can be divided into six training projects including electric steel pipe threading, manual steel pipe threading, steel pipe connection, sanitary ware installation, indoor water pressure test, PVC-U water pipe installation. Each experimental project with a video presentation, course introduction, introduces operation, components introduction and the installation practice of five functional modules, as shown in figure 2: technology to help students understand the content and use of the virtual training system more quickly. 2) Course introduction module: Before the training, the module introduces the purpose, significance and requirements of the course, illustrates the relevant principles, and explains the knowledge points, key points and difficulties of the training. 3) Component modules: Display the two-dimensional plan and three-dimensional model of the construction equipment of the project to improve students' understanding of the equipment and instruments. 4) Installation training module: Students can simulate the construction process in a realistic construction environment, including graphics, animation, test and other auxiliary teaching.

Development process
Virtual training system for water supply and drainage is a virtual teaching and training system developed based on Unity3D platform and developed by using VS2019 and other tools. This chapter will take the steel pipe threading project as an example to elaborate in detail. According to the system requirements, the development process is shown in Figure 3. Research and data collection on the actual equipment such as pipe cutters and electric threading sets as well as the training venues for the design and production of models and scenes; Understand the threading procedures and steel pipe threading standards for the design of the training process and content [8]. 2) Import the model into Unity3D, perform scene layout, interface design and other operations.
3) Use VS2019 to write code to realize interactive functions. 4) Release the pc version and Web version of the virtual training system for steel pipe threading, and publish the Web version to the school's learning network platform for students to officially go online.

Construction of 3D model
The virtual simulation training course of steel pipe threading is used to help students fully grasp the specific methods of manual and electric steel pipe threading construction. There are many types and models of construction tools that need to be used, including steel pipes of different diameters, pipe cutters, files, manual threading machines, the electric threading machine and so on. Threading equipment needs to be set with different parameters according to the actual situation. Due to the complex structure of construction equipment, the system decided to use powerful model making software Rhino and 3dMax for model making.
In the production of Unity3D animation, the movement of the object is affected by the two coordinate axes of the child object and the parent object. Therefore, in the process of using Rhino to model, it is necessary to design the animation in advance, disassemble the structure of the equipment and tools involved in the animation, build a parent-child object hierarchy, which is conducive to ensuring the accuracy of animation production.
Next, use 3dMax to make the corresponding texture, use Photoshop to draw and refine the texture exported from 3dMax, and then paste the texture back into 3dMax, as shown in Figure 4. Finally, export .fbx format and import it into Unity3D, and use its built-in baking tools to bake the scene [9].

Interface design of practical training system
This system interface is implemented based on Unity3d's UGUI system, which is a new UI system released with Unity 4.6 version. Compared with the old system OnGUI, a code-driven GUI system, the new system has the advantages of visualization, independent coordinate system, and brand-new event mechanism. Compared with the NGUI plug-in, which always considers the problem of atlas, this system obscures the concept of atlas, avoids duplication of resources, and combines the characteristics of the NGUI built-in engine, so it can run stably and operate conveniently.
The system uses UGUI to make highlighting prompts and UI interfaces. During the training process, highlighting the current step can assist the student to complete the whole set of practical training. And in the corresponding steps, related tests and important knowledge points are displayed on the UI interface with graphics and text explanations, so as to deepen students' understanding of construction content and cultivate students' independent thinking ability, as shown in Figure 5.

Code implementation of functional interaction
In this system, there are mainly two interaction methods: character roaming and clicking to trigger events.

Roaming control module.
In order to prevent penetration when roaming in the first perspective, it is necessary to add a collider component to the first perspective and other model objects.
The Trigger attribute is not checked for the first three colliders. When two colliders without ticked Trigger have a collision event, the event is a physical collision, and the kinematic collision effect (physical collision effect) will be generated between them, which can prevent the penetration phenomenon of two objects colliding. Collider At the same time, the first vision is the subject of motion, the isKinematic dynamics option of the rigidbody component mounted on it cannot be checked. Checking isKinematic means that when the object with the rigidbody component collides, there will be no physical collision effect, and it will not be affected by external forces, gravity and torque.
In addition, the rigidbody component of the object needs to check the Gravity option. Without gravity, when two colliders physically collide, it will cause two them to float in the scene, similar to the phenomenon of weightlessness in a space capsule. If the gravity option cannot be checked due to the project design, the drag value of the rigidbody can be adjusted. This value represents the air resistance of the object. 0 means that the air does not produce any resistance to the object. Note that too large a value may make the object unable to move. That is, setting the drag value can ensure that the object will not float under the impact of external force without the action of gravity.
To sum up, in the virtual training site, in order to avoid penetration and floating problems in the roaming of the first vision, the rigidbody components (check the gravity option or set the drag value, not check isKinematic dynamics option) and the collider component (not check the trigger) should be mounted on the body of the first perspective . Other objects also need to mount the collider component that does not check the trigger.

Device control module.
The target object that needs to be operated in the current step of the system design will show the highlight effect, and clicking on the highlight object will trigger the corresponding interactive event. To implement click-triggered interactions, ray detection is used here. When the mouse is aimed at the target object and the left button is pressed, a ray is emitted to the specified direction from the center of the camera. When the ray detects the collider, it will returns information about that object.

Animation Auxiliary Module
According to the preliminary research, such as the die inspection of electric wire sleeting machine, and the use of pipe cutter should pay attention to the incision should not produce section contraction, each time the depth of wire sleeting knife is different and other contents are often difficult for students to understand through the teacher's explanation. In order to enable students to learn standard construction techniques, in the water supply and drainage virtual simulation training system, Unity3D software is used to make instructive animations to guide students to learn.
Animator is a component of the animation controller in Unity, that acts as an animation segment manager. To make the animation, we need to add an animator to the target object first, then open the animation editing window, select the target child object or parent object, create a cartoon clip, click the record button, and set the different state properties of the target object at different frames, thus completing the production of the animation segment. Then set the trigger conditions to realize the playback of the animation clips during the training process.

Release of water supply and drainage training system
Unity3D is a cross-platform development tool with a wide range of platform applicability and can be released to Android, Linux, IOS, Web, Mac and other platforms. We need select File-BuildingSettings in Unity3D, enter the publishing settings interface, and add the publishing scene. This system chooses .exe and WebGL form of publishing, the latter can generate web interactive files. The file is uploaded to the server of the interactive platform for network access. [10][11] The project has been released to the Teaching Resource Library of Construction Equipment Engineering Technology website.

Examples of virtual training system for water supply and drainage
This chapter introduces the contents and advantages of virtual simulation training system of water supply and drainage by introducing two specific cases of manual steel pipe threading and electric steel pipe threading.

Case development of manual steel pipe threading
The manual steel pipe threading training system can be divided into two parts. The first part is the pretraining preparation part, covering four major modules: video demonstration, course introduction, operation introduction, and component parts. The second part is the installation training module.
First, through the preliminary preparation module, let students know the purpose, significance and course requirements of the course, have a certain understanding of the construction equipment required for the course project, and master the basic operation methods of the virtual training system.
Then enter the manual steel pipe threading training module, the interfaces are shown in Figure 6. Firstly, set the operating point for the target steel pipe. It is necessary to mark the operating point according to the construction drawings, operate the pipe cutter, cut the steel pipe multiple times according to the standard use method, and operate the file to deal with the fracture. Then set the die diameter parameter of the pipe threader, check and adjust the front chuck, scale parameters and bolts of the threader. Next, fix the steel pipe to the pipe vise, install the threader, set the die, operate the manual threader for threading. Finally, carry out quality inspection on threaded steel pipes.
During the training process, the system will pop up relevant questions at key steps to evaluate students, and further explain key knowledge points through graphic displays. When operating the equipment, the system will provide standard usage specifications to help students master the standard usage methods. At the end of the training, the system will also provide specification requirements, requesting quality testing of the threaded steel pipes to help students further understand the industry specification requirements.

Case development of electric steel pipe threading
Following the principle of consistency of interactive design, the preliminary preparation of the electric steel pipe threading training system is the same as the manual one.
After entering the installation training module, first check the die specifications of the electric pipe threader according to the prompts and requirements, and then set and adjust a series of parameters of the electric pipe threader, including tightening the bolts, fixing the winch, adjusting the thread length, and turning the handle Move the pallet, adjust the front and rear discs, etc. After that, operate the electric pipe threader to thread the target steel pipe in accordance with the standard process. After the operation, the system will ask the students to perform quality inspection on the pipe threaded steel pipe in accordance with the standard requirements.
Other auxiliary methods in the experiment process are the same as the manual threading training system. The complete construction operation simulation process, combined with graphic display, test, and animation display, enables students to clearly understand the operating mechanism and process of the electric threading machine. The training process interface is shown in Figure 7.

6.summary
Aiming at the water supply and drainage engineering, this paper uses Unity3d to build virtual simulation practical training system for water supply and drainage, and establishes a new type of training teaching method that complements both on-line and off-line [10]. The system is published to the teaching website, which can give full play to the characteristics of resource sharing and highly developed virtual simulation system. The water supply and drainage virtual simulation training system can lay a solid operational practice and theoretical foundation for students majoring in water supply and drainage, and provide a guarantee for the training of relevant professionals [8].