CN115495938B - Three-dimensional dynamic simulation and visualization method for sea surface waves - Google Patents

Three-dimensional dynamic simulation and visualization method for sea surface waves Download PDF

Info

Publication number
CN115495938B
CN115495938B CN202211436973.0A CN202211436973A CN115495938B CN 115495938 B CN115495938 B CN 115495938B CN 202211436973 A CN202211436973 A CN 202211436973A CN 115495938 B CN115495938 B CN 115495938B
Authority
CN
China
Prior art keywords
dimensional
sea surface
grid
coordinate
horizontal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211436973.0A
Other languages
Chinese (zh)
Other versions
CN115495938A (en
Inventor
胡振中
刘毅
张建民
李彬彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen International Graduate School of Tsinghua University
Original Assignee
Shenzhen International Graduate School of Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen International Graduate School of Tsinghua University filed Critical Shenzhen International Graduate School of Tsinghua University
Priority to CN202211436973.0A priority Critical patent/CN115495938B/en
Publication of CN115495938A publication Critical patent/CN115495938A/en
Application granted granted Critical
Publication of CN115495938B publication Critical patent/CN115495938B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a three-dimensional dynamic simulation and visualization method for sea surface waves, which comprises the following steps: s1: acquiring basic information of sea surface waves; s2: establishing a sea surface wave model, and simulating the elevation change of sea surface waves; s3: further simulating horizontal movement of sea surface waves on the basis of the step S2; s4: and rendering and outputting the simulation image at unit time intervals according to the requirement until the simulation is finished. By adopting the method, the technical problem that a scheme for dynamically simulating and visualizing the sea surface waves is lacked in the prior art can be solved, and the dynamic visualization of the sea surface waves and the water flow is realized.

Description

Three-dimensional dynamic simulation and visualization method for sea surface waves
Technical Field
The invention relates to dynamic simulation of ocean surface deformation and wave motion, in particular to a three-dimensional dynamic simulation and visualization method for sea surface waves.
Background
With the rapid development of economy in China, the informatization degree of marine related industries is higher and higher, the visual demand of people on massive marine environment data is more and more urgent, and especially the simulation and reproduction technology of marine scenes is greatly concerned by practitioners. The realization of the high-reality ocean scene simulation and visualization has important significance for ocean-related industries, on one hand, people can conveniently know and understand the motion change mechanism of the ocean, and on the other hand, the realization method also provides a bottom foundation for ocean engineering construction industry, ocean fishery industry, ocean transportation industry and other industries relating to ocean simulation. Sea surface waves are important components of ocean scenes, and simulation and visualization technology of the sea surface waves have important significance for ocean related industries. For example, dynamic loads caused by sea waves and ocean currents have important influence on an ocean platform and a ship, the effects caused by waves with different heights, directions and periods are different, and in the dynamic response simulation and visualization process of the ship platform and the ship, some technologies are necessary to intuitively express the dynamic changes of sea waves under different working conditions, so that the coupling analysis and display of a target main body and an ocean environment are realized.
The existing sea surface dynamic visualization technology is realized in a mode of multi-base mapping replacement, and dynamic changes of the sea surface in the spatial position caused by waves are less considered, so that the problems that the position of a water surface submerged target object changes along with time and the like are difficult to deal with in practical application.
Disclosure of Invention
The invention provides a three-dimensional dynamic simulation and visualization method of sea surface waves, aiming at solving the technical problem that dynamic changes of the sea surface on the spatial position caused by waves are not considered in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
a three-dimensional dynamic simulation and visualization method for sea surface waves comprises the following steps:
s1: acquiring basic information of sea surface waves;
s2: establishing a sea surface wave model, and simulating the elevation change of sea surface waves;
s3: further simulating horizontal movement of sea surface waves on the basis of the step S2;
s4: and rendering and outputting the simulation image at unit time intervals according to the requirement until the simulation is finished.
Further, the basic information in step S1 includes:
the elevation function of the surface waves z = f (x, y, t), where z is the vertical coordinate z of the surface at time t given the horizontal coordinate (x, y).
Further, step S2 specifically includes the following steps:
s2-1: acquiring a horizontal grid for representing a closed two-dimensional plane, wherein the horizontal grid comprises a series of two-dimensional points and a connection combination relation between the points, and is specifically represented by a plurality of triangles formed by vertexes and connecting lines thereof;
s2-2: and calculating the ordinate of the two-dimensional point according to the elevation function to change the ordinate into a three-dimensional point, so that the horizontal grid is changed into a three-dimensional grid, and a three-dimensional sea surface is obtained.
Further, step S2 further includes the following steps:
s2-3: and optimizing the three-dimensional sea surface in the step S2-2 to display the smooth grids.
Further, step S2-3 is specifically,
when the elevation function is a continuous elevation function, point normal vectors on the curved surface corresponding to the three-dimensional points are assigned to the three-dimensional points, namely:
Figure GDA0004064478380000021
unitizing the vector to obtain a normal vector of a single point
Figure GDA0004064478380000022
Wherein x is 0 ,y 0 Is a two-dimensional point coordinate on a horizontal grid, t 0 For the given moment in time, the system is,
Figure GDA0004064478380000023
and
Figure GDA0004064478380000024
partial derivatives of the elevation function in two horizontal directions;
for a given three-dimensional mesh vertex (x) when the elevation function has only discrete points or partial derivatives that are difficult to solve 0 ,y 0 ,z 0 ) And calculating the surface normal directions of all connected triangles, carrying out weighted average on the unit normal vectors according to the area of the triangles, and taking the obtained unit normal vectors as the point normal directions of the vertexes.
Further, the step S2-2 specifically includes the following steps:
s2-2-1: from two-dimensional point coordinates (x) on a horizontal grid 0 ,y 0 ) At a given time t 0 Then, calculating corresponding elevation z through the elevation function 0 =f(x 0 ,y 0 ,t 0 ) And then a new three-dimensional point (x) is obtained 0 ,y 0 ,z 0 );
S2-2-2: and connecting and combining the three-dimensional points according to the connection combination relationship between the points in the two-dimensional grid to form a new three-dimensional grid.
Further, in step S2-2, the step of obtaining the three-dimensional surface from the three-dimensional points is to connect and combine the three-dimensional points according to the connection and combination relationship between the points in the two-dimensional grid to form a new three-dimensional grid.
Further, step S3 specifically includes the following steps:
s3-1: acquiring a real sea surface picture as a mapping;
s3-2: adding a mapping coordinate m to each vertex of the three-dimensional grid, so that a preset picture is covered on the sea surface wave model;
s3-3: and continuously updating the mapping coordinates of the vertex based on the moving direction and the moving speed of the wave current.
Further, the method for overlaying the preset picture on the model in the step S3-2 specifically includes the following steps:
s3-2-1: plane of each vertexThe coordinate is used as the original mapping coordinate m, and the corresponding mapping coordinate m is obtained through conversion new Define the conversion process as m new = MR (m), and the conversion is performed so that the converted map coordinates of all vertices fall within the map area.
Further, in step S3-2-1, the chartlet coordinates range between X-axis and Y-axis [0,1], where the conversion is specifically to perform rounding-down on the original chartlet coordinates m in the X-axis direction and the Y-axis direction of each vertex to obtain [ m ], where [ m ] is equal to or less than m < [ m ] +1, and a fractional part { m } = m- [ m ], and if [ m ] is an even number, then take { m } as final chartlet coordinates, otherwise, take 1- { m } as final chartlet coordinates.
Further, step S3-3 specifically includes the following steps:
s3-3-1: determining a coordinate range [ x ] in two directions of a horizontal two-dimensional grid from a simulation region min ,x max ]And [ y min ,y max ]And appointing a mapping range [ m ] corresponding to the initial time grid xa ,m xb ]And [ m ] ya ,m yb ]Determining the proportionality coefficients between the coordinate ranges as follows:
Figure GDA0004064478380000031
Figure GDA0004064478380000032
the purpose of setting the proportionality coefficient is to convert the actual movement speed of the seawater into the change speed of the mapping coordinates, so that the simulation effect is closer to reality.
S3-3-2: recording the horizontal flow velocity of the sea surface as v, and the velocity components along two axial directions as v x And v y Then, the map coordinates of the two-dimensional grid points (x, y) at time t are as follows:
Figure GDA0004064478380000041
wherein m is x (t)、m y And (t) is an abscissa and an ordinate of the map coordinate at time t.
The invention has the following beneficial effects:
the method realizes the motion simulation and display of the sea surface waves by combining the method of simulating the deformation of the sea surface wave model by adopting the elevation function and considering the horizontal movement of the waves, and can simultaneously consider the motion of the waves in the vertical direction and the horizontal direction, thereby simulating the dynamic change of the sea surface on the spatial position caused by the waves, and being difficult to deal with the problems of the change of the position of a target object submerged on the water surface along with the time and the like in practical application.
In some embodiments, the present invention employs smoothing based on a horizontal grid and a weighted average point normal vector, making the simulated wave more natural.
In some embodiments, the horizontal grid and the elevation function adopted in the invention can be suitable for waves of various types such as regular waves, random waves, measured waves and the like, support multi-wave superposition, have higher expandability than the technology of only using sine waves or unidirectional waves, and have higher efficiency than the method of calculating the direction of a point method by adopting area weighted average.
Drawings
FIG. 1 is a schematic diagram of elevation changes and horizontal movement in a sea surface wave simulation method according to an embodiment of the present invention;
FIG. 2a is a schematic diagram illustrating a simple horizontal grid partitioning method according to an embodiment of the present invention;
FIG. 2b is a schematic diagram illustrating a sample division manner of any complex shape of a horizontal grid in the embodiment of the present invention;
FIG. 3a is a schematic view of a normal vector in an embodiment of the present invention;
FIG. 3b is a schematic diagram of a normal vector of a point in an embodiment of the invention;
FIG. 4 is a schematic diagram of direction calculation by discrete point method in the embodiment of the present invention;
FIG. 5a is a diagram illustrating an exemplary three-dimensional mesh tiling in an embodiment of the present invention;
FIG. 5b is an exemplary diagram of a three-dimensional mesh smooth surface in an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating a repetition of mapping coordinates and a mirror image according to an embodiment of the present invention;
FIG. 7 is a schematic flow chart of a method in an embodiment of the present invention;
FIG. 8 is a schematic diagram of an example of a three-dimensional visualization of a floating wind turbine in the ocean in an embodiment of the present invention;
FIG. 9 is a schematic block diagram of a dynamic simulation apparatus for three-dimensional ocean waves according to an embodiment of the present invention;
FIG. 10a is a diagram of default map resources employed by an apparatus in an embodiment of the present invention;
FIG. 10b is a schematic diagram of a simulated top view of an apparatus according to an embodiment of the present invention;
FIG. 10c is a schematic diagram of a simulated side view effect of the apparatus in an embodiment of the present invention;
11 a-11 f are diagrams of the effect of wave simulation at different times in embodiments of the present invention;
in the figure, 1-the initial sea surface, 2-the deformed sea surface.
Detailed Description
The embodiments of the present invention will be described in detail below. It should be emphasized that the following description is merely exemplary in nature and is not intended to limit the scope of the invention or its application.
In the ocean, waves are mainly represented by the deformation of the surface, so that the visual simulation of the wave motion is realized by analyzing and simulating the shape and position change of the sea surface. Specifically, as shown in FIG. 1, the present invention divides the wave motion into two separate sub-processes, elevation change and horizontal movement, as shown in FIG. 1. The elevation change refers to the vertical coordinate change of a corresponding point on the sea surface under a given horizontal coordinate; the horizontal movement refers to the horizontal component of the displacement of the specific water particles on the sea surface, and the initial sea surface 1 becomes the deformed sea surface 2 after the above change. The calculation and simulation principles of these two sub-processes are described separately below.
Elevation change
At a given moment, the surface wave can be considered as a three-dimensional curved surface, expressed in the form of a surface equation as F (x, y, z) =0, considering that the vertical coordinate z of the surface at a given horizontal coordinate (x, y) is also unique, it can be further written in the form of z = F (x, y). When time changes, the vertical coordinate of the sea surface of a given horizontal coordinate also changes, so that a time variable t needs to be introduced, and the final elevation function is written as z = f (x, y, t).
The problem to be solved next is how to draw a three-dimensional sea surface according to the elevation function f. The invention adopts a drawing method of a fixed horizontal coordinate grid, and the idea is to determine a horizontal grid in advance, wherein the grid comprises a series of two-dimensional points and a connection combination relationship between the points and is used for representing a closed two-dimensional plane, as shown in fig. 2a and fig. 2 b. From two-dimensional point coordinates (x) on a horizontal grid 0 ,y 0 ) At a given time t 0 Then, the corresponding elevation z can be calculated through the elevation function 0 =f(x 0 ,y 0 ,t 0 ) And then a new three-dimensional point (x) is obtained 0 ,y 0 ,z 0 )。
According to the connection combination relationship between the points in the two-dimensional grid, the three-dimensional points can be connected and combined to form a new three-dimensional grid. For example, three points a, B, and C in the two-dimensional mesh form a plane triangle, and corresponding three-dimensional points are calculated according to the elevation function to be a ', B', and C ', respectively, so that a' B ', and C' are a space triangle in the three-dimensional mesh. And drawing all the space triangles by applying all the connection combination relations in the two-dimensional grid to obtain the three-dimensional sea surface corresponding to the elevation function.
It should be noted that, for a planar mesh, drawing all triangles directly can result in a smooth plane; however, for the spatial mesh, because two adjacent triangles may not be on one plane (the directions of the plane methods are different), an obvious edge broken line may appear at the joint of the triangles, and a smooth spatial curved surface cannot be formed, which may greatly affect the display effect of sea surface waves.
On the basis of the three-dimensional grid, the invention further adopts a point method direction mode to realize the display of the smooth grid. Determining a plane according to the three vertexes, and then taking the normal direction of the plane as the normal direction of the triangle; the normal direction is a normal direction set at each vertex, so that a display effect similar to a curved triangle is realized, as shown in fig. 3a and 3 b. When the common vertices of adjacent triangles have the same vertex normal direction, a smooth connection is provided without creases at the edges.
The next question is how to determine the direction of the point method for each vertex on the three-dimensional mesh. The three-dimensional normal direction can be a unit normal vector
Figure GDA0004064478380000061
Is expressed in such a way that the modulo length of the vector is 1 (i.e., the length of the modulus is 1)
Figure GDA0004064478380000062
Figure GDA0004064478380000063
). For a given continuous elevation function z = f (x, y, t), since the function defines a curved surface, it is only necessary to calculate the normal direction of the vertex on the curved surface and assign the normal direction to the corresponding point. Two-dimensional grid points (x) can be found 0 ,y 0 ) At t 0 A point normal vector of the three-dimensional point corresponding to the moment is
Figure GDA0004064478380000064
The vector is unitized to obtain a normal vector of a single point
Figure GDA0004064478380000065
The above method for solving the direction of the point method requires to give the partial derivatives of the elevation function in two horizontal directions
Figure GDA0004064478380000066
And
Figure GDA0004064478380000067
it is not suitable for the case that the elevation function has only discrete points or partial derivatives which are difficult to solve. Aiming at the condition of discrete points, the invention adopts a point method direction calculation method based on a surface method direction. The basic idea of the method is as follows: for a given three-dimensional mesh vertex (x) 0 ,y 0 ,z 0 ) And calculating the surface normal directions of all connected triangles, carrying out weighted average on the unit normal vectors according to the area of the triangles, and taking the obtained unit normal vectors as the point normal directions of the vertexes. For example, for the case where the common fixed horizontal two-dimensional grid is a square grid, as shown in fig. 4, the direction of the dot method at the point P can be calculated as follows:
Figure GDA0004064478380000071
Figure GDA0004064478380000072
the effect of using the point method before and after is shown in fig. 5a and fig. 5b, it can be seen that there is a significant flaking phenomenon (as in fig. 5 a) in the direction without using the point method, and it appears as a smooth curved surface (as in fig. 5 b) after using the above method.
Moving horizontally
The shape change of sea surface waves can be simulated by the elevation change, but the sea surface water particles also have motion in the horizontal direction, for example, floating objects on the sea surface not only float up and down, but also move along the sea surface, and the horizontal movement cannot be demonstrated by the deformation of the curved surface. In view of this problem, the present invention further realizes the horizontal movement of sea surface waves through color change, and its basic idea is: a real sea surface picture is preset as a map, a map coordinate is added to each vertex of the three-dimensional grid, the preset picture is covered on the model, and then the map coordinates of the vertices are continuously modified based on the movement direction and the movement speed of wave water flow, so that the colors of the vertices are changed, and the horizontal movement effect of sea waves is finally shown.
The binding of the map and the three-dimensional mesh is realized by map coordinates at the vertexes, the map coordinates are m (X, Y) and represent the coordinates of the corresponding points of the points in the map, the areas of three vertexes of the same triangle drawn in the map are the map of the triangle, and the ranges of the map coordinates in the X direction of the transverse axis and the Y direction of the longitudinal axis of the map are usually [0,1]]From (0, 0) in the lower left corner to (1, 1) in the upper right corner, as shown in fig. 6. For the value exceeding the range, the value can be converted into the value range through some preset methods, and different display effects such as edge stretching, repetition, mirror image repetition and the like are realized. In order to avoid the phenomenon of obvious image mutation on the sea surface, the invention adopts a mirror image repetition mode to realize the mapping of sea surface waves, and the specific method comprises the following steps: the original mapping coordinate m in the X direction and the Y direction is rounded down to obtain [ m]Satisfy [ m ]]≤m<[m]+1, fractional part { m } = m- [ m =]If [ m ]]For even numbers, { m } will be the final map coordinates, otherwise 1- { m } will be the final map coordinates. After processing according to this method, the resulting final chartlet coordinates will be at [0,1]]In between, the process is denoted as m new = MR (m), the mirror repeat effect achieved is as in fig. 6.
Consider further the movement of the map over time.
Because the three-dimensional grid is obtained by fixing the horizontal two-dimensional grid, the original chartlet coordinate corresponding to each three-dimensional vertex can be directly determined by the two-dimensional coordinate of the original chartlet coordinate, namely, the original chartlet coordinate is generated on the basis of the two-dimensional grid. First, the coordinate ranges [ x ] along two directions of the horizontal two-dimensional grid are calculated respectively min ,x max ]And [ y min ,y max ]And appointing a mapping range [ m ] corresponding to the grid at the initial time (t = 0) xa ,m xb ]And [ m ] ya ,m yb ]Determining the proportionality coefficient between the coordinate ranges as follows
Figure GDA0004064478380000081
Figure GDA0004064478380000082
Recording the horizontal flow velocity of the sea surface as v, and the velocity components along two axial directions as v x And v y Then the movement distance of the water particle in two directions after the time t is v x t and v y t, multiplying the two by the above proportional coefficient to obtain the decrement of the map coordinate. For example, when the water surface moves in the positive x-direction, the map will also move in the positive x-direction and the map x-coordinate at the grid vertices will decrease. From this, the map coordinates of the two-dimensional grid points (x, y) at time t can be calculated as follows
Figure GDA0004064478380000083
Method step
The core innovative principle of the method lies in the realization principle of the elevation change and the horizontal movement, and comprises the steps of utilizing the proposed point normal vector weighted average method based on the horizontal grid to realize the efficient visualization of the smooth sea wave surface, and utilizing the proposed mapping coordinate transformation rule to realize the water flow translation effect.
As shown in fig. 7, the process and key parameters of the method are as follows:
(1) Determining basic information of sea surface waves
The basic information of sea surface waves includes:
sea surface area to be simulated, and its horizontal coordinate range [ x ] min ,x max ]And [ y min ,y max ];
The elevation function f (x, y, t) of the sea surface wave can be constructed in a mode of actually measured data interpolation, given regular wave or random wave generation;
the motion velocity components v of the sea surface current along two horizontal directions respectively x And v y
Specifying sea-surface mapping, and initial mapping coordinate range m xa ,m xb ]And [ m ] ya ,m yb ]。
(2) Determining horizontal meshing and time step
And generating a proper horizontal grid according to the simulation precision requirement of the sea surface waves, wherein the proper horizontal grid comprises grid vertexes and connection combination relations between points. In general, a simple mesh division method as shown in fig. 2a may be adopted, i.e. a region is divided into a series of small rectangles according to a given side length or mesh number, and each small rectangle is divided into two triangles along a diagonal. All two-dimensional grid point information is recorded using one list P, for example, for the grid division shown in fig. 2a, it can be noted that P = { (0, 0), (0, 1), \8230; (0, 4), (1, 4), \8230; (4, 4) }, there are 25 vertices; all the connection combination relations are recorded by adopting a list C, each element in C is composed of 3 different integers (i, j, k), 3 vertexes representing corresponding positions in P can be connected into a triangle, and 32 elements are shared in the previous example P. With both lists P and C, arbitrary complex-shaped meshing patterns like fig. 2b can also be recorded.
The time step Δ t of the simulation may be set according to a frame rate required for simulating the animation, for example, to set the frame rate to 25FPS, the time step Δ t =0.04s of the simulation may be determined.
(3) Initializing three-dimensional surface model of sea surface waves
Taking time t =0, acting an elevation function f (x, y, t) on each element in a two-dimensional vertex list P, mapping to generate a new three-dimensional vertex list Q, wherein Q and P have the same element number, and the elements at the same position in P and Q are respectively P and Q, so that the condition that the requirement is met
Figure GDA0004064478380000091
And calculating the dot normal direction of each three-dimensional vertex in the Q, and generating a unit normal vector list N, wherein N and Q have the same element number. The point method direction is generated according to the method: if the partial derivatives of the elevation function in two horizontal directions are known
Figure GDA0004064478380000092
And
Figure GDA0004064478380000093
then point taking methodThe vector is
Figure GDA0004064478380000094
Otherwise, for the given three-dimensional mesh vertex, calculating the surface normal directions of all connected triangles of the given three-dimensional mesh vertex, carrying out weighted average on normal vectors according to the area of the triangles, and then taking the obtained normal directions as the point normal directions of the vertex. In the case where the fixed horizontal two-dimensional mesh is a square, the target three-dimensional vertex is denoted by q, and adjacent vertices on the left, right, upper, and lower sides thereof are denoted by q L 、q R 、q U 、q B Then, the direction of the point method can be simplified according to the following formula:
Figure GDA0004064478380000101
Figure GDA0004064478380000102
calculating a scaling factor between coordinate ranges
Figure GDA0004064478380000103
Figure GDA0004064478380000104
Calculating the mapping coordinates of each two-dimensional vertex at the initial moment, generating a mapping point list M, wherein M and P have the same element number, and the elements at the same positions in P and M are respectively P and M (recording all two-dimensional grid point information by adopting a list P), so as to meet the requirement
Figure GDA0004064478380000105
And transmitting the three-dimensional grid vertex list Q, the point normal vector list N, the chartlet point list M, the vertex connection relation list C and chartlet resources into a three-dimensional rendering engine, setting relevant parameters such as transparency of the three-dimensional curved surface model, and carrying out first loading and rendering.
(4) Iterative computation and update of three-dimensional surface model
And recording the current actual time as a time zero point, setting a time table t =0, and circularly executing the following steps until t reaches the simulation end time.
The time schedule is increased by Δ t, i.e. t = t + Δ t.
Updating the z coordinates of all three-dimensional vertexes in Q, and calculating the mode of each vertex Q as
q z =f(q x ,q y ,t)
Updating normal vectors of all points in the N, and initializing the calculation mode in the same manner as the list N in the step (3);
updating the coordinates of all the map points M, and calculating the calculation mode of each map point M as
Figure GDA0004064478380000106
And (5) waiting for the actual time to reach t, transmitting and updating the current Q, N and M into the three-dimensional rendering engine, erasing the original image and re-rendering.
(5) End of simulation
One embodiment is described below in conjunction with the present method.
In a display scene of a certain floating wind turbine, digital dynamic simulation needs to be performed on sea waves of a local sea area where a wind turbine is located, so as to represent states of the wind turbine in different marine environments. According to the flow and the steps, determining the horizontal coordinate ranges [0,500m ] and [0,500m ] of the area to be simulated, and superposing the following 2 Stocks second-order waves with different directions, periods, wavelengths and wave heights:
horizontal direction vector (0.6, 0.8), period 10s, wavelength 150m, wave height 10m;
horizontal direction vector (1, 0), period 5s, wavelength 75m, wave height 5m.
Corresponding wave elevation function of
f(x,y,t)=5cos(α)+0.5234cos(2α)+2.5cos(β)+0.2618cos(2β)
α=0.6283t-0.0251x-0.0335y
β=1.2566t-0.0838x
The velocity of sea surface water flow is v x =2m/s,v y =0m/s, initial chartlet coordinate range [0,0.2]And [0,0.2]。
And (3) uniformly dividing the horizontal grid according to a grid form, wherein the side length of each grid is 5m, dividing the whole sea area into 100X 100 grids, and constructing two lists of P and C of grid division according to the mode given in the step (2). Taking the frame rate to be 50FPS, the time step of the simulation is Δ t =0.02s.
And (5) carrying out initialization and iteration circulation according to the steps (3) and (4), under a given moment t, firstly calculating a three-dimensional grid vertex list Q, and then calculating according to a simplified mode to obtain a normal vector list N. The scale factor of the coordinate range is
k x =k y =4×10 -4 m -1
Each of the paste points in the paste point list M at a given time is calculated as follows
Figure GDA0004064478380000111
Wherein m is x (t)、m y And (t) is an abscissa and an ordinate of the map coordinate at time t.
The three-dimensional dynamic visualization of the marine environment in which the wind turbine is located in this example can be realized as shown in fig. 8. In the application scene, the coupling motion effect of the fan and the wave motion can be realized by further combining the dynamic simulation technology of the floating fan under the wave load, such as fig. 8, so that the simulation and the simulation of the high-reality ocean scene are supported.
Realizing device
Based on the method for simulating sea surface wave deformation and motion, the three-dimensional sea wave dynamic simulation device which can be used for different directions, periods, wavelengths and wave heights is realized.
Module assembly
The implementation process can be divided into the following 4 modules: the system comprises a horizontal grid generation module, a three-dimensional vertex management module, a point method direction calculation module, a map coordinate updating module and a result display module. The relationship between the modules is shown in fig. 9, and the functions are as follows:
(1) Horizontal grid generation module
And constructing a horizontal two-dimensional grid according to a given simulation area range, grid precision requirements and the like, and expressing the generated grid in a form of a two-dimensional vertex list P and a vertex connection relation list C.
(2) Three-dimensional vertex management module
And receiving the two-dimensional vertex list P output by the horizontal grid generation module, constructing a corresponding sea surface elevation function f according to parameters such as wave direction, period, wavelength, wave height and the like, and mapping and converting the P into a three-dimensional vertex list Q through the elevation function.
(3) Point method direction calculation module
And acquiring a vertex list Q from the three-dimensional vertex management module, calculating the dot method direction of each vertex according to the method, and generating a dot method list N.
(4) Map coordinate updating module
And acquiring a vertex list P from the horizontal grid management module, calculating the mapping point coordinates corresponding to each vertex at the appointed moment according to the set sea surface horizontal flow velocity, and generating a mapping point list M.
(5) Result display module
And respectively acquiring a three-dimensional grid vertex list Q, a point method list N, a mapping point list M and a vertex connection relation list C from the 4 modules, and displaying a simulation result in a three-dimensional graph and animation mode according to given mapping resources and time intervals.
Implementation details
The device is realized based on C # programming language, and draws and displays a three-dimensional model through SharpDX (DirectX packaging library).
(1) Horizontal grid
The horizontal grid adopts a rectangular grid, and inputThe information comprises the number n of grids in the x-direction x The number of grids n in the y direction x Length of grid side in x direction s x And length of grid side s in y direction y The lower left corner of the default grid is the origin of coordinates. Namely, it is
x min =y min =0,x max =n x s x ,y max =n y s y
(2) Elevation function
The elevation function adopts the following form of Stocks second-order wave
Figure GDA0004064478380000131
Wherein
Figure GDA0004064478380000132
H is the wave height of the wave, L is the wavelength, T is the wave period, (d) x ,d y ) A two-dimensional unit vector representing the horizontal direction of the wave may be specified by user input. In order to realize a more real wave effect, a plurality of waves with different parameters are added into the module, and the sub elevation functions are superposed to obtain a final elevation function.
(3) Direction of point method
Since the device uses a rectangular horizontal grid, the direction of the point method can be calculated according to the method described above and based on the 4 adjacent vertices of each three-dimensional vertex. In order to keep the position adjacency information of the vertex, lists P, Q, N and M except C in the device actually adopt a two-dimensional table structure, and simultaneously support the searching in a two-dimensional index or one-dimensional index mode. For example, for a two-dimensional table of size 5 × 5, its row 2, column 3 elements may be obtained at a two-dimensional index of (1, 2), and the same elements may also be obtained at a one-dimensional index of 7 (i.e., 1 × 5+ 2). For a vertex at a mesh boundary, the vertex itself is substituted for its missing neighbor vertex in computing the PointDeg direction, e.g., for vertex q with a two-dimensional index of (0, 0), its left and lower neighbors q L 、q B If no exists, q is replaced by q when the normal vector of the point is calculated L And q is B
(4) Picture pasting device
Fig. 10a shows the default map resources used by the present device, and fig. 10b and 10c show the simulation effect achieved by using the map. In addition, the initial mapping range of the device defaults to 1/5 of the length and 1/5 of the width of the lower left corner of the picture, namely
m xa =m ya =0,m xb =m yb =0.2
Fig. 11 a-11 f are diagrams showing the effect of wave simulation at different times, wherein the "+" sign is a white mark added in a map for highlighting the effect of the change of the sea surface color with time, and in the simulation, the horizontal speed of the mark is the same as the water flow speed, namely 2m/s along the x direction. In addition, the motion state of the fan, such as the rotation of the fan blade, can also be simulated in the present embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is a more detailed description of the invention in connection with specific/preferred embodiments and is not intended to limit the practice of the invention to those descriptions. It will be apparent to those skilled in the art that numerous alterations and modifications can be made to the described embodiments without departing from the inventive concepts herein, and such alterations and modifications are to be considered as within the scope of the invention. In the description herein, references to the description of the term "one embodiment," "some embodiments," "preferred embodiments," "an example," "a specific example," or "some examples" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction. Although embodiments of the present invention and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the scope of the application.

Claims (5)

1. A three-dimensional dynamic simulation and visualization method for sea surface waves is characterized by comprising the following steps:
s1: acquiring basic information of sea surface waves, wherein the basic information comprises:
the elevation function of the sea surface waves z = f (x, y, t), where z is the vertical coordinate of the sea surface at a given horizontal coordinate (x, y) at time t;
s2: establishing a sea surface wave model, and simulating the elevation change of sea surface waves;
s3: further simulating horizontal movement of sea surface waves on the basis of the step S2;
s4: rendering and outputting the simulation image every unit time according to the requirement until the simulation is finished;
wherein, step S2 specifically includes the following steps:
s2-1: acquiring a horizontal grid for representing a closed two-dimensional plane, wherein the horizontal grid comprises a series of two-dimensional points and a connection combination relation between the points, and is specifically represented by a plurality of triangles formed by vertexes and connecting lines thereof;
s2-2: calculating the vertical coordinate of the two-dimensional point according to the elevation function to change the vertical coordinate into a three-dimensional point, so that the horizontal grid is changed into a three-dimensional grid to obtain a three-dimensional sea surface;
wherein, step S3 specifically includes the following steps:
s3-1: acquiring a real sea surface picture as a mapping;
s3-2: adding a mapping coordinate m to each vertex of the three-dimensional grid, so that a preset picture is covered on the sea surface wave model;
s3-3: continuously updating the mapping coordinates of the vertex based on the moving direction and the moving speed of the wave water flow;
the method for overlaying the preset picture on the model in the step S3-2 specifically comprises the following steps:
s3-2-1: taking the plane coordinate of each vertex as the original mapping coordinate m, and obtaining the corresponding mapping coordinate m through conversion new Define the conversion process as m new = MR (m), the conversion is used for making all the mapping coordinates of the vertexes after conversion fall within the mapping area, the mapping coordinates range between [0,1] in the X-axis and Y-axis, and the conversion is specifically that the original mapping coordinates m of each vertex in the X-axis direction and the Y-axis direction are rounded down to obtain [ m [ [ m ]]Satisfy [ m ]]≤m<[m]+1, a fractional part { m } = m- [ m = m [ ]]If [ m ]]An even number, then take { m } as the final map coordinates, otherwise 1- { m } as the final map coordinates.
2. The method of claim 1, wherein step S2 further comprises the steps of:
s2-3: and optimizing the three-dimensional sea surface in the step S2-2 to realize the display of the smooth grid, wherein the optimization method specifically comprises the following steps:
when the elevation function is a continuous elevation function, point normal vectors on the curved surface corresponding to the three-dimensional points are assigned to the three-dimensional points, namely:
Figure QLYQS_1
unitizing the vector to obtain a normal vector of a single point
Figure QLYQS_2
Wherein x is 0 ,y 0 Is a two-dimensional point coordinate on a horizontal grid, t 0 For the given moment in time, the system is,
Figure QLYQS_3
and
Figure QLYQS_4
partial derivatives of the elevation function in two horizontal directions are obtained;
for a given three-dimensional mesh vertex (x) when the elevation function has only discrete points or partial derivatives that are difficult to solve 0 ,y 0 ,z 0 ) And calculating the surface normal directions of all connected triangles, carrying out weighted average on the unit normal vectors according to the area of the triangles, and taking the obtained unit normal vectors as the point normal directions of the vertexes.
3. The method according to claim 1, characterized in that step S2-2 comprises in particular the steps of:
s2-2-1: from two-dimensional point coordinates (x) on a horizontal grid 0 ,y 0 ) At a given time t 0 Then, calculating corresponding elevation z through the elevation function 0 =f(x 0 ,y 0 ,t 0 ) And then a new three-dimensional point (x) is obtained 0 ,y 0 ,z 0 );
S2-2-2: and connecting and combining the three-dimensional points according to the connection combination relationship between the points in the two-dimensional grid to form a new three-dimensional grid.
4. The method according to claim 1, wherein in step S2-2, the step of obtaining the three-dimensional surface from the three-dimensional points comprises connecting and combining the three-dimensional points according to a connection and combination relationship between the points in the two-dimensional grid to form a new three-dimensional grid.
5. The method according to claim 1, characterized in that step S3-3 comprises in particular the steps of:
s3-3-1: determining a coordinate range [ x ] in two directions of a horizontal two-dimensional grid from a simulation region min ,x max ]And [ y min ,y max ]And appointing a mapping range [ m ] corresponding to the initial time grid xa ,m xb ]And [ m ] ya ,m yb ]Determining the proportionality coefficients between the coordinate ranges as follows:
Figure QLYQS_5
Figure QLYQS_6
s3-3-2: recording the horizontal flow velocity of the sea surface as v, and the velocity components along two axial directions as v x And v y Then, the map coordinates of the two-dimensional grid points (x, y) at time t are as follows:
Figure QLYQS_7
wherein m is x (t)、m y And (t) is an abscissa and an ordinate of the map coordinate at time t.
CN202211436973.0A 2022-11-16 2022-11-16 Three-dimensional dynamic simulation and visualization method for sea surface waves Active CN115495938B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211436973.0A CN115495938B (en) 2022-11-16 2022-11-16 Three-dimensional dynamic simulation and visualization method for sea surface waves

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211436973.0A CN115495938B (en) 2022-11-16 2022-11-16 Three-dimensional dynamic simulation and visualization method for sea surface waves

Publications (2)

Publication Number Publication Date
CN115495938A CN115495938A (en) 2022-12-20
CN115495938B true CN115495938B (en) 2023-03-10

Family

ID=85115907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211436973.0A Active CN115495938B (en) 2022-11-16 2022-11-16 Three-dimensional dynamic simulation and visualization method for sea surface waves

Country Status (1)

Country Link
CN (1) CN115495938B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116611364A (en) * 2023-05-23 2023-08-18 上海木圣网络科技有限公司 Wave generation method, system, equipment and readable medium based on Airy wave
CN117436317B (en) * 2023-12-20 2024-03-29 浙江远算科技有限公司 Wave current load simulation calculation method, system and equipment based on offshore wind power pile foundation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0944698A (en) * 1995-07-25 1997-02-14 Hitachi Ltd Method and device for generating simulated marine wave image
CN105894563A (en) * 2016-04-25 2016-08-24 中国电子科技集团公司第二十八研究所 Method for simulating global ocean effect on digital earth
CN109003322A (en) * 2018-08-20 2018-12-14 集美大学 A kind of three-dimensional ocean waves simulation optimization method of dynamic positioning ship operation on the sea

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0944698A (en) * 1995-07-25 1997-02-14 Hitachi Ltd Method and device for generating simulated marine wave image
CN105894563A (en) * 2016-04-25 2016-08-24 中国电子科技集团公司第二十八研究所 Method for simulating global ocean effect on digital earth
CN109003322A (en) * 2018-08-20 2018-12-14 集美大学 A kind of three-dimensional ocean waves simulation optimization method of dynamic positioning ship operation on the sea

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
一种基于GPU的大规模水面实时模拟方法;谭小辉等;《计算机仿真》;20090915;第26卷(第09期);第211-214页 *
一种视点相关的海浪网格模型;刘浩翰等;《计算机工程与应用》;20070221;第43卷(第06期);第209-212页 *
在C#中结合LOD技术实现海浪模拟;李上海等;《科学技术与工程》;20101008;第10卷(第28期);第7063-7075页 *
基于OpenGL索引顶点数组的大尺度海面LOD算法;刘丁等;《同济大学学报(自然科学版)》;20090315;第37卷(第03期);第414-418页 *
基于投影网格算法的海面波浪模拟;彭晶等;《武汉工程大学学报》;20181015;第40卷(第05期);第559-564页 *
基于构造函数的波浪模拟;曾凡涛;《广东轻工职业技术学院学报》;20061230;第5卷(第04期);第28-30页 *
基于海频谱的实时波浪模拟;曾凡涛;《计算机仿真》;20071015;第24卷(第10期);第195-199页 *

Also Published As

Publication number Publication date
CN115495938A (en) 2022-12-20

Similar Documents

Publication Publication Date Title
CN115495938B (en) Three-dimensional dynamic simulation and visualization method for sea surface waves
Gallagher et al. Computer visualization: graphics techniques for engineering and scientific analysis
JP4364409B2 (en) How to model graphic objects interactively using linked and unlinked surface elements
CN102663827B (en) Three-dimensional dynamic whole-process simulation method for storm surge and flood routing in complex flooding areas
US20050195196A1 (en) Interactive water effects using texture coordinate shifting
JP3285563B2 (en) Graphic object generation method and generation system
JP2001052196A (en) Method for generating detail oriented hierarchical expression of distance field surrounded with character frame and memory for storing data
Jeschke et al. Water surface wavelets
WO2007015928A2 (en) Method of generating surface defined by boundary of three-dimensional point cloud
CN113593051B (en) Live-action visualization method, dam visualization method and computer equipment
KR20080090671A (en) Apparatus and method for mapping textures to object model
JPH07120434B2 (en) Method and apparatus for volume rendering
CN115758938B (en) Adhesive boundary flow field numerical simulation-oriented boundary layer grid generation method
CN114332395A (en) Method for realizing flood routing simulation based on hydraulic model and three-dimensional rendering technology
Würfel et al. Natural Phenomena as Metaphors for Visualization of Trend Data in Interactive Software Maps.
WO2006106829A1 (en) Structured grid data visualization method and program
Romanyuk et al. Blending functionally defined surfaces
JPWO2013038548A1 (en) Drawing apparatus, drawing method, and drawing program
Andersen et al. Height and tilt geometric texture
Lu et al. Solid mathematical marbling
CN117456074B (en) Three-dimensional rendering method and equipment for offshore wind power scouring pit based on digital twin simulation
Lin et al. A feature-adaptive subdivision method for real-time 3D reconstruction of repeated topology surfaces
CN114627258B (en) Method and system for isomorphic modeling of gravity field catamaran spheres
Kovacs et al. Real-time creased approximate subdivision surfaces with displacements
Lachman An open programming architecture for modeling ocean waves

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant