CN108108569B - A fast modeling method of ship hull based on buoyancy surface element - Google Patents
A fast modeling method of ship hull based on buoyancy surface element Download PDFInfo
- Publication number
- CN108108569B CN108108569B CN201810008499.9A CN201810008499A CN108108569B CN 108108569 B CN108108569 B CN 108108569B CN 201810008499 A CN201810008499 A CN 201810008499A CN 108108569 B CN108108569 B CN 108108569B
- Authority
- CN
- China
- Prior art keywords
- buoyancy
- ship body
- surface element
- hull
- model
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000004364 calculation method Methods 0.000 claims abstract description 45
- 230000000007 visual effect Effects 0.000 claims abstract description 27
- 238000013461 design Methods 0.000 claims abstract description 25
- 238000004088 simulation Methods 0.000 claims abstract description 22
- 238000009877 rendering Methods 0.000 claims abstract description 5
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 24
- 238000005070 sampling Methods 0.000 claims description 23
- 238000007654 immersion Methods 0.000 claims description 7
- 230000005484 gravity Effects 0.000 claims description 2
- 230000009191 jumping Effects 0.000 claims 7
- 238000002791 soaking Methods 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000037237 body shape Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 5
- 238000002474 experimental method Methods 0.000 description 5
- 238000003860 storage Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 239000000969 carrier Substances 0.000 description 2
- 238000006073 displacement reaction Methods 0.000 description 2
- 239000012530 fluid Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000000704 physical effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000001808 coupling effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/15—Vehicle, aircraft or watercraft design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/10—Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/006—Mixed reality
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2119/00—Details relating to the type or aim of the analysis or the optimisation
- G06F2119/06—Power analysis or power optimisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2210/00—Indexing scheme for image generation or computer graphics
- G06T2210/24—Fluid dynamics
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Geometry (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Evolutionary Computation (AREA)
- Software Systems (AREA)
- Automation & Control Theory (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computational Mathematics (AREA)
- Aviation & Aerospace Engineering (AREA)
- Processing Or Creating Images (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域technical field
本发明涉及虚拟仿真技术领域,具体来说,涉及一种基于浮力面元的船体快速建模方法。The invention relates to the technical field of virtual simulation, in particular to a method for rapid modeling of ship hulls based on buoyancy surface elements.
背景技术Background technique
船体的浮力动力学建模是船体设计中的一项重要环节。当前在船体设计迭代中,主要的测验方法是实验法和计算流体力学(Computational Fluid Dynamics,CFD)方法。The buoyancy dynamics modeling of the hull is an important part of the hull design. In the current iteration of hull design, the main testing methods are the experimental method and the Computational Fluid Dynamics (CFD) method.
实验法是研究有浪条件下船体操纵性最可靠的方法。这种方法通过构建船型的缩比模型,在水槽中进行实验,但实验法由于其实体模型和水槽的制作、占地等,成本高,效率低,特别不适合船体初步设计阶段的频繁迭代。The experimental method is the most reliable method to study the manoeuvrability of the hull under wave conditions. This method conducts experiments in the tank by constructing a scaled model of the ship type. However, the experimental method has high cost and low efficiency due to the production of its solid model and the tank, and it occupies an area of space.
CFD方法是当前工程应用最为主流的方法之一,这种建模方式目标工程比较单一,更换工程后往往需要完全重新设计建模,在需要多个模型时,模型之间重复利用率低,整体设计迭代过程缓慢;而且传统流体计算是一项及其复杂的程序,大型船体的虚拟流体计算往往需要大型工作站做长达几小时甚至几天的运算处理,由于CFD网格划分中各个网格的耦合作用,对网格简化则可能引起错误的结果。在设计初期阶段,船体的设计往往更注重于对整体的把控而非各个细节,因此,CFD方法在对设计前期宏观把控阶段的计算效率上有所欠缺,不能满足设计阶段前期快速修改方案的效率要求。The CFD method is one of the most mainstream methods in current engineering applications. The target project of this modeling method is relatively single. After replacing the project, it is often necessary to completely redesign the modeling. When multiple models are required, the reuse rate between the models is low, and the overall The design iteration process is slow; and the traditional fluid calculation is an extremely complex program. The virtual fluid calculation of large hulls often requires large workstations to do operations for hours or even days. Coupling effects may cause erroneous results for mesh simplification. In the early stage of design, the design of the hull often pays more attention to the overall control rather than individual details. Therefore, the CFD method is lacking in the calculation efficiency of the macro-control stage in the early design stage, and cannot meet the rapid modification plan in the early stage of the design stage. efficiency requirements.
利用虚拟仿真的方式对船体进行动力学建模,能够一定程度上削减传统动力学建模中存在的由于船体大小、外形不同所导致的多次重复建模,从而提高设计迭代过程中的效率。The dynamic modeling of the hull by means of virtual simulation can reduce to a certain extent the repeated modeling caused by the different size and shape of the hull in the traditional dynamic modeling, thereby improving the efficiency of the design iteration process.
虚拟现实技术的应用起步较晚,特别是对于普通船体,实时计算摇荡并不重要,根据经验公式即可估计出船舶的抗浪性。但是对于特殊船型,例如需要承担舰载机起降任务的航母,实时计算船体不同浪级下的摇荡就十分重要,否则将对飞行员的起降构成很大的困难,而我国航母2012年刚刚起步,对航母的构建研究尚属初步。因此,在航母上实现虚拟现实环境下的船体快速建模需求迫切。The application of virtual reality technology started late, especially for ordinary hulls, real-time calculation of sway is not important, and the wave resistance of the ship can be estimated according to the empirical formula. However, for special ship types, such as aircraft carriers that need to undertake carrier-based aircraft take-off and landing tasks, it is very important to calculate the sway of the hull under different wave levels in real time, otherwise it will cause great difficulties for the pilots to take off and land, and my country's aircraft carriers have just started in 2012. , the research on the construction of the aircraft carrier is still preliminary. Therefore, it is urgent to realize the rapid modeling of the hull in the virtual reality environment on the aircraft carrier.
发明内容SUMMARY OF THE INVENTION
针对相关技术中的上述技术问题,本发明依托于虚拟现实技术,利用PhysX物理引擎建立船体物理模型,利用Unity3D引擎建立可视化模型,提供一种能实现对不同外形和大小的船体的参数匹配设计和受力演算,而且可以随时根据设计要求对船体外形设计进行调整的建模方法,使设计人员快速建立船体模型,可用于设计人员早期迭代设计、船上人员虚拟培训等。Aiming at the above-mentioned technical problems in the related art, the present invention relies on the virtual reality technology, uses the PhysX physics engine to establish a physical model of the hull, and uses the Unity3D engine to establish a visual model, so as to provide a kind of parameter matching design and Force calculation, and the modeling method that can adjust the hull shape design at any time according to the design requirements, so that designers can quickly build a hull model, which can be used for early iterative design of designers, virtual training of personnel on board, etc.
为实现上述技术目的,本发明的技术方案包括以下步骤:In order to realize the above-mentioned technical purpose, the technical scheme of the present invention comprises the following steps:
S1:设计所述船体的主要参数,建立所述船体的粗制三维模型;S1: Design the main parameters of the hull, and establish a rough three-dimensional model of the hull;
S2:对所述船体的粗制三维模型布置质心位置和划分浮力面元,并根据每个所述浮力面元对应的浮力体的浮力之和进行初步仿真,建立所述船体的物理模型;所述浮力面元是指将所述船体分割为多个离散的平面,每个所述离散的平面称之为浮力面元;S2: Arrange the position of the center of mass and divide the buoyancy surface elements on the rough three-dimensional model of the hull, and perform preliminary simulation according to the sum of the buoyancy of the buoyancy bodies corresponding to each of the buoyancy surface elements to establish a physical model of the hull; The buoyancy surface element refers to dividing the hull into a plurality of discrete planes, and each of the discrete planes is called a buoyancy surface element;
S3:针对所述船体的物理模型的仿真结果进行参数调整;S3: adjust parameters according to the simulation result of the physical model of the hull;
S4:判断所述船体的物理模型是否达到预期目标,如果是,则跳至S5,否则,跳至S1;S4: determine whether the physical model of the hull reaches the expected target, if so, skip to S5, otherwise, skip to S1;
S5:建立所述船体的可视化模型;S5: establish a visual model of the hull;
S6:将所述船体的物理模型和所述船体的可视化模型进行参数关联;S6: Perform parameter association between the physical model of the hull and the visual model of the hull;
S7:判断所述船体的物理模型和所述船体的可视化模型是否正确关联,如果是,则跳至S8,否则,跳至S6;S7: determine whether the physical model of the hull and the visual model of the hull are correctly associated, if so, skip to S8, otherwise, skip to S6;
S8:进行渲染和可视化仿真,建立所述船体的细化模型;S8: Rendering and visual simulation are performed, and a detailed model of the hull is established;
S9:判断所述船体的细化模型是否达到预期目标,如果是,则保存设计方案,否则,跳至S5。S9: Determine whether the refined model of the hull achieves the expected target, and if so, save the design scheme, otherwise, skip to S5.
进一步地,S2中,所述对所述船体的粗制三维模型布置质心位置和划分浮力面元,并根据每个所述浮力面元对应的浮力体的浮力之和进行初步仿真,建立所述船体的物理模型的具体步骤包括:Further, in S2, the position of the center of mass and the division of buoyancy surface elements are arranged on the rough three-dimensional model of the hull, and a preliminary simulation is performed according to the sum of the buoyancy of the buoyancy bodies corresponding to each of the buoyancy surface elements to establish the The specific steps for the physical model of the hull include:
S21:确定所述浮力面元的数量n,并根据所述船体的船底形状划分所述浮力面元的区域;S21: Determine the number n of the buoyancy panel, and divide the area of the buoyancy panel according to the shape of the bottom of the hull;
S22:判断计算要求,是否要求计算速度大于计算精度,如果是,则跳至S23,否则,跳至S24;S22: Judging the calculation requirements, whether the calculation speed is required to be greater than the calculation accuracy, if so, skip to S23, otherwise, skip to S24;
S23:对所述浮力面元进行随机面元取样计算;S23: Perform random sampling calculation on the buoyancy surface element;
S24:对所述浮力面元进行固定面元取样计算;S24: Perform fixed panel sampling calculation on the buoyancy panel;
S25:将每个所述浮力面元铅锤向上扫描,生成每个所述浮力面元对应的每个浮力体,并获取每个所述浮力体的特征体积,从而计算每个所述浮力体的浸水比例δ;S25: Scan the plumb bob of each buoyancy surface element upward to generate each buoyant body corresponding to each of the buoyancy surface elements, and obtain the characteristic volume of each of the buoyancy bodies, so as to calculate each of the buoyancy bodies The water immersion ratio δ;
S26:计算每个所述浮力体的浮力Fbuoyancy,并求得所有所述浮力体的浮力之和;S26: Calculate the buoyancy F buoyancy of each of the buoyancy bodies, and obtain the sum of the buoyancy of all the buoyancy bodies;
S27:进行可视化仿真,建立船体的物理模型;所述进行可视化仿真,建立船体的物理模型利用Unity3D引擎和PhysX引擎实现。S27: Perform a visual simulation to establish a physical model of the hull; the performing visual simulation to establish a physical model of the hull is realized by using the Unity3D engine and the PhysX engine.
进一步地,S21中,所述浮力面元的数量n满足:50<n<500。Further, in S21, the number n of the buoyancy surface elements satisfies: 50<n<500.
进一步地,S21中,所述浮力面元的区域应覆盖所述船体浸入水面的所有部分,且为闭合区域;对于对称的船体,所述浮力面元的区域包含有对称的区域。Further, in S21, the area of the buoyancy surface element should cover all parts of the hull immersed in the water surface, and be a closed area; for a symmetrical hull, the area of the buoyancy surface element includes a symmetrical area.
进一步地,S23中,所述随机面元取样为随机选取部分所述浮力面元进行取样计算,以减少计算量。Further, in S23, the random surface element sampling is to randomly select some of the buoyancy surface elements for sampling calculation, so as to reduce the amount of calculation.
进一步地,S24中,所述固定面元取样可以为按固定的步长对所有所述浮力面元进行取样计算。Further, in S24, the sampling of the fixed surface elements may be calculated by sampling all the buoyancy surface elements at a fixed step size.
进一步地,S24中,所述固定面元取样也可以为从所有所述浮力面元中预选部分浮力面元进行取样计算。Further, in S24, the sampling of the fixed panel may also be a sampling calculation performed on a preselected part of the buoyancy panel from all the buoyancy panels.
进一步地,S25中,所述浮力体的浸水比例δ的计算公式为:Further, in S25, the calculation formula of the water immersion ratio δ of the buoyant body is:
其中,H1为所述浮力面元的几何中心铅锤向上处海浪高度;H2为所述浮力体在所述浮力面元的几何中心铅锤向上处的边缘高度;H3为所述浮力面元的几何中心高度。Wherein, H 1 is the wave height at the point where the plumb weight of the geometric center of the buoyancy surface element is upward; H 2 is the edge height of the buoyant body at the point where the plumb weight of the geometric center of the buoyancy surface element is upward; H 3 is the buoyancy force The height of the geometric center of the surfel.
进一步地,S26中,所述浮力体的浮力Fbuoyancy的计算公式为:Further, in S26, the calculation formula of the buoyancy F buoyancy of the buoyant body is:
其中,CB为全局浮力调整常数,理想情况下CB的值为1;ρwater为水的密度;g为重力常数;Vvolume为所述船体的体积;Ccount为Unity3D引擎中每帧选取的浮力面元的数量。Among them, C B is the global buoyancy adjustment constant, ideally the value of C B is 1; ρ water is the density of water; g is the gravity constant; V volume is the volume of the hull; C count is the selection of each frame in the Unity3D engine the number of buoyancy panels.
优选地,S6中,所述参数关联主要体现在质心位置、浮力面元的几何中心位置、螺旋桨推力位置及方向。Preferably, in S6, the parameter association is mainly reflected in the position of the center of mass, the geometric center position of the buoyancy surface element, and the position and direction of the propeller thrust.
本发明的有益效果:Beneficial effects of the present invention:
1)本发明基于虚拟现实技术,周期短、成本低,不存在实验法对场地和实物模型的高要求。利用PhysX在设计初期快速完成对动力学的工程计算,同时使用Unity3D将其可视化,能够让设计人员在前期室内通过电脑进行逼真、可靠的任务仿真,对整个设计周期及未来训练演习有深远的意义。1) The present invention is based on virtual reality technology, has short cycle and low cost, and does not have high requirements on site and physical model by experimental method. Using PhysX to quickly complete the engineering calculation of dynamics in the early stage of design, and using Unity3D to visualize it, allows designers to perform realistic and reliable task simulations through computers in the early stage, which has far-reaching significance for the entire design cycle and future training exercises .
2)本发明对于计算机运算能力要求低,单步运算时间小于0.02秒,满足虚拟现实的实时性要求。设计人员通过本发明提供的方法能够根据不同船体大小和形状快速调整不同参数,并且快速获得直观的受力演算,在早期就对设计方式进行评估修改,从而迭代修改船体设计,极大地提高了设计工作的效率。2) The present invention has low requirements for computer computing power, and the single-step computing time is less than 0.02 seconds, which meets the real-time requirements of virtual reality. Through the method provided by the present invention, designers can quickly adjust different parameters according to different hull sizes and shapes, and quickly obtain intuitive force calculation, evaluate and modify the design method at an early stage, so as to iteratively modify the hull design, which greatly improves the design. work efficiency.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings required in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some of the present invention. In the embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本发明实施例的建模方法流程图;1 is a flowchart of a modeling method according to an embodiment of the present invention;
图2是本发明实施例的建立船体的物理模型的流程图;Fig. 2 is the flow chart of establishing the physical model of the hull according to the embodiment of the present invention;
图3是本发明实施例的船体的粗制三维模型;Fig. 3 is the crude three-dimensional model of the hull of the embodiment of the present invention;
图4是本发明实施例的船体的浮力面元的划分示意图;4 is a schematic diagram of the division of the buoyancy surface element of the hull according to the embodiment of the present invention;
图5是本发明实施例的单个浮力体的示意图;5 is a schematic diagram of a single buoyancy body according to an embodiment of the present invention;
图6是本发明实施例的单个浮力体的浸水比例计算示意图;6 is a schematic diagram of the calculation of the water immersion ratio of a single buoyancy body according to an embodiment of the present invention;
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art fall within the protection scope of the present invention.
参见图1,本发明的实施例提供一种基于浮力面元的船体快速建模方法,包括以下步骤:Referring to FIG. 1, an embodiment of the present invention provides a method for rapid modeling of hull based on buoyancy surface elements, including the following steps:
S1:设计船体的主要参数,建立船体的粗制三维模型;S1: Design the main parameters of the hull and establish a rough 3D model of the hull;
船体的主要参数包括:总长、垂线间长、型宽、型深、吃水深度、排水量、螺旋桨位置、舵面位置等,建立船体的粗制三维模型如图3所示。The main parameters of the hull include: overall length, length between vertical lines, moulded width, moulded depth, draft, displacement, propeller position, rudder surface position, etc. The rough three-dimensional model of the hull is established as shown in Figure 3.
S2:对船体的粗制三维模型布置质心位置和划分浮力面元,并根据每个浮力面元对应的浮力体的浮力之和进行初步仿真,建立船体的物理模型;浮力面元是指将船体分割为多个离散的平面,每个离散的平面称之为浮力面元,根据浮力面元实时演算船体的浮力状况;所有浮力面元能提供的浮力总和应当等于船体排水量;S2: Arrange the position of the center of mass and divide the buoyancy surface elements on the rough 3D model of the hull, and conduct preliminary simulation according to the sum of the buoyancy of the buoyancy bodies corresponding to each buoyancy surface element to establish the physical model of the hull; the buoyancy surface element refers to the It is divided into multiple discrete planes, each discrete plane is called a buoyancy surface element, and the buoyancy condition of the hull is calculated in real time according to the buoyancy surface element; the sum of the buoyancy provided by all the buoyancy surface elements should be equal to the hull displacement;
建立船体的物理模型的具体步骤如图2所示:The specific steps for establishing the physical model of the hull are shown in Figure 2:
S21:确定浮力面元的数量n,并根据船体的船底形状划分浮力面元的区域;S21: Determine the number n of buoyancy surface elements, and divide the area of buoyancy surface elements according to the shape of the bottom of the hull;
浮力面元的划分,应当遵循均匀、合理的原则,具体应该满足:The division of buoyancy surface elements should follow the principle of uniformity and rationality, and should meet the following specific requirements:
(1)浮力面元划分数量合理;(1) The number of buoyancy surface elements is reasonable;
(2)对称船体要求有对称的浮力面元;(2) Symmetrical hulls require symmetrical buoyancy surface elements;
(3)浮力面元应覆盖所有有可能浸入水面的船体部分;(3) The buoyancy panel should cover all parts of the hull that may be submerged in the water;
(4)浮力面元集合为一闭合体,并能够反映船体的完整基本形状。(4) The buoyancy surface elements are assembled into a closed body and can reflect the complete basic shape of the hull.
浮力面元划分的越多,可视化结果更加逼真,但对计算机或工作站的计算能力要求也更高,可以根据船体的大小,划分50-500个浮力面元。本发明的实施例取350个浮力面元,获得船体的浮力面元的划分示意图如图4所示。The more buoyancy surface elements are divided, the more realistic the visualization results are, but the computing power of the computer or workstation is also higher, and 50-500 buoyancy surface elements can be divided according to the size of the hull. In the embodiment of the present invention, 350 buoyancy surface elements are taken to obtain a schematic diagram of the division of the buoyancy surface elements of the hull as shown in FIG. 4 .
S22:判断计算要求,是否要求计算速度大于计算精度,如果是,则跳至S23,否则,跳至S24;S22: Judging the calculation requirements, whether the calculation speed is required to be greater than the calculation accuracy, if so, skip to S23, otherwise, skip to S24;
根据实际的船体建模的需求,如果要求快速实现建模,则在保证一定精度的情况下,跳至步骤S23,对浮力面元进行随机面元取样计算;否则,跳至步骤S24,对浮力面元进行固定面元取样计算。According to the actual hull modeling requirements, if it is required to realize the modeling quickly, in the case of ensuring a certain accuracy, skip to step S23 to perform random sampling calculation on the buoyancy surface element; otherwise, skip to step S24 to calculate the buoyancy surface element The surfel performs fixed surfel sampling calculation.
S23:对浮力面元进行随机面元取样计算;S23: Perform random sampling calculation on the buoyancy surface;
对于复杂形状的船体,浮力面元的划分可以多达几百个,让它们同时参与每一步长的计算对于计算机的使用是一负担。本着虚拟现实优化原则,为了减少计算量,选取每一帧抽取随机位置的某几个进行演算,而非全部参与计算,称为随机面元取样法。For the complex shape of the hull, the division of buoyancy surface elements can be as many as several hundred, and it is a burden for the computer to let them participate in the calculation of each step length at the same time. Based on the principle of virtual reality optimization, in order to reduce the amount of calculation, some random positions are selected for calculation in each frame, instead of all participating in the calculation, which is called the random panel sampling method.
S24:对浮力面元进行固定面元取样计算;S24: Perform fixed panel sampling calculation on the buoyancy panel;
固定面元取样即为以单个步长对全部浮力面元进行取样计算,或从全部浮力面元中预选能够代表浮力体性质的部分浮力面元进行取样计算。Fixed panel sampling is to sample and calculate all buoyancy panels in a single step, or to preselect some buoyancy panels that can represent the properties of the buoyant body from all buoyancy panels for sampling and calculation.
S25:将每个浮力面元铅锤向上扫描,生成每个浮力面元对应的浮力体,并获取每个浮力体的特征体积,从而计算每个浮力体的浸水比例δ;S25: Scan the plumb bob of each buoyancy surface element upward to generate a buoyant body corresponding to each buoyancy surface element, and obtain the characteristic volume of each buoyancy body, thereby calculating the flooding ratio δ of each buoyancy body;
将步骤S24或S25选取的每个浮力面元铅锤向上扫描,生成每个浮力面元对应的浮力体,单个浮力体的示意图如图5所示,每个浮力体的特征体积记为Vcell,参见图6,进一步计算单个浮力体的浸水比例,图6中,V1、V2均为浮力体,在将船体光滑底面划分为多个浮力面元的和后,在各个浮力面元的几何中心取一参考点,读取浮力面元的几何中心高度H3,自参考点铅垂向上发射射线,击中的船体外轮廓高度即浮力体在浮力面元的几何中心铅锤向上处的边缘高度,记为H2,击中的海洋表面高度即浮力面元的几何中心铅锤向上处海浪高度,记为H1。此处,H1是由海浪建模生成的当地动态值,随当地海面高度变化。为了满足实时化的要求,定义单个浮力体的浸水比例δ:Scan the plumb bob of each buoyant surface element selected in step S24 or S25 upward to generate a buoyant body corresponding to each buoyancy surface element. The schematic diagram of a single buoyant body is shown in Figure 5, and the characteristic volume of each buoyant body is denoted as V cell , see Fig. 6, further calculate the flooding ratio of a single buoyant body. In Fig. 6, V 1 and V 2 are both buoyancy bodies. After dividing the smooth bottom surface of the hull into the sum of multiple buoyancy surface elements, the Take a reference point from the geometric center, read the height H 3 of the geometric center of the buoyancy surface element, and shoot the ray vertically upward from the reference point. The height of the edge is recorded as H 2 , and the height of the ocean surface that hits is the height of the wave at the point where the plumb weight of the geometric center of the buoyancy surface element is upwards, recorded as H 1 . Here, H1 is the local dynamic value generated by wave modeling and varies with the local sea surface height. In order to meet the requirements of real-time, define the water immersion ratio δ of a single buoyant body:
若该处浮力体完全浸水,即H2<H1,则取δ=1;若该处浮力体完全离开水面,即H3>H1,则δ=0。If the buoyant body is completely submerged in water, that is, H 2 <H 1 , then δ=1; if the buoyant body is completely out of the water, that is, H 3 >H 1 , then δ=0.
S26:计算每个浮力体的浮力Fbuoyancy,并求得船体的浮力F;S26: Calculate the buoyancy F buoyancy of each buoyant body, and obtain the buoyancy F of the hull;
根据选取的浮力面元,对船体进行浮力计算。船体受力简化为:浮力、阻力,且浮力和阻力相互独立,此处,对海浪产生的流动力暂不计算。According to the selected buoyancy surface element, the buoyancy calculation is performed on the hull. The force on the hull is simplified as: buoyancy, resistance, and buoyancy and resistance are independent of each other. Here, the flow force generated by waves is not calculated for the time being.
1)浮力1) Buoyancy
根据浮力公式:According to the buoyancy formula:
Fbuoyancy=ρwatergVdis (3)F buoyancy = ρ water gV dis (3)
其中,ρwater为水的密度、g为重力常数、Vdis为排水体积。因此,需要将每一个浮力面元的面积转化为排水体积。Among them, ρ water is the density of water, g is the gravitational constant, and V dis is the drainage volume. Therefore, it is necessary to convert the area of each buoyancy panel into a drainage volume.
一种直观的解决办法是Vdis=Scell*h,Scell为单个浮力面元的面积在水平面的投影,h为单个浮力面元区的入水深度#,但是Scell是一个不易求解的量,每一个浮力面元的底面法向每帧都在变化,这意味着每一帧每个浮力面元都需要多求解一个法向三维向量。An intuitive solution is V dis =S cell *h, where S cell is the projection of the area of a single buoyancy panel on the horizontal plane, and h is the water entry depth# of a single buoyancy panel area, but S cell is a quantity that is not easy to solve. , the bottom normal of each buoyancy surface element changes every frame, which means that each buoyancy surface element needs to solve one more normal three-dimensional vector in each frame.
为了进一步满足实时化的要求,本方法将除了入水深度的其他部分均简化为常数,结合浸水比例δ,有:In order to further meet the requirements of real-time, this method simplifies all other parts except the water entry depth as constants, combined with the water immersion ratio δ, there are:
Vdis=Scellh=Vcellδ (4)V dis =S cell h = V cell δ (4)
式(5)中,Vvolume为船体的体积,Ccount为每帧取浮力面元的数量。In formula (5), V volume is the volume of the hull, and C count is the number of buoyancy surface elements taken in each frame.
则,单个浮力面元对应的浮力体的浮力Fbuoyancy可简化为:Then, the buoyancy F buoyancy of the buoyancy body corresponding to a single buoyancy surface element can be simplified as:
其中,CB为全局浮力调整常数,理想情况下CB的值为1;则式(2)中只需求解浸水比例δ,即可得到单个浮力体的浮力Fbuoyancy,缩减了计算步骤,加快了建模的速度。Among them, CB is the global buoyancy adjustment constant, ideally the value of CB is 1; in formula (2), only the water immersion ratio δ can be obtained to obtain the buoyancy F buoyancy of a single buoyant body, which reduces the calculation steps and speeds up the the speed of modeling.
将所有浮力面元的Fbuoyancy求和,提供的船体的浮力总和Fbuoyancy(total):Summing the F buoyancy of all buoyancy panels provides the sum of the buoyancy of the hull, F buoyancy(total) :
Fbuoyancy(total)=CBρwatergVvolumeδtotal (6)F buoyancy(total) =C B ρ water gV volume δ total (6)
2)阻力2) Resistance
根据阻力公式:According to the resistance formula:
Fdrag=-0.5ρwaterSV2 (7)F drag = -0.5ρ water SV 2 (7)
其中,S为浮力面元的特征面积、V为物体运动的速度。Among them, S is the characteristic area of the buoyancy surface element, and V is the speed of the object motion.
和浮力的求解类似,浮力面元的特征面积S是受到浮力面元的速度V方向影响的变量,为了简化计算,本文避免求解每一个浮力面元的特征面积S,采用和浮力求解中同样的方法,引入浸水比例δ估算浮力面元的特征面积S。Similar to the solution of buoyancy, the characteristic area S of the buoyancy surface element is a variable affected by the velocity V direction of the buoyancy surface element. In order to simplify the calculation, this paper avoids solving the characteristic area S of each buoyancy surface element, and adopts the same method as in the buoyancy solution. method, introducing the flooding ratio δ to estimate the characteristic area S of the buoyancy surface element.
其中,Sarea为船体的浮力面元的集合的总表面积,其值可在3D建模中由软件直接获得。Among them, S area is the total surface area of the set of buoyancy surface elements of the hull, and its value can be directly obtained by the software in 3D modeling.
则单个浮力面元在水中以Vlocal速度运动时,产生的阻力Fdrag可简化为:Then when a single buoyant surface moves at V local speed in water, the resistance F drag generated can be simplified as:
其中,CD为全局阻力调整常数,理想情况下应当为1。where CD is the global resistance adjustment constant, which should ideally be 1.
各个浮力面元的Fdrag求和,提供的船体的阻力总和Fdrag(total):The sum of F drag of each buoyancy surface element provides the sum of the resistance of the hull F drag(total) :
Fdrag(total)=-0.5CDρwaterSareaδtotal|Vlocal|2 (10)F drag(total) =-0.5C D ρ water S area δ total |V local | 2 (10)
根据浮力之和和阻力之和,通过PhysX引擎计算得到船体的浮力F。According to the sum of buoyancy and resistance, the buoyancy F of the hull is calculated by the PhysX engine.
S27:进行可视化仿真,建立船体的物理模型;所述进行可视化仿真,建立船体的物理模型利用Unity3D引擎和PhysX引擎实现。S27: Perform a visual simulation to establish a physical model of the hull; the performing visual simulation to establish a physical model of the hull is realized by using the Unity3D engine and the PhysX engine.
Unity3D是当前应用最广泛的游戏引擎之一,其逼真的视觉效果和出色的内置物理属性演算功能使其在虚拟仿真领域得到了众多开发者的青睐。同时其个人版免费、开源代码等使其上收简单,开发者可以使用Unity3D对不同的物理建模进行快速简单的修改,并对其可视化模型进行更直观地展示,大大提高流程推进速度。Unity3D is one of the most widely used game engines at present. Its realistic visual effects and excellent built-in physical property calculation function make it favored by many developers in the field of virtual simulation. At the same time, its personal version is free and open source code makes it easy to upload. Developers can use Unity3D to quickly and easily modify different physical modeling, and display their visual models more intuitively, greatly improving the speed of the process.
PhysX是一款较为知名的物理模拟软件,它通过CPU或独立的浮点处理器进行运算,模拟真实的物理效果,从而在虚拟仿真中另虚拟物体的运动与真实世界物理规律相符,增加虚拟仿真模拟的真实度。PhysX is a relatively well-known physical simulation software. It performs operations through CPU or independent floating-point processor to simulate real physical effects, so that in virtual simulation, the motion of virtual objects is consistent with the laws of real world physics, and virtual simulation is increased. The realism of the simulation.
通过PhysX和Unity3D两种引擎,即可在计算机中创建可视化仿真,同时满足视觉效果逼真、物理运动可靠两点要求。Through PhysX and Unity3D two engines, you can create a visual simulation in the computer, and at the same time meet the requirements of realistic visual effects and reliable physical motion.
S3:针对船体的物理模型的仿真结果进行参数调整;S3: Adjust the parameters according to the simulation results of the physical model of the hull;
S4:判断船体的物理模型是否达到预期目标,如果是,则跳至S5,否则,跳至S1;S4: Determine whether the physical model of the hull reaches the expected target, if so, skip to S5, otherwise, skip to S1;
S5:建立船体的可视化模型;S5: Establish a visual model of the hull;
S6:将船体的物理模型和船体的可视化模型进行参数关联;S6: Parameter association between the physical model of the hull and the visual model of the hull;
参数关联主要体现在质心位置、浮力面元的几何中心位置、螺旋桨推力位置及方向。The parameter association is mainly reflected in the position of the center of mass, the geometric center of the buoyancy surface element, and the position and direction of the propeller thrust.
S7:判断船体的物理模型和船体的可视化模型是否正确关联,如果是,则跳至S8,否则,跳至S6;S7: Determine whether the physical model of the hull and the visual model of the hull are correctly related, if so, skip to S8, otherwise, skip to S6;
S8:进行渲染和可视化仿真,建立船体的细化模型;S8: Rendering and visual simulation are performed, and a detailed model of the hull is established;
细化贴图、光照,完成模型的渲染,增强可视化模型的真实度。Refine the texture, lighting, complete the rendering of the model, and enhance the realism of the visual model.
S9:判断船体的细化模型是否达到预期目标,如果是,则保存设计方案,否则,跳至S5。S9: Determine whether the refined model of the hull achieves the expected goal, and if so, save the design scheme, otherwise, skip to S5.
本领域人员应该理解的是,上述实施例提供的方法步骤的时序可根据实际情况进行适应性调整,也可根据实际情况并发进行。It should be understood by those skilled in the art that the sequence of the method steps provided in the above embodiments may be adaptively adjusted according to actual conditions, or may be performed concurrently according to actual conditions.
上述实施例涉及的方法中的全部或部分步骤可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机设备可读取的存储介质中,用于执行上述各实施例方法所述的全部或部分步骤。所述计算机设备包括:个人计算机、服务器、网络设备、智能移动终端、智能家居设备、穿戴式智能设备、车载智能设备等;所述的存储介质包括:RAM、ROM、磁碟、磁带、光盘、闪存、U盘、移动硬盘、存储卡、记忆棒、网络服务器存储、网络云存储等。All or part of the steps in the methods involved in the above embodiments may be completed by instructing the relevant hardware through a program, and the program may be stored in a storage medium readable by a computer device for executing the methods described in the above embodiments. all or part of the steps. The computer equipment includes: personal computer, server, network equipment, intelligent mobile terminal, smart home equipment, wearable intelligent equipment, vehicle-mounted intelligent equipment, etc.; the storage medium includes: RAM, ROM, magnetic disk, magnetic tape, optical disk, Flash memory, U disk, mobile hard disk, memory card, memory stick, network server storage, network cloud storage, etc.
所述“帧”是Unity3D引擎的运算单位,表示每秒钟显示几张图片,每一帧计算一次,如:30帧就是每秒显示30张图片。The "frame" is the operation unit of the Unity3D engine, which means that several pictures are displayed per second, and each frame is calculated once. For example, 30 frames means that 30 pictures are displayed per second.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the present invention. within the scope of protection.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810008499.9A CN108108569B (en) | 2018-01-04 | 2018-01-04 | A fast modeling method of ship hull based on buoyancy surface element |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810008499.9A CN108108569B (en) | 2018-01-04 | 2018-01-04 | A fast modeling method of ship hull based on buoyancy surface element |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108108569A CN108108569A (en) | 2018-06-01 |
CN108108569B true CN108108569B (en) | 2020-06-09 |
Family
ID=62219678
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810008499.9A Active CN108108569B (en) | 2018-01-04 | 2018-01-04 | A fast modeling method of ship hull based on buoyancy surface element |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108108569B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110115840B (en) * | 2019-05-16 | 2021-10-29 | 腾讯科技(深圳)有限公司 | Object movement control method, device, terminal and storage medium in virtual scene |
CN110633551B (en) * | 2019-09-29 | 2023-05-30 | 广船国际有限公司 | Ship body local adjustment method, device, equipment and storage medium |
CN114721298A (en) * | 2022-06-09 | 2022-07-08 | 中国海洋大学 | Virtual simulation control system of small unmanned ship |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160068238A1 (en) * | 2013-03-28 | 2016-03-10 | Jun Yan | Underwater floating body and installation method thereof |
CN103661806B (en) * | 2013-11-29 | 2016-03-09 | 大连船舶重工集团有限公司 | A kind of defining method of slipway launching bottom of ship structure partial intensity |
-
2018
- 2018-01-04 CN CN201810008499.9A patent/CN108108569B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108108569A (en) | 2018-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108108569B (en) | A fast modeling method of ship hull based on buoyancy surface element | |
CN104991999A (en) | Dam bursting flood routing simulation method based on two-dimensional SPH | |
WO2019052313A1 (en) | Liquid simulation method, liquid interaction method and apparatus | |
CN101706972A (en) | Three-dimensional visualized algorithm for maritime oil spill | |
CN109344450B (en) | Fluid sets analogy method and system based on PBF | |
CN111753370A (en) | Ship swaying motion test method based on virtual simulation platform | |
CN111145350B (en) | A 3D dynamic rendering display method for flood risk analysis result data | |
CN110335275A (en) | A kind of space-time vectorization method of the flow surface based on ternary biharmonic B-spline | |
CN110298134A (en) | Improve numerical method of the underwater robot from boat docking transient motion forecast | |
CN117078876A (en) | Three-dimensional flow field simulation method and system and electronic equipment | |
CN104574518B (en) | Extensive ocean scenes semi physical method for drafting with abundant details | |
Xia et al. | Hydrodynamics study of standing-and-hovering behavior of dolphins on the water surface | |
CN110115840A (en) | Object control method for movement, device, terminal and storage medium in virtual scene | |
CN104299262B (en) | A kind of three-dimensional cloud analogy method based on velocity field streamline | |
CN115114723A (en) | Design method and system of task planning learner for unmanned surface vehicle | |
CN110458922A (en) | Method for rendering graph and Related product | |
CN110136262A (en) | Water body virtual visualization method and apparatus | |
CN115758917A (en) | IWIND-LR-based water body algae removal engineering benefit simulation method and device | |
CN113312857A (en) | Simulation method of square waves in numerical value pool based on SPH | |
CN117634132A (en) | MIKE21 flood deduction data processing and visualization method under digital twin scene | |
Mola et al. | Ship sinkage and trim predictions based on a CAD interfaced fully nonlinear potential model | |
Feng et al. | Simulation of real water in 3D animation | |
CN112560326B (en) | Method and device for determining pressure field | |
Zamri et al. | Research on atmospheric clouds: a review of cloud animation methods in computer graphics | |
Klopp et al. | Simulation of Fluvial Erosion |
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 |