Object motion simulation method based on inertia change local calculation
Through the local calculation method based on inertial change, the grid model and Lagrangian function are used, combined with Cayley mapping to calculate on the Lie group, the complex and time-consuming problem of traditional global computing methods is solved, and efficient object motion simulation is achieved. Suitable for real-time applications in complex scenarios.
Patent Information
- Application Number
- CN202411295349.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-07
AI Technical Summary
Traditional global computing methods are complex and time-consuming to process rigid body movements in fluids, making it difficult to achieve efficient simulation of object motion, especially under complex conditions of force field coupling.
Using a local calculation method based on inertial change, object information is represented through a grid model, force and torque calculation is performed using Lagrangian function and Cayley mapping, and numerical integration technology is used to calculate on the Lie group to reduce the calculation complexity and improve the Simulation efficiency.
It realizes real-time update of object motion state in a dynamic environment, reduces computing complexity and resource consumption, improves simulation accuracy and efficiency, and is suitable for real-time or near-real-time applications in complex scenarios.
Smart Images

Figure CN119272492A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an object motion simulation method based on local calculation of inertia change, belonging to the technical field of the combination of computer graphics and computational fluid dynamics. Background Art
[0002] With the deepening application of computer simulation and emulation technology in fields such as physics, engineering and computer animation, the requirements for simulation accuracy and computational efficiency in field problems are also continuously increasing. Objects in complex environments are subject to the combined effects of dynamics and fluid mechanics. Accurately simulating and simulating the state of objects faces the problem of complex state solution and high computational cost. Especially when dealing with rigid body motion in fluids, traditional global calculation methods are often complex and time-consuming. Therefore, the present invention proposes a method for simulating object motion based on local calculation of inertia changes, which aims to improve the simulation accuracy and efficiency of object motion under complex conditions of force field coupling through efficient local calculation technology.
[0003] In the method, the basic information of the object is first represented by a mesh model, including the force point, position, normal, mass, area and volume of the object. This information provides the necessary initial environment and conditions for the simulation. The object is represented by a physical model to describe the force conditions of the object, including external forces such as gravity, buoyancy and resistance, and the force and torque of the object are calculated by the Lagrangian function. The Cayley mapping is used to update the posture with time steps to achieve accurate simulation of the object's motion. The simulation process involves numerical integration technology, which is calculated by mapping the elements of the Lie algebra to the Lie group.
[0004] Through local calculation, the interaction between objects and fluids can be accurately simulated while reducing the computational complexity. Compared with the traditional global simulation method, the local calculation method can improve the computational efficiency and update the motion state of objects in real time in dynamic environments, including position, velocity, and posture. The method given has linear complexity and can effectively represent the complex natural phenomena in the interaction between objects and fluids. Summary of the invention
[0005] 1. A method for simulating object motion based on local calculation of inertia change, characterized by comprising the following steps:
[0006] Step 1: Load the object mesh data constructed by the modeling software and the object attachment information as the initial conditions for the simulation;
[0007] Step 2: Define the physical model, including the forces that affect the motion state of the object, the Lagrangian function that represents the difference between the kinetic energy and potential energy of the system, and the Cayley transform used to update the rotation part of the rigid body;
[0008] Step 3: Solve the equation of motion using the variational integration method;
[0009] Step 4: Write the calculated position, velocity, attitude and other information of the new time step into the geometry node so that it can be updated in the next time step.
[0010] 2. The object motion simulation method based on local calculation of inertia change according to claim 1 is characterized in that the specific steps of step 1 are as follows:
[0011] Step 1.1: Read the mesh information and initial state of the object from the modeling software, including position, attitude and velocity. Let the initial position be q 0 , the initial posture is R 0 , the initial velocity is ξ 0 ;
[0012] Step 1.2: Read the simulation time step h, obtain the simulated scene information and ground collision related parameters;
[0013] Step 1.3: Read the current state of motion, including momentum μ 0 , inertia tensor I 0 , linear velocity v and angular velocity ω.
[0014] 3. The object motion simulation method based on local calculation of inertia change according to claim 1 is characterized in that the specific steps of step 2 are as follows:
[0015] Step 2.1: Define external forces including gravity, buoyancy, and drag lift, and calculate the forces and moments acting on the rigid body based on the current rigid body state and generalized velocity;
[0016] Step 2.2: When the object collides with the ground, calculate the collision force and moment and assign them to the relevant points;
[0017] Step 2.3: Use the Lagrangian function to describe the kinetic energy and potential energy of the system and to calculate the forces and torques acting on the system. The Lagrangian function is expressed as where I is the inertia tensor, ξ is the velocity vector, μ 0 is the initial momentum, E 0 is the initial energy of the system;
[0018] Step 2.4: Use the Cayley map to perform numerical integration on the Lie group, mapping the elements of the Lie algebra to the elements of the Lie group.
[0019] 4. The object motion simulation method based on local calculation of inertia change according to claim 1, characterized in that the specific steps of step 3 are as follows:
[0020] Step 3.1: Solve the discrete Euler-Lagrange equations using the discrete action principle. is the accumulation of Lagrangian functions over discrete time steps. When the action is minimized, the corresponding path satisfies the discrete Euler-Lagrangian equation:
[0021] D 2 L d (q n-1 ,q n , h)+D 1 L d (q n ,q n+1 , h)=0(where D 1 and D 2 denote the partial derivatives with respect to the first and second variables, respectively);
[0022] Step 3.2: Simulate the evolution of the system by iteratively updating the position and velocity at time step h. Update the generalized velocity (ξ n+1 =ξ n +h·a n , a n is the acceleration of the system at step n) and position (q n+1 =q n +h·ξ n ).
[0023] 5. The object motion simulation method based on local calculation of inertia change according to claim 1, characterized in that the specific steps of step 4 are as follows:
[0024] Step 4.1: Update the position, angular velocity, and linear velocity of the rigid body, and write the calculated physical properties into the attributes of the geometric node;
[0025] Step 4.2: Update the posture of the rigid body and write the posture (quaternion) into the attributes of the geometry node;
[0026] Step 4.3: When a collision occurs, calculate the collision damping and update the damping momentum information in the geometry node (v=vd, d is the damping coefficient).
[0027] 6. The object motion simulation method based on local calculation of inertia change according to claim 3, characterized in that in the step 2.2, the reduction process is as follows:
[0028] (2.21) Calculate the ground impact force intensity where p down is the downward momentum, h is the time step, and F down is the downward force;
[0029] (2.22) Calculate the moment T generated by the collisioncollision =∑(P n ×F collision ), where P n is the location of the collision point;
[0030] (2.23) The collision force is distributed according to the number of collision penetration points.
[0031] 7. The object motion simulation method based on local calculation of inertia change according to claim 3, characterized in that in step 2.4, the reduction process is as follows:
[0032] (2.41) Using the angular velocity vector ω and the time step h, we can calculate the antisymmetric matrix, the antisymmetric matrix
[0033] (2.42) Using the calculated Ω h Generate a new rotation matrix R through Cayley mapping new =(I-Ω h ) -1 (I+Ω h ).R.
[0034] The beneficial effects of the present invention are: the influence of the medium on the rigid body is approximated by a local calculation method, which reduces the complexity of the calculation and greatly improves the processing speed. The set of equations required for calculation has only 6 dimensions (rotation and translation), and there is no need to process the data of the entire fluid domain, which reduces the consumption of computing resources and the computing time. The algorithm has linear complexity and can remain efficient even in large-scale simulations. This is particularly important for real-time or near-real-time applications (such as animation and virtual reality), which can ensure that the system can still maintain good performance when processing complex scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Patented algorithm flow chart for simulation of falling leaves in the wind.
[0036] Figure 2 This is the situation of the present invention under different flow fields. DETAILED DESCRIPTION
[0037] The present invention provides an object motion simulation method based on local calculation of inertia changes, and the present invention is further described in detail below in conjunction with specific implementation steps.
[0038] 1. Load the grid model and build the initial simulation environment
[0039] The method of the present invention first reads the mesh model of the object and related data, including the object's point coordinates, position, normal, mass, area and volume. This information provides the necessary initial conditions for the simulation and helps define the geometric and physical properties of the object in three-dimensional space. The mesh model is defined in a standard data format (such as OBJ, STL, etc.), and these data are converted into a model format suitable for numerical calculation.
[0040] 2. Set simulation parameters
[0041] Set the time step of the simulation and read the scene-related environment configuration information, such as ground collision parameters and other mechanical parameters. These configuration parameters are crucial for accurate simulation and can help define how objects interact with the environment, including ground collision parameters (collision depth, friction coefficient, etc.), which are used to simulate the contact behavior between objects and the ground.
[0042] 3. Read motion status data
[0043] At the initial state of the simulation, read the current motion state information, including the object's momentum, inertia tensor, linear velocity, and angular velocity. This information is used to initialize the motion equations and provide a basis for the current state for subsequent simulation steps. Momentum and inertia tensor are used to calculate the rotational dynamics of the object, while linear velocity and angular velocity are used to describe the translation and rotation behavior of the object.
[0044] 4. Define physical model and computational power
[0045] When defining the physical model, external forces such as gravity, buoyancy, and drag are included, and their coupling effects on the object are calculated. These external forces are calculated based on the current state of the object and the generalized velocity. Specifically, gravity acts on the center of mass of the object, buoyancy is related to the volume and density of the object in the fluid, and drag and lift depend on the state of motion of the object in the fluid.
[0046] 5. Lagrangian function and Cayley mapping
[0047] Lagrangian functions are used to describe the kinetic and potential energies of a system and to calculate the forces and torques of the system. By using the Cayley mapping technique, numerical integration is performed on the Lie group (e.g., the rotation group SO(3)) to accurately update the posture of the object. The Cayley mapping efficiently handles rotation updates by mapping elements of the Lie algebra to elements of the Lie group, avoiding the numerical instability in traditional methods.
[0048] 6. Iterative Posture Update and Local Calculation
[0049] The geometry nodes are updated using the calculated new position, velocity, and attitude information. These updates are saved in each time step, correctly reflect the state of the object, and are used for the next update simulation calculation. The local calculation method reduces the amount of calculation required for global calculation by performing numerical operations in the local area of the object, thereby improving the efficiency of the simulation.
[0050] In summary, the present invention provides an efficient time-varying inertial rigid body dynamics simulation method, which can update the state of an object in real time in a dynamic environment through local calculation and precise physical modeling. The beneficial effect of this method is that it improves the calculation efficiency, and at the same time can accurately capture the complex phenomena in the mutual coupling between the object and the fluid, making the simulation results more realistic and reliable. The above describes the basic principles, main features and advantages of the present invention. Those of ordinary skill in the art should understand that the above embodiments do not limit the scope of protection of the present invention in any form, and all technical solutions obtained by equivalent substitution and the like fall within the scope of protection of the present invention.
[0051] The parts not involved in the present invention are the same as the prior art or can be implemented by using the prior art.
Claims
1. A method for simulating object motion based on local calculation of inertia changes, characterized in that The following steps are involved: Step 1: Load the object mesh data constructed by the modeling software and the object attachment information as the initial conditions for the simulation; Step 2: Define the physical model, including the forces that affect the motion state of the object, the Lagrangian function that represents the difference between the kinetic energy and potential energy of the system, and the Cayley transform used to update the rotation part of the rigid body; Step 3: Solve the equation of motion using the variational integration method; Step 4: Write the calculated position, velocity, attitude and other information of the new time step into the geometry node so that it can be updated in the next time step.
2. The object motion simulation method based on local calculation of inertia change according to claim 1, characterized in that: The specific steps of step 1 are as follows: Step 1.1: Read the mesh information and initial state of the object from the modeling software, including position, attitude and velocity. Let the initial position be q0, the initial attitude be R0, and the initial velocity be ξ0; Step 1.2: Read the simulation time step h, obtain the simulated scene information and ground collision related parameters; Step 1.3: Read the current state of motion, including momentum μ0, inertia tensor I0, linear velocity v and angular velocity ω.
3. The object motion simulation method based on local calculation of inertia change according to claim 1, characterized in that: The specific steps of step 2 are as follows: Step 2.1: Define external forces including gravity, buoyancy, and drag lift, and calculate the forces and moments acting on the rigid body based on the current rigid body state and generalized velocity; Step 2.2: When the object collides with the ground, calculate the collision force and moment and assign them to the relevant points; Step 2.3: Use the Lagrangian function to describe the kinetic energy and potential energy of the system and to calculate the forces and torques acting on the system. The Lagrangian function is expressed as Where I is the inertia tensor, ξ is the velocity vector, μ0 is the initial momentum, and E0 is the initial energy of the system; Step 2.4: Use the Cayley map to perform numerical integration on the Lie group, mapping the elements of the Lie algebra to the elements of the Lie group.
4. The object motion simulation method based on local calculation of inertia change according to claim 1, characterized in that: The specific steps of step 3 are as follows: Step 3.1: Solve the discrete Euler-Lagrange equations using the discrete action principle. is the accumulation of Lagrangian functions over discrete time steps. When the action is minimized, the corresponding path satisfies the discrete Euler-Lagrangian equation: D2L d (q n-1 ,q n , h)+D1L d (q n ,q n+1 , h) = 0 (where D1 and D2 represent the partial derivatives with respect to the first and second variables, respectively); Step 3.2: Simulate the evolution of the system by iteratively updating the position and velocity at time step h. Update the generalized velocity (ξ n+1 =ξ n +h·a n , a n is the acceleration of the system at step n) and position (q n+1 =q n +h·ξ n ).
5. The object motion simulation method based on local calculation of inertia change according to claim 1, characterized in that: The specific steps of step 4 are as follows: Step 4.1: Update the position, angular velocity, and linear velocity of the rigid body, and write the calculated physical properties into the attributes of the geometric node; Step 4.2: Update the posture of the rigid body and write the posture (quaternion) into the attributes of the geometry node; Step 4.3: When a collision occurs, calculate the collision damping and update the damped momentum information in the geometry node (v = v·d, d is the damping coefficient).
6. The object motion simulation method based on local calculation of inertia change according to claim 3 is characterized in that: In step 2.2, the reduction process is as follows: (2.21) Calculate the ground impact force intensity where p down is the downward momentum, h is the time step, and F down is the downward force; (2.22) Calculate the moment T generated by the collision collision =∑(P n ×F collision ), where P n is the location of the collision point; (2.23) The collision force is distributed according to the number of collision penetration points.
7. The object motion simulation method based on local calculation of inertia change according to claim 3 is characterized in that: In step 2.4, the reduction process is as follows: (2.41) Using the angular velocity vector ω and the time step h, we can calculate the antisymmetric matrix, the antisymmetric matrix (2.42) Using the calculated Ω h Generate a new rotation matrix R through Cayley mapping new =(I-Ω h ) -1 (I+Ω h )·R.