Modeling method of bleeding model in virtual operation
By introducing error relief pressure terms and adaptive time steps into the bleeding simulation of virtual surgery, the deficiencies of blood viscosity changes and incompressibility simulation are solved, the authenticity and visual effects of the bleeding simulation are improved, and a more stable and real-time system is achieved. simulation results.
Patent Information
- Application Number
- CN202410864440.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-30
- Publication Date
- 2024-09-17
AI Technical Summary
Existing virtual surgical bleeding simulations have shortcomings in simulating the biological properties of blood. In particular, they fail to effectively consider the changes in blood viscosity with shear rate and the incompressible characteristics of blood, resulting in unrealistic visual effects and simulations.
By introducing an error relief pressure term into the Navier-Stokes equation, the dynamic viscosity of blood is calculated, and an adaptive time step is used to simulate the incompressibility of blood and improve the authenticity and real-time performance of bleeding.
It realizes the change of blood viscosity with shear rate, improves the visual effect of bleeding and the stability and real-time performance of the simulation, and enhances the authenticity and reliability of the bleeding simulation.
Smart Images

Figure CN118656971A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of virtual surgery, and in particular relates to a modeling method of a bleeding model in virtual surgery. Background Art
[0002] In recent years, virtual reality technology (VR) has attracted much attention, and its application areas have been continuously expanded. With the help of displays, sensors, force feedback and other equipment, VR technology can build a highly realistic virtual environment. This virtual environment strives to be comparable to the real environment in terms of vision, touch, hearing, and even taste and smell, making users feel as if they are in a real scene and have a strong sense of immersion. Virtual surgery is an important application of VR technology in the field of modern medicine. It combines multidisciplinary cross-disciplinary technologies such as computer graphics, material mechanics and biomedicine, and provides doctors and learners with a surgical simulation training scene that integrates multi-dimensional perception of sight, hearing and touch.
[0003] In real surgery, cutting, suction, suturing, bleeding, and electrocoagulation are frequent and critical operations. Bleeding is particularly common. Allowing bleeding not only threatens the patient's life safety, but also seriously affects the surgical field of view and increases the difficulty of surgery. Therefore, bleeding simulation is an important part of the virtual surgery platform, which can better train users to deal with bleeding.
[0004] Shi Wen (Shi Wen, Liu Peter Xiaoping, Zheng Minhua. Bleeding Simulation With Improved Visual Effects for Surgical Simulation Systems [J]. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 2018, 51(2)) incorporated the effects of tension and platelets on the viscosity of bleeding particles into the NS equations in order to obtain more realistic bleeding visual effects and biological characteristics in surgical simulations. Shi Quan (Shi Quan. Research on bleeding simulation in virtual brain surgery training system [D]. Beijing Jiaotong University, 2019) proposed an artificial repulsive force model based on potential energy function to address the stress instability problem caused by the insufficient number of neighboring particles, which effectively improved the particle aggregation phenomenon and further enhanced the authenticity of bleeding simulation. Although the existing bleeding simulation has achieved good results, there are still some shortcomings. Using only the simple Navier-Stokes (NS) equations and solving the NS equations through the Smoothed Particle Hydrodynamics Method (SPH) method cannot simulate the biological properties of blood very well. For example, it does not take into account the fact that blood viscosity increases as the shear rate decreases and the incompressible nature of blood. Summary of the invention
[0005] The present invention provides a modeling method for a bleeding model in a virtual surgery. By studying the biological characteristics of blood, the change of blood viscosity with shear rate is realized, and the authenticity of bleeding is improved; by adding an error relief pressure term in the NS equation, the incompressible characteristic of blood is realized, and the visual effect of bleeding is improved; by adopting an adaptive time step, the real-time performance of the bleeding simulation is improved.
[0006] The present invention is achieved through the following technical solutions.
[0007] The method for modeling a bleeding model in a virtual surgery according to the present invention comprises the following steps:
[0008] Step 1: In each time period, a certain number of bleeding particles are randomly generated, and the physical quantities of the particles such as speed, acceleration, and position are initially set. The initial position of the particles is set near the bleeding point;
[0009] Step 2: Calculate the viscosity coefficient of the bleeding particles according to the shear rate of the bleeding particles, so as to realize the change of blood viscosity with the shear rate, which is more consistent with the real bleeding phenomenon;
[0010] Step 3, calculate the pressure, external force and viscosity force on the particles;
[0011] Step 4: Introduce an error relief pressure term into the NS equation to accurately simulate the incompressibility of blood and calculate the resultant force on the particles;
[0012] Step 5: Calculate the adaptive time step according to the particle position and the maximum velocity in the neighborhood to ensure the stability of particle motion and improve the real-time performance of bleeding simulation;
[0013] Step 6: Update the acceleration, velocity and position of the particle at the next moment according to the resultant force on the particle and the time step.
[0014] Furthermore, in each time period described in step 1, a certain number of bleeding particles are randomly generated, and physical quantities such as the velocity, acceleration, and position of the particles are initially set, and the initial position of the particles is set near the bleeding point.
[0015] Among them, the initial position of the bleeding particle i near the bleeding point is:
[0016]
[0017]
[0018] In the formula, (x i ,y i ,z i ) is the position coordinate of bleeding particle i, r is the suction radius, θ is a random number between 0 and π, is a random number between 0 and 2π, ξ is the scaling factor, and (a, b, c) are the coordinates of the bleeding point.
[0019] Furthermore, the viscosity coefficient of the bleeding particles is calculated according to the shear rate of the bleeding particles as described in step 2.
[0020]
[0021] Where γ is the shear rate of blood, τ0 is the yield stress, μ p is the plastic viscosity, and α is the temperature factor, which is related to temperature.
[0022] Furthermore, the pressure, external force and viscosity force on the particles are calculated as described in step 3.
[0023]
[0024] In the formula, m j is the mass of particle j, P i , P j is the pressure of particles i and j, W(r i -rj ,h) is the smooth kernel function, ρ j is the particle density, μ is the viscosity coefficient of blood, v j -v i is the speed difference of the particles.
[0025] Furthermore, the error mitigation pressure term and the resultant force on the particle are calculated as described in step 4. The error mitigation pressure term (VEM) is introduced to ensure that dρ / dt=0, that is, the particle density does not change with time, ensuring the incompressibility of blood. The VEM term links the instantaneous velocity divergence error with the undesired density change, and the error mitigation pressure term P is obtained according to the state equation (EOS) VEM , and then the corresponding VEM term is added to the momentum equation to reduce the numerical error in the velocity divergence field, making the calculation of the pressure between particles more accurate and improving the incompressibility and realism of blood.
[0026] Among them, the error relief pressure term is:
[0027]
[0028] The pressure after divergence-free pressure correction is:
[0029]
[0030] The net force on the particle is:
[0031] f i =f i pressure +f i gravity +f i viscosity
[0032] In the formula, p i VEM is the pressure calculated based on the unexpected density change.
[0033] Furthermore, the time step is calculated according to the particle position and the maximum velocity within the range described in step 5.
[0034] The adaptive time step is:
[0035] Δt=Δt min +(Δt max -Δt min )H i
[0036]
[0037] In the formula, H i is the step size factor, v iis the current velocity of particle i, v max is the maximum velocity in the neighborhood of particle i, d is the distance between particle i and the particle with the maximum velocity, Δt min and Δt max are the maximum and minimum values of the time step, respectively.
[0038] Furthermore, the velocity, acceleration and position of the particle at the next moment are updated according to the resultant force on the particle and the time step as described in step 6.
[0039]
[0040] v=v0+at
[0041] x=x0+vt
[0042] In the formula, f i is the net force acting on particle i, v0 is the particle velocity of particle i at the previous moment, and x0 is the position coordinate of particle i at the previous moment.
[0043] Compared with the prior art, the modeling method of the bleeding model in virtual surgery of the present invention calculates the viscosity coefficient of blood by the shear rate of blood, realizes the change of blood viscosity with shear rate, and improves the authenticity of bleeding; by adding an error relief pressure term in the NS equation, the incompressible characteristic of blood is realized, and the visual effect of bleeding is enhanced; by adopting an adaptive time step, the stability and real-time performance of the bleeding simulation are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a flow chart of the steps of the method for building a bleeding model of the present invention.
[0045] Figure 2 It is a comparison diagram of the bleeding effects of the dynamic viscosity and fixed viscosity calculation viscosity models of the present invention.
[0046] Figure 3 It is a comparison diagram of the bleeding effects of the adaptive time step and the fixed time step described in the present invention.
[0047] Figure 4 It is the density correction diagram of the traditional SPH method.
[0048] Figure 5 It is a density correction diagram of the divergence-free pressure correction algorithm described in the present invention.
[0049] Figure 6 This is a diagram showing the effect of applying the bleeding model of the present invention to a brain tumor model. DETAILED DESCRIPTION
[0050] In order to facilitate those skilled in the art to implement the invention by referring to the description, the present invention is further described in detail below in conjunction with the accompanying drawings.
[0051] First, in each time period, a certain number of bleeding particles are randomly generated, and the physical quantities of the particles, such as velocity, acceleration, and position, are initially set. The initial position of the particles is set near the bleeding point.
[0052] Among them, the initial position of the bleeding particle i near the bleeding point is:
[0053]
[0054]
[0055] In the formula, (x i ,y i ,z i ) is the position coordinate of bleeding particle i, r is the suction radius, θ is a random number between 0 and π, is a random number between 0 and 2π, ξ is the scaling factor, and (a, b, c) are the coordinates of the bleeding point.
[0056] In this embodiment, r is 1.8 and ξ is 1.3.
[0057] Then, the viscosity coefficient of the bleeding particles is calculated according to the shear rate of the bleeding particles.
[0058]
[0059] Where γ is the shear rate of blood, τ0 is the yield stress, μ p is the plastic viscosity, and α is the temperature factor, which is related to temperature.
[0060] In this embodiment, τ0 is set to 0.05, μ p The value is 3.5 and the value of α is 1.
[0061] Next, calculate the pressure, external force, and viscosity acting on the particles.
[0062]
[0063] In the formula, m j is the mass of particle j, P i , P j is the pressure of particles i and j, W(r i -r j ,h) is the smooth kernel function, ρ j is the particle density, μ is the viscosity coefficient of blood, v j -v i is the speed difference of the particles.
[0064] After that, the error mitigation pressure term and the resultant force on the particle are calculated. The error mitigation pressure term (VEM) is introduced to ensure that dρ / dt=0, that is, the particle density does not change with time, ensuring the incompressibility of blood. The VEM term links the instantaneous velocity divergence error with the undesired density change, and the error mitigation pressure term P is obtained according to the equation of state (EOS): VEM , and then the corresponding VEM term is added to the momentum equation to reduce the numerical error in the velocity divergence field, making the calculation of the pressure between particles more accurate and improving the incompressibility and realism of blood.
[0065] Among them, the error relief pressure term is
[0066]
[0067] The pressure after divergence-free pressure correction is:
[0068]
[0069] The net force on the particle is:
[0070]
[0071] In the formula, p i VEM is the pressure calculated based on the unexpected density change.
[0072] Afterwards, the time step is calculated based on the particle position and the maximum velocity within the range.
[0073] The adaptive time step is:
[0074] Δt=Δt min +(Δt max -Δt min )H i
[0075]
[0076] In the formula, H i is the step size factor, v i is the current velocity of particle i, v max is the maximum velocity in the neighborhood of particle i, d is the distance between particle i and the particle with the maximum velocity, Δt min and Δt max are the maximum and minimum values of the time step, respectively.
[0077] In this embodiment, Δt min The value is 1ms, Δt max The value is 10ms.
[0078] Afterwards, the velocity, acceleration, and position of the particle at the next moment are updated according to the resultant force on the particle and the time step.
[0079]
[0080] v=v0+at
[0081] x=x0+vt
[0082] In the formula, f i is the net force acting on particle i, v0 is the particle velocity of particle i at the previous moment, and x0 is the position coordinate of particle i at the previous moment.
[0083] Then, the improved NS equation is obtained by using the method provided above:
[0084]
[0085] Where ρ is the density of blood, v is the velocity, and μ is the viscosity coefficient of blood. For pressure, is the viscosity force, F gravity is gravity, (F pressure ) * is the error mitigation pressure term.
[0086] The modeling method of the bleeding model in virtual surgery provided by the present invention introduces a method for calculating the viscosity of dynamic blood viscosity and a method based on divergence-free pressure correction, as well as an adaptive time step algorithm. Figure 2 As shown in the figure, it can be seen that the viscosity of the blood using the fixed viscosity method hardly changes over time, while using the method provided by the present invention, as the time goes by, the viscosity coefficient increases, and the viscosity of the blood increases, which is consistent with the viscosity change of real blood. Figure 3 As shown in the figure, the bleeding particles using the fixed step method move unsteadily and tend to move toward the upper right corner. However, using the method provided by the present invention, the bleeding slowly spreads from the bleeding point to the surroundings, and the bleeding particles move more stably. Figure 4 , Figure 5 As shown, from Figure 4 It can be seen that the density error of the traditional SPH method is stable at 18% at about 300 frames, which means that the volume of bleeding particles at different time points is not consistent, which is probably due to the occurrence of penetration, which is contrary to the incompressible property of blood. Figure 5It can be seen that after 175 frames, the average density is stably maintained at a level of about 1.04ρ0, with only 4% steady-state error. After 175 frames, the density of bleeding particles can be maintained constant, and then the total volume can be maintained constant, thereby ensuring the incompressibility of blood. Figure 6 This is the effect of the bleeding model of the present invention applied to the brain tumor model. Figure 6 It can be seen that the particle movement is relatively stable, diffusing around the bleeding point, and the visual effect is also very good.
[0087] By adopting the modeling method of the bleeding model in virtual surgery provided by the present invention, the viscosity coefficient of blood is calculated by the shear rate of blood, so that the change of blood viscosity with shear rate is realized, and the authenticity of bleeding is improved; by adding an error relief pressure term in the NS equation, the incompressible characteristic of blood is realized, and the visual effect of bleeding is improved; by adopting an adaptive time step, the stability and real-time performance of the bleeding simulation are improved.
[0088] The above embodiments are only used to illustrate the present invention, but not to limit the present invention.
Claims
1. A method for modeling a bleeding model in a virtual surgery, characterized by: The steps include: Step 1: In each time period, a certain number of bleeding particles are randomly generated, and the speed, acceleration and position of the particles are initially set. The initial position of the particles is set near the bleeding point; Step 2: Calculate the viscosity coefficient of the bleeding particles according to the shear rate of the bleeding particles, so as to realize the change of blood viscosity with the shear rate, which is more consistent with the real bleeding phenomenon; Step 3, calculate the pressure, external force and viscosity force on the particles; Step 4: Introduce an error relief pressure term into the NS equation to accurately simulate the incompressibility of blood and calculate the resultant force on the particles; Step 5: Calculate the adaptive time step according to the particle position and the maximum velocity in the neighborhood to ensure the stability of particle motion and improve the real-time performance of bleeding simulation; Step 6: Update the acceleration, velocity and position of the particle at the next moment according to the resultant force on the particle and the time step.
2. The method for modeling a bleeding model in a virtual surgery according to claim 1, wherein the initial position of the bleeding particle i near the bleeding point in step 1 is: In the formula, (x i ,y i ,z i ) is the position coordinate of bleeding particle i, r is the suction radius, θ is a random number between 0 and π, is a random number between 0 and 2π, ξ is the scaling factor, and (a, b, c) are the coordinates of the bleeding point.
3. The method for modeling a bleeding model in a virtual surgery according to claim 1, characterized in that The viscosity coefficient of the bleeding particles is calculated according to the shear rate of the bleeding particles as described in step 2: Where γ is the shear rate of blood, τ0 is the yield stress, μ p is the plastic viscosity, and α is the temperature factor, which is related to temperature.
4. The method for modeling a bleeding model in a virtual surgery according to claim 1, wherein the pressure, external force and viscosity force on the calculated particles in step 3 are: In the formula, m j is the mass of particle j, P i , P j is the pressure of particles i and j, W(r i -r j ,h) is the smooth kernel function, ρ j is the particle density, μ is the viscosity coefficient of blood, v j -v i is the speed difference of the particles.
5. The method for modeling a bleeding model in a virtual surgery according to claim 1, wherein the error relief pressure term and the resultant force on the particle in step 4 are as follows: in, The error relief pressure term is: The pressure after divergence-free pressure correction is: The net force on the particle is: f i =f i pressure +f i gravity +f i viscosity In the formula, p i VEM is the pressure calculated based on the unexpected density change.
6. The method for modeling a bleeding model in a virtual surgery according to claim 1, characterized in that The adaptive time step described in step 5 is: Δt=Δt min +(Δt max -Δt min )H i In the formula, H i is the step size factor, v i is the current velocity of particle i, v max is the maximum velocity in the neighborhood of particle i, d is the distance between particle i and the particle with the maximum velocity, Δt min and Δt max are the maximum and minimum values of the time step, respectively.
7. The method for modeling a bleeding model in a virtual surgery according to claim 1, characterized in that The acceleration, velocity, and position described in step 6 are: v=v0+at x=x0+vt In the formula, f i is the net force acting on particle i, v0 is the particle velocity of particle i at the previous moment, and x0 is the position coordinate of particle i at the previous moment.
