An interactive control flag flying demonstration image processing method, an interactive demonstration system and equipment

By employing a two-way coupling mechanism between the flagpole and the flag model, the deformation of the flag and the stress on the flagpole are calculated in real time. This solves the problem of insufficient physical realism in flag waving simulations in existing technologies, and enables high-fidelity dynamic image generation and reliable structural stress assessment. It is suitable for engineering safety design and interactive training.

CN122176139APending Publication Date: 2026-06-09SHANGHAI YIYING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI YIYING TECHNOLOGY CO LTD
Filing Date
2026-03-05
Publication Date
2026-06-09

Smart Images

  • Figure CN122176139A_ABST
    Figure CN122176139A_ABST
Patent Text Reader

Abstract

This invention discloses an interactive control method, system, and device for processing images of a flag waving demonstration. The method includes: acquiring flagpole geometric parameters, flag physical property parameters, and environmental wind field parameters, and constructing a physical simulation scene based on these parameters; applying a dynamic load driven by wind field parameters to the flag model within the simulation scene, and simultaneously calculating the flag deformation state and anisotropic stress distribution; mapping the flag deformation state and flagpole displacement response to the graphics rendering pipeline to generate a physically consistent sequence of dynamic flag waving images; dynamically adjusting the environmental wind field parameters or flag physical property parameters according to interactive commands, and re-executing steps S2 to S4 to achieve interactive physical-visual synchronous updates; improving the physical realism of the flag waving simulation, enabling the system to accurately reflect the dynamic response of the fabric and supporting structure under wind load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for processing images of flags waving, and more particularly to an interactively controlled method, system, and device for processing images of flags waving. Background Technology

[0002] In the field of dynamic flag waving simulation technology, early implementation methods mainly relied on procedural generation or data-driven visual modeling techniques. Among these, methods using Perlin noise or similar random field generation algorithms were common. These methods control the frequency, amplitude, and phase of the flag's surface fluctuations by adjusting noise parameters, thereby generating continuous and natural folds and swaying animations. This method can visually and quickly simulate the soft waving effect of a flag in a light or moderate wind, with low computational overhead and easy integration into real-time rendering applications. However, these purely visual-driven methods are essentially a kind of appearance modeling based on texture or vertex displacement. Their motion is entirely determined by a preset noise function, without introducing the dynamic coupling relationship between the physical properties of the flag material itself (such as mass distribution, elastic modulus, and air damping) and the environmental wind field.

[0003] Lacking a robust mechanical framework, such methods struggle to reflect the interaction between real wind fields and the flag structure. When simulating strong or abrupt wind changes, animations relying solely on Peripheral noise often exhibit unrealistic motion inertia, wrinkle propagation patterns, and overall deformation responses. They are particularly inaccurate in representing the flag's stretching, tearing tendencies, or high-frequency flutter as wind speeds increase. More importantly, these methods only output visual animation sequences and cannot simultaneously provide structural stress data on the flag under wind loads, such as in-plane stress distribution, fixed-end constraint reactions, or wind-induced vibration spectra. Therefore, purely visual methods have significant limitations in scenarios requiring physical reliability or further structural analysis (such as engineering assessments, virtual testing, and interactive training). Summary of the Invention

[0004] This invention overcomes the shortcomings of the prior art and provides an interactive control method, interactive demonstration system, and device for processing images of flag waving.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is: an interactively controlled method for processing images of a waving flag, comprising the following steps:

[0006] S1: Obtain the flagpole geometric parameters, flag physical property parameters, and environmental wind field parameters respectively, and construct a physical simulation scene based on the above parameters;

[0007] Among them, the physical simulation scenario couples the flagpole structure model and the fabric flag model;

[0008] S2: In the physical simulation scenario, apply dynamic loads driven by wind field parameters to the flag model and simultaneously calculate the nonlinear elastic deformation state and anisotropic stress distribution of the flag at each time.

[0009] S3: Based on the deformation state and stress distribution obtained in S2, update the additional torque and shear force on the flagpole structural model in real time, and iteratively calculate the displacement response and internal force distribution of the flagpole through the structural mechanics solver;

[0010] S4: Map the deformation state of the flag and the displacement response of the flagpole to the graphics rendering pipeline to generate a physically consistent sequence of dynamic images of the flag waving.

[0011] S5: Based on the interactive instructions, dynamically adjust the environmental wind field parameters or flag physical attribute parameters, and re-execute S2 to S4 to achieve interactive physical-visual synchronous updates.

[0012] In a preferred embodiment of the present invention, in S1, constructing a physical simulation scene specifically includes:

[0013] The flagpole structure model is discretized into a finite element structure consisting of several rigid beam elements, where each beam element is connected by nodes to form a continuous support system.

[0014] The flag model is discretized into a deformable fabric mesh consisting of several mass-spring networks, where each mass represents a discrete node of the fabric, and adjacent mass points are connected by anisotropic springs. The stiffness coefficient of the anisotropic springs is set according to the warp and weft mechanical properties of the fabric material.

[0015] The fixed edge nodes of the flag model are rigidly bound to the top nodes of the flagpole structure model, so that the boundary conditions of the flag when it is under stress are determined by the displacement state of the flagpole.

[0016] In a preferred embodiment of the present invention, in step S2, applying a dynamic load and calculating the deformation state specifically includes:

[0017] The environmental wind field parameters are analyzed into a spatiotemporally varying wind speed vector field, and the local aerodynamic pressure is calculated based on the vector field at each mass point position in the flag model.

[0018] Local aerodynamic pressure is input as an external force into the dynamic equations of the mass-spring network, and the position and velocity of each mass at the current time step are solved by an explicit integration algorithm.

[0019] In each integral iteration, the elongation of the spring is nonlinearly elastically corrected, and the material yield threshold and plastic deformation model are introduced to reflect the irreversible deformation behavior of the fabric under strong winds.

[0020] In a preferred embodiment of the present invention, in S3, updating the flagpole force and calculating the structural response specifically includes:

[0021] Project the reaction forces of all particles in the flag model along the binding edge to the corresponding nodes of the flagpole structure model;

[0022] Based on the projected force, the nodal load vector of the flagpole structure is constructed and substituted into the linear or nonlinear structural mechanics equations.

[0023] A sparse matrix solver is used to calculate the displacement, rotation angle and internal force components of each node of the flagpole, and the displacement of the top node is fed back to the boundary conditions of the flag model to form a two-way coupled loop.

[0024] In a preferred embodiment of the present invention, in S4, generating a dynamic image sequence specifically includes:

[0025] The flag model's point mesh is triangulated to generate a renderable polygonal surface, which is then assigned physically based texture and lighting parameters.

[0026] The beam elements of the flagpole structure model are converted into cylindrical geometry, and the vertices are deformed based on their displacement results.

[0027] The deformed flag and flagpole geometry are fed into the GPU rendering pipeline, where frame-by-frame shading and depth compositing are performed to output a high-fidelity image of the flag waving.

[0028] In a preferred embodiment of the present invention, in step S5, the parameters are dynamically adjusted according to the interactive instructions, specifically including:

[0029] A slider control is provided through a graphical user interface to adjust the wind speed amplitude, wind direction angle, gust frequency, fabric density, Young's modulus, and Poisson's ratio, respectively.

[0030] When the value of any control changes, the corresponding simulation parameters are updated immediately, and the original input is replaced in the next physical simulation time step.

[0031] Maintaining a constant simulation time step ensures that the interactive response delay is below a preset threshold, thereby achieving a smooth real-time demonstration effect.

[0032] In a preferred embodiment of the present invention, in S2, the calculation of the anisotropic stress distribution specifically includes:

[0033] In the mass-spring network, independent elastic coefficients and damping coefficients are configured for the warp and weft springs, respectively.

[0034] At each time step, the total tension of the longitudinal and latitudinal springs is calculated separately and normalized to the stress per unit area.

[0035] Stress distribution is used as the basis for color mapping and is superimposed on the flag surface in the form of a heat map during the rendering stage to visualize the mechanical state.

[0036] In a preferred embodiment of the present invention, in S3, the structural mechanics solver employs an incremental-iterative method to handle geometrically nonlinear problems, specifically including:

[0037] When the flagpole undergoes a large displacement, update the geometric stiffness term of the structural stiffness matrix;

[0038] The equilibrium equations are solved using the Newton-Raphson iterative method until the nodal residuals are less than the convergence tolerance.

[0039] When the number of iterations exceeds the preset limit, the time step is automatically reduced and the calculation is recalculated to ensure numerical stability.

[0040] An interactively controlled image processing system for demonstrating waving flags includes:

[0041] The parameter module is used to receive user input of flagpole geometric parameters, flag physical property parameters, and environmental wind field parameters, and to perform legality verification and unit standardization of the parameters;

[0042] The simulation module is used to build a two-way coupled physical model of the flagpole and the flag, and to perform joint solutions of nonlinear dynamics and structural mechanics.

[0043] The feedback module is used to transmit interaction forces and displacement constraints between the flag and the flagpole to maintain physical consistency;

[0044] The rendering module is used to convert simulation results into a realistic sequence of dynamic images and supports the overlay display of stress and heat maps.

[0045] The interaction module is used to listen for user interface events, update simulation parameters in real time, and trigger the physical-visual synchronous calculation of the next frame.

[0046] An electronic device, comprising:

[0047] At least one processor; and

[0048] Memory that communicates with the processor;

[0049] The memory stores a computer program that can be executed by the processor, which enables the processor to perform an interactively controlled demonstration image processing method for a waving flag.

[0050] This invention addresses the shortcomings of the prior art and has the following beneficial effects:

[0051] (1) This invention provides an interactive control method for processing images of flag waving, an interactive demonstration system and device. By constructing a two-way coupling mechanism between the flag model and the flagpole model, the fabric dynamics model based on the mass-spring network and the flagpole structure model based on the finite element beam element are exchanged in real time for force and displacement. In each simulation time step, the load feedback of the flag deformation on the flagpole and the constraint of the flagpole displacement on the flag boundary are calculated synchronously. This achieves a strict interaction simulation at the physical level, which significantly improves the physical realism of the flag waving simulation and enables the system to accurately reflect the dynamic response of the fabric and the supporting structure under wind load. Compared with the pure visual driving method using Berlin noise in the prior art, which can only generate animations that are realistic on the surface but ignore mechanical coupling, resulting in the inability to provide reliable structural stress data in strong wind simulation, this invention effectively overcomes this defect through two-way coupling and provides quantifiable mechanical basis for engineering safety design through this high-fidelity simulation.

[0052] (2) This invention provides an interactive control method, interactive demonstration system and device for processing images of a flag waving. Through real-time synchronized physical simulation and graphics rendering pipeline, the mechanical calculation results are directly mapped to the GPU rendering process, and stress heat map visualization is integrated. The mass point mesh is transformed into a renderable surface through Delaunay triangulation. Color mapping is dynamically generated based on spring tension to ensure that the visual output is strictly consistent with the physical state, realizing a high-fidelity dynamic image sequence. Users can intuitively observe the shape changes and internal stress distribution of the waving flag. Compared with the visual effects generated by the program in the prior art, the latter often suffers from shape distortion or decoupling from real mechanical behavior due to lack of physical basis. This invention eliminates such deviations through physical-visual synchronous updates. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a perspective structural diagram of a preferred embodiment of the present invention;

[0055] Figure 2 This is a logic diagram of a bidirectional coupled physical simulation according to a preferred embodiment of the present invention. Detailed Implementation

[0056] 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.

[0057] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein. Therefore, the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0058] Application Overview:

[0059] This application addresses the problem of insufficient physical realism in existing interactive flag-waving demonstration systems. Existing technologies use a procedural method of Berlin noise to generate visually realistic flag dynamic effects. However, this type of method does not establish the mechanical coupling relationship between the fabric material and the supporting structure, and ignores the anisotropic response, nonlinear elastic deformation, and reaction force of the fabric under wind loads on the flagpole structure. As a result, the simulation results cannot reflect the interaction mechanism of the flag-flagpole system in real engineering scenarios. Especially in simulations of strong winds or extreme weather, this purely visual-driven method cannot provide reliable structural stress assessment basis and is difficult to meet the needs of engineering safety design.

[0060] This invention achieves synchronous calculation of flag deformation and flagpole stress by constructing a bidirectional coupling mechanism between a fabric dynamics model based on a mass-spring network and a flagpole structural model based on finite element beam elements. It also maps the mechanical state to the graphics rendering pipeline in real time, thereby presenting physically consistent visual effects and structural responses in interactive demonstrations.

[0061] Example 1:

[0062] S1: Obtain the flagpole geometric parameters, flag physical property parameters, and environmental wind field parameters respectively, and construct a physical simulation scene based on the above parameters;

[0063] Among them, the physical simulation scenario couples the flagpole structure model and the fabric flag model;

[0064] S2: In the physical simulation scenario, apply dynamic loads driven by wind field parameters to the flag model and simultaneously calculate the nonlinear elastic deformation state and anisotropic stress distribution of the flag at each time.

[0065] S3: Based on the deformation state and stress distribution obtained in S2, update the additional torque and shear force on the flagpole structural model in real time, and iteratively calculate the displacement response and internal force distribution of the flagpole through the structural mechanics solver;

[0066] S4: Map the deformation state of the flag and the displacement response of the flagpole to the graphics rendering pipeline to generate a physically consistent sequence of dynamic images of the flag waving.

[0067] S5: Based on the interactive instructions, dynamically adjust the environmental wind field parameters or flag physical attribute parameters, and re-execute S2 to S4 to achieve interactive physical-visual synchronous updates.

[0068] In S1, the flagpole geometry parameters include total height, number of segments, diameter of each segment, and wall thickness, which are used to define the spatial topology and cross-sectional properties of the flagpole.

[0069] The physical properties of a flag include fabric density, Young's modulus in the warp and weft directions, Poisson's ratio, yield strength, and damping coefficient, which are used to characterize the mechanical behavior of the material.

[0070] Environmental wind field parameters include average wind speed amplitude, prevailing wind direction angle, gust frequency, and turbulence intensity, which are used to construct spatiotemporally varying wind load excitations.

[0071] After all parameters are entered through the graphical user interface, the system verifies the validity of all parameters and converts them to the International System of Units (SI) to ensure consistency in subsequent physical calculations.

[0072] After parameter standardization is completed, the system constructs a coupled physical simulation scenario.

[0073] Specifically, the flagpole structural model is discretized into N... s A finite element chain composed of rigid beam elements, with adjacent beam elements connected by shared nodes, forms a continuous support system;

[0074] Each beam element is modeled using Euler-Bernoulli beam theory, and its stiffness matrix is ​​determined by the material's elastic modulus, the moment of inertia of the cross section, and the element length.

[0075] The flag model is constructed as an M×K mass-spring mesh, where each mass represents a discrete node of the fabric with a mass of . , A is the fabric's areal density. c Area of ​​a single grid cell;

[0076] Adjacent particles are connected by two types of springs: a warp spring and a weft spring, with elastic coefficients k. p With k t The results are calculated from the Young's modulus in the meridional and latitudinal directions, respectively. Where E is the Young's modulus in the corresponding direction, t is the fabric thickness, and l0 is the original length of the spring.

[0077] The top edge node of the flag model is rigidly bound to the top node of the flagpole, so that the displacement of the flag boundary is completely determined by the displacement of the top node of the flagpole, thus establishing a displacement coupling relationship between the structure and the fabric.

[0078] In the parameter initialization phase described above, the system first receives the original parameters input by the user through the graphical user interface. The system performs validity checks and unit standardization on the input to ensure the stability of the numerical model and the accuracy of the physical meaning of the calculation results, thus guaranteeing its correctness and consistency.

[0079] The validity check ensures that each parameter not only meets the basic data type requirements, but also satisfies the constraints of its physical definition and numerical calculation. In the verification process, physical feasibility is checked first, followed by numerical stability.

[0080] Among these, physical feasibility verification involves checking whether the parameter values ​​are within a reasonable physical range. For example, in physical theory, the stiffness of a material must be positive, which is determined by conditions. and To determine the warp direction of the fabric, Young's modulus is used. Young's modulus in the latitudinal direction It must be a real number greater than zero.

[0081] Similarly, fabric thickness ,density It must also be greater than zero. (Regarding wind speed) The system checks whether its value is less than the preset safety limit. ,Right now This is to eliminate unrealistic inputs and ensure computational stability.

[0082] Numerical stability checks aim to prevent undefined conditions or computational divergences in subsequent mathematical models. For example, when discretizing a flagpole into beam elements, the number of segments... It must be an integer not less than 2 to ensure that at least one valid finite element is formed.

[0083] When calculating spring stiffness using parameters such as Young's modulus, the formula... The original length in The values ​​must be greater than zero. This requires that the flag grid's partitioning parameters, namely the number of rows M and the number of columns K, be valid so that meaningful values ​​can be obtained during grid initialization. If any verification fails, the system will immediately interrupt the process and return a specific parameter error message to the user interface, guiding the user to make corrections.

[0084] After passing all validity checks, the system standardizes the units of all parameters. Since parameters may be input in various commonly used units, while core physics simulation calculations must be performed under a unified International System of Units (SI), this conversion is crucial.

[0085] The system maintains a dictionary of conversion factors from units to standard SI units for each physical quantity. For example, for length, whose standard unit is the meter, the system will recognize the unit string attached to the input value, such as mm or cm, and then multiply it by the corresponding conversion factor.

[0086] Let the input value be Its attached unit is The standard unit value is The conversion formula is: Where C is the transformation coefficient function, such as , Wind speed is usually input in kilometers per hour, and its conversion factor is... ,Right now .

[0087] After unit conversion, all parameters are represented internally as a set of pure SI values. These standardized parameters are then passed to subsequent physical modeling steps. For example, standardized flagpole height and diameter are directly used to define the spatial coordinates of finite element nodes; standardized fabric density, thickness, and Young's modulus are used to calculate particle mass. and anisotropic spring stiffness This fundamentally eliminates model errors or calculation deviations caused by improper input or unit confusion, ensuring that the final mechanical simulation results can truly reflect the behavior of the physical world.

[0088] After parameter standardization, the system constructs the physical simulation scenario, namely, the discretization modeling of the flagpole structure. This step transforms a continuous flagpole with spatial topology and cross-sectional properties into a discrete mechanical model that can be numerically solved by a computer. The input is the standardized geometric parameters of the flagpole, including its total height. Number of segments Diameter of each segment and wall thickness The output is from The finite element chain, formed by connecting individual beam elements through shared nodes, accurately characterizes the stiffness and mass distribution of the original flagpole, forming the mechanical basis for subsequent coupled analysis with the flag fabric.

[0089] In the modeling process, the flagpole is first spatially discretized. The system is set uniformly or non-uniformly according to the cross-sectional changes along the axis of the flagpole, from the fixed bottom end to the free top end. Nodes. spatial coordinates Due to its height from the bottom Confirmed, among which , Every two adjacent nodes and A beam element is defined. Its length is .

[0090] Through shared nodes ,unit With unit Natural connections, and so on, connect all units end to end, forming a geometrically continuous chain structure from bottom to top. This connection establishes a path for the transmission of force and displacement between units, allowing loads acting on the top unit to be sequentially transmitted to the bottom support through the nodes, thus forming a continuous support system.

[0091] For each beam element The system uses Euler-Bernoulli beam theory for mechanical modeling, which means that when a unit is under stress, its deformation must simultaneously consider axial tension / compression, bending and shear effects. In this model, to simplify the calculation and highlight the main stress characteristics, bending stiffness is the main focus.

[0092] The local stiffness characteristics of each element are determined by its material property, elastic modulus. It is determined by the geometric properties of the cross section. For a diameter of... Wall thickness is The annular cross-section has a moment of inertia. Calculated as .

[0093] Based on this, unit Elastic stiffness matrix in local coordinate system This allows for the construction of a 6×6 matrix, whose elements are composed of... , , The parameters are determined using standard beam element formulas, for example, the stiffness coefficients associated with bending and... Proportional.

[0094] This matrix describes the linear relationship between element nodal forces and nodal displacements: ,in It is the force vector at the element node. It is the element node displacement vector.

[0095] The system performs overall stiffness matrix assembly, assembling discrete elements into a complete, continuous flagpole structure model, and combining each element... Local stiffness matrix Through coordinate transformation matrix Transform to the global coordinate system to obtain .

[0096] Based on the global degree of freedom number of all nodes, the stiffness matrix of each element is... The contribution is added to the overall stiffness matrix. The corresponding position.

[0097] Shared nodes allow the stiffness contributions of different elements to the degree of freedom of that node to be superimposed, thus forming a continuous support system. When the displacement of a node affects the stress state of all connected elements, the force acting on that node will also be distributed to each connected element.

[0098] This ultimately forms a large sparse matrix of overall stiffness. Its dimension is the total number of degrees of freedom, which fully describes the displacement of all nodes of the entire discretized flagpole structure within its elastic range. External forces at all nodes The global relationship between them, i.e. .

[0099] Thus, a physically continuous flagpole was successfully mathematically modeled as a system composed of... A finite element system composed of discrete beam elements coupled through shared nodes. This system is not only geometrically continuous, but more importantly, its mechanical response (deformation, internal force) is continuously transmitted through the overall stiffness equation, forming a support system.

[0100] After discretizing the flagpole into several beam elements, a mechanical model is established for each element using the Euler-Bernoulli beam theory to describe its deformation behavior under force and moment. The Euler-Bernoulli beam theory is the fundamental theory in structural mechanics used to describe the bending behavior of slender beams under transverse loads.

[0101] The plane section assumption states that the cross-section of a beam perpendicular to its axis before bending deformation remains planar and perpendicular to the deformed axis after deformation. This assumption presumes that bending deformation is primary and is a reasonable and efficient approximation for structures like flagpoles, where the length is much greater than the cross-sectional dimensions. Specifically:

[0102] Based on the Euler-Bernoulli beam theory, a beam element, such as element... Connecting nodes and nodes The mechanical behavior of an element is entirely defined by its nodal degrees of freedom and element stiffness matrix.

[0103] In planar frame analysis, each node is considered to have three degrees of freedom, namely two linear displacements. and and an angular displacement .

[0104] Therefore, the nodal displacement vector of a beam element can be expressed as: The corresponding nodal force vector is .

[0105] The stiffness matrix of the element connects the nodal forces and nodal displacements. The relationship is .

[0106] Thus, the resulting 6×6 element stiffness matrix Specifically, it is determined by the material's elastic modulus. Moment of inertia of cross section and unit length These three parameters are jointly determined, and their derivation originates from the bending differential equation of the beam and the principle of virtual work. For an Euler-Bernoulli beam of uniform cross-section and homogeneous material, its element stiffness matrix, in the local coordinate system, has the following standard form along the beam axis on the x-axis:

[0107]

[0108] in, It represents the cross-sectional area of ​​the beam, and the diagonal elements of the matrix represent the principal stiffness, for example, with... The corresponding principal stiffness is This indicates that in The vertical force required to generate a unit vertical displacement at a point. Off-diagonal elements represent coupling stiffness or transferred stiffness, for example... Indicates in When a point produces a unit vertical displacement, at The magnitude of the bending moment caused by a point, or conversely, at a point When a unit bending moment is applied to a point, the resulting Vertical force at the point, elements in the upper left and lower right blocks. This represents the axial tensile and compressive stiffness of the beam.

[0109] For a flagpole, which has a circular cross-section, its moment of inertia... This directly determines the beam's bending resistance. For a beam with an outer diameter of... Wall thickness is The moment of inertia of a thin-walled circular annular section about its centroidal axis. The calculation formula is:

[0110] This formula is derived from the area moment integral, and its result is related to the fourth power of the diameter, indicating that a small increase in diameter significantly improves the flexural stiffness of the cross-section. Material elastic modulus It is an inherent property of materials, representing their ability to resist elastic deformation. Element length This affects the magnitude of stiffness. As can be seen from the matrix formula, bending stiffness is related to... Inversely proportional, which means that the longer the unit, the easier it is to bend under the same force.

[0111] In the flag system, for each discrete beam element, the program will determine its geometric parameters. and material parameters Real-time calculation of its cross-sectional moment of inertia and then with and Assemble the stiffness matrix of the element in the local coordinate system. .

[0112] The system transforms the flagpole to the global coordinate system using a coordinate transformation matrix and then assembles it into the overall stiffness matrix. Through this precise element modeling based on Euler-Bernoulli beam theory, the system can realistically calculate the bending deformation, rotation angle, and internal stress of each segment of the flagpole when subjected to time-varying loads of shear force and bending moment from the fluttering flag. This allows for a high-fidelity coupling of the complex aerodynamic forces of the flag with the structural response of the flagpole, achieving a seamless connection from fabric dynamics to structural mechanics. This is the core of solving the technical problem of traditional methods neglecting the real physical coupling.

[0113] Discretizing the flag model into a deformable fabric mesh consisting of several point-spring networks transforms a continuous, physically real fabric flag into a dynamic network model in a computer simulation environment, consisting of discrete point masses that follow Newton's laws of motion and virtual springs connecting these points. In this process, through physical simulation, a computable mathematical model is used to approximate the mechanical behavior of the real fabric, especially its anisotropic tensile and deformation characteristics.

[0114] In the above, the deformable fabric mesh is a spatial discretization of the continuous flag surface, specifically as follows:

[0115] The system logically divides the surface of the flag into a regular grid of M rows and K columns based on the user-defined flag dimensions, length L and height H.

[0116] Each intersection of the grid is defined as a point mass with mass m. The tiny fabric area it represents That is, the area of ​​a single grid cell and the areal density of the fabric. The decision is made jointly, and the calculation formula is as follows: This allows the point mass to bear the mass and momentum of the tiny piece of fabric. As the basic unit for dynamic calculation, the collection of all points mass constitutes the skeleton of the flag's deformation motion.

[0117] The system creates spring connections between each mass point and its directly adjacent mass points, forming a mass-spring network. The mass-spring network simulates the inherent elasticity of a fabric by defining the mechanical interaction rules between discrete mass points. The springs in the network do not actually exist, but rather are mathematical models that establish mechanical constraints between mass points. This includes warp springs that connect adjacent mass points along the warp direction of the fabric, in the row direction of the grid, and weft springs that connect adjacent mass points along the weft direction, in the column direction of the grid. The model also adds shear springs or bending springs in the diagonal direction to resist shear deformation and bending.

[0118] Each spring follows Hooke's Law model in mechanics, and the force it generates... With its elongation or compression and its own stiffness coefficient Related, in its basic form ;

[0119] in, It is the unit vector of the spring's current direction; the negative sign indicates that the force always attempts to pull the spring back to its original length. In this way, the elastic restoring force generated by the virtual springs distributed throughout the grid drives the movement and deformation of the entire mass system under the action of external forces such as wind, thus macroscopically manifesting the waving, stretching and wrinkling of the flag.

[0120] In simulating a flag, adjacent particles on the flag are connected by anisotropic springs. A flag is a fabric, and the warp and weft yarns of a real fabric differ in material, density, and weaving method, resulting in significant differences in their tensile stiffness along the warp and weft directions—that is, their ability to resist tensile deformation. This is the anisotropy in the spring connections. To accurately reflect this characteristic in the model, the system sets independent stiffness coefficients for the warp and weft springs respectively. and Instead of using a uniform value, the two stiffness coefficients mentioned above are directly derived from the flag's physical property parameters.

[0121] According to the definition of elastic modulus in mechanics of materials, for a yarn model with a rectangular cross-section, a width equal to the fabric thickness t, and a height equal to the fabric width corresponding to the grid spacing, its tensile stiffness is proportional to Young's modulus E and the cross-sectional area.

[0122] In a discrete grid, the stiffness coefficient of a meridional spring Young's modulus from the meridional direction The calculation yields the following formula: ;

[0123] Where w is the effective width of the fabric strip represented by the spring. It is the initial length of the warp spring and the stiffness coefficient of the weft spring. Similarly, the Young's modulus in the latitudinal direction... calculate.

[0124] In this way, when the flag flutters in the wind, the tensile deformation along the warp and weft directions will generate different resistances due to different k values, thus realistically reproducing the deformation differences of real fabrics in different directions.

[0125] By rigidly binding the top edge node of the flag model to the top node of the flagpole, a physically real and computable connection is established between the discrete numerical models. This constructs a flagpole-flag coupling system, ensuring displacement coordination and force transmission between the fluttering fabric and the elastic structure supporting it. This simulates the dynamic load of the flag on the flagpole and the reverse effect of flagpole deformation on the fluttering of the flag in the real world.

[0126] Specifically, in the discretized model, the top of the flagpole is modeled as a node with multiple degrees of freedom, i.e., a coupled node, whose displacement vector is denoted as... .

[0127] The top edge of the fabric flag model is composed of a row of particles, each particle... The position is determined by its displacement vector describe.

[0128] Rigid constraint binding means that at every time step, i.e. every cycle, in the solution process, the displacement of this row of mass points must completely follow the displacement of the coupled node at the top of the flagpole.

[0129] This following relationship is defined by kinematic constraint equations, which assume that the top edge of the flag is rigidly connected to the top of the flagpole, meaning that the fabric at the top edge does not slip or separate relative to the flagpole. Therefore, for any point mass on the top edge... Its initial position has a fixed offset vector relative to the top node of the flagpole. .

[0130] After deformation, the position of the particle Must meet:

[0131]

[0132] in, These are the current spatial coordinates of the top node of the flagpole. Based on the node's rotation angle The rotation matrix.

[0133] For small corners, it can be simplified to Therefore, the displacement of each boundary particle All can be passed It is calculated explicitly.

[0134] In numerical implementation, this is addressed by modifying the system dynamics equations, specifically as follows:

[0135] The degrees of freedom of the boundary particles are eliminated from the main solution variables, and their displacements are directly derived from the displacements of the coupled nodes. The above constraint relationship is derived to realize that the flag boundary displacement is completely determined by the displacement of the top node of the flagpole, thus establishing a unidirectional displacement transfer from structure to fabric.

[0136] True physical coupling is bidirectional, namely, the displacement coupling relationship between structure and fabric. This coupling not only means that the displacement of the flag is constrained by the flagpole, but also that the force exerted by the flag on the flagpole will in turn affect the displacement of the flagpole.

[0137] This two-way coupling is achieved through a closed feedback loop of force and displacement. In each simulation time step, the flagpole dynamics solver calculates the displacement of the top coupling node at the current moment based on the loads of the previous time step, including wind load and gravity. .

[0138] Based on the aforementioned rigid constraint relationship, this displacement is assigned to all mass points on the top edge of the flag model as the boundary condition for the flag dynamics calculation.

[0139] Given a flag-mass-spring system under wind force, internal elastic force, and these boundary conditions, solve for the position and velocity of all the masses, and calculate the internal forces of all the springs.

[0140] The internal forces generated by all the springs connected to the top edge mass point, that is, the vector sum of the tension / pushing forces of the springs on the mass point, act on these top edge mass points in equal magnitude and opposite direction according to Newton's third law. These forces are the forces that the flag exerts on the flagpole through the connection point.

[0141] The system calculates the equivalent nodal forces and nodal moments of these distributed forces on the coupled nodes at the top of the flagpole, applies this force to the flagpole model, and calculates the resultant force of the flag's internal forces on all top edge mass points. and the resultant torque of these forces on the coupling nodes. To achieve this. Let the first... The net force exerted on the top edge point by the spring inside the flag is: ,but:

[0142] ,

[0143] in, From the coupling node to the mass point The vector. This is the equivalent nodal force. and nodal torque It is added as an external load to the load vector of the coupled node at the top of the flagpole and input to the flagpole structural mechanics solver at the next time step.

[0144] Thus, within a single time step, the information flow forms a complete closed loop: flagpole displacement → flag boundary conditions → flag motion and internal forces → load on the flagpole → new flagpole displacement. This real-time, bidirectional exchange of displacement and force constitutes the displacement coupling relationship, ensuring that the wind not only blows the flag, but the flag's movement also realistically pulls and shakes the flagpole. In turn, the flagpole's swaying affects the flag's fluttering shape, thereby simulating the complex fluid-structure interaction and structural dynamics between these two physical subsystems with high fidelity.

[0145] After completing the coupling scenario in S1, the system enters S2, applies wind load to the flag, and calculates its deformation response.

[0146] The environmental wind field parameters are analyzed as spatiotemporal functions. Indicates spatial location At any moment The wind speed vector. For the flag model, the first... A point mass, its local wind speed It is obtained through trilinear interpolation.

[0147] Based on relative wind speed , Calculate the aerodynamic pressure for the particle acceleration. ,in, The drag coefficient, air density, This represents the effective windward area of ​​a point mass.

[0148] Therefore, this aerodynamic force is input as an external force into the particle dynamics equations:

[0149] in, For point mass The set of neighboring nodes, For the restoring force of the spring, This is the damping force.

[0150] The system employs a fourth-order Runge-Kutta explicit integration algorithm to solve the above differential equations, with a time step of [missing information]. Seconds are used to ensure numerical stability.

[0151] In each integration iteration, if the spring elongation exceeds the yield threshold... Then the plastic deformation model is activated, and the excess strain is accumulated as permanent deformation and no longer participates in the calculation of elastic restoring force.

[0152] In the above, the abstract environmental wind field parameters are transformed into real physical forces acting on each discrete part of the fabric. The specific operation is as follows:

[0153] User-input average wind speed amplitude Dominant wind angle Gust frequency and turbulence intensity The system synthesizes and analyzes the parameters into a vector field function that varies continuously in space and time. .in, t represents the three-dimensional spatial position, and t represents time.

[0154] This function is the superposition of mean wind and fluctuating wind. The mean wind component forms the basis of the wind field, and its direction is defined by the wind direction angle α, with a magnitude typically taken as V. mean .

[0155] The pulsating wind component simulates random fluctuations in natural wind caused by turbulence and gusts. The system uses harmonic superposition to generate winds with a frequency f of gusts. g and turbulence intensity I t Pulsating wind speed components with statistically consistent characteristics .

[0156] The spacetime function is expressed as , where n dir It is the unit vector of the dominant wind direction, which makes the wind no longer uniform and constant, but rather exhibit changes in time and space.

[0157] The above function is defined over the entire continuous space, while the flag model is a discrete set of particles. To obtain the wind force acting on the i-th particle, since the particle's position x... i (t) is dynamically changing in the simulation, and its local wind speed v i (t) is obtained from the wind field in discrete storage or real-time calculation through spatial interpolation, so as to know the instantaneous wind speed at the location of the particle.

[0158] The system pre-defines a three-dimensional, regular wind speed sampling grid in the simulation space. At each time step, it calculates the wind speed vector on all nodes of the sampling grid based on the wind field spatiotemporal function v(x,t).

[0159] For the current position x of particle i i The system locates the cubic cell in the wind speed sampling grid and performs trilinear interpolation using the known wind speed values ​​at the eight corner points of the cell.

[0160] Using this three-dimensional linear interpolation method, linear interpolation is performed sequentially in the x, y, and z directions to obtain a smoothed estimate of the wind speed v at the location of the particle.i (t).

[0161] For a point (u, v, w) within a unit cube, with coordinates between 0 and 1, the interpolation result is:

[0162]

[0163] Among them, v abc This method efficiently maps wind speeds from a discrete sampling field to any spatial point, specifically the wind at corner point (a,b,c).

[0164] Obtain local wind speed v i Then, the aerodynamic force is calculated by determining the relative aerodynamic drag experienced by a particle moving in the wind, which is determined by the relative wind speed. The decision, among which, The relative wind speed represents the current velocity of the particle, reflecting the relative motion between the fabric and the air: when the particle is stationary, the force acting on it is entirely determined by the wind speed; when the particle is blown by the wind and accelerated, the force acting on it will weaken due to the decrease in relative velocity, which aligns with physical intuition. Based on this relative wind speed, the aerodynamic pressure (i.e., aerodynamic force) acting on the particle is... Calculated based on the drag formula in fluid dynamics: .

[0165] in, Represents dynamic pressure, which is a measure of the kinetic energy of airflow per unit area;

[0166] A i It is the effective windward area of ​​the particle. In the particle-spring model, the projection of the area of ​​the fabric element represented by the particle onto the direction perpendicular to the relative wind speed is taken as A. i;

[0167] Drag coefficient C d It is a dimensionless parameter that comprehensively reflects the influence of fabric surface roughness, air permeability, and other factors on air resistance.

[0168] force Direction and relative wind speed vector Δv i The direction of the wind is consistent with the magnitude of the wind speed, which is proportional to the square of the relative wind speed. This non-linear relationship means that the wind force increases dramatically with increasing wind speed, which is the fundamental reason why flags flutter violently in strong winds and generate huge pulling forces.

[0169] This calculated aerodynamic force As a key external load term, it is added to the dynamic equation of the mass, driving the entire mass-spring network to produce motion and deformation, thus ultimately transforming the abstract wind field parameters into a visible, physically consistent dynamic of flag waving.

[0170] For solving the established dynamic equations of the particles and the nonlinear behavior of the materials, the established particle-spring network is essentially a large, coupled system of ordinary differential equations (ODEs), with the motion equations of each particle being second-order ODEs. To efficiently and stably solve this complex dynamic system, this invention employs a fourth-order Runge-Kutta explicit integration algorithm to solve the particle dynamic equations and handle the nonlinear behavior of the materials. The fourth-order Runge-Kutta explicit integration algorithm is a high-precision single-step numerical integration method in computational physics.

[0171] This algorithm uses the known state at the current time step and constructs four slope estimates (k1, k2, k3, k4) to perform a weighted average to predict the state at the next time step. For a second-order system, it reduces the order to a first-order system. For a particle i, its state is determined by its position x. i and velocity v i Description. The dynamic equations can be written as:

[0172]

[0173] Among them, acceleration The fourth-order Runge-Kutta method (RK4) is used to solve for the state at the next time step t+Δt. The formula is:

[0174]

[0175] Through the above multi-stage differentiation, a local truncation accuracy of up to fourth order is obtained. When simulating systems containing nonlinear spring forces and complex wind forces, such as waving flags, it can provide much better accuracy and stability than the simple Euler method.

[0176] The stability region of explicit methods is limited; therefore, the time step Δt must be chosen to be smaller than a fraction of the period corresponding to the system's highest natural frequency. In this invention, Δt is fixed at 1 / 120 of a second, approximately 8.33 milliseconds. This fixed Δt is derived from CFL condition analysis of stiffness estimation for a typical fabric-spring system. This step size is much smaller than the minimum oscillation period determined by the stiffest spring in the system, thus ensuring that even under high-frequency forces, numerical integration will not suffer from exponentially amplified errors (i.e., numerical instability) due to excessively large step sizes, ensuring the reliability of long-term simulation operation.

[0177] After updating the state of each mass point, the system updates its elastic restoring force based on the latest length of the spring. A plastic deformation model is introduced in this invention to simulate the permanent deformation that may occur in the fabric under extreme loads. For any spring connecting mass points i and j, its current elongation is determined by... Calculations are performed, in which, This is the current length. This is the initial original length, which will be updated after plasticity occurs. The system presets the material-related yield threshold. It represents the elastic limit strain of a material.

[0178] In each integration iteration, the system performs a plasticity test on all springs. If the current elongation of a spring satisfies... If so, the spring is determined to have entered the plastic yielding stage.

[0179] At this point, the strain exceeding the yield threshold... This is considered an irreversible, permanent plastic strain. The system then performs a critical plastic update, restoring the spring's original elastic length. Permanently modified to .

[0180] In the next calculation of the elastic force, the spring elongation will be based on the new, extended elastic primitive length for tension. To calculate, the calculation formula becomes Yield threshold The strain within a certain range still participates in the calculation of elastic force, thus allowing for recovery, while the strain exceeding a certain range... strain portion This accumulated force permanently alters the spring's zero-force state, preventing it from generating a restoring force to pull the spring back to its original length. .

[0181] This model simulates the yielding and slippage of fabric fibers at the microscopic spring level, which macroscopically manifests as permanent wrinkles or deformations that appear on a flag after being stretched by strong winds. This greatly enhances the physical realism of the simulation, allowing the simulation results to not only be limited to elastic vibrations, but also to reflect the nonlinear and irreversible mechanical behavior of materials.

[0182] The flag deformation state output by S2 includes the position of each particle. The information, including the spring tension, is passed to step S3 to update the force on the flagpole.

[0183] Specifically, the resultant force of the spring on each mass point i on the top binding edge of the flag. The load is projected onto the corresponding node at the top of the flagpole, forming a concentrated load.

[0184] The reaction forces of all bound mass points are decomposed along the flagpole's axial and transverse directions, and the composite nodal load vector is obtained. ,in, The total number of flagpole nodes, each node containing three translational degrees of freedom and three rotational degrees of freedom.

[0185] Substituting this load vector into the equilibrium equation of the flagpole structure:

[0186]

[0187] in, Here is the elastic stiffness matrix. The geometric stiffness matrix is ​​determined by the displacement u and is used to handle nonlinear effects caused by large displacements.

[0188] The system uses a sparse direct solver to solve the above equations and obtain the displacement u and internal forces of each node, namely bending moment, shear force and axial force.

[0189] The new displacement of the top node is fed back to the boundary conditions of the flag model, completing one bidirectional coupling iteration.

[0190] In the above, step S3, by statistically analyzing and collecting the internal forces acting on each mass point on the top binding edge of the flag, realizes the real mechanical interaction between the flag and the flagpole, accurately transmitting the force generated by the dynamic response of the fluttering flag to the flagpole structure supporting it, and using it as a load to drive the deformation of the flagpole.

[0191] In S2, by solving the dynamic equations of the particle-spring network, all the forces acting on each particle have been calculated, including the spring restoring force, air resistance, and damping force from adjacent particles.

[0192] For the row of mass points located at the top of the flag and bound to the flagpole, denoted as set B, the forces acting on them include external wind and damping forces, as well as spring restoring forces from within the flag that connect to the unbound mass points. These are internal tensions or thrusts attempting to pull the bound mass points back or push them away from their natural positions, thus representing the tensile force exerted on the fixed edges by the overall deformation of the flag fabric. Therefore, for each bound mass point i∈B, the system first calculates the resultant spring force acting on it. :

[0193]

[0194] Where N(i) is the set of all neighboring particles of particle i. It is the restoring force of the spring connecting mass i and mass j. Essentially, it is the force exerted from inside the flag on the external supporting structure, i.e., the flagpole, through this fixed point.

[0195] During the projection operation, due to the rigid binding relationship established in S1, all the bound mass points at the top edge of the flag are forced to maintain a fixed relative position with one or a group of nodes at the top of the flagpole. A set of forces acting on discrete points can be equivalent to a concentrated force and a concentrated moment acting on a certain reference point. Therefore, the coupling node P at the top of the flagpole is chosen as this reference point. For each bound mass point i, its force... The equivalent contribution to node P includes not only the force itself, but also a torque generated by the lever arm.

[0196] Assume the position vector from node P to particle i is r. i Then the equivalent force exerted by the force on the particle on node P is: The equivalent moment is .

[0197] By vector-superimposing the contributions of all bound mass points, we obtain the total equivalent concentrated load acting on the flagpole top node P:

[0198] ,

[0199] Among them, F p It is a concentrated force vector containing three translational components; M P It is a concentrated moment vector containing three rotational components. This combination of force and moment represents the force and moment effect exerted by the waving flag as a whole on the top of the flagpole.

[0200] Finally, forming a concentrated load refers to assembling the total equivalent concentrated force and moment calculated above into the external nodal load vector F of the entire system according to the arrangement order of the nodal degrees of freedom of the flagpole finite element model. ext middle.

[0201] In the three-dimensional beam element model, each node has 6 degrees of freedom: 3 translational displacements (u... x ,u y ,u z ) and 3 rotational displacements (θ) x ,θ y ,θ z Load vector F ext The dimension is 6×N node , where N node This represents the total number of flagpole nodes.

[0202] For the top node P, assuming its global node number is m, let F... P The three translational components are sequentially placed into F ext At positions 6m−5, 6m−4, and 6m−3, M will PThe three rotational components are placed sequentially at positions 6m−2, 6m−1, and 6m.

[0203] The load components of all other nodes not directly connected to the flag are set to zero. Thus, the dynamic, distributed internal tension from the fluttering flag is successfully condensed into a concentrated load vector acting on the key nodes of the discrete flagpole model. This vector is the direct cause of the deformation and internal forces of the flagpole structure. This precise force transmission mechanism ensures that the simulation results of the flagpole's stress state have realistic physical meaning and are different from simple visual simulation.

[0204] After completing the equivalent projection of the force from the flag to the flagpole, the system constructs a complete system load vector and solves the structural equilibrium equations to accurately calculate the deformation and internal forces of the flagpole under dynamic wind loads. The input is the concentrated load acting on the top node, and the output is the displacement and internal forces of all nodes of the entire flagpole.

[0205] Construct global node load vector As mentioned above, the equivalent concentration force F from the flag P and torque M P It has been confirmed.

[0206] In three-dimensional structural analysis, each node has six degrees of freedom: three translational degrees of freedom and three rotational degrees of freedom. For a structure with N... node The finite element model of the flagpole with 6 nodes has a total degree of freedom of 6N. node .

[0207] Load vector F ext The dimensions correspond to this, with each element corresponding to a specific degree of freedom.

[0208] The process of constructing this vector involves placing the forces and moments at each node into the correct positions within the vector according to a predefined global degree-of-freedom numbering order.

[0209] For the flagpole top node P, assuming its global node number is m, then its six positions in the load vector are 6m−5, 6m−4, 6m−3, corresponding to the translational forces in the X, Y, and Z directions, and 6m−2, 6m−1, 6m corresponding to the moments about the X, Y, and Z axes.

[0210] The system will F P The X, Y, and Z components are assigned to F respectively. ext [6m−5],F ext [6m−4],F ext [6m−3], M P The three components are assigned to F respectively. ext [6m−2],F ext[6m−1],F ext [6m].

[0211] For other nodes on the flagpole, if they are not subjected to other external loads, their corresponding load vector elements are set to zero. In this way, a complete node load vector reflecting the total force exerted by the flag on the flagpole at the current time step is constructed.

[0212] Next, the load vector is substituted into the equilibrium equation of the flagpole structure to solve for the displacement.

[0213] Under the assumption of small deformation, the structural equilibrium is determined by linear equations. Description, where K e is the elastic stiffness matrix, and u is the displacement vector of all nodes.

[0214] Under strong wind loads caused by waving flags, the top of the flagpole may experience significant displacement, which alters the structure's geometry and thus affects its stiffness, resulting in a so-called geometric nonlinear effect. To capture this physical phenomenon, this invention employs equilibrium equations that include a geometric stiffness matrix:

[0215]

[0216] In this equation, K e It is a conventional elastic stiffness matrix determined by material properties and initial geometry, and it is treated as a constant throughout the analysis;

[0217] K g (u) is the geometric stiffness matrix, also known as the stress stiffness matrix or initial stress stiffness matrix. The geometric stiffness matrix is ​​a function of the current displacement u. When the structure undergoes large deformation, the axial forces inside the component, such as the axial tensile and compressive stress generated when a flagpole bends in the wind, will change the structure's ability to resist lateral bending deformation.

[0218] K g It quantifies the additional stiffness effect caused by the initial stress state, and its elements depend on the element axial force calculated from the displacement u.

[0219] Therefore, equation In fact, it is a nonlinear equation about displacement u, where the unknown u appears in both the coefficient matrix and the right-hand side, and is implicit in K. g middle.

[0220] To solve this nonlinear equation, the system employs an incremental-iterative method, using the displacement solution from the previous time step as the initial iteration value within each coupled time step. ;

[0221] Construct the tangent stiffness matrix for the current iteration step Solve the system of linear equations To obtain displacement increment ,in, It is the internal force at the current displacement.

[0222] Update displacement Repeat this process until residual force is reached. The norm is less than the set convergence tolerance.

[0223] Because the finite element model of the flagpole has a large number of degrees of freedom and the stiffness matrix K T It is sparse, and the system uses an efficient sparse direct solver to quickly solve large systems of linear equations in each iteration step.

[0224] Ultimately, the converged displacement solution *u* not only reveals the deformation shape of the flagpole, but also allows for further calculation of the bending moment, shear force, and axial force within each beam element using element formulas. Thus, the system successfully transforms the dynamic load transmitted from the fluttering flag into the precise mechanical response of the flagpole structure through a rigorous nonlinear finite element solution process, completing the entire chain of physical simulation from fluid-fabric interaction to structural mechanics analysis.

[0225] In S3, when the nonlinear equilibrium equation The linear equation system for the current iteration step is formed using iterative methods such as the Newton-Raphson method. Its core task becomes to efficiently and accurately solve this problem based on displacement increments. For a large linear system with unknowns, the coefficient matrix here... It is the global tangent stiffness matrix, therefore, its dimensions are relatively large, and its size is equal to the total number of degrees of freedom of the system. Furthermore, it is highly sparse, with each beam element connected to the entire system only through its first and last nodes, resulting in the vast majority of elements in the matrix being zero. Non-zero elements are only distributed near the main diagonal and in specific strip regions representing node connections. In response to these two matrix characteristics, this invention employs a sparse direct solver, namely PARDISO, to solve the structural equilibrium equations and complete the system coupling.

[0226] PARDISO (Parallel Direct Sparse Solver) is an advanced algorithm based on high-order nested partitioning and high-performance Level-3 BLAS operations. Its solution process is as follows:

[0227] For sparse matrices The symbolic decomposition solver relies solely on the non-zero element structure of the matrix, i.e., which positions contain non-zero elements. By reordering the rows and columns of the matrix, it minimizes the filling elements generated during subsequent numerical decomposition, i.e., elements that were originally zero but may become non-zero during the decomposition process. The optimized sorting reduces computation and memory consumption.

[0228] Numerical decomposition is performed, and the solver precisely decomposes the rearranged matrix into the product of a lower triangular matrix L and an upper triangular matrix U, i.e. , where P and Q are row and column permutation matrices.

[0229] Solve by forward substitution. Backward substitution, solution Two steps to quickly obtain the displacement increment solution .

[0230] This method is highly efficient and robust for medium-sized problems with multiple right-hand sides, providing exact solutions and avoiding the convergence issues inherent in iterative methods. The final displacement vector u obtained from the solution includes not only the translational displacements of each node but also the rotational displacements.

[0231] Based on this displacement field, the local strain-displacement relationship of each beam element is obtained. and constitutive relations Where B is the strain matrix, D is the material matrix, and u e The displacements at the element nodes can be integrated to obtain the element internal forces, axial force N, shear force V, and bending moment M. Thus, the complete mechanical state of the flagpole under wind load is quantified.

[0232] After obtaining the displacements of each node on the flagpole, the structural deformation information is fed back to the fabric dynamics model to complete one bidirectional coupling iteration. The coupling mainly occurs at the top node of the flagpole, i.e., the new displacement of the reference point P bound to the flag. This displacement vector contains a translational component (u). x ,u y ,u z ) and rotational component (θ) x ,θ y ,θ z ).

[0233] The system updates the positions of all bound mass points at the top of the flags based on the rigid binding constraints established in S1. For any mass point i in the binding set B, its initial position has a fixed local coordinate offset relative to node P. At the new time step, its updated global position Calculated by the following formula:

[0234]

[0235] in, It is the coordinate of node P after its new translational displacement, that is, its initial coordinate plus (u x ,u y ,u z ), It is a new rotational displacement The constructed rotation matrix.

[0236] For small turning angles, this matrix can be approximated as: ,in, It is a skew-symmetric matrix of cross product, representing the new velocity of the particle. Alternatively, the velocity can be obtained directly from the nodal velocities output by the structure solver.

[0237] These updated positions and velocities are set as the current state of the corresponding mass in the flag-spring system, serving as the imposed boundary conditions for the integration of its dynamic equations at the next time step.

[0238] Therefore, the coupling loop closes at time step The flag moves under the influence of wind and internal elasticity, generating a load on the flagpole. This load caused the flagpole to undergo a new displacement. .

[0239] This displacement then occurs at time step [time step]. Initially, new boundary conditions are imposed on the fixed edges of the flag, altering the solution context of its dynamic equations; under this new constraint, the flag moves again, generating new loads. ...and so on, repeating endlessly.

[0240] This real-time, two-way exchange of displacement and force means that the swaying of the flagpole affects the waving shape of the flag, and the change in the flag's shape, in turn, alters its load on the flagpole, thus realistically simulating the complex fluid-structure interaction and structural dynamics between the flagpole and the flag in reality. Each complete process, from calculating the flag forces to solving the flagpole displacements and updating the flag boundary conditions, is called a complete two-way coupling iteration.

[0241] In S4, the physical calculation results are converted into visual images, specifically as follows:

[0242] The flag particle mesh is generated into a renderable polygonal surface through Delaunay triangulation, and each triangular facet is assigned diffuse and specular reflection parameters based on the fabric material.

[0243] The tension per unit area of ​​the warp and weft springs is normalized to the [0,1] interval and mapped to red-yellow-blue heatmap colors, which are then superimposed on the flag surface to visualize the stress distribution.

[0244] The flagpole beam element is converted into a cylindrical mesh with a radius equal to the actual radius, and its vertex position is linearly interpolated based on the displacement of the finite element nodes.

[0245] The deformed flag and flagpole geometry are fed into the GPU rendering pipeline, where Phong shading, depth testing, and anti-aliasing are performed, outputting dynamic image frames with a resolution of 1920×1080.

[0246] In S4 above, the discrete data obtained from physical simulation calculations is transformed into continuous geometric surfaces and realistic material representations that can be rendered by graphics hardware. Specifically:

[0247] After S2 dynamics calculation, the geometric reconstruction of the flag particle mesh gives the set of particles representing the flag the latest three-dimensional spatial position. These particles are just discrete point clouds and lack the topological connectivity required to define a continuous surface.

[0248] The system uses the Delaunay triangulation algorithm to construct a planar point set. Here, the projected coordinates of the flag mass are regarded as a two-dimensional point set to construct a unique triangular mesh. Its standard is to satisfy the empty circumcircle property, that is, the circumcircle of any triangle in the mesh does not contain any other input points.

[0249] In mathematics, for a point set P, a Delaunay triangulation DT(P) is such that for each triangle t in the set, its circumcircle C(t) satisfies .

[0250] This method of segmentation avoids creating overly long and narrow triangles, resulting in a smoother and more stable visual effect in subsequent rendering.

[0251] In practice, the system ignores the slight three-dimensional curvature of the flag and uses the (x, y) coordinates of all particles at the current moment, assuming that the flag is unfolded in the xy plane, as the input point set for two-dimensional Delaunay partitioning.

[0252] The vertex indices of each triangle obtained from the subdivision are associated back with their original 3D mass coordinates, thus connecting the discrete mass points into a continuous 2D manifold mesh composed of triangular facets. The vertex positions of this mesh are directly derived from physical simulations, so its shape accurately reflects the actual deformation, stretching, and wrinkling of the flag under the current wind field.

[0253] After generating the geometric mesh, visual material properties are assigned to it to make its appearance conform to the specified fabric type. This is achieved by setting physically based rendering material parameters for each triangle.

[0254] In the Phong lighting model, the color of the emitted light from a point is composed of the superposition of ambient light, diffuse light, and specular light components. Based on the fabric material type defined in S1, the system retrieves two key parameters from a pre-defined material library: the diffuse reflectance coefficient k. d and specular reflection coefficient k sAnd its corresponding shininess.

[0255] k d It is an RGB vector that defines the reflectivity of a material to the diffuse component of incident light. It determines the basic color and brightness of a fabric in a matte state. For example, linen has a high diffuse reflectivity, giving it a rustic appearance, while silk may have a specific k-color due to dyeing. d color.

[0256] k s It is also an RGB vector that controls the intensity and color of the specular highlights and reflections on the material surface, and is grayish-white.

[0257] The shininess index controls the concentration of highlights; a higher value results in smaller, sharper highlights and a smoother simulated surface. For example, a smooth silk fabric would have a higher shininess index. s With a moderate shininess, it produces a bright and focused highlight under light; the rough canvas, on the other hand, has an extremely low kJ / L. s It does not produce specular highlights.

[0258] In the rendering pipeline, these parameters are passed to the shader program. For each pixel to be rendered, the shader calculates its final color in real time based on the lighting direction, viewing direction, surface normal, and these material parameters. , among which, I a ,I d ,I s These represent the ambient, diffuse, and specular light source intensities, respectively; n is the surface normal; l is the light direction; r is the reflected light direction; and v is the observation direction.

[0259] By assigning parameters to the entire flag grid uniformly or in sections, the system can visually distinguish flags of different materials, making polyester, cotton and silk exhibit completely different luster and texture under the same lighting. Thus, the material properties defined in the physical simulation are ultimately expressed as visual features that users can directly perceive, completing the mapping from physical parameters to visual attributes.

[0260] In S4, the invisible mechanical state inside the flag is transformed into an intuitive and visual heatmap, thus achieving synchronous physical-visual feedback. By extracting and scaling the physical data, at each simulation time step, the system traverses all the longitudinal and latitudinal springs in the flag mass-spring network, and the current tension T of each spring is calculated.

[0261] The tension T described above is transformed into a comparable stress concept, and the area per unit area affected by this tension is calculated. The system defines a representative infinitesimal area A for each type of spring. micro .

[0262] For example, the micro-area of ​​a warp spring can be estimated based on the fabric thickness and the warp yarn spacing, thereby calculating the normal stress on the fabric micro-element represented by the spring. .

[0263] After completing the stress calculation for all springs in the current frame, the system finds the maximum value among all stress values ​​in that frame. and minimum value .

[0264] Perform linear normalization for each stress value Mapped to a scalar s in the interval [0,1]:

[0265]

[0266] This normalization process eliminates the influence of the absolute magnitude of stress, allowing the color map to dynamically and adaptively respond to the relative distribution of internal forces within the flag under its current fluttering condition. Regardless of how wind speed affects the overall stress level, the color map always makes full use of the entire color gamut to display the area from the most tense (s=1) to the most relaxed (s=0), ensuring optimal contrast in the visualization.

[0267] After normalization, the system maps the scalar value s to a specific color. This invention uses a red-yellow-blue three-color gradient heatmap encoding scheme, where red typically represents high values, high heat, high pressure, and high stress, blue represents low values, and yellow serves as an intermediate transition.

[0268] The mapping process is implemented using a piecewise linear interpolation function, which maps the input value s to an RGB color vector (R, G, B). As s changes from 0 to 1, the blue component B decreases linearly from 1 to 0; the green component G first increases and then decreases, reaching a peak at the intermediate value s=0.5; the red component R increases linearly from 0 to 1. Mathematically, this can be represented as a piecewise function, for example:

[0269]

[0270]

[0271]

[0272] The `clamp(x,0,1)` function restricts `x` to the interval [0,1]. Through this mapping, the stress scalar `s` is encoded as a specific color; for example, high stress (s=1.0) is mapped to pure red (1,0,0), medium stress (s=0.5) is mapped to yellow (1,1,0), and low stress (s=0.0) is mapped to pure blue (0,0,1).

[0273] Finally, the generated colors are overlaid on the flag surface, blending the stress colors with the aforementioned base fabric texture. This is achieved in the graphics rendering pipeline through multi-texture blending or shader programming. The system calculates two color values ​​for each vertex of the triangle: one is the base material color C. base The other is calculated from the Phong lighting model, and is the color C of the stress-thermal map. stress The weighted mixing formula used for superposition is:

[0274]

[0275] Here, 'a' is a blending factor between 0 and 1 used to control the transparency of the heatmap. To prevent the heatmap from completely obscuring the underlying texture, 'a' is set to 0.6 to 0.8, allowing users to clearly see the stress distribution while still recognizing the flag's material and pattern.

[0276] In the GPU fragment shader, the system calculates the corresponding s-value for each fragment (pixel), obtains it through bilinear interpolation using the s-values ​​of the vertices of the triangle it belongs to, and dynamically queries the color map to get C. stress Then, combined with the calculated C base Perform real-time blending and output the final color C. final .

[0277] Through the above operations, the originally abstract longitudinal and latitudinal stress distribution, which only exists in numerical values, is transformed in real time into a semi-transparent color coating with clear physical meaning (high red, low blue), which is then integrated onto the geometric surface of the flag. This allows users to see the dynamic changes of the internal force field of the flag under wind load in a synchronous and intuitive manner, achieving a deep integration of mechanical data and visual presentation.

[0278] Example 2:

[0279] In this embodiment, the implementation mechanism of the key modules is further refined based on the steps of Embodiment 1.

[0280] In S2, the calculation of anisotropic stress distribution specifically includes: the sum of radial spring tensions. With the sum of latitudinal tensions T weft The stress components are obtained by calculating the stress components separately and dividing by the unit area in the corresponding direction. and Both are stored in a dual-channel format and blended into a single heatmap during rendering via a fragment shader.

[0281] In S3, the structural mechanics solver uses an incremental-iterative method to handle geometrically nonlinear problems. When the displacement at the top of the flagpole exceeds 5% of the flagpole length, the system activates the geometric stiffness term K. gThe nonlinear equations were solved using the Newton-Raphson iteration. The convergence tolerance of the iteration was set to 10⁻⁶. If convergence was not achieved within 10 iterations, the time step was automatically halved and the iteration was retried to ensure numerical robustness.

[0282] In S5, to improve interactive response speed, the system adopts a double buffering mechanism: the physics engine calculates the state of the next frame in one thread, while the rendering thread outputs the image of the current frame at the same time. The two are synchronized by a mutex lock to avoid screen tearing.

[0283] Example 3:

[0284] The present invention also provides an interactively controlled image processing system for demonstrating waving flags, comprising:

[0285] The parameter module is used to receive user input of flagpole geometric parameters, flag physical property parameters, and environmental wind field parameters, and to perform legality verification and unit standardization on the parameters.

[0286] The simulation module is used to build a two-way coupled physical model of the flagpole and the flag, and to perform joint solutions of nonlinear dynamics and structural mechanics.

[0287] The feedback module is used to transmit interaction forces and displacement constraints between the flag and the flagpole to maintain physical consistency;

[0288] The rendering module is used to convert simulation results into a realistic sequence of dynamic images and supports the overlay display of stress and heat maps.

[0289] The interaction module is used to listen for user interface events, update simulation parameters in real time, and trigger the physical-visual synchronous calculation of the next frame.

[0290] The parameter configuration module specifically includes: a unit conversion unit, used to convert the imperial or engineering units input by the user into the International System of Units (SI); and a parameter verification unit, used to check whether the parameters are within a physically reasonable range.

[0291] The coupled simulation engine module specifically includes: a fabric dynamics sub-unit, which adopts a mass-spring model and integrates plastic deformation logic; a structural mechanics sub-unit, which constructs a stiffness matrix based on finite element beam theory and supports geometric nonlinear solutions; and a coupling interface unit, which is responsible for the mapping and synchronization of force and displacement between the two sub-models.

[0292] The deformation-force feedback module specifically includes: a force projection unit, which projects the resultant force of the flag boundary mass points to the flagpole node; and a displacement interpolation unit, which interpolates the displacement of the flagpole node to the flag-bound edge mass points.

[0293] The graphics rendering module specifically includes: a mesh generation unit, which triangulates the point mesh; a heatmap mapping unit, which converts stress data into color textures; and a GPU rendering unit, which performs shading and compositing.

[0294] The interactive control module specifically includes: an event listening unit to capture changes in GUI controls; a parameter update unit to apply new parameters in the next physical time step; and a double-buffered synchronization unit to coordinate physical calculations and image output.

[0295] The system provided in this invention achieves a unity of physical realism and visual realism through the close collaboration of five modules: parameter configuration, coupled simulation, force feedback, rendering, and interaction, providing a reliable tool for engineering design and public demonstration.

[0296] Example 4:

[0297] The present invention also provides an electronic device, including a processor and a memory communicatively connected to the processor; wherein the memory stores a computer program executable by the processor, the computer program being executed by the processor to enable the processor to perform an interactively controlled flag-waving demonstration image processing method.

[0298] The processor is a heterogeneous computing architecture consisting of a GPU and a CPU, with the CPU responsible for parameter processing and structural mechanics solutions, and the GPU responsible for fabric dynamics integration and graphics rendering.

[0299] The memory includes RAM and solid-state drives, used to cache simulation states and store material texture libraries.

[0300] The input unit includes a mouse and keyboard for parameter adjustment; the output unit includes a high refresh rate display for real-time display of dynamic images and stress heat maps.

[0301] Based on the preferred embodiments of the present invention described above, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A method for processing interactively controlled images of a flag waving demonstration, characterized in that, Includes the following steps: S1: Obtain the flagpole geometric parameters, flag physical property parameters, and environmental wind field parameters respectively, and construct a physical simulation scene based on the above parameters; Among them, the physical simulation scenario couples the flagpole structure model and the fabric flag model; S2: In the physical simulation scenario, apply dynamic loads driven by wind field parameters to the flag model and simultaneously calculate the nonlinear elastic deformation state and anisotropic stress distribution of the flag at each time. S3: Based on the deformation state and stress distribution obtained in S2, update the additional torque and shear force on the flagpole structural model in real time, and iteratively calculate the displacement response and internal force distribution of the flagpole through the structural mechanics solver; S4: Map the deformation state of the flag and the displacement response of the flagpole to the graphics rendering pipeline to generate a physically consistent sequence of dynamic images of the flag waving. S5: Based on the interactive instructions, dynamically adjust the environmental wind field parameters or flag physical attribute parameters, and re-execute S2 to S4 to achieve interactive physical-visual synchronous updates.

2. The interactively controlled flag-waving demonstration image processing method according to claim 1, characterized in that: In S1, the physical simulation scene is constructed, specifically including: The flagpole structure model is discretized into a finite element structure consisting of several rigid beam elements, where each beam element is connected by nodes to form a continuous support system. The flag model is discretized into a deformable fabric mesh consisting of several mass-spring networks, where each mass represents a discrete node of the fabric, and adjacent mass points are connected by anisotropic springs. The stiffness coefficient of the anisotropic springs is set according to the warp and weft mechanical properties of the fabric material. The fixed edge nodes of the flag model are rigidly bound to the top nodes of the flagpole structure model, so that the boundary conditions of the flag when it is under stress are determined by the displacement state of the flagpole.

3. The interactively controlled flag-waving demonstration image processing method according to claim 1, characterized in that: In S2, applying dynamic loads and calculating the deformation state specifically includes: The environmental wind field parameters are analyzed into a spatiotemporally varying wind speed vector field, and the local aerodynamic pressure is calculated based on the vector field at each mass point position in the flag model. Local aerodynamic pressure is input as an external force into the dynamic equations of the mass-spring network, and the position and velocity of each mass at the current time step are solved by an explicit integration algorithm. In each integral iteration, the elongation of the spring is nonlinearly elastically corrected, and the material yield threshold and plastic deformation model are introduced to reflect the irreversible deformation behavior of the fabric under strong winds.

4. The interactively controlled flag-waving demonstration image processing method according to claim 1, characterized in that: In step S3, the flagpole forces are updated and the structural response is calculated, specifically including: Project the reaction forces of all particles in the flag model along the binding edge to the corresponding nodes of the flagpole structure model; Based on the projected force, the nodal load vector of the flagpole structure is constructed and substituted into the linear or nonlinear structural mechanics equations. A sparse matrix solver is used to calculate the displacement, rotation angle and internal force components of each node of the flagpole, and the displacement of the top node is fed back to the boundary conditions of the flag model to form a two-way coupled loop.

5. The interactively controlled flag-waving demonstration image processing method according to claim 1, characterized in that: In step S4, generating a dynamic image sequence specifically includes: The flag model's point mesh is triangulated to generate a renderable polygonal surface, which is then assigned physically based texture and lighting parameters. The beam elements of the flagpole structure model are converted into cylindrical geometry, and the vertices are deformed based on their displacement results. The deformed flag and flagpole geometry are fed into the GPU rendering pipeline, where frame-by-frame shading and depth compositing are performed to output a high-fidelity image of the flag waving.

6. The interactively controlled flag-waving demonstration image processing method according to claim 1, characterized in that: In S5, parameters are dynamically adjusted according to interactive instructions, specifically including: A slider control is provided through a graphical user interface to adjust the wind speed amplitude, wind direction angle, gust frequency, fabric density, Young's modulus, and Poisson's ratio, respectively. When the value of any control changes, the corresponding simulation parameters are updated immediately, and the original input is replaced in the next physical simulation time step. Maintaining a constant simulation time step ensures that the interactive response delay is below a preset threshold, thereby achieving a smooth real-time demonstration effect.

7. The interactively controlled flag-waving demonstration image processing method according to claim 1, characterized in that: In S2, the anisotropic stress distribution is calculated, specifically including: In the mass-spring network, independent elastic coefficients and damping coefficients are configured for the warp and weft springs, respectively. At each time step, the total tension of the longitudinal and latitudinal springs is calculated separately and normalized to the stress per unit area. Stress distribution is used as the basis for color mapping and is superimposed on the flag surface in the form of a heat map during the rendering stage to visualize the mechanical state.

8. The interactively controlled flag-waving demonstration image processing method according to claim 1, characterized in that: In S3, the structural mechanics solver uses an incremental-iterative method to handle geometrically nonlinear problems, specifically including: When the flagpole undergoes a large displacement, update the geometric stiffness term of the structural stiffness matrix; The equilibrium equations are solved using the Newton-Raphson iterative method until the nodal residuals are less than the convergence tolerance. When the number of iterations exceeds the preset limit, the time step is automatically reduced and the calculation is recalculated to ensure numerical stability.

9. An interactively controlled image processing system for demonstrating waving flags, characterized in that, include: The parameter module is used to receive user input of flagpole geometric parameters, flag physical property parameters, and environmental wind field parameters, and to perform legality verification and unit standardization of the parameters; The simulation module is used to build a two-way coupled physical model of the flagpole and the flag, and to perform joint solutions of nonlinear dynamics and structural mechanics. The feedback module is used to transmit interaction forces and displacement constraints between the flag and the flagpole to maintain physical consistency; The rendering module is used to convert simulation results into a realistic sequence of dynamic images and supports the overlay display of stress and heat maps. The interaction module is used to listen for user interface events, update simulation parameters in real time, and trigger the physical-visual synchronous calculation of the next frame.

10. An electronic device, characterized in that, include: At least one processor; as well as The memory is communicatively connected to the processor; The memory stores a computer program that can be executed by the processor, which enables the processor to perform an interactively controlled image processing method for a flag-waving demonstration.