CN115587552B - Grid optimization method and device, terminal equipment and storage medium - Google Patents
Grid optimization method and device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN115587552B CN115587552B CN202211588003.2A CN202211588003A CN115587552B CN 115587552 B CN115587552 B CN 115587552B CN 202211588003 A CN202211588003 A CN 202211588003A CN 115587552 B CN115587552 B CN 115587552B
- Authority
- CN
- China
- Prior art keywords
- flow field
- grid
- determining
- standard deviation
- divergence
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/28—Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
- G06T17/205—Re-meshing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2113/00—Details relating to the application field
- G06F2113/08—Fluids
Abstract
The application discloses a grid optimization method, a device, terminal equipment and a storage medium, wherein an initial space discrete grid corresponding to a model file is determined by acquiring the model file and according to the model file; determining a flow field result at the current moment according to preset flow parameters of a flow field and an initial space discrete grid; determining characteristic structure identification parameters of a preset area according to a flow field result at the current moment; according to the method, the initial space discrete grid is optimized according to the characteristic structure identification parameters, the self-adaptive technology is introduced, namely, the grid is automatically encrypted at the position where the flow field changes greatly in the flow field calculation process, the grid is dynamically optimized based on the flow field real-time calculation result, the high-precision capture of the flow field characteristics is guaranteed, and the grid distribution and the scale are reasonable.
Description
Technical Field
The present application belongs to the technical field of fluid mechanics, and in particular, relates to a grid optimization method, apparatus, terminal device, and storage medium.
Background
Mesh generation technology is an essential component of Computational Fluid Dynamics (CFD). The quality and distribution of the mesh are important factors in determining the accuracy and convergence of the calculation results.
To ensure the capture accuracy of the features in the flow field, a relatively dense grid needs to be arranged at the feature positions. Since these positions are often difficult to determine before the start of the flow calculation, they are generally reflected in the flow field results after the calculation, and if a denser grid is adopted for the global grid from the beginning, the grid amount is too large and the calculation resources are unnecessarily wasted.
Disclosure of Invention
The present application is intended to provide a method, an apparatus, a terminal device and a storage medium for grid optimization, so as to solve the deficiencies in the prior art, and the technical problem to be solved by the present application is realized by the following technical solution.
In a first aspect, an embodiment of the present application provides a mesh optimization method, where the method includes:
obtaining a model file, and determining an initial space discrete grid corresponding to the model file according to the model file;
determining a flow field result at the current moment according to preset flow parameters of a flow field and the initial space discrete grid;
determining characteristic structure identification parameters of a preset area according to the flow field result at the current moment;
and optimizing the initial space discrete grid according to the characteristic structure identification parameters.
Optionally, the determining a flow field result at the current time according to the preset flow parameters of the flow field and the initial spatial discrete grid includes:
calculating a flow field result at the current moment based on a flow control equation according to preset flow parameters of a flow field and the initial space discrete grid, wherein the preset flow parameters of the flow field at least comprise flow information and judgment information, the flow information at least comprises incoming flow speed, an attack angle, density, pressure and temperature, and the judgment information at least comprises calculation time, time step length and time step number.
Optionally, the determining, according to the flow field result at the current time, a feature structure identification parameter of a preset region includes:
calculating the temperature gradient, the speed divergence and the speed rotation of each grid unit of the initial space discrete grid according to the flow field result at the current moment;
respectively calculating the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation of the global grid;
and respectively determining characteristic structure identification parameters of preset areas of the internal flow field and the external flow field of the boundary layer according to the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation.
Optionally, determining a feature structure identification parameter of a preset region of the internal flow field of the boundary layer according to the temperature gradient standard deviation, the velocity divergence standard deviation and the velocity rotation standard deviation, including:
calculating the thickness of the boundary layer according to a boundary layer formula;
for the target grid cell, calculating the relative wall surface distance of the target grid cell;
comparing the thickness of the boundary layer with the wall surface distance, and determining whether the target grid unit is in the boundary layer according to the comparison result;
and if the target grid unit is arranged in the boundary layer, determining characteristic structure identification parameters of a heat flow area of an internal flow field of the boundary layer according to the temperature gradient of the target grid unit and the standard deviation of the temperature gradient of the global grid.
Optionally, the determining, according to the temperature gradient standard deviation, the velocity divergence standard deviation, and the velocity rotation standard deviation, a feature structure identification parameter of a preset region of an external flow field of the boundary layer includes:
calculating the average measurement value of the velocity divergence and the average measurement value of the rotation of the global grid;
calculating a speed divergence change measurement value and a speed rotation change measurement value of the target grid unit;
determining a speed divergence item self-adaptive criterion coefficient and a speed rotation item self-adaptive criterion coefficient of the target grid unit according to the speed divergence change metric value and the speed rotation change metric value of the target grid unit;
and determining characteristic structure identification parameters of a preset area of an external flow field of the boundary layer according to the speed divergence term adaptive criterion coefficient and the speed rotation term adaptive criterion coefficient of the target grid unit, wherein the preset area of the external flow field comprises a shock wave discontinuous area and a vortex structure area.
Optionally, the determining, according to the speed divergence term adaptive criterion coefficient and the speed rotation term adaptive criterion coefficient of the target grid unit, a feature structure identification parameter of a preset region of an external flow field of the boundary layer includes:
if the speed divergence term adaptive criterion coefficient is larger than the speed rotation term adaptive criterion coefficient, determining a characteristic structure identification parameter of the shock wave discontinuous area;
and if the speed divergence term adaptive criterion coefficient is smaller than the speed rotation term adaptive criterion coefficient, determining characteristic structure identification parameters of the vortex structure area.
In a second aspect, an embodiment of the present application provides a mesh optimization apparatus, including:
the acquisition module is used for acquiring a model file and determining an initial space discrete grid corresponding to the model file according to the model file;
the determining module is used for determining a flow field result at the current moment according to preset flow parameters of a flow field and the initial space discrete grid;
the calculation module is used for determining characteristic structure identification parameters of a preset area according to the flow field result at the current moment;
and the optimization module is used for optimizing the initial space discrete grid according to the characteristic structure identification parameters.
Optionally, the determining module is configured to:
calculating a flow field result at the current moment based on a flow control equation according to preset flow parameters of a flow field and the initial space discrete grid, wherein the preset flow parameters of the flow field at least comprise flow information and judgment information, the flow information at least comprises incoming flow speed, an attack angle, density, pressure and temperature, and the judgment information at least comprises calculation time, time step length and time step number.
Optionally, the computing module is configured to:
calculating the temperature gradient, the speed divergence and the speed rotation of each grid unit of the initial space discrete grid according to the flow field result at the current moment;
respectively calculating the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation of the global grid;
and respectively determining characteristic structure identification parameters of preset areas of the internal flow field and the external flow field of the boundary layer according to the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation.
Optionally, the computing module is configured to:
calculating the thickness of the boundary layer according to a boundary layer formula;
for the target grid cell, calculating the relative wall surface distance of the target grid cell;
comparing the thickness of the boundary layer with the wall surface distance, and determining whether the target grid unit is in the boundary layer according to the comparison result;
and if the target grid unit is positioned in the boundary layer, determining characteristic structure identification parameters of a heat flow area of an internal flow field of the boundary layer according to the temperature gradient of the target grid unit and the standard deviation of the temperature gradient of the global grid.
Optionally, the computing module is configured to:
calculating the average measurement value of the velocity divergence and the average measurement value of the rotation of the global grid;
calculating a speed divergence change measurement value and a speed rotation change measurement value of the target grid unit;
determining a speed divergence item self-adaptive criterion coefficient and a speed rotation item self-adaptive criterion coefficient of the target grid unit according to the speed divergence change metric value and the speed rotation change metric value of the target grid unit;
and determining characteristic structure identification parameters of a preset area of an external flow field of the boundary layer according to the speed divergence term adaptive criterion coefficient and the speed rotation term adaptive criterion coefficient of the target grid unit, wherein the preset area of the external flow field comprises a shock wave discontinuous area and a vortex structure area.
Optionally, the computing module is configured to:
if the speed divergence item adaptive criterion coefficient is larger than the speed rotation item adaptive criterion coefficient, determining characteristic structure identification parameters of the shock wave discontinuous area;
and if the speed divergence term self-adaptive criterion coefficient is smaller than the speed rotation term self-adaptive criterion coefficient, determining the characteristic structure identification parameter of the vortex structure area.
In a third aspect, an embodiment of the present application provides a terminal device, including: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the grid optimization method provided by the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed, implements the mesh optimization method provided in the first aspect.
The embodiment of the application has the following advantages:
according to the grid optimization method, the grid optimization device, the terminal equipment and the storage medium, the model file is obtained, and the initial space discrete grid corresponding to the model file is determined according to the model file; determining a flow field result at the current moment according to preset flow parameters of a flow field and an initial space discrete grid; determining characteristic structure identification parameters of a preset area according to a flow field result at the current moment; according to the method, the initial space discrete grid is optimized according to the characteristic structure identification parameters, the self-adaptive technology is introduced, namely, the grid is automatically encrypted at the position where the flow field changes greatly in the flow field calculation process, the grid is dynamically optimized based on the flow field real-time calculation result, the high-precision capture of the flow field characteristics is guaranteed, and the grid distribution and the scale are reasonable.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present application, the drawings used in the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments described in the present application, and that other drawings can be obtained by those skilled in the art without inventive labor.
FIG. 1 is a flowchart of a grid optimization method according to an embodiment of the present application;
FIG. 2 is a flowchart of another grid optimization method according to an embodiment of the present application;
FIG. 3 is a block diagram of an embodiment of a mesh optimization device according to the present application;
fig. 4 is a schematic structural diagram of a terminal device of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following embodiments and accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
An embodiment of the present application provides a mesh optimization method, which is used for performing optimization processing on a mesh unit. The execution subject of this embodiment is a mesh optimization apparatus, and is disposed on a terminal device, for example, the terminal device at least includes a computer terminal and the like.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a mesh optimization method of the present application is shown, where the method may specifically include the following steps:
s101, obtaining a model file, and determining an initial space discrete grid corresponding to the model file according to the model file;
specifically, the terminal device obtains a model file, and determines an initial spatial discrete grid corresponding to the model file according to the model file.
Initial space discrete grid generation mode: setting and calculating the domain size, the coordinate and the initial grid size according to the geometric characteristic size; setting a minimum grid size and a maximum encryption frequency Nm according to the flow parameters and the geometric characteristic size; an initial spatially discrete grid is generated.
S102, determining a flow field result at the current moment according to preset flow parameters of a flow field and an initial space discrete grid;
specifically, the terminal device sets flow parameters of the flow field in advance, for example, sets flow parameters (incoming flow speed, angle of attack, density, pressure, temperature, etc.); setting calculation time, time step length and time step number.
And the terminal equipment calculates a flow field result at the current moment based on a flow control equation (Navier-Stokes equation) according to preset flow parameters and the initial space discrete grid.
S103, determining characteristic structure identification parameters of a preset area according to a flow field result at the current moment;
specifically, the preset area at least comprises a shock wave discontinuity area, a vortex area and a high heat flow area, and the terminal equipment determines characteristic structure identification parameters of different areas according to a current flow field result.
And S104, optimizing the initial space discrete grid according to the characteristic structure identification parameters.
Specifically, the terminal device determines what type of region is according to the calculated feature structure identification parameters, judges the feature structure identification parameters of various different regions, and performs self-adaptation and dynamic optimization on the constructed initial space discrete grid. In a specific implementation process, whether the self-adaptive detection and judgment of all grid cells are finished or not is judged until the detection of all grid cells at the current time is finished.
According to the grid optimization method provided by the embodiment of the application, the model file is obtained, and the initial space discrete grid corresponding to the model file is determined according to the model file; determining a flow field result at the current moment according to preset flow parameters of a flow field and an initial space discrete grid; determining characteristic structure identification parameters of a preset area according to a flow field result at the current moment; according to the method, the initial space discrete grid is optimized according to the characteristic structure identification parameters, the self-adaptive technology is introduced, namely, the grid is automatically encrypted at the position where the flow field changes greatly in the flow field calculation process, the grid is dynamically optimized based on the flow field real-time calculation result, the high-precision capture of the flow field characteristics is guaranteed, and the grid distribution and the scale are reasonable.
The present application further provides a supplementary description of the mesh optimization method provided in the foregoing embodiment.
Optionally, determining a flow field result at the current time according to a preset flow parameter of the flow field and the initial spatial discrete grid, including:
and calculating a flow field result at the current moment based on a flow control equation according to preset flow parameters of the flow field and the initial space discrete grid, wherein the preset flow parameters of the flow field at least comprise flow information and judgment information, the flow information at least comprises incoming flow speed, attack angle, density, pressure and temperature, and the judgment information at least comprises calculation time, time step length and time step number.
Optionally, determining a feature structure identification parameter of the preset region according to the flow field result at the current time includes:
calculating the temperature gradient, the speed divergence and the speed rotation of each grid unit of the initial space discrete grid according to the flow field result at the current moment;
respectively calculating the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation of the global grid;
and respectively determining characteristic structure identification parameters of preset areas of the internal flow field and the external flow field of the boundary layer according to the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation.
Optionally, determining a characteristic structure identification parameter of a preset region of the internal flow field of the boundary layer according to the temperature gradient standard deviation, the velocity divergence standard deviation and the velocity rotation standard deviation, including:
calculating the thickness of the boundary layer according to a boundary layer formula;
for the target grid cell, calculating the relative wall surface distance of the target grid cell;
comparing the thickness of the boundary layer with the wall surface distance, and determining whether the target grid unit is in the boundary layer or not according to the comparison result;
and if the target grid unit is positioned in the boundary layer, determining the characteristic structure identification parameter of the heat flow area of the internal flow field of the boundary layer according to the temperature gradient of the target grid unit and the standard deviation of the temperature gradient of the global grid.
Optionally, determining a feature structure identification parameter of a preset region of the external flow field of the boundary layer according to the temperature gradient standard deviation, the velocity divergence standard deviation and the velocity rotation standard deviation, including:
calculating the average measurement value of the velocity divergence and the average measurement value of the rotation of the global grid;
calculating a speed divergence change measurement value and a speed rotation change measurement value of the target grid unit;
determining a speed divergence item self-adaptive criterion coefficient and a speed rotation item self-adaptive criterion coefficient of the target grid unit according to the speed divergence change metric value and the speed rotation change metric value of the target grid unit;
and determining characteristic structure identification parameters of a preset area of an external flow field of the boundary layer according to the speed divergence term adaptive criterion coefficient and the speed rotation term adaptive criterion coefficient of the target grid unit, wherein the preset area of the external flow field comprises a shock wave discontinuous area and a vortex structure area.
Optionally, determining a feature structure identification parameter of a preset area of an external flow field of the boundary layer according to the speed divergence term adaptive criterion coefficient and the speed rotation term adaptive criterion coefficient of the target grid unit, including:
if the speed divergence term adaptive criterion coefficient is larger than the speed rotation term adaptive criterion coefficient, determining characteristic structure identification parameters of the shock wave discontinuous area;
if the self-adaptive criterion coefficient of the speed divergence term is smaller than the self-adaptive criterion coefficient of the speed rotation term, determining
The characteristic structure of the vortex structure region identifies a parameter.
Fig. 2 is a flowchart of another grid optimization method in an embodiment of the present application, and as shown in fig. 2, the method includes a model importing and parameter setting stage, an initial grid generating stage, a flow field calculating stage, a dynamic adaptive process stage, and a calculation end determining stage; wherein the content of the first and second substances,
model import and parameter setting stage:
1) Model surface mesh generation and preprocessing:
(a) And importing a model file to generate a discrete grid of the model surface.
(b) Setting calculation parameters:
flow parameters (incoming flow velocity, angle of attack, density, pressure, temperature, etc.) are set.
Setting calculation time, time step length and time step number;
setting the maximum encryption times;
an initial grid generation stage:
2) Initial spatial grid generation:
(c) Setting calculation domain size and coordinates according to geometric characteristic size and initial grid size
(d) Setting the minimum grid size and the maximum encryption times Nm according to the flow parameters and the geometric characteristic size
(e) Generating an initial spatially discrete grid
And a flow field calculation stage:
3) And calculating to obtain a current-time flow field result based on a flow control equation (Navier-Stokes equation) according to the flow parameters and the space grid.
Dynamic adaptive process stage:
4) According to the flow field calculation result, typical characteristic structure identification parameters such as shock wave discontinuity, vortex, high heat flow area and the like are calculated, characteristic criterion coefficients are automatically constructed, and grid self-adaption and dynamic optimization are carried out. The method specifically comprises the following steps:
step A1, calculating the temperature gradient of each grid unitThe speed divergence->The speed rotation degree is greater or less>;
(whereinlIs the average value of the unit side length; the cell represents the current grid cell;Tit is the temperature that is set for the purpose,Uis the speed; a is constant, two-dimensional, a =2, three-dimensional, a = 3)
Step A2, respectively calculating the temperature gradient standard deviation of the global gridThe standard deviation of the speed divergence->Standard deviation of speed rotation->;
(N is the current grid cell number)
Step A3, calculating the thickness Hb of a boundary layer according to a boundary layer formula;
step A4, calculating a relative wall surface distance Hcell aiming at a target grid cell;
step A5, determining whether the grid is in the boundary layer or not by comparing Hb and Hcell;
step A6, if Hb is smaller than Hcell, calculating an average measurement value AD of the speed divergence of the whole grid and an average measurement value AR of the speed rotation;
a7, calculating a speed divergence change measurement value KD and a speed rotation change measurement value KR of the grid unit;
identifying and carrying out grid self-adaptive encryption on the area with larger heat flow in the boundary layer: the boundary layer is a viscous thin layer area close to the wall surface, and has higher requirement on the grid quality. If the heat flow in the boundary layer is larger, a denser grid is needed to ensure the heat flow calculation accuracy. Therefore, the calculation and detection of the degree of change of the grid temperature gradient in the boundary layer are performed first, and the resolution and grid density of the grid for the high heat flow region are ensured. The method comprises the following specific steps: (1) firstly, calculating the thickness Hb of a boundary layer according to a boundary layer formula; (2) then, calculating a relative wall surface distance Hcell aiming at the target grid cell; (3) determining whether the grid is in the boundary layer or not by comparing Hb and Hcell, if so, performing the next step, otherwise, performing the step 106; (4) by comparing the temperature gradients of the grid cellsAnd a standard deviation of temperature gradient of the global grid +>If the temperature gradient change is large and the grid does not reach the maximum encryption frequency, encrypting the grid unit, and then performing the step A11; otherwise, directly performing the step A11.
Step A8, respectively calculating self-adaptive criterion coefficients of grid unit speed divergence itemsAnd speed rotation adaptive criterion coefficient>;
Identifying and carrying out grid self-adaptation on typical flow field characteristics such as boundary layer external shock wave discontinuity, vortex structure and the like: the intermittent characteristics of the shock wave can be identified through the speed divergence, and the vortex structure can be identified through the speed rotation. In order to automatically match the criterion coefficients, the average value of the speed divergence and the rotation divergence of the whole grid needs to be calculated, and the flow leading characteristics and the coefficients of the self-adaptive criterion of the divergence term and the rotation divergence term are determined according to the change degree of the speed divergence and the rotation divergence of the target grid unit relative to the average value. The method comprises the following specific steps: (1) calculating the average metric value of the velocity divergence and the rotation of the whole grid:
(2) calculating a grid cell speed divergence change metric KD and a speed rotation change metric KR
(3) Self-adaptive criterion coefficient for calculating grid unit speed divergence termAnd speed rotation adaptive criterion coefficient>: if yes/H>>/>The shock break characteristic corresponding to the velocity divergence dominates, for which a finer capture is required, the criterion coefficient->=/>//>(ii) a The flow field vortex structure corresponding to the speed rotation degree plays a secondary role, the capturing fineness of the characteristics is lower, and the criterion coefficient->=/>//>;
Step A9, temperature gradientDegree of rotationAnd the standard deviation of the divergence of velocities->And if the first preset condition is met, encrypting the target grid unit.
Step A10, if the temperature gradientAnd a speed divergence standard deviation>If the second preset condition is met, the target grid unit is coarsened;
(1) when the first predetermined condition(s) is satisfied(s) according to the above-determined criterion coefficient>a1 SD or +>>a2 SR), which indicates that the grid velocity divergence or the rotation is large, the grid is positioned near the shock wave discontinuity or vortex structure, and when the grid does not reach the maximum encryption times, encryption is required, and then step 106 is performed; if the criterion condition is not met, the next step is carried out; (2) when a second predetermined condition (` pre `) is fulfilled>Less than 0.1 a1 SD or->Less than 0.1 × a2 × sr), which indicates that the grid speed or rotation change is small, the position is not in the feature structure region, and coarsening is required;
and a calculation end judgment stage:
step A11, judging whether the grid unit is traversed and ended;
judging whether the self-adaptive detection and judgment of all grid cells are finished or not, and if so, carrying out the next step; if not, the next grid unit is carried out, and the steps are repeated until all the grid unit detection at the current time is finished.
And step A12, if yes, judging whether the set calculation time step number is reached, if yes, outputting a result, and finishing the calculation. The next time step is performed and the above steps are repeated until the set time step is reached.
Currently, the commonly used adaptive techniques mainly include two types: one is to solve global control equations (e.g., adjoint equations), which are relatively computationally intensive; and another method is to construct characteristic criteria (such as gradient criteria, entropy increase criteria and the like) aiming at local characteristics of a flow field, and the calculation amount of the method is relatively small, but the method usually depends on manual setting of criterion coefficients. For example, in the cartesian grid adaptive process, the criteria such as speed divergence, rotation degree, gradient and the like are often adopted, the criterion coefficient is basically set manually, and the method has strong experience, and in the flow problem of different characteristics, repeated debugging is needed according to specific characteristics, so that a lot of time and manpower are wasted.
The embodiment of the application provides a grid self-adaptive automatic controller based on flow field data, which can automatically construct criterion coefficients aiming at local characteristics, dynamically optimize in the flow field calculation process, has small calculated amount and high automation degree, and can automatically capture shock wave discontinuity, vortex structures, high heat flow areas and the like and realize grid self-adaptation.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
According to the grid optimization method provided by the embodiment of the application, the model file is obtained, and the initial space discrete grid corresponding to the model file is determined according to the model file; determining a flow field result at the current moment according to preset flow parameters of a flow field and an initial space discrete grid; determining characteristic structure identification parameters of a preset area according to a flow field result at the current moment; according to the method, the initial space discrete grid is optimized according to the characteristic structure identification parameters, the self-adaptive technology is introduced, namely, the grid is automatically encrypted at the position where the flow field changes greatly in the flow field calculation process, the grid is dynamically optimized based on the flow field real-time calculation result, the high-precision capture of the flow field characteristics is guaranteed, and the grid distribution and the scale are reasonable.
Another embodiment of the present application provides a mesh optimization apparatus, configured to perform the mesh optimization method provided in the foregoing embodiment.
Referring to fig. 3, a block diagram of a structure of an embodiment of a mesh optimization device of the present application is shown, where the device may specifically include the following modules: an obtaining module 301, a determining module 302, a calculating module 303 and an optimizing module 304, wherein:
the obtaining module 301 is configured to obtain a model file, and determine an initial spatial discrete grid corresponding to the model file according to the model file;
the determining module 302 is configured to determine a flow field result at a current moment according to a preset flow parameter of a flow field and an initial spatial discrete grid;
the calculation module 303 is configured to determine a feature structure identification parameter of the preset region according to a flow field result at the current time;
the optimization module 304 is configured to optimize the initial spatial discrete grid according to the feature structure identification parameter.
The mesh optimization device provided by the embodiment of the application determines the initial spatial discrete mesh corresponding to the model file by acquiring the model file and according to the model file; determining a flow field result at the current moment according to preset flow parameters of a flow field and an initial space discrete grid; determining characteristic structure identification parameters of a preset area according to a flow field result at the current moment; according to the method, the initial space discrete grid is optimized according to the characteristic structure identification parameters, the self-adaptive technology is introduced, namely, the grid is automatically encrypted at the position where the flow field changes greatly in the flow field calculation process, the grid is dynamically optimized based on the flow field real-time calculation result, the high-precision capture of the flow field characteristics is guaranteed, and the grid distribution and the scale are reasonable.
The present application further provides a supplementary description of the mesh optimization apparatus provided in the foregoing embodiment.
Optionally, the determining module is configured to:
and calculating a flow field result at the current moment based on a flow control equation according to preset flow parameters of a flow field and an initial space discrete grid, wherein the preset flow parameters of the flow field at least comprise flow information and judgment information, the flow information at least comprises incoming flow speed, an attack angle, density, pressure and temperature, and the judgment information at least comprises calculation time, time step and time step number.
Optionally, the calculation module is configured to:
calculating the temperature gradient, the speed divergence and the speed rotation of each grid unit of the initial space discrete grid according to the flow field result at the current moment;
respectively calculating the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation of the global grid;
and respectively determining characteristic structure identification parameters of preset areas of the internal flow field and the external flow field of the boundary layer according to the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation.
Optionally, the calculation module is configured to:
calculating the thickness of the boundary layer according to a boundary layer formula;
for the target grid cell, calculating the relative wall surface distance of the target grid cell;
comparing the thickness of the boundary layer with the wall surface distance, and determining whether the target grid unit is in the boundary layer or not according to the comparison result;
and if the target grid unit is positioned in the boundary layer, determining the characteristic structure identification parameter of the heat flow area of the internal flow field of the boundary layer according to the temperature gradient of the target grid unit and the standard deviation of the temperature gradient of the global grid.
Optionally, the calculation module is configured to:
calculating the average measurement value of the velocity divergence and the average measurement value of the rotation of the global grid;
calculating a speed divergence change measurement value and a speed rotation change measurement value of the target grid unit;
determining a speed divergence item self-adaptive criterion coefficient and a speed rotation item self-adaptive criterion coefficient of the target grid unit according to the speed divergence change metric value and the speed rotation change metric value of the target grid unit;
and determining characteristic structure identification parameters of a preset area of an external flow field of the boundary layer according to the speed divergence term adaptive criterion coefficient and the speed rotation term adaptive criterion coefficient of the target grid unit, wherein the preset area of the external flow field comprises a shock wave discontinuous area and a vortex structure area.
Optionally, the calculation module is configured to:
if the speed divergence term adaptive criterion coefficient is larger than the speed rotation term adaptive criterion coefficient, determining a characteristic structure identification parameter of the shock wave discontinuous area;
and if the speed divergence term self-adaptive criterion coefficient is smaller than the speed rotation term self-adaptive criterion coefficient, determining characteristic structure identification parameters of the vortex structure area.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The mesh optimization device provided by the embodiment of the application determines the initial spatial discrete mesh corresponding to the model file by acquiring the model file and according to the model file; determining a flow field result at the current moment according to preset flow parameters of a flow field and an initial space discrete grid; determining characteristic structure identification parameters of a preset area according to a flow field result at the current moment; according to the method, the initial space discrete grid is optimized according to the characteristic structure identification parameters, the self-adaptive technology is introduced, namely, the grid is automatically encrypted at the position where the flow field changes greatly in the flow field calculation process, the grid is dynamically optimized based on the flow field real-time calculation result, the high-precision capture of the flow field characteristics is guaranteed, and the grid distribution and the scale are reasonable.
A further embodiment of the present application provides a terminal device, configured to execute the mesh optimization method provided in the foregoing embodiment.
Fig. 4 is a schematic structural diagram of a terminal device according to the present application, and as shown in fig. 4, the terminal device includes: at least one processor 401 and memory 402;
the memory stores a computer program; at least one processor executes a computer program stored in a memory to implement the grid optimization method provided by the above-described embodiments.
In the terminal device provided by this embodiment, an initial spatial discrete grid corresponding to a model file is determined by obtaining the model file and according to the model file; determining a flow field result at the current moment according to preset flow parameters of a flow field and an initial space discrete grid; determining characteristic structure identification parameters of a preset area according to a flow field result at the current moment; according to the method, the initial space discrete grid is optimized according to the characteristic structure identification parameters, the self-adaptive technology is introduced, namely, the grid is automatically encrypted at the position where the flow field changes greatly in the flow field calculation process, the grid is dynamically optimized based on the flow field real-time calculation result, the high-precision capture of the flow field characteristics is guaranteed, and the grid distribution and the scale are reasonable.
Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the method for grid optimization provided in any of the above embodiments is implemented.
According to the computer-readable storage medium of the embodiment, the model file is obtained, and the initial space discrete grid corresponding to the model file is determined according to the model file; determining a flow field result at the current moment according to preset flow parameters of a flow field and an initial space discrete grid; determining characteristic structure identification parameters of a preset area according to a flow field result at the current moment; according to the method, the initial space discrete grid is optimized according to the characteristic structure identification parameters, the self-adaptive technology is introduced, namely, the grid is automatically encrypted at the position where the flow field changes greatly in the flow field calculation process, the grid is dynamically optimized based on the flow field real-time calculation result, the high-precision capture of the flow field characteristics is guaranteed, and the grid distribution and the scale are reasonable.
It should be noted that the above detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular is intended to include the plural unless the context clearly dictates otherwise. Furthermore, it will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than those illustrated or otherwise described herein.
Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, article, or apparatus.
For ease of description, spatially relative terms such as "over 8230 \ 8230;,"' over 8230;, \8230; upper surface "," above ", etc. may be used herein to describe the spatial relationship of one device or feature to another device or feature as shown in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if a device in the figures is turned over, devices described as "above" or "on" other devices or configurations would then be oriented "below" or "under" the other devices or configurations. Thus, the exemplary terms "at 8230; \8230; 'above" may include both orientations "at 8230; \8230;' above 8230; 'at 8230;' below 8230;" above ". The device may also be oriented in other different ways, such as by rotating it 90 degrees or at other orientations, and the spatially relative descriptors used herein interpreted accordingly.
In the foregoing detailed description, reference is made to the accompanying drawings, which form a part hereof. In the drawings, like numerals typically identify like components, unless context dictates otherwise. The illustrated embodiments described in the detailed description, drawings, and claims are not meant to be limiting. Other embodiments may be utilized, and other changes may be made, without departing from the spirit or scope of the subject matter presented here.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (9)
1. A method of mesh optimization, the method comprising:
obtaining a model file, and determining an initial space discrete grid corresponding to the model file according to the model file;
determining a flow field result at the current moment according to preset flow parameters of a flow field and the initial space discrete grid;
determining feature structure identification parameters of a preset area according to the flow field result at the current moment, wherein the feature structure identification parameters comprise: calculating each grid list of the initial space discrete grid according to the flow field result of the current moment
Temperature gradient, velocity divergence and velocity rotation of the elements;
respectively calculating the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation of the global grid; respectively determining the standard deviation of the temperature gradient, the standard deviation of the velocity divergence and the standard deviation of the velocity rotation according to the standard deviation of the temperature gradient, the standard deviation of the velocity divergence and the standard deviation of the velocity rotation
Identifying parameters of characteristic structures of preset areas of an internal flow field and an external flow field of the boundary layer; and optimizing the initial space discrete grid according to the characteristic structure identification parameters.
2. The method according to claim 1, wherein the determining the flow field result at the current time according to the flow parameters of the preset flow field and the initial spatially discrete grid comprises:
calculating a flow field result at the current moment based on a flow control equation according to preset flow parameters of a flow field and the initial space discrete grid, wherein the preset flow parameters of the flow field at least comprise flow information and judgment information, the flow information at least comprises incoming flow speed, an attack angle, density, pressure and temperature, and the judgment information at least comprises calculation time, time step length and time step number.
3. The method according to claim 1, wherein the determining the characteristic structure identification parameter of the preset region of the internal flow field of the boundary layer according to the temperature gradient standard deviation, the velocity divergence standard deviation and the velocity rotation standard deviation comprises:
calculating the thickness of the boundary layer according to a boundary layer formula;
for the target grid cell, calculating the relative wall surface distance of the target grid cell;
comparing the thickness of the boundary layer with the wall surface distance, and determining whether the target grid unit is in the boundary layer according to the comparison result;
and if the target grid unit is arranged in the boundary layer, determining characteristic structure identification parameters of a heat flow area of an internal flow field of the boundary layer according to the temperature gradient of the target grid unit and the standard deviation of the temperature gradient of the global grid.
4. The method according to claim 1, wherein the determining the characteristic structure identification parameter of the preset region of the external flow field of the boundary layer according to the temperature gradient standard deviation, the velocity divergence standard deviation and the velocity rotation standard deviation comprises:
calculating the average measurement value of the velocity divergence and the average measurement value of the rotation of the global grid;
calculating a speed divergence change measurement value and a speed rotation change measurement value of the target grid unit;
determining a speed divergence item self-adaptive criterion coefficient and a speed rotation item self-adaptive criterion coefficient of the target grid unit according to the speed divergence change metric value and the speed rotation change metric value of the target grid unit;
according to the speed divergence term self-adaptive criterion coefficient and the speed rotation term self-adaptation of the target grid unit
And determining a characteristic structure identification parameter of a preset area of an external flow field of the boundary layer by using a criterion coefficient, wherein the preset area of the external flow field comprises a shock wave discontinuous area and a vortex structure area.
5. The method according to claim 4, wherein the determining feature structure identification parameters of the preset region of the external flow field of the boundary layer according to the velocity divergence term adaptive criterion coefficient and the velocity rotation term adaptive criterion coefficient of the target grid cell comprises:
if the speed divergence term adaptive criterion coefficient is larger than the speed rotation term adaptive criterion coefficient, determining a characteristic structure identification parameter of the shock wave discontinuous area;
and if the speed divergence term self-adaptive criterion coefficient is smaller than the speed rotation term self-adaptive criterion coefficient, determining the characteristic structure identification parameter of the vortex structure area.
6. A mesh optimization apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a model file and determining an initial space discrete grid corresponding to the model file according to the model file;
the determining module is used for determining the flow field result at the current moment according to the preset flow parameters of the flow field and the initial space discrete grid;
the calculation module is used for determining characteristic structure identification parameters of a preset area according to the flow field result at the current moment, and comprises the following steps:
calculating the temperature gradient, the speed divergence and the speed rotation of each grid unit of the initial space discrete grid according to the flow field result at the current moment;
respectively calculating the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation of the global grid;
respectively determining characteristic structure identification parameters of preset areas of an internal flow field and an external flow field of the boundary layer according to the temperature gradient standard deviation, the speed divergence standard deviation and the speed rotation standard deviation;
and the optimization module is used for optimizing the initial space discrete grid according to the characteristic structure identification parameters.
7. The apparatus of claim 6, wherein the determining module is configured to:
calculating the flow field result of the current moment based on a flow control equation according to preset flow parameters of the flow field and the initial space discrete grid, wherein the preset flow parameters of the flow field at least
The flow information at least comprises inflow speed, attack angle, density, pressure and temperature, and the judgment information at least comprises calculation time, time step length and time step number.
8. A terminal device, comprising: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the memory-stored computer program to implement the mesh optimization method of any of claims 1-5.
9. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when executed, implements the grid optimization method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211588003.2A CN115587552B (en) | 2022-12-12 | 2022-12-12 | Grid optimization method and device, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211588003.2A CN115587552B (en) | 2022-12-12 | 2022-12-12 | Grid optimization method and device, terminal equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115587552A CN115587552A (en) | 2023-01-10 |
CN115587552B true CN115587552B (en) | 2023-03-28 |
Family
ID=84783233
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211588003.2A Active CN115587552B (en) | 2022-12-12 | 2022-12-12 | Grid optimization method and device, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115587552B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116052820B (en) * | 2023-03-22 | 2023-06-02 | 中国空气动力研究与发展中心计算空气动力研究所 | Material thermal performance evaluation method, device, equipment and readable storage medium |
CN116432563A (en) * | 2023-06-13 | 2023-07-14 | 中国空气动力研究与发展中心计算空气动力研究所 | Method, device, terminal equipment and storage medium for processing space grid |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017084105A1 (en) * | 2015-11-20 | 2017-05-26 | 田川 | System and method for numerical simulation of plasma discharges |
CN114996858A (en) * | 2022-07-14 | 2022-09-02 | 中国空气动力研究与发展中心计算空气动力研究所 | Aircraft simulation method and device, terminal equipment and storage medium |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102043887A (en) * | 2010-12-31 | 2011-05-04 | 中国航空工业集团公司第六三一研究所 | Grid self-adaptive method based on error estimation |
CN104331584B (en) * | 2014-11-28 | 2017-06-23 | 北京航空航天大学 | A kind of two-dimentional hybrid grid automatic generating method calculated towards boundary-layer |
CN109461209B (en) * | 2018-10-11 | 2022-06-07 | 中国空气动力研究与发展中心计算空气动力研究所 | Novel structural grid generation method |
CN109783965B (en) * | 2019-01-25 | 2022-08-02 | 中国空气动力研究与发展中心计算空气动力研究所 | Automatic block encryption method for structural grid |
US11645433B2 (en) * | 2019-06-11 | 2023-05-09 | Dassault Systemes Simulia Corp. | Computer simulation of physical fluids on irregular spatial grids stabilized for explicit numerical diffusion problems |
CN110795869B (en) * | 2020-01-06 | 2020-04-07 | 中国人民解放军国防科技大学 | Numerical calculation method and device for flow field data |
CN112818573B (en) * | 2021-01-26 | 2022-06-14 | 北京理工大学 | Method for acquiring boundary layer non-local variable information for unstructured grid |
CN112699623B (en) * | 2021-03-24 | 2021-05-25 | 中国空气动力研究与发展中心计算空气动力研究所 | High-precision heat flow calculation method based on unstructured grid regularized reconstruction technology |
CN113505443B (en) * | 2021-09-09 | 2021-12-14 | 南京航空航天大学 | Self-adaptive Cartesian grid generation method for three-dimensional streaming problem with any shape |
CN115270378B (en) * | 2022-09-28 | 2022-12-30 | 中国空气动力研究与发展中心计算空气动力研究所 | Method for generating bow-shaped shock wave external field grid |
-
2022
- 2022-12-12 CN CN202211588003.2A patent/CN115587552B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017084105A1 (en) * | 2015-11-20 | 2017-05-26 | 田川 | System and method for numerical simulation of plasma discharges |
CN114996858A (en) * | 2022-07-14 | 2022-09-02 | 中国空气动力研究与发展中心计算空气动力研究所 | Aircraft simulation method and device, terminal equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115587552A (en) | 2023-01-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115587552B (en) | Grid optimization method and device, terminal equipment and storage medium | |
CN115470511B (en) | Cartesian grid generation method and device suitable for multi-component model | |
JP4418390B2 (en) | Three-dimensional shape processing apparatus, curved surface generation program and method | |
CN110458772B (en) | Point cloud filtering method and device based on image processing and storage medium | |
Liu et al. | Constant scallop-height tool path generation for three-axis discrete data points machining | |
CN105631939B (en) | A kind of three-dimensional point cloud distortion correction method and its system based on curvature filtering | |
CN104217433A (en) | Method and device for analyzing image | |
CN108876758A (en) | Face identification method, apparatus and system | |
CN115937167A (en) | Method and device for detecting defects of battery pole piece ceramic and electronic equipment | |
CN109684723A (en) | A kind of two-dimensional structure internal acoustic method for analyzing performance | |
CN112330595A (en) | Tripwire detection method and device, electronic equipment and storage medium | |
CN111553983A (en) | Three-dimensional space modeling method, device, equipment and medium for reducing explosion site | |
CN113033578A (en) | Image calibration method, system, terminal and medium based on multi-scale feature matching | |
CN114004952A (en) | Data processing method of point cloud with high-density noise based on statistical manifold curvature | |
Ziel et al. | Comparison of 2D boundary curving methods with modal shape functions and a piecewise linear target mesh | |
Antani et al. | Mesh sizing with additively weighted Voronoi diagrams | |
Bian et al. | Topology recovery technique for complex freeform surface model after local geometry repair | |
JP4622987B2 (en) | Tool reference plane data creation device and creation method | |
CN110264531A (en) | A kind of catching for X-comers takes method, apparatus, system and readable storage medium storing program for executing | |
CN105357411B (en) | The method and device of detection image quality | |
Song et al. | Automatic detection of tangential discontinuities in point cloud data | |
CN117272874B (en) | Flow field calculation method, flow field calculation device, terminal equipment and medium | |
CN116071429B (en) | Method and device for identifying outline of sub-pattern, electronic equipment and storage medium | |
WO2023143110A1 (en) | Method for solving partial differential equation and related device | |
CN111507896B (en) | Image liquefaction processing method, device, equipment and storage medium |
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 |