A hierarchical program processing method for solving the NS equations using aerodynamic characteristics evaluation

Through layered programming and class-level construction, it solves the repetitive work and scalability problems in traditional CFD software development, achieves a complete description and numerical solution of the N-S equation, and improves the maintainability and scalability of the software. , supports multi-person collaborative development and algorithm expansion.

CN114925633BActive Publication Date: 2024-10-18AVIC SHENYANG AERODYNAMICS RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210667527.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2024-10-18
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

Traditional CFD software program development involves a large amount of repetitive work involving functional changes and process reengineering. It lacks easy maintenance and scalability, and is difficult to adapt to future algorithm and technology needs.

Method used

Using a hierarchical programming method, N-S equations are solved by constructing different levels of classes, isolating the impact of local function expansion on the entire program, and providing a basis for multi-person collaborative development and algorithm expansion, including the creation of aerodynamic evaluation program framework and data initialization , double-layer time iteration, multi-grid calculation and boundary condition update and other steps.

Benefits of technology

It achieves a complete description of the discrete and numerical solution of N-S equations, reduces repetitive work, improves the maintainability and scalability of the software, and supports the design and development of large-scale parallel CFD software platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925633B_ABST
    Figure CN114925633B_ABST
Patent Text Reader

Abstract

The present invention proposes a hierarchical program processing method for solving N‑S equations by applying aerodynamic characteristics evaluation, and belongs to the technical field of numerical calculation of aerodynamics. The method comprises the following steps: S1. Creating a program framework; S2. Creating a parameter file class object from a file to obtain the conditions and control parameters required for calculation; S3. Creating a grid class object from a file; S4. Creating a solver class object to start flow field calculation; S5. The program ends. The present invention adopts a hierarchical software architecture design concept, and solves a large number of repetitive work technical problems of functional changes and process reengineering in the development of traditional CFD software programs by constructing classes at different levels for the N‑S equations, and realizes the design and development of a large-scale parallel CFD software platform with easy maintainability and scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a method for designing a program for evaluating application startup characteristics, and more particularly to a hierarchical program processing method, electronic equipment and storage medium for solving NS equations for evaluating application aerodynamic characteristics, and belongs to the technical field of numerical calculation of aerodynamics. Background Art

[0002] Computational Fluid Dynamics (CFD) software for solving NS equations has gradually become the core software for aerodynamic performance evaluation in aircraft design. It complements wind tunnel tests and provides basic technical support for aircraft development. Although my country has carried out a lot of work in CFD theoretical research and software development, the CFD software results that can be used for aircraft development in the industrial sector are relatively simple and are still in the development stage. It is an inevitable development trend to carry out self-developed CFD software development.

[0003] The construction of the overall architecture of modern CFD software needs to ensure that it is easy to maintain and scalable. Easy maintainability requires that the software platform can adapt to future improvements in basic algorithms and general module functions, the cost of software updates and maintenance, and the enhancement of special computing functions. Scalability requires that the software architecture can adapt to the current CFD numerical simulation requirements while also adapting to the foreseeable future development needs of special CFD numerical simulation technology.

[0004] Hierarchical program architecture design guarantees the maintainability and extensibility of software and is a commonly used design method in the current industrial computing software development. Hierarchical development code design encourages code reuse and strives to develop shared toolkits. The development and testing of classes and functional components are carried out in isolation, which can reduce the number of bugs that appear in the debugging process. The main classes are organized from the perspective of numerical modeling, such as computational domain class, field algebra class, matrix and solution class, numerical method class, etc. for hierarchical design, which makes it easy for program developers to expand the model. This encapsulation shields the details of the processing method from the outside. Program developers do not have to spend a lot of time to learn all the program codes. Once they have mastered the main framework and functional modules of the program, they can engage in innovative development work. The object-oriented program development model is an important manifestation of the use of hierarchical code design. Summary of the invention

[0005] A brief overview of the present invention is provided below in order to provide a basic understanding of certain aspects of the present invention. It should be understood that this overview is not an exhaustive overview of the present invention. It is not intended to identify key or important parts of the present invention, nor is it intended to limit the scope of the present invention. Its purpose is merely to present certain concepts in a simplified form as a prelude to a more detailed description discussed later.

[0006] In view of this, in order to solve the technical problems of a large number of repetitive work in function changes and process reengineering in the development of traditional CFD software programs in the prior art, the present invention provides a hierarchical program processing method for solving the NS equations using aerodynamic characteristics evaluation, which can achieve a complete description of the discretization and numerical solution process of the NS equations, isolate the impact of local function expansion on the entire program, and lay a foundation for multi-person collaborative development and algorithm expansion.

[0007] Solution 1: Apply the hierarchical program processing method to solve the NS equations for aerodynamic characteristics evaluation. The solver class is used as the program entry, and various classes are called to implement function functions to complete data initialization, double-layer time iteration, multi-grid calculation, boundary condition update, residual value calculation and physical quantity update, including the following steps:

[0008] S1. Create a framework for aerodynamic assessment procedures;

[0009] S2. Create a parameter file class object from the file to obtain the conditions and control parameters required for calculation;

[0010] S3. Create a grid class object from the file;

[0011] S4. Create a solver class object and start flow field calculation;

[0012] S5. The procedure ends.

[0013] Preferably, the program framework includes grid class, field class, material class, boundary condition class, boundary condition management class, flux class, flux management class, input and output interface class, multi-grid class, time class, time management class, turbulence class, turbulence management class, solver class and parameter file class.

[0014] Preferably, the method for creating a boundary condition management class includes:

[0015] S11. In the boundary condition base class, two functions of all boundaries are defined using virtual functions: initialization and update of boundaries;

[0016] S12. Define and obtain relevant data that needs to be accessed and operated in the boundary condition base class;

[0017] S13. Define a pointer to the base class FlowBoundary in the management class;

[0018] S14. Change FlowBoundaryManager file when adding new boundary derived classes.

[0019] Preferably, the creation method of the flux management class, the time management class and the turbulence management class is the same as the boundary condition management class method.

[0020] Preferably, the method for creating a solver class object comprises the following steps:

[0021] S41. Start the outer iteration of the dual time method;

[0022] S42. Save the old value;

[0023] S43. Start the inner iteration of the dual-time method;

[0024] S44. Branch selection processing method according to multiple grid paths;

[0025] S45. Call the input and output interface class to complete the residual value and integral physical quantity calculation;

[0026] S46. End the inner iteration and the outer iteration;

[0027] S47. Determine whether the number of inner loop steps is less than the total number of inner loop steps. If yes, return to S41 to call the time management class to advance the time. If no, end the inner loop iteration.

[0028] S48. Determine whether the current physical time in the outer loop is less than the total physical time. If so, return to S41 to continue the outer iteration of the dual time method. If not, end the outer loop iteration.

[0029] Preferably, the method for starting the inner iteration of the dual-time method comprises the following steps:

[0030] S431. Calculate the local time step;

[0031] S432. Start a multi-step time advancement loop;

[0032] S433. Call the flux management class to complete the calculation of the residual value of the convection term, diffusion term and source term;

[0033] S434. Call the turbulence management class to complete the turbulence residual value related calculation;

[0034] S435. Perform residual value smoothing;

[0035] S436. Update relevant conservation quantities;

[0036] S437. Call the boundary management class to complete the boundary condition update;

[0037] S438. Determine whether the current multi-step time advancement loop is less than the total number of time advancement loop steps. If so, return to S432 to continue the time advancement loop. If not, end the time advancement loop.

[0038] Preferably, the method of processing branch selection based on multiple grid paths includes:

[0039] S441. Advance flag: call the time management class to complete the time advancement;

[0040] S442. Restriction flag: Call the multigrid class to restrict the conserved quantities and residuals of the fine grid to the coarse grid;

[0041] S443. Extension flag: Call the multi-grid class coarse grid correction amount to extend to the fine grid;

[0042] S444. Determine whether all processes of the multi-grid loop are completed. If not, return to S44 to select a branch to calculate the multi-grid loop. If yes, end the multi-grid loop.

[0043] Preferably, the grid class stores basic data; used to implement grid data access, grid topology relationship query and grid overall operation;

[0044] The field class stores the flow field physical quantities corresponding to the grid class, and is used to store density, pressure, velocity flow field physical quantities and various basic mathematical operations;

[0045] The material class stores basic data of the flow medium, which is used to describe the physical properties of air and water;

[0046] The boundary condition class and boundary management class are derived from the boundary condition base class BoundaryCondtion to realize the boundary conditions of various NS equation flows, boundary condition initialization and update, and isolation of specific classes from solvers;

[0047] The flux class and flux management class add the inviscid flux class InviscidFluxScheme and the viscous flux class ViscousFluxScheme in the derived relationship, which are used to realize flux zeroing and flux calculation, and isolation of specific classes from solvers;

[0048] The input and output interface class includes a grid management class, a flow field result processing class, and a collection of various post-processing software classes, which are used to realize the conversion of different grid files and the post-processing result conversion functions;

[0049] The multi-grid class is used for the class of rapid convergence of the flow field, realizing the setting of the multi-grid circulation path, the transfer of flow field variables and residual values ​​from fine grids to coarse grids, and the correction of flow field variables from coarse grids to fine grids;

[0050] The time class and time management class adopt a multiple inheritance derivation mode, and a specific time class used for NS equation advancement is derived from a basic flow field data class and a certain time class, which is used to implement initialization, advancement iteration, and isolation of specific classes from solvers;

[0051] The turbulence class and turbulence management class add various turbulence basic quantity combination classes in the derived relationship, which are used to realize turbulence initialization, turbulence viscosity coefficient calculation, turbulence related residual value zeroing, turbulence source term and dissipation term calculation, turbulence quantity boundary update, and isolation of specific classes from solvers;

[0052] The solver class is used to solve the NS equation, which mainly includes initialization, saving old values ​​and organizing the multi-grid solution process;

[0053] The parameter file class is used to manage the user's parameter files, implement parameter import, parameter checking and set default parameters.

[0054] Solution 2: An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the hierarchical program processing method for solving the NS equations for evaluating aerodynamic characteristics as described in Solution 1 are implemented.

[0055] Solution three: A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the hierarchical program processing method for solving the NS equations for evaluating aerodynamic characteristics as described in Solution one.

[0056] The beneficial effects of the present invention are as follows: the present invention adopts a hierarchical software architecture design concept, and solves a large number of repetitive work technical problems in function changes and process reengineering in traditional CFD software program development work by constructing classes at different levels for the NS equation, and realizes the design and development of a large-scale parallel CFD software platform with easy maintainability and scalability. The present invention also has the following characteristics:

[0057] 1. Use object-oriented thinking to restructure the CFD program to facilitate code reuse;

[0058] 2. The manager is used to isolate local function extensions, which facilitates program organization and collaborative development;

[0059] 3. The data organization and function implementation of the class are completed according to the discrete process of the NS equation, and a program architecture for the implementation of the NS equation algorithm is given;

[0060] 4. The layered idea is adopted to complete the transmission of data structure, providing basic data support for the implementation of derived class algorithms, which facilitates program simplification and implementation. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0062] Figure 1 is a schematic diagram of the method flow chart;

[0063] Figure 2 This is a flow chart of the solver class object;

[0064] Figure 3 This is a schematic diagram of the derived relationship of the boundary condition class;

[0065] Figure 4 It is a schematic diagram of the flux class derived relationship;

[0066] Figure 5 It is a schematic diagram of the time class derivation relationship;

[0067] Figure 6 Derived schematic diagram for turbulence class;

[0068] Figure 7 Schematic diagram of the inner-layer iteration process of the dual-time method. DETAILED DESCRIPTION

[0069] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0070] Example 1, reference Figure 1-7 This embodiment describes a hierarchical program processing method for solving the NS equations for evaluating aerodynamic characteristics. The solver class is used as the program entry, and various classes are called to implement function functions to complete data initialization, double-layer time iteration, multi-grid calculation, boundary condition update, residual value calculation and physical quantity update, including the following steps:

[0071] S1. Create a program framework; the framework includes mesh class (Mesh), field class (Field), material class (Material), boundary condition class (a series of derived classes of FlowBoundary) and boundary condition management class (FlowBoundaryManager), flux class (a series of derived classes of FlowFlux) and flux management class (FlowFluxManager), input and output interface class (IO), multi-grid class (MutiGrid), time class (a series of derived classes of TimeScheme) and time management class (FlowTimeManager), turbulence class (a series of derived classes of BaseTurbulence) and turbulence management class (TurbulenceManager), solver class (FlowSolver) and parameter file class (FlowConfigure).

[0072] The program framework uses the solver class (FlowSolver) to realize the program entry. By calling the functions implemented by various classes, it completes the functions of data initialization, double-layer time iteration, geometric multi-grid calculation, boundary condition update, residual value calculation, physical quantity update, etc., and realizes a complete description of the discrete process of the NS equation, which can give the flow characteristics of the flow around the object. The program framework can be jointly developed by multiple people and realize local function expansion, providing basic technical support for collaborative development.

[0073] The manager is used to realize the integrated management of various methods in the discretization process of the NS equation, isolating the destructiveness of the method expansion to the entire program, and realizing the program code reuse and the integrity of the overall program process.

[0074] The method for creating a boundary condition management class includes:

[0075] S11. In the boundary condition base class, two functions of all boundaries are defined using virtual functions: initialization and update of boundaries;

[0076] S12. Define and obtain relevant data that needs to be accessed and operated in the boundary condition base class;

[0077] S13. Define a pointer to the base class FlowBoundary in the management class;

[0078] S14. Change FlowBoundaryManager file when adding new boundary derived classes.

[0079] The boundary conditions of various NS equation flows are derived from the boundary condition base class FlowBoundary, such as inflow boundary, outflow boundary, wall boundary, etc. This class collection is mainly used to implement functions such as boundary condition initialization and update, and is uniformly organized by the management class FlowBoundaryManager to isolate specific classes from solvers, which is convenient for large-scale program compilation and debugging.

[0080] The method for creating a flux management class includes:

[0081] S15. Use virtual functions in the flux base class to define two functional functions for all boundaries: initialization and update boundaries;

[0082] S16. Define and obtain the relevant data that needs to be accessed and operated in the flux base class;

[0083] S17. Define a pointer to the base class FlowFlux in the management class;

[0084] S18.Change FlowFluxManager file when adding new Boundary derived classes.

[0085] The time management method includes:

[0086] S19. Two functions of defining all boundaries using virtual functions in the time base class: initialization and update boundaries;

[0087] S110. Define and obtain the relevant data that needs to be accessed and operated in the time base class;

[0088] S111. Define a pointer to the base class FlowTime in the management class;

[0089] S112.Change FlowTimeManager file when adding new Boundary derived classes.

[0090] The methods of the turbulence management class include:

[0091] S113. Two functions of defining all boundaries using virtual functions in the turbulence base class: initialization and update of boundaries;

[0092] S114. Define and obtain relevant data that needs to be accessed and operated in the turbulence base class;

[0093] S115. Define a pointer to the base class BaseTurbulence in the management class;

[0094] S116.Change TurbulenceManager file when adding new boundary derived classes.

[0095] The mesh class (Mesh) stores basic data, including mesh points, mesh faces, mesh units, topological structures, etc.; it is used to implement mesh data access, mesh topological relationship query, and mesh overall operation (zoom, translate, rotate), etc.

[0096] The field class (Field) stores the flow field physical quantities corresponding to the grid class, including the basic data of the internal field, physical boundary field, and parallel boundary field. The field forms include scalar field, vector field, and tensor field, which are used to realize the storage of density, pressure, and velocity flow field physical quantities and various basic mathematical operations;

[0097] The material class (Material) stores the basic data of the flow medium, which is used to describe the physical properties of air and water; basic data such as constitutive relations, medium constants, key parameters of the medium, etc.

[0098] The boundary condition class (a series of derived classes of BoundaryCondtion) and the boundary management class (FlowBoundaryManager) are derived from the boundary condition base class BoundaryCondtion to implement boundary conditions, boundary condition initialization and update, and isolation of specific classes from solvers for various NS equation flows;

[0099] The flux class (a series of derived classes of FluxScheme) and the flux management class (FlowFluxManager), refer to Figure 4 InviscidFluxScheme and ViscousFluxScheme are added to the derived relationship. This is mainly because there are many types of flux formats for the NS equations, and they are used to derive various specific flux formats, such as the center format and the upwind format. This class collection is mainly used to implement functions such as flux zeroing and flux calculation, and is organized uniformly by the management class FlowFluxManager to isolate specific classes from solvers, which is convenient for large-scale program compilation and debugging.

[0100] The input and output interface class (IO) includes a grid management class, a flow field result processing class, and a collection of various post-processing software classes, which are used to realize the conversion of different grid files and the conversion of post-processing results;

[0101] The multigrid class (MutiGrid) is used for fast convergence of flow field, and realizes setting multigrid circulation path, transferring flow field variables and residual values ​​from fine grid to coarse grid, and modifying flow field variables from coarse grid to fine grid;

[0102] The time class (a series of derived classes of TimeScheme) and the time management class (FlowTimeManager) refer to Figure 5 , adopts a multiple inheritance derivation mode, deriving a specific time class for NS equation advancement from the basic flow field data class (FlowTimePackage) and a time class (such as BaseRungeKutta). This class collection is mainly used to implement initialization, advancement iteration and other functions, and is uniformly organized by the management class FlowTimeManager to achieve isolation between specific classes and solvers, which is convenient for large-scale program compilation and debugging. Figure 5 A schematic diagram of the FlowRungeKutta class advancement process is given.

[0103] The turbulence class (BaseTurbulence series derived class) and turbulence management class (TurbulenceManager), refer to Figure 6In the derived relationship, various classes of turbulence basic quantity combinations (such as KOmega, KEpsilon, etc.) are added. This is mainly because there are many kinds of turbulence models in the NS equations, and they are used to derive and implement various specific turbulence models. This class collection is mainly used for turbulence initialization, turbulence viscosity coefficient calculation, turbulence-related residual zeroing, turbulence source term and dissipation term calculation, turbulence boundary update and other functions, and is organized uniformly by the management class TurbulenceManager to achieve isolation of specific classes and solvers, which is convenient for large-scale program compilation and debugging.

[0104] The solver class (FlowSolver): is used to solve the NS equation, mainly including initialization, saving old values ​​and organizing the multi-grid solution process;

[0105] The parameter file class (FlowConfigure) is used to manage the user's parameter files, implement parameter import, parameter checking and set default parameters.

[0106] S2. Create a parameter file class (FlowConfigure) object from the file to obtain the conditions and control parameters required for calculation;

[0107] S3. Create a Mesh object from the file;

[0108] S4. Create a solver class (FlowSolver) object and call its member function to start flow field calculation. The flow field calculation process is as follows: Figure 2 As shown, it mainly includes the following steps:

[0109] S41. Start the outer iteration of the dual time method;

[0110] S42. Save the old value;

[0111] S43. Start the inner iteration of the dual-time method, mainly completing the update of the conservation amount through the time management class (FlowTimeManager) object, and establish a calling relationship with most classes in the program framework. Refer to 7, including the following steps:

[0112] S431. Calculate the local time step;

[0113] S432. Start a multi-step time advancement loop;

[0114] S433. Call the flux management class (FlowFluxManager) to complete the calculation of the residual values ​​of the convection term, diffusion term and source term;

[0115] S434. Call the turbulence management class (TurbulenceManager) to complete the turbulence residual value related calculation;

[0116] S435. Perform residual value smoothing;

[0117] S436. Update relevant conservation quantities;

[0118] S437. Call the boundary management class (FlowBoundaryManager) to complete the boundary condition update.

[0119] S438. Determine whether the current multi-step time advancement cycle is less than the total time advancement cycle step number. If so, return to S432 to continue the time advancement cycle. If not, end the time advancement cycle.

[0120] S44. According to the multi-grid path, a multi-grid cycle is started, and a branch selection processing method is performed, including:

[0121] S441. Advance flag: call the time management class (FlowTimeManager) to complete the time advancement;

[0122] S442. Restriction flag: Call the multigrid class (MutiGrid) to restrict the conservation quantities and residuals of the fine grid to the coarse grid;

[0123] S443. Extension flag: Call the multigrid class (MutiGrid) to extend the coarse grid correction value to the fine grid.

[0124] S444. Determine whether all processes of the multi-grid loop are completed. If not, return to S44 to select a branch to calculate the multi-grid loop. If yes, end the multi-grid loop.

[0125] S45. Call the input and output interface class (IO) to complete the residual value and integral physical quantity calculation;

[0126] S46. Determine whether the number of inner loop steps is less than the total number of inner loop steps. If yes, return to S441 to call the time management class to advance the time. If no, end the inner loop iteration.

[0127] S47. Determine whether the current physical time in the outer loop is less than the total physical time. If so, return to S41 to continue the outer iteration of the dual-time method. If not, end the outer loop iteration.

[0128] S5. The procedure ends.

[0129] Abbreviations and Key Terms

[0130] NS equations: Navier-Stokes equations.

[0131] Embodiment 2: The computer device of the present invention may be a device including a processor and a memory, such as a single chip microcomputer including a central processing unit. Furthermore, the processor is used to implement the steps of the above-mentioned recommendation method based on CREO software that can modify the recommendation data driven by the relationship when executing the computer program stored in the memory.

[0132] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0133] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0134] Embodiment 3, Computer-readable storage medium embodiment

[0135] The computer-readable storage medium of the present invention can be any form of storage medium that can be read by a processor of a computer device, including but not limited to non-volatile memory, volatile memory, ferroelectric memory, etc. A computer program is stored on the computer-readable storage medium. When the processor of the computer device reads and executes the computer program stored in the memory, the steps of the above-mentioned modeling method of modifiable relationship-driven modeling data based on CREO software can be implemented.

[0136] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.

[0137] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.

Claims

1. A hierarchical program processing method for solving the NS equations for evaluating aerodynamic characteristics, characterized in that: The solver class is used as the program entry point to call various classes to implement functions, complete data initialization, double-layer time iteration, multi-grid calculation, boundary condition update, residual value calculation and physical quantity update, including the following steps: S1. Create a framework for aerodynamic assessment procedures; S2. Create a parameter file class object from the file to obtain the conditions and control parameters required for calculation; S3. Create a grid class object from the file; S4. Create a solver class object and start flow field calculation; S5. The procedure ends; The program framework includes a grid class, a field class, a material class, a boundary condition class, a boundary condition management class, a flux class, a flux management class, an input and output interface class, a multigrid class, a time class, a time management class, a turbulence class, a turbulence management class, a solver class and a parameter file class; The method for creating a solver class object comprises the following steps: S41. Start the outer iteration of the dual time method; S42. Save the old value; S43. Start the inner iteration of the dual-time method; S44. Branch selection processing method according to multiple grid paths; S45. Call the input and output interface class to complete the residual value and integral physical quantity calculation; S46. End the inner iteration and the outer iteration; S47. Determine whether the number of inner loop steps is less than the total number of inner loop steps. If yes, return to S41 to call the time management class to advance the time. If no, end the inner loop iteration. S48. Determine whether the current physical time in the outer loop is less than the total physical time. If so, return to S41 to continue the outer iteration of the dual time method. If not, end the outer loop iteration; The grid class stores basic data and is used to implement grid data access, grid topology relationship query and grid overall operation; The field class stores the flow field physical quantities corresponding to the grid class, which is used to store density, pressure, velocity flow field physical quantities and various basic mathematical operations; The material class stores basic data of the flow medium, which is used to describe the physical properties of air and water; The boundary condition class and boundary management class are derived from the boundary condition base class BoundaryCondtion to realize the boundary conditions of various NS equation flows, boundary condition initialization and update, and isolation of specific classes from solvers; The flux class and flux management class add the inviscid flux class InviscidFluxScheme and the viscous flux class ViscousFluxScheme in the derived relationship, which are used to realize flux zeroing and flux calculation, and isolation of specific classes from solvers; The input and output interface class includes a grid management class, a flow field result processing class, and a collection of various post-processing software classes, which are used to realize the conversion of different grid files and the post-processing result conversion functions; The multi-grid class is used for the class of rapid convergence of the flow field, realizing the setting of the multi-grid circulation path, the transfer of flow field variables and residual values ​​from fine grids to coarse grids, and the correction of flow field variables from coarse grids to fine grids; The time class and time management class adopt a multiple inheritance derivation mode, and a specific time class used for NS equation advancement is derived from a basic flow field data class and a certain time class, which is used to implement initialization, advancement iteration, and isolation of specific classes from solvers; The turbulence class and turbulence management class add various turbulence basic quantity combination classes in the derived relationship, which are used to realize turbulence initialization, turbulence viscosity coefficient calculation, turbulence related residual value zeroing, turbulence source term and dissipation term calculation, turbulence quantity boundary update, and isolation of specific classes from solvers; The solver class is used to solve the NS equation, including initialization, saving old values ​​and organizing the multi-grid solution process; The parameter file class is used to manage the user's parameter files, implement parameter import, parameter checking and set default parameters.

2. A hierarchical program processing method for solving NS equations for evaluating aerodynamic characteristics according to claim 1, characterized in that: The methods for creating boundary condition management classes include: S11. In the boundary condition base class, two functions of all boundaries are defined using virtual functions: initialization and update of boundaries; S12. Define and obtain relevant data that needs to be accessed and operated in the boundary condition base class; S13. Define a pointer to the base class FlowBoundary in the management class; S14. Change FlowBoundaryManager file when adding new boundary derived classes.

3. A hierarchical program processing method for solving NS equations for evaluating aerodynamic characteristics according to claim 2, characterized in that: The method for creating flux management classes, time management classes, and turbulence management classes is the same as that for boundary condition management classes.

4. A hierarchical program processing method for solving NS equations for evaluating aerodynamic characteristics according to claim 3, characterized in that: The method for starting the inner layer iteration of the dual time method comprises the following steps: S431. Calculate the local time step; S432. Start a multi-step time advancement loop; S433. Call the flux management class to complete the calculation of the residual value of the convection term, diffusion term and source term; S434. Call the turbulence management class to complete the turbulence residual value related calculation; S435. Perform residual value smoothing; S436. Update relevant conservation quantities; S437. Call the boundary management class to complete the boundary condition update; S438. Determine whether the current multi-step time advancement loop is less than the total number of time advancement loop steps. If so, return to S432 to continue the time advancement loop. If not, end the time advancement loop.

5. A hierarchical program processing method for solving NS equations for evaluating aerodynamic characteristics according to claim 4, characterized in that: The method of processing branch selection according to multiple grid paths includes: S441. Advance flag: call the time management class to complete the time advancement; S442. Restriction flag: Call the multigrid class to restrict the conserved quantities and residuals of the fine grid to the coarse grid; S443. Extension flag: Call the multi-grid class coarse grid correction amount to extend to the fine grid; S444. Determine whether all processes of the multi-grid loop are completed. If not, return to S44 to select a branch to calculate the multi-grid loop. If yes, end the multi-grid loop.

6. An electronic device, characterized in that It comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of a hierarchical program processing method for solving NS equations for evaluating aerodynamic characteristics as described in any one of claims 1 to 5 when executing the computer program.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements a hierarchical program processing method for solving NS equations for evaluating aerodynamic characteristics as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Decomposing a Generic Class into Layers

    US20150301825A1

  • Methods and systems for the estimation of the computational cost of simulation

    US20210133378A1