Application of Real-time Simulation Algorithm of Fire Spraying Water Trajectory in Virtual Environment

By applying mathematical calculation methods and correction coefficient fitting functions based on air resistance theory in a virtual environment, combined with the fourth-order Runge-Kutta algorithm and object pooling technology, the problems of slow jet trajectory prediction speed and high equipment requirements in existing technologies are solved, achieving fast and accurate jet trajectory simulation and improving system performance.

CN116108771BActive Publication Date: 2026-01-13TIANJIN FIRE SCI & TECH RES INST OF MEM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310167381.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2026-01-13
Estimated Expiration
2043-02-27

AI Technical Summary

Technical Problem

Existing technologies for predicting the trajectory of fire monitor jets suffer from high computational requirements and slow speed, making it difficult to achieve accurate jet trajectory positioning in a virtual environment.

Method used

Using a mathematical calculation method based on air resistance theory, and by adding correction coefficients, combined with the fourth-order Runge-Kutta algorithm and object pooling technology, the trajectory of a fire monitor jet is simulated in a Unity virtual scene. The accuracy of the jet trajectory is improved by using a correction coefficient fitting function, and the model is verified by actual jet trajectories.

Benefits of technology

It enables rapid and accurate prediction of fire monitor jet trajectories in Unity virtual scenes, reducing hardware requirements and improving system performance and the accuracy of jet trajectory prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116108771B_ABST
    Figure CN116108771B_ABST
Patent Text Reader

Abstract

The application discloses application of a fire-fighting jet water trajectory real-time restoration simulation algorithm in a virtual environment, and the mathematical calculation mode of adding a correction coefficient is used to predict the jet trajectory, so that the required hardware equipment is less, and the calculation speed is faster; the fire-fighting monitor jet trajectory model based on the air resistance theory after correction can accurately and effectively predict the fire-fighting monitor jet trajectory in the Unity virtual scene, so as to improve the accuracy of the fire-fighting monitor jet trajectory prediction, and the model is verified through the actual jet trajectory, and the application relates to the fire-fighting technical field.The application of the fire-fighting jet water trajectory real-time restoration simulation algorithm in the virtual environment saves the water droplet prefabricated body instantiation object when not used instead of directly destroying the object, directly gives the cached object when used next time without instantiation, so that resources are fully utilized, the process is accelerated, and the system performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fire protection technology, specifically the application of a real-time simulation algorithm for reconstructing the trajectory of fire jet water in a virtual environment. Background Technology

[0002] With social progress and economic development, large shopping malls, stadiums, airports and high-rise residential buildings have become important components of urban architecture. At the same time, these large spaces and high-rise buildings pose serious challenges to fire safety. In order to improve the speed and accuracy of fire fighting, it is not only necessary to aim the jet at the fire point as soon as possible, but also to accurately locate the jet trajectory under different flow rates and different pitch angles.

[0003] Currently, there are two main approaches to the study of jet trajectory positioning: one is to use computer image technology to locate the jet trajectory, which has the advantage of forming a closed-loop control, realizing progressive control and adjustment, and achieving high control accuracy; the other is to predict the jet trajectory through mathematical calculation based on the motion law of the mass point, which has the advantage of being able to predict the jet trajectory simply and quickly based on parameters such as the water gun elevation angle and flow rate.

[0004] The two jet trajectory prediction methods mentioned above each have their own advantages, but both need further in-depth research to achieve more accurate prediction and positioning of jet trajectories. Considering the various changing factors of the air resistance mathematical model, the mathematical calculation method of adding correction coefficients to predict jet trajectories requires less hardware and has a faster calculation speed. The modified fire monitor jet trajectory model based on air resistance theory can accurately and effectively predict the fire monitor jet trajectory in the Unity virtual scene, in order to improve the accuracy of fire monitor jet trajectory prediction. The established model is then verified through actual jet trajectories. Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] To address the shortcomings of existing technologies, this invention provides an application of a real-time simulation algorithm for reconstructing fire-fighting water jet trajectories in a virtual environment. By adding correction coefficients and employing mathematical calculations to predict jet trajectories, the required hardware is minimal, and the calculation speed is fast. The corrected fire-fighting water jet trajectory model based on air resistance theory can accurately and effectively predict fire-fighting water jet trajectories in a Unity virtual scene, thereby improving the accuracy of fire-fighting water jet trajectory prediction. The established model is then validated using actual jet trajectories.

[0007] (II) Technical Solution

[0008] To achieve the above objectives, the present invention provides the following technical solution: a real-time simulation algorithm for restoring the trajectory of fire-fighting water jets, specifically including the following steps:

[0009] T1. Taking a unit mass jet element as the research object, establish a rectangular coordinate system and perform force analysis. Let v be the velocity of the jet element, θ be the angle between the jet velocity direction and the positive x-axis, Ft be the air resistance, which is opposite to the jet direction, mg be the weight of the element, which is vertically downward, and x and y be the range and height of the element.

[0010] Let i be the unit vector in the direction of the jet velocity, then:

[0011] v = vi

[0012] Differentiating both sides with respect to time, we get:

[0013]

[0014] Let j be a unit vector perpendicular to the jet velocity direction. According to the principle of vector differentiation, we have:

[0015]

[0016] Lianlide:

[0017]

[0018] The water jet from a fire monitor is continuous, therefore the mass of water ejected per second, *m*, can be considered a constant and does not change with time *t*. According to Newton's second law:

[0019]

[0020] Projecting onto vectors i and j, we get:

[0021]

[0022] Therefore, we can know

[0023]

[0024] T2, Step T1: Add correction coefficients k1 and k2 to the above formula, and the modified formula is as follows:

[0025] Ascending phase:

[0026]

[0027] Descent phase:

[0028]

[0029] T3. The formula for calculating the air resistance Ft experienced by the jet micro-element in the air is as follows:

[0030]

[0031] Where ρ 空 Let V be the air density, v be the velocity of the infinitesimal element, and S be the velocity of the infinitesimal element. M Let C be the cross-sectional area of ​​the infinitesimal element. X This refers to the air drag coefficient;

[0032] T4, air drag coefficient C X The calculation formula is as follows:

[0033]

[0034] Where Re is the Reynolds number, ρ 水 Let d0 be the water density, v0 be the initial velocity of the infinitesimal element, and d0 be the diameter of the fire monitor.

[0035] T5. Divide the jet trajectory model into two parts, with the highest point of the trajectory as the dividing point, and the cross-sectional area S M The calculation formula is as follows:

[0036] Ascending phase:

[0037] S M =A0(1+aln(1+x))

[0038] Descent phase:

[0039] S M =A0(1+bln(1+y0-y))

[0040] Where A0 is the initial cross-sectional area, a and b are the area correction coefficients for the rising and falling sections, respectively, and y0 is the jet height at the highest point of the jet.

[0041] T6. Directly solving the differential equation is too complex, so the fourth-order Runge-Kutta algorithm is used to solve it with a step size of 0.02, as shown in the following formula, where h is the step size.

[0042]

[0043] T7. Different correction coefficients are used for different angles. The fitting function for the correction coefficients is as follows:

[0044] X=(eθ f +g)l

[0045] Where X is the correction coefficient in the jet estimation model, θ is the angle between the initial velocity direction of the infinitesimal element and the positive x-axis, and e, f, and g are the coefficients of the fitting function.

[0046] Preferably, the shape of the jet micro-element in the model of step T1 does not change during the entire motion process. However, this assumption is impossible in reality due to the jet breaking and the influence of wind. At the same time, by observing the actual motion trajectory of the water jet, it can be seen that the rate of change of velocity in the rising segment is significantly different from that in the falling segment.

[0047] Preferably, the correction coefficients k1 and k2 added in step T2 are used to simulate the phenomenon that the air resistance and the velocity direction of the jet micro-element are not collinear due to the jet breakup and wind force during the rising and falling stages, so as to improve the accuracy of the jet trajectory simulation.

[0048] Preferably, in step T5, based on experiments and research, it is found that when the water jet is first ejected from the nozzle, it is a solid cylinder. Then, due to the breakup of the jet, the water jet in contact with the air on the outside becomes droplets. At this time, the inside is still solid until the entire jet column is completely broken into droplets.

[0049] This invention also provides the application of a real-time simulation algorithm for reconstructing the trajectory of fire-fighting water jets in a virtual environment, specifically including the following steps:

[0050] E1. Building virtual 3D scenes based on the Unity3D virtual reality engine;

[0051] E2. Based on the .NET framework, implement a trajectory algorithm class that encapsulates the fire monitor jet trajectory model based on air resistance theory into an external function interface GenerateTrack().

[0052] E3, when called, pass in the muzzle position, muzzle elevation angle, muzzle flow rate, muzzle diameter and calculation accuracy, and it will return the point set of the fire monitor jet trajectory at this time;

[0053] E4. By comparing the simulated jet trajectory in Unity with the actual jet trajectory from different angles, the accuracy of the jet trajectory model is verified.

[0054] Preferably, the appearance of the water flow trajectory is implemented using the trailing system provided in the Unity engine. Create an empty GameObject, add the Trail Renderer component to it, use this empty object to simulate a single water droplet, and adjust the properties of the Trail Renderer component to set the width, length and water map appearance of the water droplet. After setting, make this empty object into a water droplet prefab.

[0055] Preferably, in order to generate water droplets in real time at the nozzle of the fire monitor in the virtual scene, the Resources.Load() method is used to dynamically load the water droplet prefab. After the water droplet is generated, the GenerateTrack() function interface of the trajectory algorithm class is called to obtain the trajectory point set of the water droplet at this moment. The DOPath() method of the DoTween plugin is used to make the water droplet move along the jet trajectory calculated by the trajectory algorithm class. New water droplets are generated in real time at the nozzle position at fixed intervals. When the time interval between water droplet generation is small enough, a continuous water flow effect is formed in the virtual space.

[0056] Preferably, during the movement of the water, interactions with other objects will occur. These interactions are implemented using Unity's physics engine, which can be used to simulate realistic collision effects. First, add a rigid body to the water droplet prefab, disable UseGravity, and add a Sphere collider. At the same time, set the layers for the objects that need to interact in the scene. Add a BulletProperty script to the bullet prefab. In BulletProperty, based on the different layers, implement the interaction events of the water droplet colliding with different objects when collision events are triggered.

[0057] (III) Beneficial Effects

[0058] This invention provides an application of a real-time simulation algorithm for reconstructing the trajectory of fire-fighting water jets in a virtual environment. Compared with existing technologies, it has the following advantages:

[0059] (1) The application of the real-time simulation algorithm for fire jet trajectory restoration in a virtual environment is that the mathematical calculation method of adding correction coefficients to predict the jet trajectory requires less hardware equipment and has a faster calculation speed. The modified fire water cannon jet trajectory model based on air resistance theory can accurately and effectively predict the fire water cannon jet trajectory in the Unity virtual scene, so as to improve the accuracy of fire water cannon jet trajectory prediction. The established model is verified by the actual jet trajectory.

[0060] (2) The application of the real-time simulation algorithm for fire spray water trajectory restoration in the virtual environment is achieved by using object pool technology. When not in use, the instantiated objects of the water droplet prefab are saved instead of being destroyed directly. When used again, the cached objects are directly provided without instantiation. This makes full use of resources, speeds up the process, and improves system performance. Attached Figure Description

[0061] Figure 1 This is a schematic diagram of the fire monitor jet trajectory model of the present invention;

[0062] Figure 2This is a schematic diagram of a fire monitor blooming in an embodiment of the present invention. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] Please see Figure 1-2 This invention provides a technical solution: a real-time simulation algorithm for restoring the trajectory of fire-fighting water jets, specifically including the following steps:

[0065] T1. Taking a unit mass jet micro-element as the research object, establish a rectangular coordinate system and perform force analysis, such as... Figure 1 As shown, let v be the velocity of the jet element, θ be the angle between the jet velocity direction and the positive x-axis, Ft be the air resistance, which is opposite to the jet direction, mg be the weight of the element, which is vertically downward, and x and y be the range and height of the element.

[0066] Let i be the unit vector in the direction of the jet velocity, then:

[0067] v = vi

[0068] Differentiating both sides with respect to time, we get:

[0069]

[0070] Let j be a unit vector perpendicular to the jet velocity direction. According to the principle of vector differentiation, we have:

[0071]

[0072] Lianlide:

[0073]

[0074] The water jet from a fire monitor is continuous, therefore the mass of water ejected per second, *m*, can be considered a constant and does not change with time *t*. According to Newton's second law:

[0075]

[0076] Projecting onto vectors i and j, we get:

[0077]

[0078] Therefore, we can know

[0079]

[0080] T2, Step T1: Add correction coefficients k1 and k2 to the above formula, and the modified formula is as follows:

[0081] Ascending phase:

[0082]

[0083] Descent phase:

[0084]

[0085] T3. The formula for calculating the air resistance Ft experienced by the jet micro-element in the air is as follows:

[0086]

[0087] Where ρ 空 Let V be the air density, v be the velocity of the infinitesimal element, and S be the velocity of the infinitesimal element. M Let C be the cross-sectional area of ​​the infinitesimal element. X This refers to the air drag coefficient;

[0088] T4, air drag coefficient C X The calculation formula is as follows:

[0089]

[0090] Where Re is the Reynolds number, ρ 水 Let d0 be the water density, v0 be the initial velocity of the infinitesimal element, and d0 be the diameter of the fire monitor.

[0091] T5. Divide the jet trajectory model into two parts, with the highest point of the trajectory as the dividing point, and the cross-sectional area S M The calculation formula is as follows:

[0092] Ascending phase:

[0093] S M =A0(1+aln(1+x))

[0094] Descent phase:

[0095] S M =A0(1+bln(1+y0-y))

[0096] Where A0 is the initial cross-sectional area, a and b are the area correction coefficients for the rising and falling sections, respectively, and y0 is the jet height at the highest point of the jet.

[0097] T6. Directly solving the differential equation is too complex, so the fourth-order Runge-Kutta algorithm is used to solve it with a step size of 0.02, as shown in the following formula, where h is the step size.

[0098]

[0099] T7. Different correction coefficients are used for different angles. The fitting function for the correction coefficients is as follows:

[0100] X=(eθ f +g)l

[0101] Where X is the correction coefficient in the jet estimation model, θ is the angle between the initial velocity direction of the infinitesimal element and the positive x-axis, and e, f, and g are the coefficients of the fitting function.

[0102] In this embodiment of the invention, the shape of the jet micro-element in the model of step T1 does not change during the entire motion process. However, this assumption is impossible to hold in reality due to the jet breaking and the influence of wind. At the same time, by observing the actual motion trajectory of the water jet, it can be seen that the rate of change of velocity in the rising segment of the jet is significantly different from that in the falling segment.

[0103] In this embodiment of the invention, correction coefficients k1 and k2 are added in step T2 to simulate the phenomenon that the air resistance and the velocity direction of the jet micro-element are not collinear due to the jet breakup and wind force during the rising and falling stages, so as to improve the accuracy of the jet trajectory simulation.

[0104] According to experiments and literature review, in step T5 of this invention, the water jet is a solid cylinder when it is first ejected from the nozzle. Then, due to the breakup of the jet, the water jet in contact with the air on the outside becomes droplets. At this time, the inside is still solid until the entire jet column is completely broken into droplets.

[0105] This invention also provides an application of a real-time simulation algorithm for reconstructing the trajectory of fire-fighting water jets in a virtual environment, specifically including the following steps:

[0106] E1. Building virtual 3D scenes based on the Unity3D virtual reality engine;

[0107] E2. Based on the .NET framework, implement a trajectory algorithm class that encapsulates the fire monitor jet trajectory model based on air resistance theory into an external function interface GenerateTrack().

[0108] E3, when called, pass in the muzzle position, muzzle elevation angle, muzzle flow rate, muzzle diameter and calculation accuracy, and it will return the point set of the fire monitor jet trajectory at this time;

[0109] E4. By comparing the simulated jet trajectory in Unity with the actual jet trajectory from different angles, the accuracy of the jet trajectory model is verified.

[0110] In this case study, the YST-4NN water cannon from TFT Corporation was used for testing. The operating pressure was 689.5 kPa, the rated flow rate Q was 94.625 L / s, the nozzle height was 0.61 m, the equivalent outlet diameter d was 57.15 mm, and the muzzle water jet velocity was:

[0111]

[0112] The parameters required for calculating the trajectory of the fire monitor jet at various elevation angles are shown in Table 1 below.

[0113] Table 1 Correction factors required for jet trajectory calculation at various pitch angles.

[0114] Angle / ° a b k1 k2 30 159 4.98 1.05 1.65 45 259 4.32 1.18 1.56 60 299 3.65 1.196 1.45 75 323 3 1.2 1.38

[0115] The comparison of the jet height and range of the water jet at different pitch angles and their errors are shown in Tables 2 and 3, respectively.

[0116] Table 2 Comparison of Simulated and Actual Firing Heights

[0117] Angle / ° Simulated firing height / m Actual firing height / m error 30 15.85 15.73 0.76% 45 26.84 26.60 0.90% 60 39.66 39.44 0.56% 75 52.08 51.52 1.09%

[0118] Table 3 Comparison of Simulated Range and Actual Range

[0119] Angle / ° Simulated range / m Actual range / m error 30 88.07 79.85 10.29% 45 87.15 72.54 20.14% 60 75.81 62.50 21.30% 75 49.10 40.40 21.53%

[0120] As shown in Tables 2 and 3, the predicted values ​​of the elevation are very close to the actual values, with errors all within 1.1%. However, the predicted values ​​of the range differ significantly from the actual values, all exceeding 10%, with the maximum difference reaching 21.53%. This indicates that the predicted curves of the jet trajectory at each elevation angle have a high degree of fit with the actual curves in the ascending segment, while the error is larger and the fit is lower in the descending segment.

[0121] To reduce the error in the jet trajectory prediction curve during the descent segment, the cross-sectional area S of the descent segment is... M The formula is revised as follows:

[0122] S M =A0(1+bln(1+y0-y))

[0123] The parameters required for calculating the trajectory of the fire monitor jet at each pitch angle after correction are shown in Table 4 below.

[0124] Table 4. Correction factors required for jet trajectory calculation at various pitch angles.

[0125]

[0126]

[0127] The comparison of the jet height and range of the water jet at different pitch angles and their errors are shown in Tables 5 and 6, respectively.

[0128] Table 5 Comparison of corrected simulated firing height and actual firing height

[0129] Angle / ° Simulated firing height / m Actual firing height / m error 30 15.85 15.73 0.76% 45 26.84 26.60 0.90% 60 39.66 39.44 0.56% 75 52.08 51.52 1.09%

[0130] Table 6 Comparison of corrected simulated range and actual range

[0131] Angle / ° Simulated range / m Actual range / m error 30 79.04 79.85 -1.01% 45 72.90 72.54 0.50% 60 61.81 62.50 -1.10% 75 40.58 40.40 0.45%

[0132] As shown in Tables 5 and 6, the predicted values ​​of the jet height and range are very close to the actual values, with errors within 1.1%. This indicates that the predicted jet trajectory curves at each elevation angle are highly consistent with the actual curves, proving the accuracy of the fire monitor jet trajectory model.

[0133] For predicting the trajectory of a fire monitor jet at any pitch angle, correction coefficients in the jet trajectory model are obtained by fitting a function. The correction coefficients of the fitting function are shown in Table 7.

[0134] Table 7. Fitting function coefficients for correction coefficients

[0135]

[0136]

[0137] The correction factors required for calculating the trajectory of the fire monitor jet at each elevation angle are obtained by fitting the correction factor function, as shown in Table 8.

[0138] Table 8 Correction coefficients calculated for the fitting function

[0139] Angle / ° a b k1 k2 30 160.02 880.08 1.05 1.66 45 260.03 1430.16 1.18 1.54 60 300.88 1654.86 1.196 1.45 75 322.04 1771.21 1.2 1.38

[0140] The original correction coefficients are shown in Table 9.

[0141] Table 9 Original Correction Factors

[0142] Angle / ° a b k1 k2 30 159 874.5 1.05 1.65 45 259 1424.5 1.18 1.56 60 299 1644.5 1.196 1.45 75 323 1776.5 1.2 1.38

[0143] The comparison of the jet height and range of water jets at different pitch angles, predicted by the correction coefficients calculated using the fitting function, and their errors are shown in Tables 10 and 11, respectively.

[0144] Table 10 Comparison of predicted and actual ranges based on the correction coefficients calculated using the fitting function.

[0145]

[0146]

[0147] Table 11 Comparison of predicted and actual firing heights based on the correction coefficients calculated using the fitting function.

[0148] Angle / ° Simulated firing height / m Actual firing height / m error 30 15.21 15.73 -3.31% 45 26.22 26.60 -1.43% 60 38.99 39.44 -1.14% 75 51.45 51.52 -0.14%

[0149] As shown in Tables 10 and 11, the predicted values ​​of the elevation and range have relatively large errors compared with the actual values ​​and the original correction coefficients, but the overall errors are all within 3.4%. This demonstrates the effectiveness and accuracy of the fitting function in predicting the jet trajectory curves at various elevation angles.

[0150] Based on the calculation results of the range, height and correction coefficient of the jet trajectory at various pitch angles, it can be seen that the modified fire monitor jet trajectory model based on air resistance theory can accurately and effectively predict the fire monitor jet trajectory in the Unity virtual scene.

[0151] In this embodiment of the invention, the visualization effect in the virtual scene of the jet trajectory is reproduced as follows:

[0152] The appearance of the water trail is implemented using the trailing system provided by the Unity engine. Create an empty GameObject, add the Trail Renderer component to it, and use this empty object to simulate a single water droplet. By adjusting the properties of the Trail Renderer component, set the width, length and water map appearance of the water droplet. After setting, make this empty object into a water droplet prefab.

[0153] To generate water droplets in real time at the nozzle of a fire monitor in a virtual scene, the Resources.Load() method is used to dynamically load a pre-made water droplet. After the droplet is generated, the GenerateTrack() function of the trajectory algorithm class is called to obtain the trajectory point set of the droplet at that moment. The DOPath() method of the DoTween plugin is used to make the droplet move along the jet trajectory calculated by the trajectory algorithm class. New water droplets are generated in real time at the nozzle position at fixed intervals. When the time interval between generating water droplets is short enough, a continuous water flow effect is formed in the virtual space.

[0154] During the water's movement, it will interact with other objects. This is achieved through Unity's physics engine, which can be used to simulate realistic collision effects. First, add a rigid body to the water droplet prefab, disable Use Gravity, and add a Sphere collider. At the same time, set the layers for the objects that need to interact in the scene. Add a BulletProperty script to the bullet prefab. In BulletProperty, based on the different layers, implement the interaction events of the water droplet colliding with different objects when collision events are triggered.

[0155] Object instantiation is a complex process. For example, instantiating a prefab involves a lot of behind-the-scenes work: loading its dependent resources, instantiating these resources, assigning values ​​to resource objects, assigning values ​​to the prefab object, and finally obtaining the prefab instantiated object. Therefore, frequently generating and destroying a large number of water droplets in a virtual scene can significantly impact system performance. To address this, object pooling technology is used. Instead of directly destroying prefab instantiated water droplets when they are not in use, the pooled objects are saved and used again when needed without requiring instantiation. This fully utilizes resources, accelerates the process, and improves system performance.

[0156] In this embodiment of the invention, the visualization effect reproduction in the virtual scene of the flowering trajectory is specifically as follows: when the fire monitor flowers, as shown... Figure 2 As shown, the current muzzle direction is The flowering trajectory effect can be implemented by transforming it into the effect of multiple jet trajectories. For example, when the flowering angle is α, at this time... Let be the initial direction of one of the jet trajectories on the flowering trajectory, where The initial direction of an adjacent jet trajectory can be determined by... By rotating counterclockwise by β around the current muzzle direction, we can obtain... and so on, we can obtain... The direction of all jets rotating counterclockwise around the current muzzle direction is such that when β is sufficiently small, the jet trajectory effect is continuous, thus simulating the blooming effect.

[0157] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.

[0158] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0159] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. The application of a real-time simulation algorithm for reconstructing the trajectory of fire-fighting water jets in a virtual environment, characterized by: Specifically, the following steps are included: E1. Building virtual 3D scenes based on the Unity3D virtual reality engine; E2. Based on the .NET framework, implement a trajectory algorithm class that encapsulates the fire monitor jet trajectory model based on air resistance theory into an external function interface GenerateTrack(). E3, when called, pass in the muzzle position, muzzle elevation angle, muzzle flow rate, muzzle diameter and calculation accuracy, and it will return the point set of the fire monitor jet trajectory at this time; E4. By comparing the Unity simulated jet trajectory with the actual jet trajectory from different angles, the accuracy of the jet trajectory model is verified. To generate water droplets in real time at the nozzle of a fire monitor in a virtual scene, the Resources.Load() method is used to dynamically load a pre-made water droplet. After the water droplet is generated, the GenerateTrack() function of the trajectory algorithm class is called to obtain the trajectory point set of the water droplet at this moment. The DOPath() method of the DoTween plugin is used to make the water droplet move along the jet trajectory calculated by the trajectory algorithm class. New water droplets are generated in real time at the nozzle position at fixed intervals. When the time interval between water droplet generation is small enough, a continuous water flow effect is formed in the virtual space. The real-time simulation algorithm for reconstructing the trajectory of fire-fighting water jets specifically includes the following steps: T1. Establish a rectangular coordinate system and perform force analysis. Let v be the velocity of the jet element, θ be the angle between the jet velocity direction and the positive x-axis, Ft be the air resistance, which is opposite to the jet direction, mg be the weight of the element, which is vertically downward, and x and y be the range and height of the element. Let i be the unit vector in the direction of the jet velocity, then: v = vi Differentiating both sides with respect to time, we get: Let j be a unit vector perpendicular to the jet velocity direction. According to the principle of vector differentiation, we have: Lianlide: The water jet from a fire monitor is continuous, therefore the mass of water ejected per second, *m*, can be considered a constant and does not change with time *t*. According to Newton's second law: Projecting onto vectors i and j, we get: Therefore, we can know T2, Step T1: Add correction coefficients k1 and k2 to the above formula, and the modified formula is as follows: Ascending phase: Descent phase: T3. The formula for calculating the air resistance Ft experienced by the jet micro-element in the air is as follows: Where ρ 空 Let V be the air density, v be the velocity of the infinitesimal element, and S be the velocity of the infinitesimal element. M Let C be the cross-sectional area of ​​the infinitesimal element. X This refers to the air drag coefficient; T4, air drag coefficient C X The calculation formula is as follows: Where Re is the Reynolds number, ρ 水 Let d0 be the water density, v0 be the initial velocity of the infinitesimal element, and d0 be the diameter of the fire monitor. T5. Divide the jet trajectory model into two parts, with the highest point of the trajectory as the dividing point, and the cross-sectional area S M The calculation formula is as follows: Ascending phase: S M =A0(1+a ln(1+x)) Descent phase: S M =A0(1+b ln(1+y0-y)) Where A0 is the initial cross-sectional area, a and b are the area correction coefficients for the rising and falling sections, respectively, and y0 is the jet height at the highest point of the jet. T6. Therefore, the fourth-order Runge-Kutta algorithm is used to solve the problem, with a step size of 0.02, as shown in the following formula, where h is the step size; T7. Different correction coefficients are used for different angles. The fitting function for the correction coefficients is as follows: X=(eθ f +g)l Where X is the correction coefficient in the jet estimation model, θ is the angle between the initial velocity direction of the infinitesimal element and the positive x-axis, and e, f, and g are the coefficients of the fitting function.

2. The application of the real-time simulation algorithm for fire jet water trajectory reconstruction according to claim 1 in a virtual environment, characterized in that: The shape of the jet micro-element in the T1 model does not change during the entire motion process. However, this assumption is impossible in reality due to jet breakup and the influence of wind. At the same time, by observing the actual motion trajectory of the water jet, it can be seen that the rate of change of velocity in the rising segment is significantly different from that in the falling segment.

3. The application of the real-time simulation algorithm for fire-fighting water jet trajectory reconstruction according to claim 1 in a virtual environment, characterized in that: The correction coefficients k1 and k2 added in step T2 are used to simulate the phenomenon that the air resistance and the velocity direction of the jet micro-element are not collinear due to the jet breakup and wind force during the rising and falling stages, so as to improve the accuracy of the jet trajectory simulation.

4. The application of the real-time simulation algorithm for fire-fighting water jet trajectory as described in claim 1 in a virtual environment, characterized in that: In step T5, the water jet is a solid cylinder when it is first ejected from the nozzle. Then, due to the breakup of the jet, the water jet in contact with the air on the outside becomes droplets. At this time, the inside is still solid until the entire jet column is broken into droplets.

5. The application of the real-time simulation algorithm for fire jet water trajectory reconstruction according to claim 1 in a virtual environment, characterized in that: The appearance of the water trail is implemented using the trailing system provided by the Unity engine. Create an empty GameObject, add the Trail Renderer component to it, and use this empty object to simulate a single water droplet. By adjusting the properties of the Trail Renderer component, set the width, length and water map appearance of the water droplet. After setting, make this empty object into a water droplet prefab.

6. The application of the real-time simulation algorithm for fire-fighting water jet trajectory reconstruction according to claim 1 in a virtual environment, characterized in that: During the movement of the water, it will interact with other objects. This is achieved through the physics engine provided by Unity. First, add a rigid body to the water droplet prefab, disable Use Gravity, and add a Sphere collider. At the same time, set the layer for the objects that need to interact in the scene, and add a BulletProperty script to the bullet prefab. In BulletProperty, the interaction events of the water droplet colliding with different objects are implemented according to the different layers when the collision event is triggered.

Citation Information

Patent Citations

  • Automatic water jet implementation method and system

    CN114521939A

  • Method for simply simulating fluid flow, storage medium and terminal equipment

    CN115359157A