Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 5, No. 3, 2023 5 Application of Efficient Algorithm in Dynamic Simulation of Viscoelastic Fluid in 3D Animation Zicheng Liu Qingdao Academy, Qingdao, China Abstract: With the rapid development of computer technology, 3D animation has become a hot and concerned field. Whether it is movies, TV, games or other digital media, 3D animation is playing an increasingly important role. In the process of 3D animation, computers need to deal with a lot of data and complex calculations, so efficient algorithms are of great significance to improve the efficiency of animation production and the quality of simulation. Efficient algorithm plays a vital role in 3D animation, which can improve the computational efficiency, reduce the computational time and save computational resources, and at the same time improve the accuracy and realism of simulation. In this paper, the application of an efficient algorithm- finite element method in the dynamic simulation of viscoelastic fluid is introduced in detail. At the same time, the article also discusses the future technical trends and development direction, which provides ideas and references for further research. Keywords: Efficient Algorithm; 3D Animation; Viscoelastic Fluid; Dynamic Simulation. 1. Introduction In the past decades, computer graphics has made great progress, making the realism and details of computer- generated images more and more noticeable. Among them, fluid simulation is an important research field in computer graphics, which is very important for simulating and rendering real-world fluid phenomena [1]. In the entertainment fields such as movies and games, in order to improve the audience's visual experience, animation needs more and more detailed and realistic fluid simulation effects [2]. At the same time, in the fields of scientific calculation and engineering simulation, it is also necessary to accurately simulate the fluid to guide the process of product design and optimization. The simulation of viscoelastic fluid is an important task in computer graphics. Because the motion behavior of viscoelastic fluid is more complicated than that of ordinary fluid, it is necessary to adopt a more elaborate simulation method [3]. Compared with ordinary fluids, viscoelastic fluids have more complex motion behaviors, such as fluctuation and vortex, so more detailed simulation methods are needed [4]. In addition, with the continuous development of computer graphics technology, animation requires more realism and real-time performance for fluid simulation. Therefore, in order to meet these requirements, researchers continue to explore new algorithms and methods to improve the efficiency and effect of fluid simulation. Efficient algorithm is the key to solve the dynamic simulation problem of viscoelastic fluid. Efficient algorithms can greatly reduce computing time and memory consumption, improve simulation efficiency, and at the same time bring higher realism and credibility to animation production [5]. Therefore, the efficient algorithm has important application value in the dynamic simulation of viscoelastic fluid. However, there are still some shortcomings in the current efficient algorithm, such as the inability to fully simulate the complex behavior of viscoelastic fluids and the numerical instability. Therefore, this paper will put forward some improvement measures to solve these problems, so that the efficient algorithm is more suitable for the application of viscoelastic fluid dynamic simulation in 3D animation. 2. Overview of Related Technologies In the field of computer graphics, the dynamic simulation of viscoelastic fluid has attracted extensive attention. At present, the common fluid simulation methods include particle system, hydrodynamic simulation, viscoelastic fluid simulation and so on. Particle system and fluid dynamics simulation methods have certain universality, but the simulation effect for viscoelastic fluids is not ideal [6]. In computer graphics, efficient algorithms are of great significance. First of all, the efficient algorithm can greatly reduce the calculation time and memory consumption, and improve the simulation efficiency [7]. Secondly, efficient algorithms can bring higher realism and credibility to animation production. However, there are still some shortcomings in the current efficient algorithms, such as difficulty in processing large-scale data sets and sensitivity to noise [8]. Therefore, this paper will put forward some improvement measures to solve these problems, so that the efficient algorithm is more suitable for the application of viscoelastic fluid dynamic simulation in 3D animation. Figure 1 is a fluid animation simulation screen based on 3D animation software. Figure 1. Fluid animation simulation screen based on 3D animation software First of all, to solve the problem that efficient algorithms 6 are difficult to deal with large-scale data sets, we can consider adopting parallel computing framework. By assigning computing tasks to multiple processors or computers for simultaneous processing, the computing efficiency can be greatly improved [9]. Secondly, in order to solve the problem that efficient algorithms are sensitive to noise, filtering technology can be used to reduce the influence of noise on simulation results. In addition, in order to improve the accuracy of simulation results, multi-scale simulation method can be considered. Multi-scale simulation method can comprehensively consider the physical effects and interactions at different scales, so as to obtain more precise and accurate simulation results. 3. Algorithm Design and Application Efficient algorithm has a wide application prospect, which can be used in movies, games, scientific calculation and engineering simulation to simulate fluid dynamics, thus improving the realism and credibility of animation production. In 3D animation, finite element method is one of the commonly used methods to simulate viscoelastic fluid dynamics. It can get high-precision simulation results by discretizing fluid infinitesimals and describing the interaction between infinitesimals by using linear or nonlinear equations. In the dynamic simulation of viscoelastic fluid, the finite element method can be used to simulate complex scenes such as droplet impact on the surface and pipeline flow. By discretizing fluid infinitesimal elements and describing the interaction between infinitesimal elements with linear or nonlinear equations, high-precision simulation results can be obtained. Finite element method is also widely used in dynamic simulation of viscoelastic fluid. These methods can get more real and accurate simulation results by modeling the physical properties and motion laws of fluids. The finite difference method is a numerical method based on the difference equation. By discretization in space and time, the difference equation is used to approximate the calculation instead of the differential equation, and a high-precision simulation result can be obtained. In the finite difference method, the key steps are to determine the difference equation and choose the appropriate discretization scheme. The fluid region is divided into a series of small elements, each of which can be represented by its centroid and shape parameters. For fluid regions with complex shapes, unstructured grids can be used to adapt to various boundary conditions. In the process of simulation, it is necessary to determine the boundary conditions of fluid, such as fixed boundary and free boundary. These boundary conditions will have an important impact on the simulation results. According to the physical properties and motion law of fluid, the differential equation is constructed to describe the interaction between each infinitesimal. Before the animation subject ontology model is established, it is necessary to describe the objective animation subject structure by classification. If the animation subject contains six elements, it is described as: P X, T, J , Re l , S , S (1) In the formula: X and T respectively represent different elements in the virtual environment and the relational operators between different elements. J and Rel respectively represent the conceptual hierarchy and non- clustering relationship between different elements. S and S respectively represent the existing ontology prototype and the intrinsic correlation of the elements. Among them: X ,X , … ,X ∈ X describes all the elements in the animation character structure. The relational operator described by T can be expressed as: attribute_of  X ,X compose_of  X ,X effect_of  X ,X (2) The formula respectively describes the correlation between X and X . For the sensitivity index, the characteristic elements in formula (2) can be described by formula (3): Sensitivetime attribute_of X ,X , compose_of X ,X , effect_of X ,X (3) According to the maximum mean square error, the threshold of the sensitivity index can be determined. The formula is described as: Threshold_Sensitivetime attribute_of X e ,X e d e (4) Where E represents the playing time of video animation. In animation, finite element method can be used to simulate the dynamic effects of various fluids. For example, in the film special effects production, finite element method can be used to simulate the dynamic behavior of explosion, water flow, smoke and other scenes. These effects can increase the realism and credibility of the film. In game development, finite element method can be used to simulate natural phenomena and fluid dynamic effects in games. For example, the finite element method can be used to simulate natural phenomena such as atmospheric flow and waves, as well as the effects of liquid spraying and fluid collision in the game. In scientific calculation, finite element method can be used to simulate the dynamic behavior of various fluids. For example, the finite element method can be used to simulate the dynamic behavior of scenes such as blood flow and fountain effect. 4. Technical Trend Efficient algorithm plays an important role in 3D animation. With the continuous development of computing technology and algorithm theory, efficient algorithm will be further improved and optimized. 4.1. GPU Acceleration and Distributed Computing GPU acceleration and distributed computing are hot areas of computer technology at present, and they are also important technical trends of 3D animation production in the future. By assigning computing tasks to GPU or multiple CPU cores for parallel computing, the computing efficiency and speed can be greatly improved. At the same time, by distributing computing tasks to multiple computing nodes, distributed computing of large-scale computing can be realized, and the computing efficiency can be further improved. In the future, with the acceleration of GPU and the continuous development of distributed computing technology, 3D animation will get more efficient, fast and accurate computing support. For example, GPU acceleration can achieve a more realistic image rendering effect and improve the quality and efficiency of animation production. 4.2. Deep Learning and Machine Learning Deep learning and machine learning are important 7 branches in the field of artificial intelligence at present, and they are also important technical trends of 3D animation production in the future. Through deep learning and machine learning technology, the data in the process of 3D animation can be analyzed and processed more efficiently and accurately. For example, deep learning technology is used to learn and simulate the posture of animated characters in order to achieve more realistic and vivid role performance. In the future, there may be more intelligent animation software and tools, which can analyze and model users' needs and preferences through machine learning technology to realize automatic and intelligent animation production process. 4.3. Virtual Reality (VR) and Augmented Reality (AR) Virtual Reality (VR) and Augmented Reality (AR) are two other important trends of computer technology at present, and they are also important application fields of 3D animation in the future. Through VR and AR technology, a more immersive and interactive animation experience can be realized, so that the audience can participate in the animation plot more deeply. For example, by watching 3D animated movies through VR technology, the audience can explore and interact in the animated world like a game, thus improving the viewing experience. In the future, there may also be animation production processes and methods that combine VR and AR technologies. Real scenes and objects are transformed into virtual models through advanced 3D scanning and modeling technologies, and then the audience and virtual scenes can have an interactive experience through VR and AR technologies. 5. Conclusion Fluid simulation is an important research field in computer graphics, which is very important for simulating and rendering real-world fluid phenomena. Because the motion behavior of viscoelastic fluid is more complicated than that of ordinary fluid, it is necessary to adopt more sophisticated simulation methods. This paper discusses the application of efficient algorithm in 3D animation. Firstly, the definition and characteristics of efficient algorithm are introduced, and its importance in 3D animation is pointed out. Then, the application of finite element method in efficient algorithm in dynamic simulation of viscoelastic fluid is analyzed. The algorithm can be used not only to simulate the dynamic behavior of fluid, but also to simulate the dynamic behavior of other substances, such as explosion, smoke and water flow. These algorithms can enhance the realism and credibility of animation and improve the audience's viewing experience. In the future, efficient algorithms will be further improved and perfected, and more intelligent and efficient algorithms will appear, and computing technologies and tools will also be continuously developed, such as GPU acceleration, distributed computing, deep learning and machine learning. These technologies will make 3D animation more efficient, realistic and vivid. At the same time, new technologies such as VR and AR will also be combined with 3D animation to bring more immersive and interactive experience to the audience. References [1] Alves M A, Oliveira P J, Pinho F T. Numerical Methods for Viscoelastic Fluid Flows[J]. Annual Review of Fluid Mechanics, 2020, 53(1):1-33. [2] He T. On the edge‐based smoothed finite element approximation of viscoelastic fluid flows[J]. International Journal for Numerical Methods in Fluids, 2022, 94(5):423-442. [3] Xu X Y. Three-dimensional simulation of two viscoelastic droplets impacting onto a rigid plate using smoothed particle hydrodynamics[J]. Journal of Applied Mechanics and Technical Physics, 2017, 58(2):318-327. [4] Xie C, Xu K, Qi P, et al. A new mechanism of viscoelastic fluid for enhanced oil recovery: Viscoelastic oscillation[J]. Advances in Geo-Energy Research, 2022, 6(3):267-268. [5] Cai W H, Li Y Y, Zhang H N, et al. An efficient micro-mixer by elastic instabilities of viscoelastic fluids: Mixing performance and mechanistic analysis[J]. International Journal of Heat and Fluid Flow, 2018, 74(DEC.):130-143. [6] Gholipour, Ghayesh, Zhang. A Comparison between Elastic and Viscoelastic Asymmetric Dynamics of Elastically Supported AFG Beams[J]. Vibration, 2020, 3(1):3-17. [7] Kwon Y. Numerical modelling of two-dimensional melt fracture instability in viscoelastic flow[J]. Journal of Fluid Mechanics, 2018, 855:595-615. [8] Liu D, Zhou H, Fang K, et al. A Study of Viscoelastic Model of Polymers in Shear Flow Based on Molecular Dynamic Simulations[J]. Materials Science, 2021(4):27. [9] Shamloo, Amir, Mehrafrooz, et al. Nanomechanics of actin filament: A molecular dynamics simulation[J]. Cytoskeleton, 2018, 75(3):118-130.