CN116738892A - Flow field numerical simulation data protection method, system, equipment and medium - Google Patents

Flow field numerical simulation data protection method, system, equipment and medium Download PDF

Info

Publication number
CN116738892A
CN116738892A CN202310989269.6A CN202310989269A CN116738892A CN 116738892 A CN116738892 A CN 116738892A CN 202310989269 A CN202310989269 A CN 202310989269A CN 116738892 A CN116738892 A CN 116738892A
Authority
CN
China
Prior art keywords
file
calculation
flow field
continuation
target
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.)
Granted
Application number
CN202310989269.6A
Other languages
Chinese (zh)
Other versions
CN116738892B (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 CN202310989269.6A priority Critical patent/CN116738892B/en
Publication of CN116738892A publication Critical patent/CN116738892A/en
Application granted granted Critical
Publication of CN116738892B publication Critical patent/CN116738892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/15Vehicle, aircraft or watercraft design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • 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/08Thermal analysis or thermal optimisation
    • 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

Landscapes

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

Abstract

The application discloses a flow field numerical simulation data protection method, a system, equipment and a medium, wherein a first calculation continuation file for storing target flow field characteristic information is generated at the current calculation continuation file generation moment; if the first calculation continuation file is complete, the first calculation continuation file is saved, and the saved second calculation continuation file is deleted; if the first calculation continuation file is incomplete, returning to the step of executing the first calculation continuation file for storing the characteristic information of the target flow field if the first calculation continuation file is regenerated, and storing the first calculation continuation file if the first calculation continuation file is not regenerated; when only the first calculation continuation file is stored, generating a target calculation continuation file based on the first calculation continuation file; under the condition that the first subsequent calculation file and the second subsequent calculation file are stored, generating a target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file; and carrying out stable flow field numerical simulation on the simulation object based on the target calculation file. The stability is good, and the calculation and storage resources can be reasonably saved.

Description

Flow field numerical simulation data protection method, system, equipment and medium
Technical Field
The application relates to the technical field of computational fluid mechanics, in particular to a flow field numerical simulation data protection method, system, equipment and medium.
Background
For the solving process of Computational Fluid Dynamics (CFD) simulation, the complexity and uncertainty of the computing working conditions often lead to the difference between the results of numerical simulation computation (such as flow field parameters, wall parameters and the like) and experimental and real numerical values, so that various computing parameters (incoming flow parameters, physicochemical models, numerical formats and the like) need to be reasonably adjusted, and the simulation value is ensured to approach the real physical value as much as possible. In the numerical simulation process, in order to prevent the problem that the flow field needs to be recalculated after the calculation parameters are modified, a general numerical simulation program introduces a function of flow field calculation continuation, wherein the function refers to that after a certain number of iterative steps are output by the program, a certain number of data files are used for storing flow field characteristic parameter information in the numerical simulation process, then when the simulation program is stopped accidentally or manually, and the simulation calculation needs to be restarted again, the flow field characteristic information can be read from the files only if the calculation continuation files exist, so that the simulation calculation process starts relay calculation from the space flow field corresponding to the iterative steps of the last output calculation continuation files, and calculation time and cost are saved.
When the calculation file is output, the flow field information of each calculation grid unit needs to be recorded, and if the grid quantity is small, the data output and the data reading can be completed quickly, so that the condition of data writing failure or incomplete is seldom caused. However, when the calculated grid quantity is large, for example, the grid quantity is tens of millions or hundreds of millions, the speed of reading and writing data is also different due to inconsistent hardware level of each computer or cluster server, so that the situation that the simulation program is accidentally terminated (such as power failure, dead halt, etc.) when outputting the continuous calculation file often occurs, and the problem of incomplete data information in the continuous calculation file is caused. If the calculation program is started again, when the calculation file needs to be read, the relevant flow field information cannot be effectively read to cause calculation failure, and finally the whole simulation calculation process can only be restarted from the first step, so that time is wasted, and calculation resources are wasted.
For many software, in order to avoid the above situations, a flow field calculation file is usually output after selecting the calculation steps designated by the interval, and when calculation is needed, the file data output last time is read, but the disadvantage is that: setting the output interval step number smaller, which can lead to a large number of continuous calculation files in the whole result file system, and if the calculation grid quantity is overlarge, the storage space can be greatly wasted; when the number of the set interval steps is large, if the situation of unexpected termination occurs and the situation of incomplete calculation file data occurs, only flow field data in the calculation file output in the previous interval can be read, so that the calculation result in the current interval is wasted.
In view of the foregoing, there is still a need to provide a method for stably outputting a flow field calculation file and reasonably saving calculation and storage resources.
Disclosure of Invention
The application aims to provide a flow field numerical simulation data protection method, which can solve the technical problems of how to stably output flow field continuous calculation files based on flow field numerical simulation and reasonably save calculation and storage resources to a certain extent. The application also provides a flow field numerical simulation data protection system, equipment and a computer readable storage medium.
In order to achieve the above object, the present application provides the following technical solutions:
a flow field numerical simulation data protection method comprises the following steps:
generating a first calculation continuation file storing target flow field characteristic information at the current calculation continuation file generation moment, wherein the target flow field characteristic information comprises flow field characteristic information generated by carrying out flow field numerical simulation on a simulation object;
judging whether the first calculation file is complete or not;
if the first calculation continuation file is complete, the first calculation continuation file is saved, and the saved second calculation continuation file is deleted;
if the first calculation continuation file is incomplete, judging whether to regenerate the first calculation continuation file, if the first calculation continuation file is regenerated, returning to the step of executing the first calculation continuation file for generating the storage target flow field characteristic information, and if the first calculation continuation file is not regenerated, storing the first calculation continuation file;
Judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object;
if the continuous calculation file of the simulation object is applied to carry out flow field numerical simulation on the simulation object, generating a target continuous calculation file based on the first continuous calculation file under the condition that only the first continuous calculation file is stored; generating a target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file under the condition that the first subsequent calculation file and the second subsequent calculation file are stored;
and carrying out flow field numerical simulation on the simulation object based on the target calculation file.
Preferably, the generating the target calculation file based on the first calculation file and the second calculation file includes:
and transferring the data of the first subsequent calculation file to the same storage position in the second subsequent calculation file, and taking the updated second subsequent calculation file as the target subsequent calculation file.
Preferably, before the flow field numerical simulation is performed on the simulation object based on the target calculation file, the flow field numerical simulation method further includes:
acquiring change information of a user on the target calculation continuing file;
and modifying the target calculation continuing file based on the modification information.
Preferably, the generating a first subsequent calculation file storing the characteristic information of the target flow field includes:
storing the target flow field characteristic information into a target variable according to a preset data writing sequence;
creating an empty file, writing the target variable into the empty file according to a target format, and generating the first calculation continuing file.
Preferably, the generating the first subsequent calculation file storing the characteristic information of the target flow field further includes:
generating a monitoring file of the first calculation continuation file, wherein the monitoring file is used for recording whether each data in the target flow field characteristic information is completely stored in the first calculation continuation file;
the judging whether the first subsequent calculation file is complete comprises the following steps:
judging whether each data in the target flow field characteristic information is completely stored in the first calculation continuation file or not based on the monitoring file;
if yes, judging that the first continuous calculation file is complete;
if not, judging that the first continuous calculation file is incomplete.
Preferably, after the generating the target calculation file based on the first calculation file and the second calculation file, the method further includes:
and storing the target calculation continuation file, and deleting the first calculation continuation file or the second calculation continuation file.
Preferably, the determining whether to apply the subsequent calculation file of the simulation object to perform flow field numerical simulation on the simulation object includes:
judging whether a restarting calculation instruction input by a user after terminating flow field numerical simulation is received or not;
if the restarting calculation instruction is received, judging that the continuous calculation file of the simulation object is applied to perform flow field numerical simulation on the simulation object;
and if the restarting calculation instruction is not received, judging that the continuous calculation file of the simulation object is not applied to perform flow field numerical simulation on the simulation object.
A flow field numerical simulation data protection system, comprising:
the generation module is used for generating a first calculation file for storing the target flow field characteristic information at the current calculation file generation moment, wherein the target flow field characteristic information comprises flow field characteristic information generated by carrying out flow field numerical simulation on a simulation object;
the integrity judging module is used for judging whether the first follow-up calculation file is complete or not; if the first calculation continuation file is complete, the first calculation continuation file is saved, and the saved second calculation continuation file is deleted; judging whether the first calculation continuation file is regenerated if the first calculation continuation file is incomplete, prompting a generating module to execute the step of generating the first calculation continuation file for storing the target flow field characteristic information if the first calculation continuation file is regenerated, and storing the first calculation continuation file if the first calculation continuation file is not regenerated;
The application judging module is used for judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object; if the continuous calculation file of the simulation object is applied to carry out flow field numerical simulation on the simulation object, generating a target continuous calculation file based on the first continuous calculation file under the condition that only the first continuous calculation file is stored; generating a target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file under the condition that the first subsequent calculation file and the second subsequent calculation file are stored;
and the simulation module is used for carrying out flow field numerical simulation on the simulation object based on the target calculation file.
Preferably, the application judging module includes:
the application judging unit is used for judging whether a restarting calculation instruction input by a user after the flow field numerical simulation is terminated is received or not; if the restarting calculation instruction is received, judging that the continuous calculation file of the simulation object is applied to perform flow field numerical simulation on the simulation object; and if the restarting calculation instruction is not received, judging that the continuous calculation file of the simulation object is not applied to perform flow field numerical simulation on the simulation object.
A flow field numerical simulation data protection apparatus comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the flow field numerical simulation data protection method when executing the computer program.
A computer readable storage medium having stored therein a computer program which when executed by a processor performs the steps of the flow field numerical simulation data protection method as described in any one of the above.
According to the flow field numerical simulation data protection method provided by the application, a first calculation continuation file for storing target flow field characteristic information is generated at the current calculation continuation file generation moment, and the target flow field characteristic information comprises flow field characteristic information generated by performing flow field numerical simulation on a simulation object; judging whether the first calculation continuation file is complete or not; if the first calculation continuation file is complete, the first calculation continuation file is saved, and the saved second calculation continuation file is deleted; if the first subsequent calculation file is incomplete, judging whether to regenerate the first subsequent calculation file, if the first subsequent calculation file is regenerated, returning to execute the step of generating the first subsequent calculation file storing the characteristic information of the target flow field, and if the first subsequent calculation file is not regenerated, storing the first subsequent calculation file; judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object; if the calculation continuation file of the simulation object is applied to perform flow field numerical simulation on the simulation object, generating a target calculation continuation file based on the first calculation continuation file under the condition that only the first calculation continuation file is stored; under the condition that the first subsequent calculation file and the second subsequent calculation file are stored, generating a target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file; and carrying out flow field numerical simulation on the simulation object based on the target calculation file. In the application, under the condition that the generated first subsequent calculation file is complete, only the latest and complete first subsequent calculation file is reserved, and the flow field numerical simulation can be directly carried out on the basis of the first subsequent calculation file; under the condition that the generated first subsequent calculation file is incomplete, the first subsequent calculation file and the generated second subsequent calculation file are saved, and the flow field numerical simulation can be performed on the first subsequent calculation file and the second subsequent calculation file in a comprehensive mode; the flow field numerical simulation restart caused by incomplete calculation files is avoided, the stability of flow field numerical simulation based on the calculation files is ensured, and calculation and storage resources are saved by reasonably processing the first calculation files and the second calculation files. The flow field numerical simulation data protection system, the flow field numerical simulation data protection equipment and the computer readable storage medium provided by the application also solve the corresponding technical problems.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a first flow chart of a flow field numerical simulation data protection method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a three-dimensional structural grid;
FIG. 3 is a schematic diagram of a two-dimensional structural grid;
FIG. 4 is a second flowchart of a flow field numerical simulation data protection method according to an embodiment of the present application;
FIG. 5 is a third flowchart of a flow field numerical simulation data protection method according to an embodiment of the present application;
FIG. 6 is a schematic block diagram of the overall implementation flow of the present application;
fig. 7 is a schematic diagram of a procedure for realizing uniqueness of a follow-up file:
FIG. 8 is a schematic diagram of an operation flow in which two calculation continuation files exist;
FIG. 9 is a schematic structural diagram of a flow field numerical simulation data protection system according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a flow field numerical simulation data protection device according to an embodiment of the present application;
Fig. 11 is a schematic diagram of another structure of a flow field numerical simulation data protection device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a first flowchart of a flow field numerical simulation data protection method according to an embodiment of the application.
The flow field numerical simulation data protection method provided by the embodiment of the application can comprise the following steps:
step S101: at the current calculation file generation moment, a first calculation file storing target flow field characteristic information is generated, wherein the target flow field characteristic information comprises flow field characteristic information generated by carrying out flow field numerical simulation on a simulation object.
In practical application, when the current calculation file generation time is reached, a first calculation file storing the target flow field characteristic information can be generated, namely the first calculation file is the latest generated calculation file, and the target flow field characteristic information refers to flow field characteristic information generated by performing flow field numerical simulation on the simulation object. The calculation file generation time may be a time determined at a fixed time interval, or may be any time specified by the user; in addition, the simulation object may be an object such as an airplane, a missile, an automobile, etc., and the flow field numerical simulation may be a gas component change of the simulation object in the running process, etc., and the application is not limited in detail herein.
It should be noted that, in the initial stage of flow field numerical simulation, it is necessary to make assumptions and appropriately simplify the working conditions such as physics and chemistry related to the simulation object, to determine whether the working conditions are two-dimensional or three-dimensional, and to select appropriate calculation models and numerical methods for simulation calculation, such as control equations, physical models, chemical models, laminar flow or turbulence, steady or unsteady, what space discrete format, and so on. And then, according to the determined calculation model and a numerical method, determining the number and types of variables participating in the simulation calculation in the flow field, thereby further determining the size of the dimension of the variable array and the number of elements in the array, wherein the variables participating in the simulation calculation comprise, but are not limited to, the following flow field parameters: cartesian coordinate values of grid points and grid cells and a series of information of calculated coordinate values, density, velocity, pressure, temperature, reaction set number, reaction coefficient, iteration step number, and the like.
It should be noted that prior to numerical simulation, the existing simulation object and the flow field area surrounding the simulation object need to be grid-divided, that is, the division of the calculation grid is the premise and the basis of the whole simulation calculation, and for the sake of understanding, the description is given here taking the structural grid as an example, and of course, the non-structural grid is also applicable. In general, instead of a complete block, the whole calculation area needs to be divided into a plurality of areas according to various calculation requirements, and each area is called a grid block, and then each grid block is further divided into a plurality of tiny units according to calculation conditions, flow characteristics, calculation accuracy and the like, and the units are called grid units, each unit is connected with a grid surface, and each surface is formed by grid points. The above elements form the basis of flow field data storage, and the transmission and storage of the whole flow field data are carried out by taking grid points, grid surfaces, grid units and grid blocks as units. The mesh topology (network topology refers to the connection relation between points and surfaces, points and units, and between surfaces and units) of the structural mesh is numbered according to a specific sequence, and the points, the surfaces and the units are numbered in three directions of I, J, K by adopting a calculation coordinate system in units of mesh blocks. When the flow field calculation file stores flow field characteristic information, the flow field calculation file is stored by taking the mass centers (also called grid centers) of grid units in each grid block as a unit, a series of characteristic parameters such as the density, the speed, the pressure, the temperature and the like of the flow field are defined on the mass centers, and the flow field characteristic information is stored in the sequence of 1-Ni,1-Nj and 1-Nk (Ni, nj and Nk represent the number of grid units in three directions) in a calculation coordinate system according to the three directions of I, J, K, so that the flow field characteristic information stored in the calculation file can be replaced and corrected in a subsequent component by the aid of the construction of the data structure with regularity.
In a specific application scenario, in the process of generating a first calculation file for storing the characteristic information of the target flow field, the characteristic information of the target flow field can be stored into a target variable according to a preset data writing sequence; and creating an empty file, writing the target variable into the empty file according to the target format, and generating a first calculation continuing file. Specifically, the flow field characteristic information on each grid unit at the current moment obtained by calculation can be stored into the target variable FlowData according to a certain writing sequence, for example, according to the sequence of grid coordinate point information, density, speed, pressure, temperature, reaction component number, various coefficients and the current iteration step number, then an empty file is created, for example, an empty dat file is created, the flow field characteristic information of each grid unit stored by the target variable FlowData can be in a specific format, can be in a binary format, can be in a decimal format and the like, and is written into the newly generated dat file to finally generate a first calculation file.
Step S102: judging whether the first calculation continuation file is complete or not; if the first calculation continuation file is complete, executing step S103; if the first calculation file is incomplete, step S104 is performed.
Step S103: and saving the first calculation continuation file and deleting the saved second calculation continuation file.
Step S104: judging whether the first calculation continuation file is regenerated or not, and if the first calculation continuation file is regenerated, returning to the execution step S101; if the first calculation file is not regenerated, step S105 is executed.
Step S105: the first calculation continuation file is saved.
In practical application, after a first calculation continuation file storing the characteristic information of the target flow field is generated at the current calculation continuation file generation moment, whether the first calculation continuation file is complete or not can be judged; if the first calculation continuation file is complete, the first calculation continuation file is saved, the saved second calculation continuation file is deleted, and only the first calculation continuation file with complete and latest data is saved at the moment; if the first calculation continuation file is incomplete, judging whether to regenerate the first calculation continuation file, if the first calculation continuation file is regenerated, returning to execute the step of generating the first calculation continuation file storing the target flow field characteristic information, and if the first calculation continuation file is not regenerated, storing the first calculation continuation file, wherein the stored second calculation continuation file is not deleted, namely, the first calculation continuation file and the second calculation continuation file are stored. When the flow field numerical simulation data protection method of the present application is executed for the first time, since the second calculation continuation file stored does not exist after the first calculation continuation file is generated, only the first calculation continuation file exists in the first calculation continuation file stored for the first time, and only when the calculation continuation file is generated again afterwards, the newly generated calculation continuation file becomes the first calculation continuation file, the stored first calculation continuation file generated for the first time becomes the second calculation continuation file, that is, the first calculation continuation file refers to the newly generated calculation continuation file in the present application, and the second calculation continuation file refers to the second calculation continuation file generated and stored before the first calculation continuation file.
In a specific application scene, in order to more intuitively know whether data in a calculation file is complete and effective or not in a first calculation file for storing target flow field characteristic information or know that an unexpected place occurs in a data storage process specifically when the data is incomplete, a process monitoring file for storing the data can be synchronously generated along with the generation of the calculation file, namely a monitoring file of the first calculation file can be generated, the monitoring file is used for recording whether each data in the target flow field characteristic information is completely stored in the first calculation file, and the information contained in the monitoring file can comprise the number of each calculation grid block, the storage step process, whether each characteristic variable flow field information in each calculation grid block is completely stored, whether the data storage of the calculation file is completed or not, and the like; correspondingly, in the process of judging whether the data in the first subsequent calculation file is complete, whether each data in the target flow field characteristic information is completely stored in the first subsequent calculation file can be judged based on the monitoring file; if yes, judging that the first calculation continuation file is complete; if not, the first calculation continuation file is judged to be incomplete.
Step S106: judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object; if the flow field numerical simulation is performed on the simulation object by using the calculation continuation file of the simulation object, step S107 is generated.
Step S107: generating a target subsequent calculation file based on the first subsequent calculation file under the condition that only the first subsequent calculation file is stored; in the case where the first and second calculation continuation files are stored, the target calculation continuation file is generated based on the first and second calculation continuation files.
Step S108: and carrying out flow field numerical simulation on the simulation object based on the target calculation file.
In practical application, after the first calculation continuation file is stored, whether the calculation continuation file of the simulation object is applied to perform flow field numerical simulation on the simulation object can be judged; if the calculation continuation file of the simulation object is applied to perform flow field numerical simulation on the simulation object, generating a target calculation continuation file based on the first calculation continuation file under the condition that only the first calculation continuation file is stored; under the condition that the first subsequent calculation file and the second subsequent calculation file are stored at the same time, generating a target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file; and carrying out flow field numerical simulation on the simulation object based on the target calculation file. And after the target calculation continuation file is generated based on the first calculation continuation file and the second calculation continuation file, the target calculation continuation file can be saved, the first calculation continuation file or the second calculation continuation file can be deleted, and the like, and the application is not limited in detail herein.
In a specific application scene, a flow field calculation continuation file is not used under normal conditions and only exists in a result file system, but if calculation is stopped accidentally due to abnormality (power failure, dead halt and the like) in a simulation calculation process, or calculation results are converged due to insufficient iterative steps after calculation is finished, or calculation is stopped manually due to incorrect calculation parameters and model selection, the flow field parameters are reset and numerical calculation is restarted according to characteristic information of each grid unit of the flow field stored in the calculation continuation file, namely whether a user inputs a calculation instruction for restarting after stopping flow field numerical simulation can be judged in the process of judging whether flow field numerical simulation is performed on a simulation object by using the calculation continuation file of the simulation object; if a restarting calculation instruction is received, judging that a continuous calculation file of the simulation object is applied to perform flow field numerical simulation on the simulation object; if the restarting calculation instruction is not received, judging that the continuous calculation file of the simulation object is not applied to perform flow field numerical simulation on the simulation object.
It should be noted that, for ultra-large scale calculation, the grid quantity of the calculation model is very huge, and reaches to the millions or tens of millions of grids, even hundreds of millions of grids, in the process of numerical simulation calculation, when the calculation continuation file is output, because the flow field characteristic information of each grid unit needs to be recorded, certain time is required to be consumed for data access and storage, and when the flow field data is being written into the calculation continuation file, if the unstable condition of a cluster server or a local workstation occurs, the program is often abnormally terminated in the process of outputting the calculation continuation file, so that the flow field characteristic information of all grid units is not stored into the calculation continuation file, and finally the data is incomplete; that is, the stability of flow field numerical simulation is difficult to be ensured by a single calculation file, and the flow field numerical simulation can be stably performed by alternately generating and storing two calculation files, so that a complete target calculation file can be generated under any condition.
According to the flow field numerical simulation data protection method provided by the application, a first calculation continuation file for storing target flow field characteristic information is generated at the current calculation continuation file generation moment, and the target flow field characteristic information comprises flow field characteristic information generated by performing flow field numerical simulation on a simulation object; judging whether the first calculation continuation file is complete or not; if the first calculation continuation file is complete, the first calculation continuation file is saved, and the saved second calculation continuation file is deleted; if the first subsequent calculation file is incomplete, judging whether to regenerate the first subsequent calculation file, if the first subsequent calculation file is regenerated, returning to execute the step of generating the first subsequent calculation file storing the characteristic information of the target flow field, and if the first subsequent calculation file is not regenerated, storing the first subsequent calculation file; judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object; if the calculation continuation file of the simulation object is applied to perform flow field numerical simulation on the simulation object, generating a target calculation continuation file based on the first calculation continuation file under the condition that only the first calculation continuation file is stored; under the condition that the first subsequent calculation file and the second subsequent calculation file are stored, generating a target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file; and carrying out flow field numerical simulation on the simulation object based on the target calculation file. In the application, under the condition that the generated first subsequent calculation file is complete, only the latest and complete first subsequent calculation file is reserved, and the flow field numerical simulation can be directly carried out on the basis of the first subsequent calculation file; under the condition that the generated first subsequent calculation file is incomplete, the first subsequent calculation file and the generated second subsequent calculation file are saved, and the flow field numerical simulation can be performed on the first subsequent calculation file and the second subsequent calculation file in a comprehensive mode; the flow field numerical simulation restart caused by incomplete calculation files is avoided, the stability of flow field numerical simulation based on the calculation files is ensured, and calculation and storage resources are saved by reasonably processing the first calculation files and the second calculation files.
Referring to fig. 4, fig. 4 is a second flowchart of a flow field numerical simulation data protection method according to an embodiment of the present application.
On the basis of the foregoing embodiment, the flow field numerical simulation data protection method provided by the embodiment of the present application may include the following steps:
step S201: at the current calculation file generation moment, a first calculation file storing target flow field characteristic information is generated, wherein the target flow field characteristic information comprises flow field characteristic information generated by carrying out flow field numerical simulation on a simulation object.
Step S202: judging whether the first calculation continuation file is complete or not; if the first calculation continuation file is complete, executing step S203; if the first calculation file is incomplete, step S204 is performed.
Step S203: and saving the first calculation continuation file and deleting the saved second calculation continuation file.
Step S204: judging whether the first calculation continuation file is regenerated or not, and if the first calculation continuation file is regenerated, returning to the execution step S201; if the first calculation file is not regenerated, step S205 is executed.
Step S205: the first calculation continuation file is saved.
Step S206: judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object; if the flow field numerical simulation is performed on the simulation object by applying the calculation continuation file of the simulation object, step S207 is generated.
Step S207: generating a target subsequent calculation file based on the first subsequent calculation file under the condition that only the first subsequent calculation file is stored; and under the condition that the first subsequent calculation file and the second subsequent calculation file are stored, the data of the first subsequent calculation file is transferred to the same storage position in the second subsequent calculation file, and the updated second subsequent calculation file is used as the target subsequent calculation file.
In practical application, under the condition that only the first calculation continuation file is stored, accidental termination may occur in other processes of analog calculation, but not in the process of outputting the calculation continuation file, so that only one first calculation continuation file exists, and at the moment, only the first calculation continuation file needs to be directly read and calculation is restarted. Under the condition that the first subsequent calculation file and the second subsequent calculation file are stored, accidental termination occurs in the process of outputting the first subsequent calculation file, so that the second subsequent calculation file is not deleted yet, and therefore the first subsequent calculation file and the second subsequent calculation file exist simultaneously when calculation is terminated, but the first subsequent calculation file and the second subsequent calculation file are identical in stored information type and different in time schedule, so that the first subsequent calculation file and the second subsequent calculation file can be synthesized to perform restarting calculation when the target subsequent calculation file is generated based on the first subsequent calculation file and the second subsequent calculation file, and the updated second subsequent calculation file can be used as the target subsequent calculation file by transferring the data of the first subsequent calculation file to the same storage position in the second subsequent calculation file.
Step S208: and carrying out flow field numerical simulation on the simulation object based on the target calculation file.
Referring to fig. 5, fig. 5 is a third flowchart of a flow field numerical simulation data protection method according to an embodiment of the present application.
On the basis of the foregoing embodiment, the flow field numerical simulation data protection method provided by the embodiment of the present application may include the following steps:
step S301: generating a first calculation continuation file storing target flow field characteristic information at the current calculation continuation file generation moment, wherein the target flow field characteristic information comprises flow field characteristic information generated by carrying out flow field numerical simulation on a simulation object;
step S302: judging whether the first calculation continuation file is complete or not; if the first calculation continuation file is complete, executing step S303; if the first calculation file is incomplete, step S304 is performed.
Step S303: and saving the first calculation continuation file and deleting the saved second calculation continuation file.
Step S304: judging whether the first calculation continuation file is regenerated or not, and if the first calculation continuation file is regenerated, returning to the execution step S301; if the first calculation file is not regenerated, step S305 is performed.
Step S305: the first calculation continuation file is saved.
Step S306: judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object; if the flow field numerical simulation is performed on the simulation object by using the calculation continuation file of the simulation object, step S307 is generated.
Step S307: generating a target subsequent calculation file based on the first subsequent calculation file under the condition that only the first subsequent calculation file is stored; in the case where the first and second calculation continuation files are stored, the target calculation continuation file is generated based on the first and second calculation continuation files.
Step S308: acquiring change information of a user on a target calculation continuation file; changing the target calculation continuation file based on the change information; and carrying out flow field numerical simulation on the simulation object based on the changed target calculation file.
In practical application, in the simulation calculation process, the situation of actively stopping calculation exists, at this time, often, because the condition of the incoming flow calculation is not suitable, such as unsuitable temperature, speed, density, pressure and the like of the incoming flow, or unreasonable local flow field parameters, the calculation is restarted after the relevant parameters are regulated so as to correct the final calculation result, thus meeting the accuracy of calculation, namely, before the simulation object is subjected to flow field numerical simulation based on the target calculation file, the change information of the target calculation file can be obtained by a user; and changing the target calculation continuing file based on the change information.
In order to facilitate understanding of the flow field numerical simulation data protection method provided by the present application, the whole process of flow field numerical simulation data protection will now be described, referring to fig. 6, fig. 6 is a schematic block diagram of the overall implementation flow of the present application, which includes the following components and construction methods:
(1) And the incoming flow calculation parameter control component is used for selecting proper control equations, physical models, chemical models and the like according to the aimed actual physical working conditions of the numerical simulation so that the analysis solution of the simulation calculation accords with the test value as much as possible.
(2) The numerical simulation iteration and construction data structure component is used for carrying out a numerical simulation calculation process according to the calculation incoming flow conditions and the physical model given by the component (1), determining the form of a corresponding data structure and storing the characteristic information data of the flow field.
(3) The flow field numerical simulation continuous calculation protection file output assembly is used for:
(1) before flow field numerical simulation, presetting the interval step number of flow field calculation file output, and recording as: and n, after the iteration of the nth step is completed, storing the flow field characteristic information on each grid unit at the nth step time obtained by calculation into a variable FlowData according to a certain writing sequence. Then creating an empty dat file, writing the flow field characteristic information of each grid unit of the nth step stored by the variable FlowData into the newly generated dat file, and finally generating a continuous calculation file 1, namely a first continuous calculation file, which is expressed by FlowFile_1.
(2) In the numerical simulation process, the whole grid for calculation is not a complete Block, the whole grid is divided in a regional way, the divided grids become grid blocks, each grid Block is called a Block, each Block has a unique number, when flow field characteristic information is stored in a subsequent calculation file, data storage is sequentially carried out according to the Block numbers, and a mark is carried out in a monitor file to indicate which Block is being subjected to data storage operation, then the required flow field characteristic information is stored in the subsequent calculation file in a specific sequence by taking the Block as a unit, and the mark is used for indicating the characteristic variable to finish storage when the flow field characteristic information is stored in the monitor file until all flow field characteristic information in all blocks are stored.
Examples: if the above operation is performed in the first calculation grid block, firstly, the information of the grid block is read, and the file mark of the monitor file is marked: block_1 is executing data writing, and when the flow field characteristic information is stored, if the density storage of each grid unit in the grid Block is completed, the price is marked in the monitor file: the density data is stored, other flow field variables are sequentially stored, and the description is marked sequentially until all grid cells in the block_1-block_n grid blocks complete the storage of flow field characteristic information. And finally, marking: and finishing writing, and continuing to calculate the complete file data.
After the flowFile_1 file and the monitor File are output, that is, before the subsequent steps are executed, the mark with complete data in the monitor File is read through a user-defined Judge () function, and whether the execution is continued downwards is judged, wherein the pseudo code is as follows:
if (FlowFile_1 exists and MonitorFile exists)
{
Read(MonitorFile);
If (a mark with complete data exists in the monitor file);
{
the data of the calculation continuing file is complete;
executing the following steps;
}
else
{
re-executing the process of outputting the continuous calculation file;
}
}
that is, the program will determine whether a complete data mark exists in the monitor file, if yes, determine that the data in the subsequent file is complete, and then execute the subsequent steps; if the mark does not exist, judging that the data is incomplete, and outputting and storing the characteristic information of each grid unit in a subsequent calculation file again, namely, re-executing the step (1) once again until the data is complete and effective. The following operation has the advantages that: the integrity of the stream field data in the calculation continuation file can be ensured, so that the failure of restarting calculation caused by the condition that the data is incomplete when the calculation continuation file is required to be used is avoided.
(3) When the flowfile_1 subsequent calculation file is successfully output and the data is judged to be complete, the whole flow field numerical simulation process is continued. And (2) after the iteration of the step (2 n) is completed, the procedure of outputting the follow-up calculation file in the step (1) is repeated, and the flow field characteristic information at the moment of the step (2 n) is output to form a 2 nd follow-up calculation file, namely a FlowFile_2 file, namely a new first follow-up calculation file, wherein FlowFile_1 becomes a saved second follow-up calculation file at the moment, and the completeness and validity judgment of the file are completed.
(4) After steps (1) to (3) are completed, two calculation continuation files, namely flowfile_1 and flowfile_2, exist in the result file system of the simulation calculation, and a plurality of calculation continuation files are unnecessary to exist for the numerical simulation process, and particularly for some calculation examples with huge calculation grid quantity, the waste of hard disk storage space is caused, so that only the latest calculation continuation files can be left. The calculation continuation file at the moment i.n of the iterative step is reserved, and the file of the step (i-1) n is deleted, so that only a unique flow field calculation continuation file exists in a calculation result system, and the process is shown in figure 7.
It should be specifically noted that, the process of deleting the unnecessary calculation file in the step (4) is performed on the premise that the data of the two calculation files, namely the flowfile_1 and the flowfile_2, are complete and valid, that is, if only a unique calculation file exists, no matter the calculation is performed or stopped, the flow field information in the calculation file is also complete and valid, and the calculation can be directly read and restarted. However, if the calculation is stopped and there are 2 calculation continuation files in the result file system, this indicates that an abnormal termination of the program occurs during the output of any one calculation continuation file, and the calculation needs to be restarted after the operation of the component (4).
(4) And restarting the computing component after the computing exception is passively terminated, wherein the computing component is used for judging the exception condition and realizing the identification of the continuous computing file and the updating and replacing of the flow field data if the computing is forced to be terminated due to the exception condition in the process of simulating the computing.
Specifically, when two continuous calculation files exist in the result file system, a program is needed to judge which continuous calculation file should be read to restart the calculation most effectively. The application judges the sequence of file generation and executes the data updating and replacing operation by the self-defined GetValuableF () function, and the specific process is as follows:
(1) the system generation Time of the two calculation continuation files is read from the result file system, and then the year, month, day, time and the like generated by the two calculation continuation files are uniformly converted into numbers in seconds and respectively assigned to two variables, namely Time1 and Time2.
(2) Judging the sizes of the two variable values of the Time1 and the Time2 to determine the sequence of generating the subsequent calculation files, wherein the smaller the value is, the earlier the file generation Time is, the program reads and generates complete and effective flow field characteristic data in the earlier subsequent calculation files by default, and the component (2) can know that when the two subsequent calculation files exist, the data of the earlier generated subsequent calculation files are complete and effective.
(3) In order to ensure that the flow field characteristic data information read by a program and used for restarting calculation is up to date (because the flow field information stored in the subsequent calculation file generated later corresponds to the flow field information with more simulation iteration steps, the data is newer), the data replacement operation is needed for the two subsequent calculation files, and because the data stored in the two subsequent calculation files are written into the subsequent calculation files according to the same grid Block sequence (such as from Block_1 to Block_n), the same grid unit sequence (such as I, J, K for storing the data from 1 to n respectively) and the same variable storage sequence, the data types stored in the same positions of the two subsequent calculation files generated later are completely consistent, and only the flow field characteristic data in the subsequent calculation file generated later is replaced by the data in the same storage position in the subsequent calculation file generated earlier, namely the updating of the data information is completed, so that the flow field characteristic data used for restarting calculation is ensured to be up to date.
(4) After reading of stream field characteristic data in the earlier calculation continuing file is completed and updating operation is carried out on the data, the later generated calculation continuing file is deleted, so that the effectiveness of the component (3) after the simulation calculation is restarted is ensured (because the component (3) recognizes and deletes the calculation continuing file output in the last n steps according to the name, if two calculation continuing files appear in a result file system during normal calculation, program deletion can be possibly caused, redundant calculation continuing files need to be deleted in advance during restarting, calculation errors are avoided), and the restarting of the simulation calculation is completed by using the stream field characteristic data in the final calculation continuing file. The process is shown in fig. 8.
(5) The computer is restarted to calculate the assembly after stopping voluntarily, is used for when needing the data in the manual adjustment follow-up calculation file, finish seeking the value and replacing the operation of the data through programming.
Specifically, since it is known in the component (2) that the data structure is constructed in the form of points, planes and grid cells, and the flow field characteristic information is stored according to a specific I, J, K direction numbering sequence, the data in the flow field calculation file can be corrected only by knowing the numbers of the points, planes and grid blocks Block where the cells are located to be corrected, and the coordinate information of the I, J, K directions, wherein: the grid block number and the I, J, K coordinate information of the correction area can be obtained in the grid file and the flow field display file. And then, outputting the coordinate information of the area to be corrected and the corrected flow field data information into a newly built file by adopting the same data format as the flow field calculation file, wherein the file is named as a set. And then reading the original calculation continuation file, reading the flow field characteristic information of each grid unit stored in each Block, replacing the corrected data with the corresponding flow field data information in the original calculation continuation file through a user-defined function interface, namely finishing the replacement and correction of the data, and finally restarting the calculation. The specific substitution rules are as follows:
(1) Data replacement of points: directly giving data information Picon1= { i, j, k, si } of the corresponding points, and then directly replacing the values of the corresponding points after being read by a calculation program;
(2) data substitution of facets: if the grid is a two-dimensional grid, the number of the grid block where the correction point is needed is determined firstly, then the calculated coordinate information of two points of the end point of the surface and the type and the value of the data variable to be replaced are given, namely the Picon1= { I1, J1, K1, si } and Picon2= { I2, J2, K2, ti } are given, the value assignment of the two points is carried out on the area covered by the middle of the two points, and if Si=Ti, the data of the flow field variable in the correction area are modified to be the same value; if Si+.Ti, interpolation is performed based on the number of faces and the values of Si and Ti.
For the three-dimensional grid, firstly, determining the number of grid blocks, then providing the calculated coordinate values of 4 points on the grid surface boundary which forms the data to be corrected and corresponding data information Picont1= { I1, J1, K1, si }, picont2= { I2, J2, K2, ti }, picont3= { I3, J3, K3, ui } and Picont4= { I4, J4, K4, vi }, projecting the plane formed by the four points onto the target surface where the data points in the continuous calculation file to be corrected are located, replacing the data corresponding to the grid points on the projected surface by taking the data information of the four points as a reference, and modifying the data of the flow field variables in the correction area to be the same value if Si=Ti=ui=Vi; if the values of Si, ti, ui and Vi are not identical, weighting according to the distance between the grid center coordinates of the correction grid unit and the coordinates of 4 boundary points to obtain the values of the characteristic parameters of each flow field, and then assigning the obtained values to each grid unit of the projection surface, thereby completing the correction of the data information of the continuous calculation file.
(3) Data replacement of the grid blocks: if the data of a certain grid Block, namely the grid unit in a Block, needs to be corrected, the number of the grid Block needs to be known, and the flow field characteristic parameter information in the corresponding Block is replaced in sequence according to the sequence of I, J, K.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a flow field numerical simulation data protection system according to an embodiment of the present application.
The flow field numerical simulation data protection system provided by the embodiment of the application can comprise:
the generating module 101 is configured to generate, at a current calculation file generating time, a first calculation file storing target flow field feature information, where the target flow field feature information includes flow field feature information generated by performing flow field numerical simulation on a simulation object;
an integrity determination module 102, configured to determine whether the first calculation file is complete; if the first calculation continuation file is complete, the first calculation continuation file is saved, and the saved second calculation continuation file is deleted; if the first calculation continuation file is incomplete, judging whether to regenerate the first calculation continuation file, if the first calculation continuation file is regenerated, prompting the generating module to execute the step of generating the first calculation continuation file storing the characteristic information of the target flow field, and if the first calculation continuation file is not regenerated, storing the first calculation continuation file;
The application judging module 103 is used for judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object; if the calculation continuation file of the simulation object is applied to perform flow field numerical simulation on the simulation object, generating a target calculation continuation file based on the first calculation continuation file under the condition that only the first calculation continuation file is stored; under the condition that the first subsequent calculation file and the second subsequent calculation file are stored, generating a target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file;
the simulation module 104 is configured to perform flow field numerical simulation on the simulation object based on the target calculation file.
The flow field numerical simulation data protection system provided by the embodiment of the application, the application judgment module can comprise:
the first processing unit is used for transferring the data of the first subsequent calculation file to the same storage position in the second subsequent calculation file, and taking the updated second subsequent calculation file as the target subsequent calculation file.
The flow field numerical simulation data protection system provided by the embodiment of the application can further comprise:
the acquisition module is used for acquiring the change information of a user on the target calculation continuation file before simulating the flow field numerical simulation of the simulation object based on the target calculation continuation file;
And the change module is used for changing the target calculation continuing file based on the change information.
The flow field numerical simulation data protection system provided by the embodiment of the application, the generating module can comprise:
the first storage unit is used for storing the target flow field characteristic information into a target variable according to a preset data writing sequence;
the first writing unit is used for creating an empty file, writing the target variable into the empty file according to a target format, and generating the first calculation continuing file.
In the flow field numerical simulation data protection system provided by the embodiment of the application, in the process of generating the first calculation continuation file storing the target flow field characteristic information, the generating module can also generate a monitoring file of the first calculation continuation file, wherein the monitoring file is used for recording whether each data in the target flow field characteristic information is completely stored in the first calculation continuation file;
the integrity determination module may include:
the first judging unit is used for judging whether each data in the target flow field characteristic information is completely stored in the first calculation continuing file or not based on the monitoring file; if yes, judging that the first continuous calculation file is complete; if not, judging that the first continuous calculation file is incomplete.
The flow field numerical simulation data protection system provided by the embodiment of the application, the integrity judging module can comprise:
a second judging unit for judging whether an abnormal condition exists; if the abnormal condition exists, judging that the first continuous calculation file is not regenerated; and if the abnormal condition does not exist, judging to regenerate the first continuous calculation file.
The flow field numerical simulation data protection system provided by the embodiment of the application can further comprise:
the storage module is used for storing the target subsequent calculation file after the integrity judging module generates the target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file, and deleting the first subsequent calculation file or the second subsequent calculation file.
The embodiment of the application provides a flow field numerical simulation data protection system, and an application judgment module comprises:
the application judging unit is used for judging whether a restarting calculation instruction input by a user after the flow field numerical simulation is terminated is received or not; if a restarting calculation instruction is received, judging that a continuous calculation file of the simulation object is applied to perform flow field numerical simulation on the simulation object; if the restarting calculation instruction is not received, judging that the continuous calculation file of the simulation object is not applied to perform flow field numerical simulation on the simulation object.
The application also provides flow field numerical simulation data protection equipment and a computer readable storage medium, which have the corresponding effects of the flow field numerical simulation data protection method provided by the embodiment of the application. Referring to fig. 10, fig. 10 is a schematic structural diagram of a flow field numerical simulation data protection device according to an embodiment of the present application.
The flow field numerical simulation data protection device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the steps of the flow field numerical simulation data protection method described in any embodiment when executing the computer program.
Referring to fig. 11, another flow field numerical simulation data protection device provided in an embodiment of the present application may further include: an input port 203 connected to the processor 202 for transmitting an externally input command to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing result of the processor 202 to the outside; and the communication module 205 is connected with the processor 202 and is used for realizing communication between the flow field numerical simulation device and the outside. The display unit 204 may be a display panel, a laser scanning display, or the like; communication means employed by the communication module 205 include, but are not limited to, mobile high definition link technology (HML), universal Serial Bus (USB), high Definition Multimedia Interface (HDMI), wireless connection: wireless fidelity (WiFi), bluetooth communication, bluetooth low energy communication, ieee802.11s based communication.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the steps of the flow field numerical simulation data protection method described in any embodiment are realized.
The computer readable storage medium to which the present application relates includes Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The description of the related parts in the flow field numerical simulation data protection system, the device and the computer readable storage medium provided by the embodiment of the application is referred to in the detailed description of the corresponding parts in the flow field numerical simulation data protection method provided by the embodiment of the application, and is not repeated here. In addition, the parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of the corresponding technical solutions in the prior art, are not described in detail, so that redundant descriptions are avoided.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A flow field numerical simulation data protection method, characterized by comprising:
generating a first calculation continuation file storing target flow field characteristic information at the current calculation continuation file generation moment, wherein the target flow field characteristic information comprises flow field characteristic information generated by carrying out flow field numerical simulation on a simulation object;
judging whether the first calculation file is complete or not;
if the first calculation continuation file is complete, the first calculation continuation file is saved, and the saved second calculation continuation file is deleted;
if the first calculation continuation file is incomplete, judging whether to regenerate the first calculation continuation file, if the first calculation continuation file is regenerated, returning to the step of executing the first calculation continuation file for generating the storage target flow field characteristic information, and if the first calculation continuation file is not regenerated, storing the first calculation continuation file;
Judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object;
if the continuous calculation file of the simulation object is applied to carry out flow field numerical simulation on the simulation object, generating a target continuous calculation file based on the first continuous calculation file under the condition that only the first continuous calculation file is stored; generating a target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file under the condition that the first subsequent calculation file and the second subsequent calculation file are stored;
and carrying out flow field numerical simulation on the simulation object based on the target calculation file.
2. The method of claim 1, wherein the generating a target calculation file based on the first calculation file and the second calculation file comprises:
and transferring the data of the first subsequent calculation file to the same storage position in the second subsequent calculation file, and taking the updated second subsequent calculation file as the target subsequent calculation file.
3. The method of claim 1, wherein prior to performing flow field numerical simulation on the simulated object based on the target calculation file, further comprising:
Acquiring change information of a user on the target calculation continuing file;
and modifying the target calculation continuing file based on the modification information.
4. The method of claim 1, wherein generating the first calculation file storing the target flow field characteristic information comprises:
storing the target flow field characteristic information into a target variable according to a preset data writing sequence;
creating an empty file, writing the target variable into the empty file according to a target format, and generating the first calculation continuing file.
5. The method of claim 4, wherein generating the first calculation file storing the target flow field characteristic information further comprises:
generating a monitoring file of the first calculation continuation file, wherein the monitoring file is used for recording whether each data in the target flow field characteristic information is completely stored in the first calculation continuation file;
the judging whether the first subsequent calculation file is complete comprises the following steps:
judging whether each data in the target flow field characteristic information is completely stored in the first calculation continuation file or not based on the monitoring file;
if yes, judging that the first continuous calculation file is complete;
If not, judging that the first continuous calculation file is incomplete.
6. The method of claim 1, wherein after generating the target calculation file based on the first calculation file and the second calculation file, further comprising:
and storing the target calculation continuation file, and deleting the first calculation continuation file or the second calculation continuation file.
7. The method according to any one of claims 1 to 6, wherein the determining whether to apply the calculation file of the simulation object to perform flow field numerical simulation on the simulation object includes:
judging whether a restarting calculation instruction input by a user after terminating flow field numerical simulation is received or not;
if the restarting calculation instruction is received, judging that the continuous calculation file of the simulation object is applied to perform flow field numerical simulation on the simulation object;
and if the restarting calculation instruction is not received, judging that the continuous calculation file of the simulation object is not applied to perform flow field numerical simulation on the simulation object.
8. A flow field numerical simulation data protection system, comprising:
the generation module is used for generating a first calculation file for storing the target flow field characteristic information at the current calculation file generation moment, wherein the target flow field characteristic information comprises flow field characteristic information generated by carrying out flow field numerical simulation on a simulation object;
The integrity judging module is used for judging whether the first follow-up calculation file is complete or not; if the first calculation continuation file is complete, the first calculation continuation file is saved, and the saved second calculation continuation file is deleted; judging whether the first calculation continuation file is regenerated if the first calculation continuation file is incomplete, prompting a generating module to execute the step of generating the first calculation continuation file for storing the target flow field characteristic information if the first calculation continuation file is regenerated, and storing the first calculation continuation file if the first calculation continuation file is not regenerated;
the application judging module is used for judging whether to apply the continuous calculation file of the simulation object to perform flow field numerical simulation on the simulation object; if the continuous calculation file of the simulation object is applied to carry out flow field numerical simulation on the simulation object, generating a target continuous calculation file based on the first continuous calculation file under the condition that only the first continuous calculation file is stored; generating a target subsequent calculation file based on the first subsequent calculation file and the second subsequent calculation file under the condition that the first subsequent calculation file and the second subsequent calculation file are stored;
and the simulation module is used for carrying out flow field numerical simulation on the simulation object based on the target calculation file.
9. The system of claim 8, wherein the application determination module comprises:
the application judging unit is used for judging whether a restarting calculation instruction input by a user after the flow field numerical simulation is terminated is received or not; if the restarting calculation instruction is received, judging that the continuous calculation file of the simulation object is applied to perform flow field numerical simulation on the simulation object; and if the restarting calculation instruction is not received, judging that the continuous calculation file of the simulation object is not applied to perform flow field numerical simulation on the simulation object.
10. A flow field numerical simulation data protection apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the flow field numerical simulation data protection method according to any one of claims 1 to 7 when executing said computer program.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the flow field numerical simulation data protection method according to any one of claims 1 to 7.
CN202310989269.6A 2023-08-08 2023-08-08 Flow field numerical simulation data protection method, system, equipment and medium Active CN116738892B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310989269.6A CN116738892B (en) 2023-08-08 2023-08-08 Flow field numerical simulation data protection method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310989269.6A CN116738892B (en) 2023-08-08 2023-08-08 Flow field numerical simulation data protection method, system, equipment and medium

Publications (2)

Publication Number Publication Date
CN116738892A true CN116738892A (en) 2023-09-12
CN116738892B CN116738892B (en) 2023-10-20

Family

ID=87915348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310989269.6A Active CN116738892B (en) 2023-08-08 2023-08-08 Flow field numerical simulation data protection method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN116738892B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117875220A (en) * 2024-03-11 2024-04-12 中国空气动力研究与发展中心计算空气动力研究所 Data monitoring method, equipment and medium based on flow field numerical simulation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577547A (en) * 2017-08-08 2018-01-12 国家超级计算深圳中心(深圳云计算中心) A kind of urgent operation of High-Performance Computing Cluster continues calculation method and system
US20180205776A1 (en) * 2017-01-17 2018-07-19 Beijing Baidu Netcom Science And Technology Co., Ltd. Fault handling for computer nodes in stream computing system
CN108388748A (en) * 2018-03-12 2018-08-10 北京理工大学 Method is discontinuously calculated in a kind of detonation numerical simulation serial program
CN115796083A (en) * 2023-02-17 2023-03-14 中国空气动力研究与发展中心计算空气动力研究所 Helicopter flow field simulation method, device and equipment and readable storage medium
CN116542178A (en) * 2023-05-24 2023-08-04 中国空气动力研究与发展中心计算空气动力研究所 Constant flow numerical simulation method, device, equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180205776A1 (en) * 2017-01-17 2018-07-19 Beijing Baidu Netcom Science And Technology Co., Ltd. Fault handling for computer nodes in stream computing system
CN107577547A (en) * 2017-08-08 2018-01-12 国家超级计算深圳中心(深圳云计算中心) A kind of urgent operation of High-Performance Computing Cluster continues calculation method and system
CN108388748A (en) * 2018-03-12 2018-08-10 北京理工大学 Method is discontinuously calculated in a kind of detonation numerical simulation serial program
CN115796083A (en) * 2023-02-17 2023-03-14 中国空气动力研究与发展中心计算空气动力研究所 Helicopter flow field simulation method, device and equipment and readable storage medium
CN116542178A (en) * 2023-05-24 2023-08-04 中国空气动力研究与发展中心计算空气动力研究所 Constant flow numerical simulation method, device, equipment and medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
何磊 等: "国家数值风洞(NNW)软件自动化集成与测试平台设计与研发", 空气动力学学报, vol. 28, no. 06, pages 1158 - 1164 *
李伟伟: "面向叶轮机气动形状精细设计的伴随方法及其应用研究", 中国博士学位论文全文数据库 工程科技Ⅱ辑, no. 02, pages 039 - 3 *
王俊: "海量流场数据涡特征与关键瞬态提取研究", 中国优秀硕士学位论文全文数据库 基础科学辑, no. 01, pages 004 - 77 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117875220A (en) * 2024-03-11 2024-04-12 中国空气动力研究与发展中心计算空气动力研究所 Data monitoring method, equipment and medium based on flow field numerical simulation

Also Published As

Publication number Publication date
CN116738892B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN116738892B (en) Flow field numerical simulation data protection method, system, equipment and medium
CN111027164B (en) STAR-CCM+ based automatic simulation analysis method and device
JP6784003B2 (en) Methods, devices, computer-readable storage media, and programs for configuring collaborative simulations for integrated systems
JP2005010140A5 (en)
US9965574B2 (en) CAD-based initial surface geometry correction
US6195594B1 (en) Real-time planner for design
CN116227043B (en) Aircraft numerical simulation method, system, equipment and computer storage medium
US20090106002A1 (en) Process simulation framework
JP2005537539A (en) Method and apparatus for designing technical systems
KR20190139161A (en) Pre-step co-simulation method and device
CN113238995A (en) Calibration data updating method, storage medium and electronic equipment
CN114239216A (en) Modelica-based hot fluid medium simulation real-time method
CN111161424B (en) Determination method and determination device for three-dimensional map
CN114492251B (en) Low-speed flow field divergence processing method, device, equipment and medium in supercomputing environment
US10365557B2 (en) Compact OPC model generation using virtual data
CN110009742B (en) System and method for finite element mesh repair
CN115657467A (en) Wind power plant wake flow control optimization method, device, equipment and storage medium
JP4771822B2 (en) Numerical analysis mesh generation device, numerical analysis mesh generation method, numerical analysis mesh generation program
CN107844334B (en) Method and system for automatically configuring RCS of robot
CN111444618A (en) Simulation method and device based on variable dictionary
CN109670253B (en) Method for randomly and uniformly distributing two objects in specified rectangular area
CN117852315B (en) Method for determining initial conditions of computer-aided engineering and related device
CN114638030B (en) Thermal hydraulic model correction method and device based on expert knowledge base
CN116069676B (en) Version comparison method, device, terminal equipment and storage medium
CN112464395B (en) Method and device for calibrating physical model parameters of engine

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