CN115016951B - Flow field numerical simulation method and device, computer equipment and storage medium - Google Patents

Flow field numerical simulation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115016951B
CN115016951B CN202210952867.1A CN202210952867A CN115016951B CN 115016951 B CN115016951 B CN 115016951B CN 202210952867 A CN202210952867 A CN 202210952867A CN 115016951 B CN115016951 B CN 115016951B
Authority
CN
China
Prior art keywords
grid
flow field
solver
memory
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210952867.1A
Other languages
Chinese (zh)
Other versions
CN115016951A (en
Inventor
赵钟
陈坚强
张勇
万云博
何先耀
武文军
徐刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Original Assignee
Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Computational Aerodynamics Institute of China Aerodynamics Research and Development Center filed Critical Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Priority to CN202210952867.1A priority Critical patent/CN115016951B/en
Publication of CN115016951A publication Critical patent/CN115016951A/en
Application granted granted Critical
Publication of CN115016951B publication Critical patent/CN115016951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Fluid Mechanics (AREA)
  • Computing Systems (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a flow field numerical simulation method, a flow field numerical simulation device, computer equipment and a storage medium, wherein the method comprises the following steps: packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks; determining a mesh data structure of each mesh block; the grid data structure comprises variable parameters of grid blocks and a solving function combination; establishing a mapping relation between each grid data structure and a corresponding CPU core, a memory address and an execution thread; and reading the variable parameters of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and carrying out implicit calculation on the variable parameters based on the solving function combination of the corresponding grid blocks in the memory subspace to obtain flow field values. By adopting the method, the grid data structure can be used as an independent solving object, so that the solving of the whole flow field is decomposed into a plurality of grid blocks to be solved respectively, the OpenMP parallel programming difficulty can be greatly reduced, and the parallel computing efficiency can be improved.

Description

Flow field numerical simulation method and device, computer equipment and storage medium
Technical Field
The application relates to the technical field of high-performance calculation of wind tunnel test simulation, in particular to a flow field numerical simulation method, a flow field numerical simulation device, computer equipment and a storage medium.
Background
CFD (Computational Fluid Dynamics) is a discipline for predicting the relevant physical phenomena of Fluid flow, heat transfer, mass transfer, chemical reactions, etc. by numerically solving NS equations (Navier-Stokes equations, control equations for describing Fluid mechanics). In the process of industrial product research and development, by means of CFD numerical simulation, the research and development cost can be greatly reduced, the design period is shortened, the fine design level of the product is improved, and powerful support is provided for the construction development and digital transformation of national defense industry and national economic equipment.
In the CFD solution, a flow field variable at a new time, i.e., time dispersion, is usually calculated according to a flow field variable at a previous time. Time discrete formats generally include implicit formats and explicit formats. The explicit format is to directly calculate and sequentially obtain the flow field variables of the new moment according to the flow field variables of the previous moment, and the method is simple and low in efficiency. The implicit format is that a large simultaneous equation set is formed according to the flow field variable of the previous moment, all the flow field variables of the new moment are obtained simultaneously by solving the equation set, and the method is complex and high in efficiency. Compared with the explicit format, the implicit format is more stable, and is more widely and mature in application. However, data dependency exists when the implicit format is adopted for calculation, and data competition is easy to occur, namely, multiple threads try to change the same variable in the flow field grid model. Changing (writing or reading) the same variable value at the same time would result in the result of the implicit calculation being unpredictable. The general solution is to avoid data contention by using an atomic operation/lock protection mechanism that allows only one thread to execute code at a time and does not allow multiple threads to execute the same code segment at the same time, which, however, will cause most CPU cores to be idle and the computational efficiency to be greatly reduced.
Disclosure of Invention
Therefore, it is necessary to provide a flow field numerical simulation method, a flow field numerical simulation device, a computer device, and a storage medium, which can not only greatly reduce the difficulty of OpenMP parallel programming, but also improve the parallel computation efficiency, in view of the above technical problems.
A flow field numerical simulation method, the method comprising:
packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks;
determining a mesh data structure for each of the mesh blocks; the grid data structure comprises variable parameters of grid blocks and a solution function combination;
establishing a mapping relation between each grid data structure and a corresponding CPU core, a memory address and an execution thread;
and reading the variable parameters of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and performing implicit calculation on the variable parameters based on the solving function combination of the corresponding grid blocks in the memory subspace to obtain flow field values.
In one embodiment, the determining the mesh data structure of each of the mesh blocks includes:
determining a variable parameter of each grid block; the variable parameters comprise geometric parameters, solver type parameters, solver control parameters and flow field numerical values of the grid blocks;
obtaining a solving function combination of the grid blocks; the solving function combination comprises a parameter reading function, a solver loading function and a flow field numerical value reading and writing function;
and generating a grid data structure of the grid block based on the variable parameters of the grid block and the combination of the solving function.
In one embodiment, the determining of the solver type parameter includes:
determining the grid type to which the grid block belongs;
and setting the type of the solver as a structure solver or a non-structure solver according to the type of the grid.
In one embodiment, the establishing a mapping relationship between each of the mesh data structures and the corresponding CPU core, memory address, and execution thread includes:
determining the number of grid blocks obtained by packaging the flow field grid model;
performing virtual memory division according to the number of the grid blocks to obtain a corresponding number of memory subspaces;
based on OpenMP guidance statements, concurrently allocating a CPU core, a memory subspace and an OpenMP execution thread for each grid block; the memory subspaces allocated by different grid blocks are different;
and establishing a mapping relation between the grid data structure corresponding to each grid block and the corresponding CPU core, the memory address of the memory subspace and the OpenMP execution thread.
In one embodiment, the reading, according to the mapping relationship, variable parameters of corresponding grid blocks into memory subspaces corresponding to corresponding memory addresses by using corresponding execution threads on each CPU core, and performing implicit computation on the variable parameters in the memory subspaces based on a combination of solving functions of the corresponding grid blocks to obtain flow field values includes:
reading the function by adopting a corresponding execution thread on each CPU core through operating parameters based on the mapping function, and reading the geometric parameters, solver type parameters, solver control parameters and initial flow field values of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses;
inputting the solver type parameters and the solver control parameters into the solver loading function, loading the solver loading function with a corresponding type of solver, and controlling the solver to calculate and process the geometric parameters and the initial flow field numerical values of the grid blocks based on the solver control parameters to obtain a target flow field numerical value;
and replacing the initial flow field numerical value with the target flow field numerical value based on the flow field numerical value read-write function.
A flow field numerical simulation apparatus, the apparatus comprising:
the grid partitioning module is used for packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks;
a data structure construction module for determining a mesh data structure of each of the mesh blocks; the grid data structure comprises variable parameters of grid blocks and a solving function combination;
the mapping module is used for establishing the mapping relation between each grid data structure and the corresponding CPU core, memory address and execution thread;
and the parallel implicit calculation module is used for reading the variable parameters of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and performing implicit calculation on the variable parameters based on the solving function combination of the corresponding grid blocks in the memory subspace to obtain flow field values.
In one embodiment, the data structure building module is further configured to determine a variable parameter for each of the grid blocks; the variable parameters comprise geometric parameters, solver type parameters, solver control parameters and flow field numerical values of the grid blocks; obtaining a solving function combination of the grid blocks; the solving function combination comprises a parameter reading function, a solver loading function and a flow field numerical value reading and writing function; and generating a grid data structure of the grid block based on the variable parameters of the grid block and the combination of the solving function.
In one embodiment, the data structure construction module is further configured to determine a grid type to which the grid block belongs; and setting the type of the solver as a structure solver or a non-structure solver according to the type of the grid.
A computer device comprising a memory storing a computer program and a processor implementing the following steps when the computer program is executed:
packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks;
determining a mesh data structure for each of the mesh blocks; the grid data structure comprises variable parameters of grid blocks and a solving function combination;
establishing a mapping relation between each grid data structure and a corresponding CPU core, a memory address and an execution thread;
and reading the variable parameters of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and performing implicit calculation on the variable parameters based on the solving function combination of the corresponding grid blocks in the memory subspace to obtain flow field values.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks;
determining a mesh data structure for each of the mesh blocks; the grid data structure comprises variable parameters of grid blocks and a solving function combination;
establishing a mapping relation between each grid data structure and a corresponding CPU core, a memory address and an execution thread;
and reading the variable parameters of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and performing implicit calculation on the variable parameters based on the solving function combination of the corresponding grid blocks in the memory subspace to obtain flow field values.
According to the flow field numerical simulation method, the flow field numerical simulation device, the computer equipment and the storage medium, based on a coarse-grained parallel implicit computing mode of grid blocks, the fine-grained geometric topology is packaged and isolated into the grid data structure, only coarse-grained circulation needs to be carried out on the grid data structure, the OpenMP parallel programming difficulty can be greatly reduced, compared with the traditional fine-grained parallel implicit computing, due to the fact that an atomic operation or lock protection mechanism is usually adopted to avoid the situation that partial cores are idle and computing performance is reduced due to the fact that a data competition mode is avoided, the grid data structure, a CPU core and an execution thread are in one-to-one mapping relation, the grid data structure can serve as an independent solving object, the whole flow field is solved into a plurality of grid blocks to be solved respectively, data competition does not exist among different grid blocks, an atomic operation/lock protection mechanism does not need to be adopted, and therefore parallel computing efficiency is further improved.
Drawings
Fig. 1 is a diagram of an application environment of a flow field numerical simulation method in an embodiment.
Fig. 2 is a schematic flow chart of a flow field numerical simulation method in one embodiment.
FIG. 3 is a diagram of a mesh data structure with member variables in one embodiment.
FIG. 4 is a diagram illustrating a fine-grained parallel implicit solution method in one embodiment.
FIG. 5 is a diagram illustrating a coarse-grained parallel implicit solution method in one embodiment.
Fig. 6 is a block diagram showing a flow field numerical simulation apparatus according to an embodiment.
FIG. 7A is a diagram illustrating an internal structure of a computer device in one embodiment.
Fig. 7B is an internal structural diagram of a computer device in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In order to solve the problem of parallel computing data competition and improve the parallel computing efficiency of CFD software, the application provides a coarse-grained parallel implicit computing-based flow field numerical simulation method without data competition, and the method can be applied to the application environment shown in FIG. 1. The high-performance computer 10 includes a supercomputer 102 having a large CPU. The supercomputer 102 generally comprises a plurality of computing nodes, each computing node is internally provided with a plurality of CPU cores, is mainly used for scientific computation and is a hardware platform for developing CFD simulation computation. The supercomputer 102 may be a terminal or a server. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server can be implemented by an independent server or a server cluster formed by a plurality of servers.
The demand for parallel computing by CFD applications is increasing due to the fact that the leading-edge CFD method requires more and more computation, the wide application of CFD industrial software requires faster and faster computation, and the like. Parallel computing is an important way for developing CFD simulation, and a large number of CPU cores of a high-performance computer simultaneously solve an NS equation (Navier-Stokes equation, hydrodynamics control equation) and is an effective means for improving the computing speed. The basic idea of parallel computing is to decompose the NS equation solving task into several subtasks, each of which is computed simultaneously by an independent CPU core. The currently adopted parallel modes mainly include two types: a parallel method based on a shared memory and a parallel method based on an MPI (Message paging Interface). The parallel method of sharing memory is generally used for multi-core parallel in computer nodes, and the MPI parallel method is generally used for parallel communication between computer nodes. The application aims to improve the parallel method of the shared memory.
The CFD simulation is used for solving the NS equation to obtain flow field variables such as pressure, speed, density, temperature and the like in the fluid flow, and the continuous NS equation is discretized into a linear equation set in an Ax = B form through two processes of space discretization and time discretization. Where explicit and implicit formats are commonly used for time discrete processes. The explicit format is to directly calculate and sequentially obtain the flow field variables of the new moment according to the flow field variables of the previous moment; the implicit format is that a large simultaneous equation set is formed according to the flow field variables of the previous moment and the new moment, and all the flow field variables of the new moment are obtained simultaneously by solving the equation set. The explicit format has a limitation on the time step, a smaller time step may cause an increase in the amount of calculation, a larger time step may cause an unstable solution process, and situations that the numerical value reaches infinity or the negative number is given a root sign or the like cannot be calculated may occur, that is, the calculation is diverged, so that the calculation efficiency is low. The implicit format has no above-mentioned limitation to the time step length, and the calculation efficiency is high. However, in parallel computing, an implicit format needs a simultaneous equation set for solving, and there is data dependency in the computing process, that is, all the solving processes of a plurality of unknowns must wait for the completion of one of the unknowns to be successfully executed, so that data competition is easy to occur, and great difficulty is brought to parallelization of the solving process. The application aims to improve a parallel computing method based on an implicit format.
In one embodiment, as shown in fig. 2, a flow field numerical simulation method is provided, which is illustrated by applying the method to the high-performance computer 10 in fig. 1, and includes the following steps:
step 202, packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks.
The flow field grid model is a three-dimensional model which is obtained by dispersing a fluid object surface and comprises a plurality of computational grids. Specifically, the spatial region to be simulated is discretized into different grid units (such as tetrahedrons and hexahedrons) by calculating the grid, and then numerical simulation is performed based on the discretized grid. Computational grids can be classified into structured grids, unstructured grids, and hybrid grids, depending on the geometric topology of the discrete cells. The flow field numerical simulation method is suitable for different grid types.
Specifically, the high-performance computer 10 obtains the flow field mesh model by self-generating or reading from other computer devices. The high performance computer 10 decomposes a plurality of original computational grids (denoted as Grid) in the flow field Grid model into a plurality of sub-regions, and each sub-region becomes an independent Grid block (denoted as GridBlock). Therefore, fine-grained geometric topology such as points, faces, units and the like in the computational grid can be converted into coarse-grained geometric topology based on grid blocks. The coarse granularity and the fine granularity are relative concepts, and aiming at fine-grained geometric topologies such as points, faces, units and the like in a computational grid, if a set object comprising the fine-grained geometric topology exists, the object belongs to the coarse-grained geometric topology. Each lattice block has a unique identifier as its index, which may be a number.
At step 204, the grid data structure of each grid block is determined. The grid data structure includes a combination of variable parameters and solving functions for the grid blocks.
A grid data structure is a data storage structure. In this embodiment, each grid block GridBlock has a corresponding grid data structure for storing variable parameters of the grid block and a dedicated solution function combination. The geometric information on the lattice blocks is stored in a lattice data structure. In addition, the grid data structure also comprises complete data information required by CFD calculation such as calculation parameters, flow field parameters, a solver and the like.
In this embodiment, the high-performance computer 10 abstractly encapsulates the fine-grained geometric topology such as points, planes, and units in the computational Grid (Grid) by using the Grid data structure, so that the computational Grid (Grid) has a logical hierarchical structure, and a coarse-grained Grid block concept is formed on the basis of the fine-grained geometric topology.
In one embodiment, step 204, determining the mesh data structure for each mesh block includes: determining a variable parameter of each grid block; the variable parameters comprise geometric parameters of the grid blocks, solver type parameters, solver control parameters and flow field numerical values; acquiring a solving function combination of the grid blocks; the solving function combination comprises a parameter reading function, a solver loading function and a flow field numerical value reading and writing function; and generating the grid data structure of the grid block based on the variable parameters of the grid block and the combination of the solving function.
Specifically, the high-performance computer 10 establishes an abstract grid data structure for each grid block, and sets member variables of one grid block in the grid data structure. Each member variable may specifically be the Index of the grid block itself or a variable parameter. FIG. 3 illustrates a grid data structure with member variables. The Grid Data structure comprises variable parameters of a Grid block, such as a geometric parameter Grid of the Grid block, a solver type parameter Solvers, a solver control parameter Data _ Param and an initial flow Field value Data _ Field. The Grid of the geometric parameters of the Grid block comprises calculation Grid points, lines, surfaces, units and connection relations among the calculation Grid points, the lines, the surfaces and the units; solver type parameters Solvers refer to solver types suitable for the current grid block, such as a structure solver, a non-structure solver and the like; the solver control parameter Data _ Param refers to control parameters required by CFD calculation, such as maximum iteration step number, calculation condition and the like; the initial flow Field value Data _ Field refers to the initial value of the flow Field Data (velocity, pressure, temperature, etc.) on the computational grid.
Further, the high-performance computer 10 sets the operations of grid block reading, solver loading, calculation parameter acquisition, flow field data reading and writing and the like as member functions, so that the grid data structure is used as an independent solving object, and the whole flow field solution is decomposed into a plurality of grid blocks for respective solution. Each member function may specifically be a function for solving a grid block flow field value, such as a parameter reading function, a solver loading function, and a flow field value reading and writing function.
Step 206, a mapping relationship between each grid data structure and the corresponding CPU core, memory address, and execution thread is established.
In this embodiment, in addition to coarse granularity on the computational mesh geometry topology, coarse granularity is also implemented on hardware, i.e., each processor in the high performance computer 10 includes multiple CPUs, each including at least one CPU core, each CPU having a corresponding one or more threads of execution. The execution thread may specifically be an OpenMP (Open Multi-Processing, parallel computing mode and programming language based on shared memory and multithreading) execution thread. Each execution thread is used for executing a subtask, namely, calculating the flow field value of one grid block based on the implicit format. The present application combines the coarse-grained concepts of both hardware and geometric topologies and establishes a mapping relationship.
Specifically, the high-performance computer 10 determines the number of grid blocks obtained by packaging the flow field grid model, and performs virtual memory division according to the number of grid blocks to obtain the same number of memory subspaces. The high performance computer 10 allocates a CPU core, a memory subspace, and an execution thread to each grid block. The memory subspaces allocated by different grid blocks are different. The high performance computer 10 establishes a mapping relationship between the grid data structure corresponding to each grid block and the memory addresses and execution threads of the corresponding CPU core, memory subspace.
And step 208, reading the variable parameters of the corresponding grid blocks into the memory subspaces corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and performing implicit calculation on the variable parameters based on the solving function combination of the corresponding grid blocks in the memory subspaces to obtain flow field values.
The high performance computer 10 coarse grain loops and performs implicit calculations concurrently. Specifically, the high-performance computer 10 starts the corresponding mesh data structure on each CPU core by the execution thread based on the established mapping relationship. The high performance computer 10 performs implicit format solution based on the started mesh data structure according to the CFD solution flow by using the combination of the variable parameters and the solution functions involved in the mesh data structure. The high-performance computer 10 obtains a flow field value at a new time based on the developed implicit format calculation result.
In one embodiment, step 208, according to the mapping relationship, reading the variable parameter of the corresponding grid block into the memory subspace corresponding to the corresponding memory address by using the corresponding execution thread on each CPU core, and performing implicit computation on the variable parameter based on the combination of the solving functions of the corresponding grid block in the memory subspace to obtain a flow field value, includes: reading the geometric parameters, solver type parameters, solver control parameters and initial flow field values of the corresponding grid blocks into a memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core through operating parameter reading functions based on the mapping functions; inputting solver type parameters and solver control parameters into a solver loading function, loading the solver loading function with a corresponding type of solver, and controlling the solver to calculate and process the geometric parameters and the initial flow field numerical values of the grid blocks based on the solver control parameters to obtain a target flow field numerical value; and replacing the initial flow field numerical value with the target flow field numerical value based on the flow field numerical value read-write function.
In another embodiment, the high-performance computer 10 uses the C + + language to implement independent solution by instantiating a mesh data structure (e.g., class object instantiation) and updating the flow field information by calling relevant member variables and member functions via CFD solution rules.
In the aspect of implicit format-based parallel computing, a traditional method usually adopts an OpenMP parallel programming language to perform fine-grained implicit solution, that is, fine-grained geometric topologies such as points, surfaces, and units in a computational grid are used. In the parallel implicit computing mode based on the fine-grained grid information, the fine-grained geometric topologies such as points, faces and units in a computing grid need to be circulated, the parallel programming difficulty is high, and the fine-grained mode can traverse grid units around the current points, faces and units, so that the flow field numerical computation of different points, faces and units is interfered, and the problem of data competition is easy to occur.
In this embodiment, based on a coarse-grained parallel implicit computing mode of a grid block, the fine-grained geometric topologies are encapsulated and isolated into a grid data structure, and only coarse-grained circulation needs to be performed on the grid data structure, so that the OpenMP parallel programming difficulty can be greatly reduced. As shown in fig. 4 and 5, compared with the conventional fine-grained parallel implicit computation, because an atomic operation or lock protection mechanism is usually adopted to avoid the occurrence of data contention, which may cause partial idle cores and reduced computation performance, in this embodiment, a one-to-one mapping relationship among a grid data structure, a CPU core, and an execution thread is established, so that the grid data structure may be used as an independent solution object, the whole flow field solution is decomposed into a plurality of grid blocks for solution respectively, no data contention exists among different grid blocks, an atomic operation/lock protection mechanism is not required, and thus, the parallel computation efficiency is further improved.
In one embodiment, the determination of solver type parameters includes: determining the grid type of the grid block; and setting the type of the solver as a structure solver or a non-structure solver according to the type of the grid.
The real fluid motion has two flow states with distinct properties of laminar flow and turbulent flow, and the flow in nature is mostly turbulent flow. Wherein, laminar flow means that when the flow velocity is very small, the fluids flow in layers and are not mixed with each other; turbulent flow refers to the situation that when the flow velocity is high, a plurality of small vortexes exist in a flow field, laminar flows are damaged, sliding exists between adjacent flow layers, mixed fluid does irregular movement, structural grids are often adopted for discretization aiming at a flow area with a complex flow phenomenon, and then a structural solver is used for realizing high-precision solving.
Specifically, the high-performance computer 10 determines the mesh type to which each mesh block belongs in the flow field mesh model, and extracts the mesh topology information of the mesh block. When the grid type of one grid block is a structural grid, the high-performance computer 10 sets the solver type of the grid block as a structural solver; when the grid type of one grid block is an unstructured grid, setting the solver type of the grid block as an unstructured solver. The structure solver can be a high-precision algorithm such as a direct numerical simulation method (DNS), a large eddy simulation method (LES) or a Reynolds average N-S equation method (RANS). Of course, the solver type may also be determined in other manners, which are not described herein again.
In one embodiment, step 206, establishing a mapping relationship between each grid data structure and the corresponding CPU core, memory address, and execution thread includes: determining the number of grid blocks obtained by packaging the flow field network model; performing virtual memory division according to the number of the grid blocks to obtain a corresponding number of memory subspaces; based on OpenMP guidance statements, concurrently allocating a CPU core, a memory subspace and an OpenMP execution thread for each grid block; the memory subspaces allocated by different grid blocks are different; and establishing a mapping relation between the grid data structure corresponding to each grid block and the corresponding CPU core, the memory address of the memory subspace and the OpenMP execution thread.
The high-performance computer 10 may implement the present embodiment based on a plurality of programming languages, and the C + + programming language is described as an example below. Specifically, the high-performance computer 10 traverses all the grid data structures by using the For loop statement, maps a plurality of grid data structures obtained by grid partitioning to a plurality of CPU cores in the current computing node, and establishes a mapping relationship between each grid data structure and each CPU core. Different grid data structures can respectively use different CPU cores, and can also share the same CPU core. Preferably, when the number of CPU cores of the current compute node is greater than or equal to the number of grid blocks obtained by partitioning, each grid block is allocated to obtain an independent CPU core; and when the number of the CPU cores of the current computing node is less than the number of the grid blocks obtained by partitioning, each grid block is distributed to obtain an independent CPU core.
The high-performance computer 10 traverses all the grid data structures by using the For loop statement, maps a plurality of grid data structures obtained by grid partitioning to a plurality of threads in the current computing node respectively, and establishes a mapping relation between each grid data structure and an execution thread. Different grid data structures may use different threads of execution, or may share the same thread of execution. Preferably, when the number of idle execution threads of the current computing node is greater than or equal to the number of the grid blocks obtained by partitioning, each grid block is allocated to obtain an independent execution thread; and when the number of idle execution threads of the current computing node is less than the number of grid blocks obtained by partitioning, distributing the grid blocks to obtain an independent execution thread. FIG. 5 shows a mapping relationship diagram of a mesh data structure, CPU cores, memory subspaces, and OpenMP threads. Each OpenMP execution thread, CPU core, and grid block have different unique identifiers, for example, assuming that n OpenMP execution threads are total, in fig. 5, each OpenMP execution thread may have a different number n-i, where i is greater than or equal to 1 and less than or equal to n.
In the above-described establishment of the mapping relationship, the high-performance computer 10 may implement automatic binding of the mesh data structure, the CPU core, and the OpenMP execution thread based on the OpenMP guidance statement, and establish a one-to-one mapping relationship among the three. The OpenMP guidance statement specifically refers to a guidance statement in which OpenMP is added before a For loop statement, for example, a # pragma omp parallel For statement.
It should be noted that the CPU related to the present application refers to a multi-core CPU in particular, because each execution thread executes a For loop statement when an OpenMP guidance statement parallelizes a For loop, and when a mesh data structure is looped, it is equivalent to that each execution thread processes one mesh data structure.
In another embodiment, execution threads and a single core in the CPU multi-core are automatically bound by the OpenMP language. In other words, the high-performance computer 10 establishes a mapping relationship between each CPU core and one or more execution threads in advance, so that when a flow field value needs to be calculated by using the flow field value simulation method provided by the present application, only the corresponding relationship between the grid data structure of each grid block and the CPU core needs to be dynamically established, thereby improving the efficiency of establishing the mapping relationship and further improving the efficiency of calculating the flow field value.
In this embodiment, the grid data structure can be used as an independent solving object by establishing a mapping relationship among the grid data structure, the CPU core, and the OpenMP execution thread, so that the whole flow field solving is decomposed into a plurality of grid blocks to be solved respectively, which not only greatly reduces the OpenMP parallel programming difficulty, but also improves the parallel computing efficiency.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In one embodiment, as shown in fig. 6, there is provided a flow field numerical simulation apparatus 600, comprising: a grid partitioning module 602, a data structure construction module 604, a mapping module 606, and a parallel implicit computation module 608, wherein:
a mesh partitioning module 602, configured to encapsulate and isolate a geometric topology of the flow field mesh model to obtain a plurality of mesh blocks;
a data structure construction module 604 for determining a mesh data structure of each mesh block; the grid data structure comprises variable parameters of grid blocks and a solving function combination;
a mapping module 606, configured to establish a mapping relationship between each grid data structure and a corresponding CPU core, memory address, and execution thread;
a parallel implicit calculation module 608, configured to read the variable parameter of the corresponding grid block into a memory subspace corresponding to the corresponding memory address by using a corresponding execution thread on each CPU core according to the mapping relationship, and perform implicit calculation on the variable parameter based on a combination of solving functions of the corresponding grid block in the memory subspace, so as to obtain a flow field value.
In one embodiment, the data structure construction module 604 is further configured to determine a variable parameter for each grid block; the variable parameters comprise geometric parameters of the grid blocks, solver type parameters, solver control parameters and flow field numerical values; acquiring a solving function combination of the grid blocks; the solving function combination comprises a parameter reading function, a solver loading function and a flow field numerical value reading and writing function; and generating the grid data structure of the grid block based on the variable parameters of the grid block and the combination of the solving function.
In one embodiment, the data structure construction module 604 is further configured to determine a grid type to which the grid block belongs; and setting the type of the solver as a structure solver or a non-structure solver according to the type of the grid.
In an embodiment, the mapping module 606 is further configured to determine the number of grid blocks obtained by packaging the flow field grid model; performing virtual memory division according to the number of the grid blocks to obtain a corresponding number of memory subspaces; based on OpenMP guidance statements, concurrently allocating a CPU core, a memory subspace and an OpenMP execution thread to each grid block; the memory subspaces allocated by different grid blocks are different; and establishing a mapping relation between the grid data structure corresponding to each grid block and the corresponding CPU core, the memory address of the memory subspace and the OpenMP execution thread.
In an embodiment, the parallel implicit calculation module 608 is further configured to read, on the basis of the mapping function, the function by using a corresponding execution thread on each CPU core through running a parameter reading function, and read the geometric parameter, the solver type parameter, the solver control parameter, and the initial flow field value of the corresponding grid block into the memory subspace corresponding to the corresponding memory address; inputting solver type parameters and solver control parameters into a solver loading function, loading the solver loading function with a corresponding type of solver, and controlling the solver to calculate and process the geometric parameters and the initial flow field numerical values of the grid blocks based on the solver control parameters to obtain a target flow field numerical value; and replacing the initial flow field numerical value with the target flow field numerical value based on the flow field numerical value read-write function.
For specific limitations of the flow field numerical simulation apparatus, reference may be made to the above limitations of the flow field numerical simulation method, and details are not described here. The various modules in the flow field numerical simulation device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a high performance computer is provided, the computer device may be a server, and its internal structure diagram may be as shown in fig. 7A. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the grid data structure, the flow field numerical value and the like of the grid block. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a flow field numerical simulation method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7B. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a flow field numerical simulation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configurations shown in fig. 7A and 7B are merely block diagrams of some configurations relevant to the present disclosure, and do not constitute a limitation on the computing devices to which the present disclosure may be applied, and a particular computing device may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks; determining a mesh data structure of each mesh block; the grid data structure comprises variable parameters of grid blocks and a solving function combination; establishing a mapping relation between each grid data structure and a corresponding CPU core, a memory address and an execution thread; and reading the variable parameters of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and combining solving functions based on the corresponding grid blocks in the memory subspace and executing implicit calculation on the variable parameters to obtain flow field values.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a variable parameter of each grid block; the variable parameters comprise geometric parameters of the grid blocks, solver type parameters, solver control parameters and flow field numerical values; acquiring a solving function combination of the grid blocks; the solving function combination comprises a parameter reading function, a solver loading function and a flow field numerical value reading and writing function; and generating the grid data structure of the grid block based on the variable parameters of the grid block and the combination of the solving function.
In one embodiment, the processor when executing the computer program further performs the steps of: determining the grid type of the grid block; and setting the type of the solver as a structure solver or a non-structure solver according to the type of the grid.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining the number of grid blocks obtained by packaging the flow field grid model; performing virtual memory division according to the number of the grid blocks to obtain a corresponding number of memory subspaces; based on OpenMP guidance statements, concurrently allocating a CPU core, a memory subspace and an OpenMP execution thread for each grid block; the memory subspaces allocated by different grid blocks are different; and establishing a mapping relation between the grid data structure corresponding to each grid block and the corresponding CPU core, the memory address of the memory subspace and the OpenMP execution thread.
In one embodiment, the processor, when executing the computer program, further performs the steps of: reading the geometric parameters, solver type parameters, solver control parameters and initial flow field values of the corresponding grid blocks into the memory subspaces corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core through operating parameter reading functions based on the mapping functions; inputting solver type parameters and solver control parameters into a solver loading function, loading the solver loading function with a corresponding type of solver, and controlling the solver to calculate and process the geometric parameters and the initial flow field numerical values of the grid blocks based on the solver control parameters to obtain a target flow field numerical value; and replacing the initial flow field numerical value with the target flow field numerical value based on the flow field numerical value read-write function.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
in the embodiment, based on a coarse-grained parallel implicit computing mode of grid blocks, the fine-grained geometric topology is packaged and isolated into a grid data structure, only coarse-grained circulation needs to be performed on the grid data structure, the OpenMP parallel programming difficulty can be greatly reduced, compared with the traditional fine-grained parallel implicit computing mode, because an atomic operation or lock protection mechanism is usually adopted to avoid occurrence of data competition, partial cores are idle and computing performance is reduced, the grid data structure can be used as an independent solving object by establishing a one-to-one mapping relation among the grid data structure, a CPU core and an execution thread, so that the whole flow field is solved and decomposed into a plurality of grid blocks to be respectively solved, no data competition exists among different grid blocks, an atomic operation/lock protection mechanism does not need to be adopted, and then parallel computing efficiency is improved.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks; determining a mesh data structure of each mesh block; the grid data structure comprises variable parameters of grid blocks and a solving function combination; establishing a mapping relation between each grid data structure and a corresponding CPU core, a memory address and an execution thread; and reading the variable parameters of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and combining solving functions based on the corresponding grid blocks in the memory subspace and executing implicit calculation on the variable parameters to obtain flow field values.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining a variable parameter of each grid block; the variable parameters comprise geometric parameters of the grid blocks, solver type parameters, solver control parameters and flow field numerical values; acquiring a solving function combination of the grid blocks; the solving function combination comprises a parameter reading function, a solver loading function and a flow field numerical value reading and writing function; and generating the grid data structure of the grid block based on the variable parameters of the grid block and the combination of the solving function.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining the grid type of the grid block; and setting the type of the solver as a structure solver or a non-structure solver according to the type of the grid.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining the number of grid blocks obtained by packaging the flow field grid model; performing virtual memory division according to the number of the grid blocks to obtain a corresponding number of memory subspaces; based on OpenMP guidance statements, concurrently allocating a CPU core, a memory subspace and an OpenMP execution thread for each grid block; the memory subspaces allocated by different grid blocks are different; and establishing a mapping relation between the grid data structure corresponding to each grid block and the corresponding CPU core, the memory address of the memory subspace and the OpenMP execution thread.
In one embodiment, the computer program when executed by the processor further performs the steps of: reading the geometric parameters, solver type parameters, solver control parameters and initial flow field values of the corresponding grid blocks into a memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core through operating parameter reading functions based on the mapping functions; inputting solver type parameters and solver control parameters into a solver loading function, loading the solver loading function with a corresponding type of solver, and controlling the solver to calculate and process the geometric parameters and the initial flow field numerical values of the grid blocks based on the solver control parameters to obtain a target flow field numerical value; and replacing the initial flow field numerical value with the target flow field numerical value based on the flow field numerical value read-write function.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
in the embodiment, based on a coarse-grained parallel implicit computing mode of grid blocks, the fine-grained geometric topology is packaged and isolated into a grid data structure, only coarse-grained circulation needs to be performed on the grid data structure, the OpenMP parallel programming difficulty can be greatly reduced, compared with the traditional fine-grained parallel implicit computing mode, because an atomic operation or lock protection mechanism is usually adopted to avoid occurrence of data competition, partial cores are idle and computing performance is reduced, the grid data structure can be used as an independent solving object by establishing a one-to-one mapping relation among the grid data structure, a CPU core and an execution thread, so that the whole flow field is solved and decomposed into a plurality of grid blocks to be respectively solved, no data competition exists among different grid blocks, an atomic operation/lock protection mechanism does not need to be adopted, and then parallel computing efficiency is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware that is instructed by a computer program, and the computer program may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for those skilled in the art, various changes and modifications can be made without departing from the spirit of the present application, and all of them fall within the scope of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A flow field numerical simulation method, the method comprising:
packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks;
determining a mesh data structure for each of the mesh blocks; the grid data structure comprises variable parameters of grid blocks and a solving function combination;
determining the number of grid blocks obtained by packaging the flow field grid model;
performing virtual memory division according to the number of the grid blocks to obtain a corresponding number of memory subspaces;
based on OpenMP guidance statements, concurrently allocating a CPU core, a memory subspace and an OpenMP execution thread to each grid block; the memory subspaces allocated by different grid blocks are different;
establishing a mapping relation between a grid data structure corresponding to each grid block and a corresponding CPU core, a memory address of a memory subspace and an OpenMP execution thread;
and reading the variable parameters of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and performing implicit calculation on the variable parameters based on the solving function combination of the corresponding grid blocks in the memory subspace to obtain flow field values.
2. The method of claim 1, wherein the determining the mesh data structure for each of the mesh blocks comprises:
determining a variable parameter of each grid block; the variable parameters comprise geometric parameters, solver type parameters, solver control parameters and flow field numerical values of the grid blocks;
obtaining a solving function combination of the grid blocks; the solving function combination comprises a parameter reading function, a solver loading function and a flow field numerical value reading and writing function;
and generating a grid data structure of the grid block based on the variable parameters of the grid block and the combination of the solving function.
3. The method of claim 2, wherein the determination of the solver type parameter comprises:
determining a mesh type of the mesh block;
and setting the type of the solver as a structure solver or a non-structure solver according to the type of the grid.
4. The method according to claim 2, wherein the reading, according to the mapping relationship, variable parameters of corresponding grid blocks into a memory subspace corresponding to corresponding memory addresses by using corresponding execution threads on each CPU core, and performing implicit computation on the variable parameters based on a combination of solving functions of corresponding grid blocks in the memory subspace, to obtain a flow field value comprises:
reading the geometric parameters, solver type parameters, solver control parameters and initial flow field values of the corresponding grid blocks into the memory subspaces corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core through operating parameter reading functions based on mapping functions;
inputting the solver type parameters and the solver control parameters into the solver loading function, loading the solver loading function with a corresponding type of solver, and controlling the solver to calculate and process the geometric parameters and the initial flow field numerical values of the grid blocks based on the solver control parameters to obtain a target flow field numerical value;
and replacing the initial flow field numerical value with the target flow field numerical value based on the flow field numerical value read-write function.
5. A flow field numerical simulation apparatus, the apparatus comprising:
the grid partitioning module is used for packaging and isolating the geometric topology of the flow field grid model to obtain a plurality of grid blocks;
a data structure construction module for determining a mesh data structure of each of the mesh blocks; the grid data structure comprises variable parameters of grid blocks and a solving function combination;
the mapping module is used for determining the number of grid blocks obtained by packaging the flow field grid model; performing virtual memory division according to the number of the grid blocks to obtain a corresponding number of memory subspaces; based on OpenMP guidance statements, concurrently allocating a CPU core, a memory subspace and an OpenMP execution thread to each grid block; the memory subspaces allocated by different grid blocks are different; establishing a mapping relation between a grid data structure corresponding to each grid block and a corresponding CPU core, a memory address of a memory subspace and an OpenMP execution thread;
and the parallel implicit calculation module is used for reading the variable parameters of the corresponding grid blocks into the memory subspace corresponding to the corresponding memory addresses by adopting corresponding execution threads on each CPU core according to the mapping relation, and performing implicit calculation on the variable parameters based on the solving function combination of the corresponding grid blocks in the memory subspace to obtain flow field values.
6. The apparatus of claim 5, wherein the data structure construction module is further configured to determine a variable parameter for each of the grid blocks; the variable parameters comprise geometric parameters, solver type parameters, solver control parameters and flow field numerical values of the grid blocks; obtaining a solving function combination of the grid blocks; the solving function combination comprises a parameter reading function, a solver loading function and a flow field numerical value reading and writing function; and generating a grid data structure of the grid block based on the variable parameters of the grid block and the combination of the solving function.
7. The apparatus of claim 6, wherein the data structure construction module is further configured to determine a grid type to which the grid block belongs; and setting the type of the solver as a structure solver or a non-structure solver according to the type of the grid.
8. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 4 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN202210952867.1A 2022-08-10 2022-08-10 Flow field numerical simulation method and device, computer equipment and storage medium Active CN115016951B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210952867.1A CN115016951B (en) 2022-08-10 2022-08-10 Flow field numerical simulation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210952867.1A CN115016951B (en) 2022-08-10 2022-08-10 Flow field numerical simulation method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115016951A CN115016951A (en) 2022-09-06
CN115016951B true CN115016951B (en) 2022-10-25

Family

ID=83065756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210952867.1A Active CN115016951B (en) 2022-08-10 2022-08-10 Flow field numerical simulation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115016951B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115809705B (en) * 2022-11-21 2024-06-14 本源量子计算科技(合肥)股份有限公司 Fluid dynamics computing system based on quantum computing and quantum computer
CN116127877B (en) * 2023-04-04 2023-09-22 中国空气动力研究与发展中心计算空气动力研究所 Acceleration method, device, terminal equipment and storage medium for multiple grids
CN116502370B (en) * 2023-06-25 2023-09-12 中国空气动力研究与发展中心计算空气动力研究所 Fluid parameter simulation method, system, electronic equipment and storage medium
CN117056090B (en) * 2023-10-13 2023-12-26 中国空气动力研究与发展中心计算空气动力研究所 Unstructured implicit LUSGS thread parallel method, device, medium and system
CN117494509B (en) * 2023-11-02 2024-05-28 上海慕灿信息科技有限公司 Block structure self-adaptive grid refinement method based on multiple physical fields
CN117787147B (en) * 2024-02-28 2024-05-03 中国空气动力研究与发展中心计算空气动力研究所 Model building method for solving full-speed domain flow problem and related products

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543663A (en) * 2019-07-22 2019-12-06 西安交通大学 Coarse-grained MPI + OpenMP hybrid parallel-oriented structural grid area division method
CN111814384A (en) * 2020-09-01 2020-10-23 北京应用物理与计算数学研究所 Front-back low-overhead connection data structure and method for high-performance numerical simulation
KR102209526B1 (en) * 2019-10-21 2021-02-01 주식회사 스탠다임 Method and apparatus for analysis protein-ligand interaction using parallel operation
CN113689556A (en) * 2021-10-25 2021-11-23 中国空气动力研究与发展中心计算空气动力研究所 Block self-adaptive Cartesian grid quick map mapping method and system
CN114818224A (en) * 2022-05-27 2022-07-29 中国空气动力研究与发展中心计算空气动力研究所 Structural grid generation method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140130056A1 (en) * 2012-11-05 2014-05-08 Rational Systems Llc Parallel Execution Framework
CN110795869B (en) * 2020-01-06 2020-04-07 中国人民解放军国防科技大学 Numerical calculation method and device for flow field data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543663A (en) * 2019-07-22 2019-12-06 西安交通大学 Coarse-grained MPI + OpenMP hybrid parallel-oriented structural grid area division method
KR102209526B1 (en) * 2019-10-21 2021-02-01 주식회사 스탠다임 Method and apparatus for analysis protein-ligand interaction using parallel operation
CN111814384A (en) * 2020-09-01 2020-10-23 北京应用物理与计算数学研究所 Front-back low-overhead connection data structure and method for high-performance numerical simulation
CN113689556A (en) * 2021-10-25 2021-11-23 中国空气动力研究与发展中心计算空气动力研究所 Block self-adaptive Cartesian grid quick map mapping method and system
CN114818224A (en) * 2022-05-27 2022-07-29 中国空气动力研究与发展中心计算空气动力研究所 Structural grid generation method, device, equipment and storage medium

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
CPU/GPU computing for a multi-block structured grid based high-order flow solver on a large heterogeneous system;Wei Cao等;《Cluster Computing》;20131127;第17卷;第255-270页 *
Grid-based mapping: A method for rapidly determining the spatial distributions of small features over very large areas;Jason D.Ramsdale等;《Planetary and Space Science》;elsevier;20170630;第49-61页 *
三维典型超声速燃烧室流场数值模拟;王江峰等;《南京航空航天大学学报》;20080615(第03期);第34-38页 *
基于OpenMP 4.0的CFD应用异构并行技术研究;杨梅芳;《中国优秀硕士学位论文全文数据库 基础科学辑》;20190215(第2期);A004-44 *
基于OpenMP的二维有限元-离散元并行分析方法;严成增等;《岩土力学》;20140910;第35卷(第9期);第2717-2724页 *
非结构CFD软件MPI+OpenMP混合并行及超大规模非定常并行计算的应用;王年华等;《航空学报》;20200310;第41卷;第190-204页 *
高阶精度CFD应用在天河2系统上的异构并行模拟与性能优化;王勇献等;《计算机研究与发展》;20150415(第04期);第59-68页 *

Also Published As

Publication number Publication date
CN115016951A (en) 2022-09-06

Similar Documents

Publication Publication Date Title
CN115016951B (en) Flow field numerical simulation method and device, computer equipment and storage medium
Feichtinger et al. A flexible Patch-based lattice Boltzmann parallelization approach for heterogeneous GPU–CPU clusters
Economon et al. Performance optimizations for scalable implicit RANS calculations with SU2
Zhang et al. An adaptive breadth-first search algorithm on integrated architectures
Pienaar et al. MDR: performance model driven runtime for heterogeneous parallel platforms
Economon et al. Towards high-performance optimizations of the unstructured open-source SU2 suite
Carpaye et al. Design and analysis of a task-based parallelization over a runtime system of an explicit finite-volume CFD code with adaptive time stepping
Han et al. Energy efficient VM scheduling for big data processing in cloud computing environments
Langguth et al. Scalable heterogeneous CPU-GPU computations for unstructured tetrahedral meshes
Tolosana-Calasanz et al. Model-driven development of data intensive applications over cloud resources
Javanmard et al. Toward efficient architecture-independent algorithms for dynamic programs
Levchenko et al. GPU implementation of ConeTorre algorithm for fluid dynamics simulation
Humphrey et al. An evaluation of an asynchronous task based dataflow approach for Uintah
Peterson et al. Automatic halo management for the Uintah GPU-heterogeneous asynchronous many-task runtime
Ciznicki et al. Energy aware scheduling model and online heuristics for stencil codes on heterogeneous computing architectures
US9032405B2 (en) Systems and method for assigning executable functions to available processors in a multiprocessing environment
Ma et al. GPU parallelization of unstructured/hybrid grid ALE multigrid unsteady solver for moving body problems
Sanfui et al. Symbolic and numeric kernel division for graphics processing unit-based finite element analysis assembly of regular meshes with modified sparse storage formats
He et al. Using minmax-memory claims to improve in-memory workflow computations in the cloud
Upadhyay et al. An effective scheme for memory congestion reduction in multi-core environment
Zakirov et al. Compact update algorithm for numerical schemes with cross stencil for data access locality
Jeannot Process mapping on any topology with TopoMatch
Shimokawabe et al. A high-productivity framework for multi-GPU computation of mesh-based applications
Dagli et al. Multi-accelerator neural network inference in diversely heterogeneous embedded systems
Hardasmal et al. A parallelisation tale of two languages

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