A method and system for three-dimensional modeling of offshore structures based on geometric constraint solving
Through the integration of geometric constraint solution method and Web browser, the geometric constraints and modeling error problems in complex environments in marine engineering structure modeling are solved, efficient and accurate three-dimensional modeling of marine structures is achieved, and the reliability of design is improved and security, and support online modeling.
Patent Information
- Application Number
- CN202411408397.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-10
AI Technical Summary
Traditional marine engineering structural modeling methods cannot accurately consider geometric constraints and limitations in complex marine environments, resulting in large simulation modeling errors, affecting the reliability and security of the design, and the web platform is not sufficient to process large amounts of data and complex calculations. Implement online modeling.
Adopt the three-dimensional modeling method of marine engineering structure based on geometric constraint solution, and use model generation units, constraint acquisition units, model reconstruction units and three-dimensional modeling units to add geometric constraints, and use constraint queue calculation units to solve to generate accurate marine engineering Structures three-dimensional models and integrates them into a web browser to achieve user-friendly online modeling.
Improve the accuracy of offshore structure simulation modeling and design reliability and security, optimize the interactive experience of geometric constraint solution, realize fast and efficient modeling of complex offshore structures, and meet the rapidity of the marine engineering field. , accurate modeling requirements.
Smart Images

Figure CN118916973B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method and system for three-dimensional modeling of an offshore structure based on geometric constraint solving, and belongs to the technical field of offshore structure simulation. Background Art
[0002] As the industrial foundation of China's marine engineering equipment manufacturing industry is gradually improved, the development of the industry and breakthroughs in core technologies have become the focus of development. In the field of marine engineering, modeling, simulation and analysis are crucial tasks. Traditional modeling and analysis methods usually install independent software on the local computer and perform three-dimensional drawing and modeling based on the design characteristics of the marine engineering structure.
[0003] However, in reality, marine engineering structures are subject to various constraints and restrictions in complex marine environments. These constraints and restrictions will affect the geometric shape and size of marine engineering structures. If these constraints and restrictions are not taken into account, it will lead to large errors in the simulation modeling of marine engineering structures, and it will be impossible to accurately evaluate the performance of marine engineering structures in complex marine environments, thus affecting the reliability and safety of marine engineering structure design.
[0004] Furthermore, with the development of Internet technology, Web-based tools have gradually become a trend because they can achieve advantages such as cross-platform use, real-time collaboration and simplified deployment. However, due to the limitations of the Web platform, especially in processing large amounts of data and complex calculations, traditional Web technologies often cannot meet the modeling needs of marine engineering structures and cannot achieve online modeling of marine structures, which affects the promotion and use of marine modeling and simulation solutions.
[0005] The information disclosed in this Background Art is only for understanding the background of the inventive concept and therefore it may include information that does not constitute the prior art. Summary of the invention
[0006] In response to the above problem or one of the above problems, an object of the present invention is to provide a three-dimensional modeling method for offshore structures based on geometric constraint solving, by creating a model generation unit, an initial model of an offshore structure, a model reconstruction unit, a constraint queue calculation unit and a three-dimensional modeling unit, geometric constraints are added to the offshore structure to obtain a three-dimensional model of the offshore structure, and the constraints and restrictions on the offshore structure are fully considered, so that the simulation modeling of the offshore structure is more accurate, thereby effectively improving the reliability and safety of the offshore structure design.
[0007] In response to the above problem or one of the above problems, the second purpose of the present invention is to provide a three-dimensional modeling system for marine structures based on geometric constraint solving. In a Web browser, the three-dimensional modeling method of marine structures is integrated using the web browser code, thereby effectively combining the advantages of the web browser code technology and the constraint queue computing unit. Therefore, the high-performance computing capability of the web browser code and the precise modeling capability of the relevant computing units can be utilized to achieve efficient geometric modeling of marine structures, and user-friendly operation and visualization of the results can be achieved through the Web interface, thereby meeting the needs of fast and accurate modeling in the field of marine engineering.
[0008] To achieve one of the above purposes, the first technical solution of the present invention is:
[0009] A three-dimensional modeling method for offshore structures based on geometric constraint solving includes the following contents:
[0010] Generate an initial model of the offshore structure based on the basic geometric element graphics of the offshore structure through the model generation unit created in advance;
[0011] Using the constraint acquisition unit created in advance, the geometric constraints on the offshore structure are constructed according to the initial model of the offshore structure;
[0012] Using the model reconstruction unit created in advance, geometric constraints are added to the initial model of the offshore structure to obtain the offshore structure response model that can be used for constraint solving;
[0013] Based on the constraint queue calculation unit created in advance, the constraint solving algorithm is used to solve the offshore structure response model and obtain the geometric coordinate update information;
[0014] Using the previously created three-dimensional modeling unit, based on the geometric coordinate update information, the initial model of the offshore structure is updated to obtain the three-dimensional model of the offshore structure, thereby completing the three-dimensional modeling of the offshore structure.
[0015] After continuous exploration and experiments, the present invention adds geometric constraints to the offshore structure by creating a model generation unit, an initial model of the offshore structure, a model reconstruction unit, a constraint queue calculation unit and a three-dimensional modeling unit, and obtains a three-dimensional model of the offshore structure, fully considering the constraints and restrictions on the offshore structure, thereby making the simulation modeling of the offshore structure more accurate, thereby effectively improving the reliability and safety of the offshore structure design.
[0016] Furthermore, the present invention greatly optimizes the interactive experience of geometric constraint solving based on the constraint queue calculation unit, and users can see the geometric changes of marine structures after applying constraints in a very short time. Through the constraint queue calculation unit, geometric relationships can be accurately controlled to maintain design consistency, and various parts of the model can be adjusted according to geometric constraints to keep all constraints satisfied without having to manually adjust the position and size of each geometric object. At the same time, geometric constraints make the design process more efficient and flexible. Designers can quickly create and modify models, and automatic solutions using the constraint queue calculation unit can greatly reduce duplication of work and human errors. Therefore, the geometric constraint solving scheme of the present invention can quickly and efficiently build complex marine structure models.
[0017] Furthermore, the three-dimensional modeling method of the marine structure of the present invention can be integrated into the browser to meet the modeling needs of the marine engineering structure, realize the online modeling of the marine structure, and realize user-friendly operation and visualization results through the Web interface, thereby meeting the needs of fast and accurate modeling in the marine engineering field; and thus the performance of the marine engineering structure in a complex marine environment can be accurately evaluated, which is convenient for the promotion and use of marine engineering modeling simulation solutions.
[0018] As the preferred technical measures:
[0019] The method of generating the initial model of the offshore structure through the model generation unit created in advance and based on the basic geometric element graphics of the offshore structure is as follows:
[0020] Obtaining basic geometric element graphics of the offshore structure, which includes multiple node images and multiple rod images;
[0021] According to the offshore structure, one or more bar images are selected, and coordinate information, angle information and orientation information of the bar images are set;
[0022] Assemble one or more selected bar images through node images to form a basic bar connection structure;
[0023] Based on the rod connection structure, a pile foundation platform image and / or a submarine pipeline image and / or an offshore wind turbine image are formed, and an initial model of the offshore structure is obtained.
[0024] As the preferred technical measures:
[0025] The method of constructing geometric constraints on offshore structures using the constraint acquisition unit created in advance is as follows:
[0026] Get geometric constraint information, including length constraint, angle constraint, parallel constraint, perpendicular constraint and tangent constraint;
[0027] Based on the characteristic requirements of the offshore structure, relevant constraint conditions on the offshore structure are screened out from the geometric constraint information; the relevant constraint conditions include angle constraint and length constraint;
[0028] Based on the angle constraint and the length constraint, the target angle and the target length of the offshore structure are obtained;
[0029] According to the target angle and the target length, an angle constraint function and a length constraint function are constructed;
[0030] Angle constraint function, used to represent the difference between the vector angle between two rods and the target angle;
[0031] Length constraint function, which is used to represent the difference between the actual length and the target length of the vectors of the two bars;
[0032] According to the angle constraint function and the length constraint function, a group of nonlinear constraint equations is constructed to characterize the geometric constraints of offshore structures.
[0033] As the preferred technical measures:
[0034] The method of using the model reconstruction unit created in advance to add geometric constraints to the initial model of the offshore structure to obtain the offshore structure response model that can be used for constraint solving is as follows:
[0035] Obtaining a nonlinear constraint equation group for representing geometric constraint conditions, which includes a length constraint function and an angle constraint function;
[0036] Select multiple bar images in the initial model of the offshore structure;
[0037] Bind an angle constraint function to two adjacent rod images to constrain the angle range between the two rods;
[0038] Bind a length constraint function to each bar image to constrain the length of the bar;
[0039] After binding is completed, the offshore structure response model that can be used for constraint solving is obtained.
[0040] As the preferred technical measures:
[0041] Based on the previously created constraint queue simulation unit, the constraint solving algorithm is used to solve the offshore structure response model and obtain the geometric coordinate update information as follows:
[0042] Digitally process the bar images in the offshore structure response model to obtain position vector information of at least two bars;
[0043] Based on the position vector information of the two rods, the initial vector angle and initial vector length of the two rods are calculated;
[0044] According to the initial vector angle and the angle constraint function, the difference between the initial vector angle and the target angle is calculated to obtain the angle error;
[0045] According to the initial vector length and the length constraint function, the difference between the initial vector length and the target length is calculated to obtain the length error;
[0046] Calculate the comprehensive error value based on the angle error and length error;
[0047] When the comprehensive error value is greater than or equal to a predetermined threshold, the iteration continues, the position vector information is updated, and the comprehensive error value is recalculated;
[0048] When the comprehensive error value is less than a predetermined threshold, the iteration is stopped, and the position vector information at this time is used as the geometric coordinate update information to complete the coordinate solution under the constraints of the target angle and target length.
[0049] As the preferred technical measures:
[0050] The method for updating the position vector information is as follows:
[0051] Obtaining the position vector information of this iteration, and determining the angle constraint function and the length constraint function of at least two rods based on the position vector information;
[0052] Then, the partial derivatives of the angle constraint function and the length constraint function with respect to the coordinate values are calculated respectively to obtain a number of partial derivative information;
[0053] Based on some partial derivative information, the Jacobian matrix is constructed;
[0054] Based on the Jacobian matrix and the position vector information of this iteration, the position vector information of the next iteration is calculated to complete the update of the position vector information of this iteration.
[0055] As the preferred technical measures:
[0056] Using the previously created 3D modeling unit, based on the geometric coordinate update information, the initial model of the offshore structure is updated to obtain the 3D model of the offshore structure as follows:
[0057] Based on the geometric coordinate update information, the geometric coordinates of the bar image and the node image are updated to obtain the geometric structure change data after the geometric constraints are applied;
[0058] The geometric structure change data at least includes length change information, angle change information and position change information;
[0059] According to the geometric structure change data, the initial model of the offshore structure is rendered and updated using a three-dimensional rendering engine to obtain a three-dimensional model of the offshore structure.
[0060] As the preferred technical measures:
[0061] The method of rendering and updating the initial model of the offshore structure by using the 3D rendering engine to obtain the 3D model of the offshore structure is as follows:
[0062] Delete the original vertex data of the member cached in the browser;
[0063] At the same time, the line segments used to represent the rods are destroyed through the 3D drawing protocol;
[0064] According to the geometric structure change data, the vertex coordinates of each rod image are changed through the rendering engine, that is, new vertices are redrawn to obtain a new vertex array;
[0065] Based on the new vertex array, the rod image is updated using the 3D engine, and line segments used to represent the rod are drawn through the 3D drawing protocol;
[0066] The new line segment is displayed in the browser window, so that the user can directly see the changed rod and offshore structure in the browser window.
[0067] As the preferred technical measures:
[0068] The method to get a new vertex array is as follows:
[0069] According to the geometric structure change data, the starting point coordinates and the end point coordinates of the rod are obtained;
[0070] Taking the starting point of the rod as the reference, calculate the coordinates of the MD vertices on the top surface of the rod;
[0071] Taking the end point of the rod as the reference, calculate the coordinates of ND vertices on the bottom surface of the rod;
[0072] Sum up the MD vertex coordinates of the top surface and the ND vertex coordinates of the bottom surface to get a new vertex array.
[0073] MD is 3 or 4 or 5 or 6 or 7; ND is 3 or 4 or 5 or 6 or 7.
[0074] To achieve one of the above purposes, the second technical solution of the present invention is:
[0075] A three-dimensional modeling system for offshore structures based on geometric constraint solving, comprising a Web browser;
[0076] The web browser is used to implement the above-mentioned three-dimensional modeling method of offshore structures based on geometric constraint solving, which integrates a model generation unit, an initial model of the offshore structure, a model reconstruction unit, a constraint queue calculation unit and a three-dimensional modeling unit through a web browser code;
[0077] When the user uses the Web browser, the Web browser realizes online modeling of the offshore structure.
[0078] The web browser of the present invention utilizes web browser code and integrates a three-dimensional modeling method for marine structures, thereby effectively combining the advantages of web browser code (webassembly) technology and constraint queue computing units, thereby utilizing the high-performance computing capabilities of web browser code and the precise modeling capabilities of related computing units to achieve efficient geometric modeling of marine structures, and realize user-friendly operation and visualization of results through a web interface, thereby meeting the needs of fast and precise modeling in the field of marine engineering.
[0079] Compared with the prior art solutions, the present invention has the following beneficial effects:
[0080] After continuous exploration and experiments, the present invention adds geometric constraints to the offshore structure by creating a model generation unit, an initial model of the offshore structure, a model reconstruction unit, a constraint queue calculation unit and a three-dimensional modeling unit, and obtains a three-dimensional model of the offshore structure, fully considering the constraints and restrictions on the offshore structure, thereby making the simulation modeling of the offshore structure more accurate, thereby effectively improving the reliability and safety of the offshore structure design.
[0081] Furthermore, the present invention is based on the constraint queue calculation unit, which greatly optimizes the interactive experience of geometric constraint solving. Users can see the geometric changes of marine structures after applying constraints in a very short time. Through the constraint queue calculation unit, geometric relationships can be accurately controlled to maintain design consistency, and various parts of the model can be adjusted according to geometric constraints to keep all constraints satisfied without having to manually adjust the position and size of each geometric object. At the same time, geometric constraints make the design process more efficient and flexible. Designers can quickly create and modify models, and automatic solving using the constraint queue calculation unit can greatly reduce duplication of work and human errors. Therefore, the geometric constraint solving scheme of the present invention can quickly and efficiently construct complex marine structure models.
[0082] Furthermore, the Web browser of the present invention utilizes the web browser code to integrate the three-dimensional modeling method of marine engineering structures, thereby effectively combining the advantages of the web browser code (webassembly) technology and the constraint queue computing unit, and thus utilizing the high-performance computing capabilities of the web browser code and the precise modeling capabilities of the relevant computing units to achieve efficient geometric modeling of marine engineering structures, and realize user-friendly operation and visualization of results through the Web interface, thereby meeting the needs of fast and precise modeling in the field of marine engineering. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1It is a schematic diagram of a first process of the method for three-dimensional modeling of marine structures of the present invention;
[0084] Figure 2 A second schematic flow chart of the method for three-dimensional modeling of marine structures of the present invention;
[0085] Figure 3 A schematic diagram of a process flow for constraint solving of the present invention;
[0086] Figure 4 A schematic structural diagram of an offshore wind turbine platform constructed using the present invention. DETAILED DESCRIPTION
[0087] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0088] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the following detailed description of the present invention. Those skilled in the art can fully understand the present invention without the description of these details.
[0089] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention pertains. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" as used herein includes any and all combinations of one or more of the associated listed items.
[0090] like Figure 1 As shown, the first specific embodiment of the method for three-dimensional modeling of marine structures based on geometric constraint solving of the present invention is as follows:
[0091] A three-dimensional modeling method for offshore structures based on geometric constraint solving includes the following contents:
[0092] Generate an initial model of the offshore structure based on the basic geometric element graphics of the offshore structure through the model generation unit created in advance;
[0093] Using the constraint acquisition unit created in advance, the geometric constraints on the offshore structure are constructed according to the initial model of the offshore structure;
[0094] Using the model reconstruction unit created in advance, geometric constraints are added to the initial model of the offshore structure to obtain the offshore structure response model that can be used for constraint solving;
[0095] Based on the constraint queue calculation unit created in advance, the constraint solving algorithm is used to solve the offshore structure response model and obtain the geometric coordinate update information;
[0096] Using the previously created three-dimensional modeling unit, based on the geometric coordinate update information, the initial model of the offshore structure is updated to obtain the three-dimensional model of the offshore structure, thereby completing the three-dimensional modeling of the offshore structure.
[0097] A second specific embodiment of the method for three-dimensional modeling of marine structures based on geometric constraint solving of the present invention:
[0098] A three-dimensional modeling method for offshore structures based on geometric constraint solving includes the following contents:
[0099] Using the model generation unit, first draw the offshore structure graphics;
[0100] Then, geometric constraints are added to the offshore structure through the model reconstruction unit;
[0101] Then, the constraint queue calculation unit is called to perform geometric constraint solving calculation;
[0102] Finally, the 3D modeling unit uses the 3D rendering engine to re-render the marine engineering model to obtain the 3D model of the marine engineering structure, thus completing the 3D modeling of the marine engineering structure.
[0103] A specific embodiment of the marine structure three-dimensional modeling system based on geometric constraint solving of the present invention:
[0104] A three-dimensional modeling system for offshore structures based on geometric constraint solving, comprising a Web browser;
[0105] The Web browser is used to implement the above-mentioned three-dimensional modeling method of offshore structures based on geometric constraint solving. It integrates a model generation unit, an initial model of the offshore structure, a model reconstruction unit, a constraint queue calculation unit and a three-dimensional modeling unit through a network browser code webassembly; when a user uses the Web browser, the Web browser realizes online modeling of the offshore structure.
[0106] like Figure 2 As shown, the third specific embodiment of the method for three-dimensional modeling of marine structures based on geometric constraint solving of the present invention is as follows:
[0107] A method for three-dimensional modeling of an offshore structure based on geometric constraint solving comprises the following steps:
[0108] Step 1: Use the model generation unit to draw the offshore structure graphics, which includes the following contents:
[0109] Select basic geometric element graphics, such as nodes and rods, on the front-end interactive interface; add the selected offshore rod to the 3D window, and adjust the coordinates, angles, and orientations of the rod. Follow the same steps to add another rod, which is connected to an end point of the created rod. A connection point is formed between the two rods, forming a basic rod connection structure. Similarly, complex offshore structures such as pile foundation platforms, submarine pipelines, and offshore wind turbines can be drawn through multiple interactions.
[0110] Step 2: Add geometric constraints to the offshore structure through the model reconstruction unit, which includes the following:
[0111] Select the connected marine engineering members drawn in the 3D window, and then select the marine engineering nodes connected between the members. The selected structures will be used as the response objects of the constraint queue calculation unit. The angle constraint tool can be used to bind angle constraints to the two selected members to constrain the angle range between the two members. Users can ensure the existence and accuracy of the angle constraint information by entering or confirming the angle value.
[0112] Step 3: Call the constraint queue calculation unit to prepare for geometric constraint solving calculations, which includes the following:
[0113] Each added constraint condition and bound constraint object will be recorded in the constraint queue, for example: the constraint condition is an angle constraint, and the constraint object is two connected rods.
[0114] Each time the user adds a constraint operation, the constraint queue updates the content and records, and the program automatically traverses the constraint queue and calls the constraint queue calculation unit API. The constraint queue calculation unit API will prepare to solve the constraints based on the geometric constraint information set by the user. The geometric constraint information includes the target length value and target angle value of the selected rod.
[0115] Step 4: Compile and integrate the constraint queue computing unit, which includes the following:
[0116] Before calling the constraint queue calculation unit, the system of the present invention will integrate the model generation unit, the initial model of the offshore structure, the model reconstruction unit, the constraint queue calculation unit and the three-dimensional modeling unit into the browser of the present invention in advance by compiling the web browser code WebAssembly for program calling.
[0117] WebAssembly is a new type of code that runs in modern web browsers and provides new performance features and effects. Due to its binary format and static typing, web browser code usually executes much faster than pure JavaScript code. This makes WebAssembly very suitable for running computationally intensive tasks such as 3D rendering, physics simulation or complex algorithms.
[0118] In this embodiment, the method of integrating the relevant computing unit into the browser by compiling the web browser code WebAssembly is as follows:
[0119] Step 1: Prepare C++ static libraries, such as Solver libraries;
[0120] Step 2: Use the Emscripten toolchain to compile the C++ code into the WebAssembly (wasm) format for web browser code and generate a compiled file in the .wasm format. After the compilation is complete, two files will be generated, including: a wrapper file solver.js and a binary file solver.wasm.
[0121] Step 3: Put the above two files in the same directory. Through the wrapper file solver.js, the binary file solver.wasm in the same path can be run in the web browser.
[0122] Step 4: Load and instantiate the wrapper file solver.js through the lightweight JavaScript program.
[0123] Since solving the calculation takes a lot of time, the response stream is constructed to directly handle the function for asynchronous loading.
[0124] The response stream direct processing function can directly process the response stream returned from the interactive function fetch request, so compilation can start during the network transmission process, thereby speeding up the loading of the module.
[0125] Response stream direct processing functions are built-in applications in modern web browsers that are used to asynchronously compile and instantiate web browser code and can efficiently process streaming bytecode.
[0126] Step 5: Encapsulate the compiled geometric constraint solving module into various constraint functions, such as length constraint function, angle constraint function, etc. These constraint functions are introduced into the geometric modeling module through the application programming interface API call.
[0127] Through the constraint solving list, the constraint conditions and constraint parameters are passed to the application programming interface API of the constraint solving module, preparing for the constraint solving calculation.
[0128] Through testing, it can be known that the method of integrating the web browser code WebAssembly in the present invention improves the computing performance by about 5 times compared with the solution of directly using the programming language JavaScript for calculation.
[0129] This is because web browser code can be directly converted into machine code when it is compiled, while the programming language JavaScript code needs to be interpreted and executed by the programming language engine at runtime. This direct conversion to machine code reduces the overhead of the intermediate layer, thus providing higher performance.
[0130] Step 5: Call the constraint queue calculation unit to solve the geometric constraints of the constraints in the constraint list in turn. If a marine structure is bound to several constraints at the same time, a joint solution is performed according to multiple constraints, including the following:
[0131] First, the geometric figures and their constraints need to be mathematically represented. Common geometric constraints include distance, angle, parallelism, perpendicularity, tangency, etc.
[0132] For example: When calculating the angle constraint of a member, the length constraints of two members need to be satisfied.
[0133] Assume that the three-dimensional vector of member 1 is , the three-dimensional vector of member 2 is , the angle between the two members is a specified value .
[0134] The expressions for the two members are as follows:
[0135]
[0136]
[0137] in, and is the three-dimensional vector of member 1 The coordinates of the two endpoints are and ; and is the three-dimensional vector of member 2 The coordinates of the two endpoints are and .
[0138] The expression for the angle constraint is as follows:
[0139]
[0140]
[0141]
[0142] in, , , are the vectors of member 1 Components in the x, y, and z directions; , , are the vectors of member 2 Components in the x, y, and z directions; is the angle between rod 1 and rod 2; is the target angle of member 1 and member 2; is the current member angle Angle with target The difference function between .
[0143] Assume that the vector of the member and The target lengths are and , then the expression of the length constraint is as follows:
[0144]
[0145]
[0146]
[0147]
[0148] Then, construct the length error function of member 1 and the length error function of member 2 , which is used to represent the difference between the actual length and the target length of the two bars, is expressed as follows:
[0149]
[0150]
[0151] In this embodiment, the constraint solving method can be found in Figure 3 , which includes the following:
[0152] Geometric constraint problems often involve nonlinear equations, and the main methods include numerical methods and symbolic methods.
[0153] The numerical method solves the geometric position that satisfies the constraints through iteration. The main methods include Newton-Raphson method and gradient descent method. Newton-Raphson method is a method that uses the first-order derivative of a function for iterative approximation. Gradient descent method finds a solution that minimizes the objective function through optimization method and is often used to deal with nonlinear constraints.
[0154] The symbolic method directly solves the constraint equations through algebraic operations. The main methods include algebraic elimination and Groebner basis.
[0155] Algebraic elimination methods obtain solutions to a system of algebraic equations by the process of eliminating different factors, such as Gaussian elimination.
[0156] Groebner bases are an algebraic tool for solving systems of polynomial equations that can systematically eliminate variables and simplify equations.
[0157] In this embodiment, the method for constructing a nonlinear system of equations includes the following contents:
[0158] Get the angle constraint and length constraint, set the constraint function, and construct the following nonlinear equations:
[0159]
[0160] in, is an angle function, used to represent the difference between the current vector angle and the target angle; is the length error function of member 1, which is used to represent the difference between the actual length of the vector of member 1 and the target length; is the length error function of member 2, which is used to represent the difference between the actual length of the vector of member 2 and the target length.
[0161] In this embodiment, the method of solving using the Newton-Raphson method is as follows:
[0162] Set the solution vector of the problem during the iteration process and .
[0163] In the In the iterations, the vector is an estimate of the current solution.
[0164] In the In the iterations, the vector By updating The new solution obtained is then estimated.
[0165] In the current iteration The objective function value at , and then we can get the following iterative expression:
[0166]
[0167] in, is the Jacobian matrix, which represents the derivative matrix of the constraint function.
[0168] Jacobian matrix The elements of are the partial derivatives of the constraint functions with respect to the variables, and their expressions are as follows:
[0169]
[0170] Among them, each element , , ...is the corresponding function on the variable The partial derivative of .
[0171] In this embodiment, the iterative update method includes the following contents:
[0172] Set the initial guess value , which is a vector and The initial position of .
[0173] Then, calculate the constraint function value of the current geometric element position .
[0174] Then calculate the Jacobian matrix .
[0175] Then, the position of the geometric element is updated, and the calculation formula is as follows:
[0176]
[0177] Finally, check the convergence, that is, determine whether the norm of the nonlinear equation system is less than the predetermined threshold. When the norm of is less than a predetermined threshold, it is considered that the optimal solution is found, the iteration ends, and the result is output; otherwise, the iteration continues. The predetermined threshold is generally set to 10 to the power of -6.
[0178] In this embodiment, the method for simultaneously constraining the angle and length of two marine engineering rods is as follows:
[0179] First, set the vectors of the two members, which are and The angle between the rods is , the target length is and .
[0180] Then, calculate the initial angle, and the calculation formula is as follows:
[0181]
[0182]
[0183] Then perform the initial length check, the calculation formula is as follows:
[0184]
[0185]
[0186] Then construct the constraint function and Jacobian matrix, and the calculation formula is as follows:
[0187]
[0188]
[0189]
[0190] Then iterative updates are performed, which include the following:
[0191] Calculate constraint function values and Jacobian matrix; Update ; Check convergence and repeat iterations until the constraints are satisfied; finally, get the calculation result. The expression of the calculation result is as follows:
[0192]
[0193]
[0194] Therefore, through the above numerical solution method, the result vector under the constraint conditions of the target angle of 45 degrees and the lengths of 5 and 1 respectively can be obtained, and its expression is as follows:
[0195]
[0196] Step 6: Re-render the marine engineering model using a 3D rendering engine through the 3D modeling unit, which includes the following contents:
[0197] The 3D rendering engine is a 3D visualization engine built based on the underlying technology of the 3D drawing protocol webgl, where geometric models can be displayed and interacted with quickly and in real time.
[0198] After receiving the results of the previous calculation, the 3D rendering engine updates the geometric coordinate information of the offshore rods and connection points. It also re-renders the model and presents the offshore structure calculated by constraint solving on the user's 3D window interface canvas. The user can see the changes in the geometric structure after the constraints are applied, such as changes in length, angle, position, etc.
[0199] In this embodiment, the re-rendering process is as follows:
[0200] After the 3D rendering engine obtains the coordinate results of the bar calculated by the geometric constraint solver, the endpoint of the marine engineering bar is changed through the rendering engine. and and the end point of marine member 2 and The 3D engine updates the vertex array of the rod (one-dimensional line structure) based on the coordinates of the rod.
[0201] The 3D rendering engine changes the endpoints of the two lines according to the data calculated by the rod model. The rods of the one-dimensional structure are represented by lines in the web browser window, and then the browser canvas drawing results are updated through the 3D drawing protocol webgl, which specifically includes the following steps:
[0202] Step 1: Destroy the endpoint , , , The original data cached in the browser, the original data of member 1 is as follows:
[0203]
[0204] The original data of member 2 is as follows:
[0205] ;
[0206] At the same time, the lines used to represent the rods are destroyed via the 3D drawing protocol webgl.
[0207] Step 2: Redraw the new endpoints , , , ,
[0208] The new endpoints of member 1 are as follows:
[0209]
[0210] The new endpoints of member 2 are as follows:
[0211]
[0212] At the same time, the lines used to represent the rods are drawn using the 3D drawing protocol webgl.
[0213] Then, the browser of the present invention automatically refreshes and displays the new rod effect, so that the new line segment is displayed in the browser canvas, and the user can directly see the changed rod structure effect in the web browser window.
[0214] In this embodiment, the method for re-rendering the rods of the three-dimensional structure is as follows:
[0215] First, the three-dimensional rods are set based on the preset three-dimensional rod cross-section. For example, the cross-section of the square steel rod is a square. Assuming that the side length of the cross-section is 0.25, the new vertex coordinates can be obtained by the following calculation formula.
[0216] The calculation method of the four vertices of member 1 is as follows:
[0217] Starting point of rod 1 The coordinates are as follows:
[0218]
[0219] End point of member 1 The coordinates are as follows:
[0220]
[0221] Since the side length of the square steel section is 0.25 and half of the side length is 0.125; assuming that the section of the square steel bar is parallel to the XY plane, the four vertices of the section can be translated along the positive and negative directions of the XY plane. The top vertex is obtained by translating along the vector direction based on the bottom surface. The specific calculation method is as follows:
[0222] End point As a reference, the calculation formulas for the four vertices of the bottom surface of member 1 are as follows:
[0223]
[0224]
[0225]
[0226]
[0227] in, , , , are the four vertices of the bottom surface of rod 1.
[0228] Starting point As a reference, the calculation formula for the top vertex of member 1 is as follows:
[0229]
[0230]
[0231]
[0232]
[0233] in, , , , The four vertices of the top surface of the rod.
[0234] The calculation method of the four vertices of member 2 is as follows:
[0235] Starting point of member 2 The coordinates are as follows:
[0236]
[0237] End point of member 2 The coordinates are as follows:
[0238]
[0239] Since the side length of the square steel section is 0.25, the end point As a reference, the calculation formulas for the four vertices of the bottom surface of rod 2 are as follows:
[0240]
[0241]
[0242]
[0243]
[0244] in, , , , are the four vertices of the bottom surface of rod 2.
[0245] Starting point As a reference, the calculation formulas for the four vertices on the top surface of rod 2 are as follows:
[0246]
[0247]
[0248]
[0249]
[0250] in, , , , The four vertices of the top surface of the rod.
[0251] Therefore, through the above calculation, the vertex array of the two rods (three-dimensional square steel structure) can be obtained. If it is other cross-sectional structures, the above algorithm is still used.
[0252] In this embodiment, the three-dimensional rendering engine updates the view effect to the browser, and the changed three-dimensional rod structure effect can be directly seen in the web browser window.
[0253] After the calculation is completed, the offshore structure will retain the added constraints to prevent subsequent modeling operations from affecting the completed geometric relationships.
[0254] Based on the entire process above, the marine engineering modeling module can interactively generate new geometric structures, position information, direction information, and geometric relationships on the web page in real time, at high speed, and accurately.
[0255] Therefore, based on the constraint queue calculation unit, the interactive experience of geometric constraint solving is greatly optimized, and users can see the geometric changes of offshore structures after applying constraints in a very short time. Through the constraint queue calculation unit, geometric relationships can be precisely controlled to maintain design consistency, and various parts of the model can be automatically adjusted without having to manually adjust the position and size of each geometric object to ensure that all constraints are met. Geometric constraints make the design process more efficient and flexible. Designers can quickly create and modify models, and automatic solving through the constraint queue calculation unit can greatly reduce duplication of work and human errors. Therefore, the geometric constraint solving scheme of the present invention can quickly and efficiently construct complex offshore structure models.
[0256] At the same time, the present invention combines the advantages of the web browser code WebAssembly technology and the constraint queue computing unit, utilizes the high-performance computing capabilities of the web browser code WebAssembly and the precise modeling capabilities of the constraint queue computing unit, to achieve efficient geometric modeling of marine structures, and realizes user-friendly operation and visualization of results through a Web interface, thereby meeting the needs of fast and precise modeling in the field of marine engineering.
[0257] like Figure 4 , a specific embodiment of applying the present invention to a certain offshore wind turbine platform:
[0258] The present invention is applied to build an offshore wind turbine platform based on a jacket, and the stability and accuracy of the structure are ensured by setting geometric constraints.
[0259] The structure of the offshore wind power platform from top to bottom is: tower, conductor frame, main leg, support pipe, pile pipe (bottom).
[0260] There is a fixed 120-degree angle between the main legs of the jacket and the bottom pile pipe structure. To ensure the accuracy of the model, the same 120-degree angle constraint can be set for the other three main legs and pile pipes, and vertical constraints can be applied to the four pile pipes at the bottom.
[0261] Take the main legs and pile pipes in the jacket structure as an example:
[0262] Angle constraint settings, which include the following:
[0263] In the jacket structure, each main leg and its corresponding bottom pile pipe must maintain a fixed angle of 120 degrees. By setting the angle constraint, the following conditions are met:
[0264]
[0265] in, Indicates A main leg, Indicates A pile pipe.
[0266] In addition, the remaining three main legs and the pile pipe should also follow the 120-degree symmetry constraint.
[0267] Vertical constraint settings include the following:
[0268] In order to ensure the stability and accuracy of the entire structure, vertical constraints are applied to the four bottom piles to make them perpendicular to the ground plane:
[0269]
[0270] in, For the ground plane.
[0271] After completing the above constraint settings, the system of the present invention begins to analyze the constraints and generate a geometric structure that meets the conditions. The specific solution steps are as follows:
[0272] Step 1: Initialize the structure and set the initial coordinates of each node.
[0273] Step 2: Apply angle constraints and vertical constraints to construct a set of constraint equations. The expression of the constraint equations is as follows:
[0274]
[0275]
[0276] in, is the angle constraint, A vertical constraint.
[0277] Step 3: Analyze the equations and adjust the node coordinates in real time so that all constraints are satisfied at the same time.
[0278] Step 4: When users drag and drop in the model, such as moving the main legs or connecting the bracing tubes, the angles and verticality will not be affected because the geometric constraints are fixed. The solver in the web browser can also be used to update the positions of other structures in real time to ensure the continuity of operations and the stability of the structure.
[0279] Through the above geometric constraints and solution process, efficient and accurate construction of offshore wind turbine platforms can be achieved, especially for complex structures that require precise control of angles and verticality. This modeling solution not only improves design efficiency, but also reduces the risk of modeling errors.
[0280] In summary, the present invention makes up for the problem of slow and difficult processing of geometric constraints in traditional modeling, greatly improves the accuracy and speed of modeling, and can quickly provide accurate marine engineering models for simulation analysis processes, providing a new idea and method for visual modeling technology in the field of marine engineering.
[0281] An embodiment of a device applying the method of the present invention:
[0282] An electronic device comprising:
[0283] one or more processors;
[0284] A storage device for storing one or more programs;
[0285] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned three-dimensional modeling method of marine engineering structures based on geometric constraint solving.
[0286] A computer medium embodiment of the method of the present invention is applied:
[0287] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned three-dimensional modeling method of marine engineering structures based on geometric constraint solving.
[0288] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, and computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0289] The present application is described by flowcharts or / and block diagrams of the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each process or / and block in the flowchart or / and block diagram and the combination of the processes or / and blocks in the flowchart or / and block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart or / and block diagram. Figure 1 Process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0290] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 Process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0291] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 Process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0292] The unit in this application is an object that objectively describes the morphological structure with the help of physical or virtual expressions. The object is not equal to the object and is not limited to physical and virtual. It can be a data processing function, software program, processing mode, usage method, operation method, workflow, application process, electronic hardware, circuit module, processing system, system imitation or simulation object.
[0293] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field can still modify or replace the specific implementation methods of the present invention with equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A three-dimensional modeling method for offshore structures based on geometric constraint solving, characterized in that: Includes the following: Generate an initial model of the offshore structure based on the basic geometric element graphics of the offshore structure through the model generation unit created in advance; Using the constraint acquisition unit created in advance, the geometric constraints on the offshore structure are constructed according to the initial model of the offshore structure; The method is as follows: Get geometric constraint information, including length constraint, angle constraint, parallel constraint, perpendicular constraint and tangent constraint; Based on the characteristic requirements of the offshore structure, relevant constraints on the offshore structure are screened out from the geometric constraint information; the relevant constraints include angle constraints and length constraints; Based on the angle constraint and the length constraint, the target angle and the target length of the offshore structure are obtained; According to the target angle and the target length, an angle constraint function and a length constraint function are constructed; Angle constraint function, used to represent the difference between the vector angle between two rods and the target angle; Length constraint function, which is used to represent the difference between the actual length and the target length of the vectors of the two bars; According to the angle constraint function and the length constraint function, a nonlinear constraint equation group is constructed to characterize the geometric constraint conditions of the offshore structure; The model reconstruction unit created in advance is used to add geometric constraints to the initial model of the offshore structure to obtain the offshore structure response model that can be used for constraint solving; the method is as follows: Obtaining a nonlinear constraint equation group for representing geometric constraint conditions, which includes a length constraint function and an angle constraint function; Select multiple bar images in the initial model of the offshore structure; Bind an angle constraint function to two adjacent rod images to constrain the angle range between the two rods; Bind a length constraint function to each bar image to constrain the length of the bar; After binding is completed, the response model of the offshore structure that can be used for constraint solving is obtained; Based on the constraint queue calculation unit created in advance, the constraint solving algorithm is used to solve the offshore structure response model and obtain the geometric coordinate update information; The method is as follows: Digitally process the bar images in the offshore structure response model to obtain position vector information of at least two bars; Based on the position vector information of the two rods, the initial vector angle and initial vector length of the two rods are calculated; According to the initial vector angle and the angle constraint function, the difference between the initial vector angle and the target angle is calculated to obtain the angle error; According to the initial vector length and the length constraint function, the difference between the initial vector length and the target length is calculated to obtain the length error; Calculate the comprehensive error value based on the angle error and length error; When the comprehensive error value is greater than or equal to a predetermined threshold, the iteration continues, the position vector information is updated, and the comprehensive error value is recalculated; When the comprehensive error value is less than a predetermined threshold, the iteration is stopped, and the position vector information at this time is used as the geometric coordinate update information to complete the coordinate solution under the constraints of the target angle and target length; The method for updating the position vector information is as follows: Obtaining the position vector information of this iteration, and determining the angle constraint function and the length constraint function of at least two rods based on the position vector information; Then, the partial derivatives of the angle constraint function and the length constraint function with respect to the coordinate values are calculated respectively to obtain a number of partial derivative information; Based on some partial derivative information, the Jacobian matrix is constructed; Based on the Jacobian matrix and the position vector information of this iteration, the position vector information of the next iteration is calculated to complete the update of the position vector information of this iteration; Using the previously created three-dimensional modeling unit, based on the geometric coordinate update information, the initial model of the offshore structure is updated to obtain the three-dimensional model of the offshore structure, thereby completing the three-dimensional modeling of the offshore structure.
2. A method for three-dimensional modeling of marine structures based on geometric constraint solving as claimed in claim 1, characterized in that: The method of generating the initial model of the offshore structure through the model generation unit created in advance and based on the basic geometric element graphics of the offshore structure is as follows: Obtaining basic geometric element graphics of the offshore structure, which includes multiple node images and multiple rod images; According to the offshore structure, one or more bar images are selected, and coordinate information, angle information and orientation information of the bar images are set; Assemble one or more selected bar images through node images to form a basic bar connection structure; Based on the rod connection structure, a pile foundation platform image and / or a submarine pipeline image and / or an offshore wind turbine image are formed, and an initial model of the offshore structure is obtained.
3. The method for three-dimensional modeling of marine structures based on geometric constraint solving according to claim 1, characterized in that: Using the previously created 3D modeling unit, based on the geometric coordinate update information, the initial model of the offshore structure is updated to obtain the 3D model of the offshore structure as follows: Based on the geometric coordinate update information, the geometric coordinates of the bar image and the node image are updated to obtain the geometric structure change data after the geometric constraints are applied; The geometric structure change data at least includes length change information, angle change information and position change information; According to the geometric structure change data, the initial model of the offshore structure is rendered and updated using a three-dimensional rendering engine to obtain a three-dimensional model of the offshore structure.
4. A method for three-dimensional modeling of marine structures based on geometric constraint solving as claimed in claim 3, characterized in that: The method of rendering and updating the initial model of the offshore structure by using the 3D rendering engine to obtain the 3D model of the offshore structure is as follows: Delete the original vertex data of the member cached in the browser; At the same time, the line segments used to represent the rods are destroyed through the 3D drawing protocol; According to the geometric structure change data, the vertex coordinates of each rod image are changed through the rendering engine, that is, new vertices are redrawn to obtain a new vertex array; Based on the new vertex array, the rod image is updated using the 3D engine, and line segments used to represent the rod are drawn through the 3D drawing protocol; The new line segment is displayed in the browser window, so that the user can directly see the changed rod and offshore structure in the browser window.
5. A method for three-dimensional modeling of marine structures based on geometric constraint solving as claimed in claim 4, characterized in that: The method to get a new vertex array is as follows: According to the geometric structure change data, the starting point coordinates and the end point coordinates of the rod are obtained; Taking the starting point of the rod as the reference, calculate the coordinates of the MD vertices on the top surface of the rod; Taking the end point of the rod as the reference, calculate the coordinates of ND vertices on the bottom surface of the rod; Sum up the MD vertex coordinates of the top surface and the ND vertex coordinates of the bottom surface to get a new vertex array.
6. A three-dimensional modeling system for offshore structures based on geometric constraint solving, characterized in that: It includes a web browser; The web browser is used to implement a method for three-dimensional modeling of an offshore structure based on geometric constraint solving as described in any one of claims 1 to 5, which integrates a model generation unit, an initial model of the offshore structure, a model reconstruction unit, a constraint queue calculation unit and a three-dimensional modeling unit through a web browser code; When the user uses the Web browser, the Web browser realizes online modeling of the offshore structure.
