CN-121435819-B - Underwater explosion load calculation method based on intermittent Galerkin method and MPI
Abstract
The application relates to a large-scale underwater explosion problem, in particular to an underwater explosion load calculation method based on intermittent Galerkin method and MPI. The method for calculating the underwater explosion load based on the intermittent Galerkin method and the MPI comprises the following steps of carrying out unstructured grid division on a water area geometric model, calculating an LDGM second-order wave equation in an unstructured grid data basis after space dispersion and time dispersion, carrying out regional decomposition by utilizing the METIS in the calculation process, dividing the unstructured network into a plurality of subfields to be distributed to different processors, carrying out parallel processing on the numerical flux on the boundaries of the subfields through the MPI exchange among the processors until the time domain circulation calculation is completed, and obtaining a pressure field of the flow field evolving along with time. The LDGM is used for solving the pressure load of the flow field, so that the strong gradient of the shock wave and the local detail of the cavitation area can be captured more accurately, the problems of numerical dissipation and oscillation are avoided, and the calculation efficiency is improved through a parallel processing scheme.
Inventors
- LIU MOUBIN
- Lian Chaoxu
- WU WENBIN
Assignees
- 北京大学
Dates
- Publication Date
- 20260508
- Application Date
- 20251028
Claims (8)
- 1. An underwater explosion load calculating method based on intermittent Galerkin method and MPI is characterized by comprising the following steps: S1, meshing, namely establishing a water area geometric model in the underwater explosion problem, establishing a calculation domain in a rectangular coordinate system O-xyz, and discretizing the calculation domain into N non-overlapping unstructured tetrahedron units K j { j=1, 2, & gt, N } to obtain a grid file containing grid composition information and node coordinate information; S2, dividing subdomains, namely acquiring the adjacent relation of the grid units according to the grid files in the step S1, and generating text files for dividing METIS software packages; S3, initializing unit information, namely performing multistage division by adopting gpmetis programs according to the set number of subdomains to obtain a region division file containing unit attribution, parallelly reading the grid file generated in the step S1, locally renumbering the nodes and units of the subdomains in each CPU core, deleting repeated nodes, and ensuring the uniqueness of local storage of shared nodes so as to support continuous access of subdomain data; s4, initializing MPI information, namely establishing adjacent topological relations among grid units, unit surfaces and grid nodes, establishing and storing relations between every two adjacent subfields according to topological structures of units and nodes in the adjacent subfields, and continuously storing the relations in a data structure established for non-blocking communication; s5, reducing the order, namely introducing auxiliary variables Expressing the LDGM discrete second-order wave equation as a first-order form, such as the formula (1) and the formula (2), Wherein p represents hydrodynamic acoustic pressure, superscript Representing the time derivative, the fluid sound velocity is , And Bulk modulus and density of the fluid, respectively; s6, solving an approximate solution Finding an approximate solution in a piecewise polynomial space So that for all basis functions The relation of the formulas (3) - (6) is respectively satisfied in the space of the piecewise polynomials, Wherein, the , And The components of the normal vector n in the x-, y-and z-directions respectively, 、 、 And Is a numerical flux, they are discretized tetrahedral units A single value function at the boundary, fluid sound velocity of , And Bulk modulus and density of the fluid, respectively; S7, introducing numerical flux: For cell boundaries in the internal computation domain, the numerical flux computation is as shown in equations (7) and (8), In the formula, Stability coefficient of The number of the auxiliary vector coefficients, , Is the unit normal vector pointing out of the cell plane, 、 、 Is that Components in three directions of x-, y-, and z-, wherein formula (7) and formula (8) 、 、 And The calculation formula of (2) is given by the formula (9) -formula (12), respectively, In the above, superscript' "He" "Means the variable on a surface s shared by two adjacent tetrahedral units, where the superscript is " " Variables representing tetrahedra K " " Variables representing adjacent tetrahedral units of K; for calculating the cell boundaries of the outer surface, the numerical flux calculation is performed as shown in formulas (13) - (14), (13) (14); In which the fluid sound velocity is , And Bulk modulus and density of the fluid, respectively, p represents hydrodynamic acoustic pressure, stability coefficient G N represents the normal gradient of the incident load of an underwater explosion on the boundary of the flow field, c 1 and a 1 are the impedance coefficients defined at the non-reflective boundary, An acceleration representative of the fluid node; S8, parallel processing, namely calculating the data in each unstructured grid in the step S1 according to different calculation unit types, ensuring that each block of data is concentrated in a cache, and allowing a CPU core to continuously execute the calculation of the same type; S9, time dispersion, namely updating a variable value in a time domain by adopting a fourth-order Longge-Kutta method, outputting the required physical quantity in parallel, generating corresponding grid information and flow field physical quantity by each CPU core, and finally carrying out post-processing, wherein the size of a time step is determined according to CFL (computational fluid dynamics) conditions, as shown in the formula (15) Where cfl=0.01 is set, Is the minimum characteristic length in all discretized units, and the fluid sound velocity is , And Bulk modulus and density of the fluid, respectively; S10, calculating data in the unstructured grid in the calculation domain after space dispersion and time dispersion according to the LDGM formula in the step S6, carrying out regional decomposition by utilizing METIS in the step S2 and the step S3 in the calculation process, dividing the unstructured grid into a plurality of subdomains and distributing the subdomains to different processors, carrying out parallel processing between the processors through numerical flux on the MPI exchange subdomain boundary in the step S4 and the step S8 until time domain circulation calculation is completed, and obtaining a pressure field of the flow field evolving along with time.
- 2. The method for calculating the underwater explosion load based on the intermittent Galerkin method and the MPI according to claim 1, wherein the volume fraction term in the formula (3) in the step S6 is calculated by adopting an eight-point Gaussian integral formula, and the calculation requires the calculation of an unstructured tetrahedral unit K in a physical coordinate system ) Constant parameter unit for linear mapping into reference coordinate system ( ) The coordinates of vertices of the iso-ginseng unit in the reference coordinate system are (0, 0, 0), (1, 0, 0), (0, 1, 0) and (0, 0, 1), respectively, and the coordinate mapping relationship between the physical coordinate system and the reference coordinate system is given by formula (16): where k is the kth element in the computation domain omega, , , And Is the coordinates corresponding to the four vertices of the kth cell in the physical coordinate system.
- 3. The method for calculating the underwater explosion load based on the intermittent Galerkin method and the MPI according to claim 2, wherein the basis function in the formula (3) is The partial derivatives for x, y and z are calculated by equation (17): 。
- 4. The method for calculating the underwater explosion load based on the intermittent Galerkin method and the MPI according to claim 1, wherein the flow field is not interfered by the loading of shock waves at the initial moment, and the initial condition is that 。
- 5. The method for calculating the underwater explosion load based on the intermittent Galerkin method and the MPI according to claim 1, wherein the acoustic dynamic pressure is added with linear artificial viscous pressure The calculation formula is formula (18), In the formula, Is the damping coefficient of the material, and, Volume strain rate The sound velocity of the fluid is , And Bulk modulus and density of the fluid, respectively.
- 6. The method of claim 1, wherein in the three-dimensional LDGM parallel program based on MPI, the units located in a certain subdomain are called physical units, the adjacent units of the subdomain boundary units are called virtual units, when the numerical flux of the subdomain boundary units is calculated, the information of the virtual units needs to be transferred to the CPU cores where the adjacent units are located, and the information transfer between the different CPU cores is completed by means of MPI data communication.
- 7. The method for calculating the underwater explosion load based on the intermittent Galerkin method and the MPI according to claim 1, wherein the MPI communication mode includes an aggregate communication and a peer-to-peer communication, the aggregate communication application determining the time step in step S9 The sum of the numerical errors and the calculation of the minimum feature length L min are implemented by the functions mpi_bcast, mpi_allgather and mpi_allreduce provided by MPI, respectively.
- 8. The method for calculating the underwater explosion load based on the intermittent Galerkin method and the MPI according to claim 1, wherein the MPI parallel program of the three-dimensional LDGM comprises three types of memory allocation, namely single memory allocation, continuous multiple memory allocation and discontinuous multiple memory allocation, The single memory allocation is realized by accurately calculating the size of each array and allocating a memory space matched with the array size for the array; The continuous multiple memory allocations have the same data type and data structure, the memory access time is close, a memory pool is allocated in advance, small memory blocks are allocated continuously from the memory pool when needed, and part of memory addresses are reused in the process, so that the memory is effectively and fully utilized; the discontinuous multiple memory allocation adopts two modes of static allocation and dynamic allocation, the static allocation is carried out in compiling, the memory is allocated on a stack, the method is suitable for small, fixed-size and universal arrays, the dynamic allocation allocates the memory on a stack, and when part of arrays are not needed any more, occupied memory is released in time, so that the method is suitable for large-scale arrays.
Description
Underwater explosion load calculation method based on intermittent Galerkin method and MPI Technical Field The application relates to a large-scale underwater explosion problem, in particular to an underwater explosion load calculation method based on intermittent Galerkin method and MPI. Background The problem of underwater explosion is an important direction of research in the fields of underwater engineering, marine military, marine resource development and the like, and the process involves various complex physical phenomena including propagation of shock explosion waves in water, generation of bubbles, expansion, collapse and the like, and interaction of the shock waves with surrounding structures. High-precision underwater explosion numerical simulation faces severe physical property changes (such as density fields), complex boundary conditions and other difficulties, and extremely high requirements are put on the accuracy and stability of a numerical method, particularly in terms of strong discontinuities (shock waves), large deformations (bubbles, splashes), multiphase coupling (water, gas, explosive, structures) and cavitation, although the precise prediction and protection of underwater explosion still face great challenges after many years of research. The traditional simulation methods mainly comprise a finite element method, a finite difference method and a finite volume method, wherein the discontinuities of flow field pressure are difficult to accurately capture when the response problem of underwater explosion dynamics is solved, and the problem of numerical oscillation can occur, so that the solution is unstable. Secondly, when Lagrangian or Eulerian grids are used in the aspects of processing large deformation and moving interfaces, the problems of interface capture blurring, interface geometric description approximation and the like exist, and the problems of insufficient precision, calculation termination and the like can be caused. Finally, the spatio-temporal scale span of underwater explosion simulation is generally large, often requiring the use of very fine grids to accurately capture the pressure wave propagation characteristics of the fluid, which presents significant challenges for both computational resources and computational efficiency. The Local Discontinuous Galerkin Method (LDGM) is a high-precision numerical method, can efficiently process the hydrodynamic problems of inclusion, strong discontinuity and strong nonlinearity, and is particularly suitable for simulating the propagation of shock waves. The MPI (Message Passing Interface) parallel operation is a standard specification of a message passing interface, which defines a series of functions, constants and behaviors for carrying out inter-process communication on a distributed memory system, and the core idea is that a plurality of processes (each having independent address spaces) cooperatively complete a large-scale computing task by mutually sending and receiving messages, and the method is mainly applied to the field of high-performance computing. The combination of the Local Discontinuous Galerkin Method (LDGM) and MPI (Message Passing Interface) parallel operation provides possibility for solving the problem of underwater explosion. Disclosure of Invention The invention aims to overcome the defects in the prior art, and provides an underwater explosion load calculation method based on a discontinuous Galerkin method and MPI, which is used for dispersing a fluid medium under the action of far-field underwater explosion into a non-structural grid, solving flow field pressure load by using LDGM, capturing strong gradient of shock waves and local details of cavitation areas more accurately through local weighted residual minimization, avoiding the problems of numerical dissipation and oscillation possibly occurring in the traditional method, and improving the calculation efficiency through a parallel processing scheme. In order to solve the technical problems, the invention adopts the following technical scheme that the method for calculating the underwater explosion load based on the intermittent Galerkin method and the MPI comprises the following steps: S1, meshing, namely establishing a water area geometric model in the underwater explosion problem, performing unstructured meshing, establishing a calculation domain in a rectangular coordinate system O-xyz, and discretizing the calculation domain into N non-overlapping unstructured tetrahedron units Kj { j=1, 2, & gt, N }, so as to obtain a grid file containing grid composition information and node coordinate information. S2, dividing subdomains, namely acquiring the adjacent relation of the grid units according to the grid files in the step S1, and generating text files for dividing the METIS software package. S3, initializing unit information, namely performing multistage division by adopting gpmetis programs according to the set number of subdomains to obtain a