CN115310420A - Simulation analysis report generation method, device, equipment and storage medium - Google Patents

Simulation analysis report generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN115310420A
CN115310420A CN202210956006.0A CN202210956006A CN115310420A CN 115310420 A CN115310420 A CN 115310420A CN 202210956006 A CN202210956006 A CN 202210956006A CN 115310420 A CN115310420 A CN 115310420A
Authority
CN
China
Prior art keywords
target
cfd simulation
template
analysis
data
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.)
Pending
Application number
CN202210956006.0A
Other languages
Chinese (zh)
Inventor
李佰文
马宝全
淮晓永
王盈
张弛
李俊达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
6th Research Institute of China Electronics Corp
Original Assignee
6th Research Institute of China Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 6th Research Institute of China Electronics Corp filed Critical 6th Research Institute of China Electronics Corp
Priority to CN202210956006.0A priority Critical patent/CN115310420A/en
Publication of CN115310420A publication Critical patent/CN115310420A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a method, a device, equipment and a storage medium for generating a simulation analysis report, wherein the method comprises the following steps: after the target CFD simulation test is finished, extracting a target CFD simulation analysis report template corresponding to the target CFD simulation test; traversing each placeholder variable in the target CFD simulation analysis report template, and triggering and executing the data generation script corresponding to the placeholder variable; based on the defined data generation function in the data generation script, calling an analysis processing service, and processing the simulation test result data to generate corresponding analysis result data; and replacing the corresponding placeholder variable in the target CFD simulation analysis report template by using the analysis result data to obtain a target simulation analysis report. Therefore, the CFD simulation analysis report is automatically generated by using the template, and the generation efficiency of the analysis report is improved.

Description

Simulation analysis report generation method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of fluid mechanics simulation technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a simulation analysis report.
Background
Computational Fluid Dynamics (CFD) systems can analyze the Fluid Dynamics of industrial design solutions through simulation tests, thereby improving the optimization design solutions. The CFD system is widely applied to the industrial design of aerospace, ships, automobiles and the like.
The CFD simulation analysis report is an important component of a post-processing task of a Computational Fluid Dynamics (CFD) simulation system, the analysis report comprises systematic description of simulation elements such as pre-processing (model information and grid division), solving (solving method and residual curve) and post-processing (data visualization analysis such as cloud chart, flow chart, curve chart and the like), and the analysis report is an important basis for an engineer to analyze the physical characteristic rule of a flow field, discover the advantages and the disadvantages of an industrial design scheme and optimize and improve the design scheme.
After the simulation solution is finished, an engineer uses a post-processing analysis tool to perform visual analysis processing on the test result data according to experience, so as to generate analysis result data such as a physical quantity distribution cloud chart, a flow chart, a data curve and the like of the flow field, and then a simulation analysis report document is generated. The existing CFD simulation analysis report generation scheme is generally generated by adopting a method of manually extracting and editing information or simply and automatically extracting and generating the CFD simulation analysis report based on a fixed parameter template, and cannot meet the application requirement of a user on generating a more accurate analysis report after deep post-processing analysis is carried out by utilizing a post-processing analysis tool. The report generation processing has low automation degree, low generation efficiency and easy error.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, equipment and a storage medium for generating a simulation analysis report, wherein a CFD simulation analysis report is automatically generated by using a template, so that the automation degree of report generation processing is improved, and the report generation efficiency is improved.
The embodiment of the disclosure provides a method for generating a simulation analysis report, which includes:
after the target CFD simulation test is finished, extracting a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test; wherein the target CFD simulation analysis report meta-template includes at least one placeholder variable representing dynamic data content; each placeholder variable corresponds to a data generation script;
instantiating data generation script parameters in the target CFD simulation analysis report meta-template according to analysis operation methods and parameters in an operation log in a post-processing analysis process of target CFD simulation test result data to generate a target CFD simulation test report template;
traversing each placeholder variable in the target CFD simulation analysis report template, and triggering and executing the data generation script corresponding to the placeholder variable;
based on the defined data generation function in the data generation script, calling analysis processing service according to the processing method and parameters in the data generation function, and processing the simulation test result data to generate corresponding analysis result data;
and replacing the corresponding placeholder variable in the target CFD simulation analysis report template by using the analysis result data, and performing corresponding format rendering processing to obtain a target simulation analysis report.
In an optional embodiment, a target CFD simulation test report template corresponding to the target CFD simulation test is generated according to the following steps:
extracting the target CFD simulation analysis report meta-template corresponding to the target CFD simulation test from a template set according to the professional field type based on the test information of the target CFD simulation test;
instantiating data generation script parameters in the target CFD simulation analysis report meta-template according to analysis operation methods and parameters in an operation log in a post-processing analysis process of target CFD simulation test result data to generate a target CFD simulation test report template;
in an optional embodiment, the template set includes a target CFD simulation analysis report meta-template corresponding to at least one type of service field, and each placeholder variable in the target CFD simulation analysis report meta-template correspondingly obtains any one of the following data information:
grid information of the target CFD simulation test, a solution scheme of the target CFD simulation test, a calculation residual error map of the target CFD simulation test and a flow field analysis map of the target CFD simulation test.
In an optional embodiment, the automatically generating simulation test analysis result data corresponding to each placeholder variable based on the defined data generating method in the data generating script includes:
based on the defined data generation function in the data generation script, calling analysis processing service according to the processing method and parameters in the data generation function;
and processing the simulation test result data through the analysis processing service to generate corresponding simulation test analysis result data.
The embodiment of the present disclosure further provides a device for generating a simulation analysis report, where the device includes:
the template management module is used for extracting a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test from an analysis report template set according to the professional field type according to the target CFD simulation test; wherein the target CFD simulation analysis report meta-template includes at least one placeholder variable representing dynamic data content; each placeholder variable corresponds to a data generation script;
the template instantiation module is used for instantiating the data generation script parameters in the target CFD simulation analysis report meta-template according to the method parameters in the analysis operation message based on the operation log data in the user post-processing analysis process to generate a target CFD simulation test report template;
the script execution module is used for traversing each placeholder variable in the target CFD simulation analysis report template, triggering and executing the data generation script corresponding to the placeholder variable, calling an analysis processing service according to a processing method and parameters in a script function, and processing test result data by the analysis processing service to generate analysis result data;
the analysis processing service module is responsible for specifically executing the data content generation script, and when receiving the data generation message, calls a corresponding post-processing analysis function API interface according to an analysis method in the message, and processes the test result data to generate analysis result data, such as a residual error curve, a flow field cloud chart, a flow chart and the like;
the report generation module is used for receiving analysis result data generated by the analysis processing service, replacing the position-occupying variables with the data contents after the data contents of all the position-occupying variables in the template are received, and performing corresponding format rendering processing to obtain a target simulation analysis report;
and the message middleware is responsible for data communication among the modules and performs communication distribution of the data messages among the modules according to the subscription relation of the message subjects.
In an optional embodiment, the template management module is configured to extract a target CFD simulation analysis report template corresponding to the target CFD simulation test according to the following steps:
based on the test information of the target CFD simulation test, extracting a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test from a template set according to the category of the professional field;
instantiating data generation script parameters in the target CFD simulation analysis report meta-template according to analysis operation methods and parameters in an operation log in a post-processing analysis process of target CFD simulation test result data to generate a target CFD simulation test report template;
in an optional implementation manner, the template management module is specifically configured to enable the template set to include a target CFD simulation analysis report meta-template corresponding to at least one type of service field, where each placeholder variable in the target CFD simulation analysis report meta-template correspondingly obtains any one of the following data information:
the method comprises the steps of grid information of a target CFD simulation test, a solving scheme of the target CFD simulation test, a calculation residual error map of the target CFD simulation test and a flow field analysis map of the target CFD simulation test.
In an optional implementation manner, the script execution module is specifically configured to:
based on the defined data generation function in the data generation script, calling analysis processing service according to the processing method and parameters in the data generation function;
and processing the simulation test result data through the analysis processing service to generate corresponding simulation test analysis result data.
An embodiment of the present disclosure further provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory communicate with each other via the bus when the electronic device is running, and the machine-readable instructions are executed by the processor to perform the steps of the above embodiments.
Embodiments of the present disclosure also provide a computer storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the foregoing embodiments are performed.
The embodiment of the disclosure provides a method, a device, equipment and a storage medium for generating a simulation analysis report, wherein the method comprises the following steps: after the target CFD simulation test is finished, extracting a target CFD simulation analysis report template corresponding to the target CFD simulation test; traversing each placeholder variable in the target CFD simulation analysis report template, and triggering and executing the data generation script corresponding to the placeholder variable; based on a defined data generation method in the data generation script, calling corresponding analysis processing service to generate analysis result data corresponding to each placeholder variable; and replacing the corresponding placeholder variable in the target CFD simulation analysis report template by using the analysis result data, and performing corresponding format rendering processing to obtain a target simulation analysis report. In this way, a CFD simulation analysis report is automatically generated using the template. The scheme improves the automation degree of the analysis report generation processing and improves the report generation efficiency.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
FIG. 1 is a flow chart illustrating a method for generating a simulation analysis report according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a data message driven analysis report generation process flow in a GUI client according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating an apparatus for generating a simulation analysis report according to an embodiment of the present disclosure;
fig. 4 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, as generally described and illustrated in the figures herein, could be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. Additionally, the term "at least one" herein means any one of a variety or any combination of at least two of a variety, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
After the simulation solution is finished, an engineer uses a post-processing analysis tool to perform visual analysis processing on the test result data according to experience, so as to generate analysis result data such as a physical quantity distribution cloud chart, a flow chart, a data curve and the like of the flow field, and then a simulation analysis report document is generated. The research shows that the existing CFD simulation analysis report generation scheme is generally generated by adopting a method of manually extracting and editing information or simply and automatically extracting and generating the CFD simulation analysis report based on a fixed parameter template, and cannot meet the application requirement of a user on generating a more accurate analysis report after deep post-processing analysis is carried out by utilizing a post-processing analysis tool. The report generation processing has low automation degree, low generation efficiency and easy error.
Based on the above research, the present disclosure provides a method for generating a simulation analysis report, including: after the target CFD simulation test is finished, extracting a target CFD simulation analysis report template corresponding to the target CFD simulation test; traversing each placeholder variable in the target CFD simulation analysis report template, and triggering and executing the data generation script corresponding to the placeholder variable; based on the defined data generation method in the data generation script, calling an analysis processing service, and processing the test result data to generate analysis result data; and replacing the corresponding occupancy variable in the target CFD simulation analysis report template by the simulation test analysis result data, and performing corresponding format rendering processing to obtain a target simulation analysis report. Therefore, the CFD simulation analysis report is automatically generated by using the template, the automation degree of report generation processing is improved, and the report generation efficiency is improved.
To facilitate understanding of the present embodiment, first, a method for generating a simulation analysis report disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the method for generating a simulation analysis report provided in the embodiments of the present disclosure is generally a computer device with certain computing capability, and the computer device includes, for example: a terminal device, which may be a User Equipment (UE), a mobile device, a User terminal, a computing device, or the like, or a server or other processing device. In some possible implementations, the simulation analysis report generation method may be implemented by a processor calling computer-readable instructions stored in a memory.
Referring to fig. 1, a flowchart of a simulation analysis report generation method provided in the embodiment of the present disclosure is shown, where the method includes steps S101 to S104, where:
s101: and after the target CFD simulation test is finished, extracting a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test according to the professional field type.
The target CFD simulation test is mainly applied to the fields of aerospace, vehicles, ships, energy and the like, and different target CFD simulation analysis report element templates are preset for each professional field, for example, the aerospace CFD simulation analysis report element templates are preset for the aerospace professional field.
The target CFD simulation analysis report meta-template consists of template contents and data contents, wherein the template contents are standard contents formulated according to professional field expert experience, and the data contents are dynamic contents generated after test data are processed through an analysis tool. The data content is embedded in the corresponding position of the template content in a position-occupying variable mode. The data content may include: grid data information, a calculated residual error map, a flow field visual analysis image, a variable curve graph and the like.
Wherein the target CFD simulation analysis report meta-template includes at least one placeholder variable representing dynamic data content; and each placeholder variable corresponds to one data generation script. The Jinji2 template engine is used to define a target CFD simulation analysis report meta-template, in which the basic outline (i.e. the template content) of the target simulation analysis report is defined.
The data to be acquired defined by the basic outline can include target simulation test names, researcher information, test start and stop time, grid data information, physical models, solution scheme information, calculation residual diagrams, flow field visualization analysis diagrams and the like. And embedding a position-occupying variable representing dynamic data content in a corresponding position in the template, and generating a script and a rendering format of the data content by the corresponding data. Each placeholder variable corresponds to a data generation script and is used for processing and generating dynamic data content corresponding to the placeholder variable.
Wherein the mesh data information may include: grid files used by the target simulation test, basic information of grids, grid quality information and the like; the solution information may include: physical models, boundary condition setting, solution scheme setting information and the like adopted by a user simulation test; the flow field visualization analysis map can comprise a surface cloud map, a contour map, a flow map and other visualization analysis maps of the solution result; the data graph may include: a curve image of scalar data such as pressure, velocity, etc.
Further, in an optional implementation manner, the target CFD simulation analysis report meta-template corresponding to the target CFD simulation test is extracted according to the following steps:
and extracting the target CFD simulation analysis report meta-template corresponding to the target CFD simulation test from a template set according to the professional field type based on the test information of the target CFD simulation test.
Here, the test information of the target CFD simulation test may include a target CFD simulation test name, a professional field type, a target CFD simulation test purpose, a target CFD simulation test physical model, and the like.
And selecting the template with the highest comprehensive matching degree as a target CFD simulation analysis report meta-template according to the matching of the professional field type, the simulation test purpose, the physical model and the template information in the test information of the target CFD simulation test.
Further, in an optional implementation manner, the template set includes a target CFD simulation analysis report meta-template corresponding to at least one type of professional field, and each placeholder variable in the target CFD simulation analysis report meta-template correspondingly obtains any one of the following data information:
the method comprises the steps of grid information of a target CFD simulation test, a solving scheme of the target CFD simulation test, a calculation residual error map of the target CFD simulation test and a flow field analysis map of the target CFD simulation test.
S102: and instantiating data generation script parameters in the target CFD simulation analysis report meta-template according to the analysis operation method and parameters in the operation log in the post-processing analysis process of the target CFD simulation test result data to generate a target CFD simulation test report template.
S103: traversing each placeholder variable in the target CFD simulation analysis report template, and triggering and executing the data generation script corresponding to the placeholder variable.
In the analysis report, because data content is embedded in standard content established according to professional field expert experience through an occupancy variable, and each occupancy variable has a corresponding data generation script, when the data content is obtained according to a target CFD simulation analysis report template, the target CFD simulation analysis report template is traversed first, each embedded occupancy variable is obtained, and the data generation script corresponding to the occupancy variable is executed.
The format of the data generation script may be (topic, method, args, kwugs), where: topic is the name of the data subject, method is the method for generating data, args is the parameter of variable list class, and kwarges is the parameter of variable keyword class.
The data generation script may include a control-class script and a data-class script, where a data format of the control-class script may be (ctTopic, method, args, kwangs), where: ctTopic is the name of the message topic, method is the message method, args is the parameter of the variable list class, kwarges is the parameter of the variable keyword class. The data format of the data-type script may be ("dtTopic", { "type": "type of processing", "data": { "format": json | list | png "," cnt ": specific data content" }).
Illustratively, the data topic setting schedule is as follows:
Figure BDA0003791380840000101
s104: and calling an analysis processing service according to the processing method and the parameters in the data generation function based on the defined data generation function in the data generation script, and processing the simulation test result data by the analysis processing service to generate corresponding analysis result data.
Here, a message communication method based on message middleware is employed when acquiring the generated data content from the target CFD simulation analysis report template. The method for generating the data content is defined in the template through the script, when the data content is generated, the script interpreter interprets the data generation function in the corresponding data generation script, the analysis processing service is called according to the method and the parameter, the simulation test result data is processed to generate the corresponding analysis result data (namely the data content), and the data is distributed to the report generation module through the message middleware.
S105: and replacing the corresponding placeholder variable in the target CFD simulation analysis report template by using the analysis result data, and performing corresponding format rendering processing to obtain a target simulation analysis report.
After receiving simulation test analysis result data corresponding to each placeholder variable, the report generation module replaces the corresponding placeholder variable in the target CFD simulation analysis report template with each received data content, and performs display rendering processing on various data contents according to a data format script defined in the template, so that a target simulation analysis report document can be automatically generated.
In the simulation analysis report generation method disclosed in this embodiment, after a target CFD simulation test is completed, a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test is extracted according to a professional field category; instantiating data generation script parameters in the target CFD simulation analysis report meta-template according to analysis operation methods and parameters in the operation logs in the post-processing analysis process to generate a target CFD simulation test report template; traversing each placeholder variable in the target CFD simulation analysis report template, triggering and executing the data corresponding to the placeholder variable to generate a script function, calling an analysis processing service according to a processing method and parameters in the placeholder variable, and processing simulation test result data by the analysis processing service to generate corresponding analysis result data; and replacing the corresponding occupancy variable in the target CFD simulation analysis report template by the simulation test analysis result data, and performing corresponding format rendering processing to obtain a target simulation analysis report. Therefore, the CFD simulation analysis report is automatically generated by using the template, and the automation level of report generation processing and the report generation efficiency are improved.
Next, this embodiment will be further described with reference to specific embodiments.
In an optional embodiment, the generating, based on the defined data generating function in the data generating script, simulation test analysis result data corresponding to each of the placeholder variables includes:
and calling an analysis processing service according to a processing method and parameters in the defined data generating function in the data generating script corresponding to each placeholder variable in the target CFD simulation analysis report template, and processing simulation test result data to generate corresponding analysis result data.
Here, the generation method and the generation parameter of the data content defined in the data generation script corresponding to the placeholder variable are instantiated and set according to the method and the parameter in the operation log in the post-processing analysis process when the meta-template is instantiated.
The method comprises the steps of generating an analysis report subject ctGenreport, initiating a target CFD simulation analysis report generation operation in a GUI (graphical user interface) by a user, sending the report to a script execution module by a GUI client, traversing each placeholder in a template by the script execution module, generating a message subject of a script according to data corresponding to each placeholder, sending corresponding grid data to generate ctGridInfo, ctSchem solution setting information, ctResidual calculation residual diagram generation, ctFlow flow field visualization analysis generation and other control script messages to an analysis processing service, correspondingly processing test data by the analysis processing service according to message subjects, methods and parameters to generate corresponding result data, packaging the generated result data into grid data information dtGridInfo, solution scheme information dtSchem, calculation residual diagram dtResidual, flow field analysis dtFlow and other subject data contents, sending the generated subject data contents to a report generation module, performing content replacement and formatting processing on the placeholder by the report generation module, generating a complete target CFD simulation analysis report, and sending the complete CFD simulation analysis report to a user for editing and viewing.
Here, the data information interactive communication between the modules is automatically completed through the message middleware. Specifically, a Redis service is established, and a message middleware service function is provided by utilizing a publish-subscribe mechanism of the Redis service.
The data interface realizing method of the data interaction communication among the script executing module, the report generating module, the analysis processing service and the document editor comprises the following steps:
firstly, establishing a connection pool from a module to a message middleware service, and obtaining an available connection rc from the connection pool as a connection client;
secondly, a message queue psData is created, which works in publish-subscribe mode: psMessage = rc.
Thirdly, each module subscribes the message theme required to be received and processed;
and finally, creating a message processing thread, monitoring the message in the message processing thread, and executing according to the message method when the message is received: and asynchronously calling a corresponding message processing API interface method, packaging the returned processing result data into a corresponding subject message, and issuing the data message.
Further, on the basis of the realization of the data interface of data interaction among the script execution module, the report generation module, the analysis processing service and the document editor, the method for realizing the data content generation by the script execution module, the report generation module, the analysis processing service and the document editor comprises the following steps:
a script execution module, subscribing ctGenReport subject: sub (ctGenReport); in the message processing thread, when receiving ctGenReport subject message, generating a script according to the data in the report template, and generating and issuing corresponding data content generating message, including ctGridInfo, ctSchem, ctResidual and ctFlow.
An analysis processing service module, subscribing ctGridInfo, ctSchem, ctResidual, ctFlow topics: sub (ctGridInfo, ctSchem, ctResidual, ctFlow); in the message processing thread, when the corresponding theme message is received, the corresponding API interface method is called according to different messages to carry out corresponding message processing.
The report generation module subscribes to dtGridInfo, dtSchem, dtResidual and dtFlow topics: sub (dtGridInfo, dtSchem, dtResidual, dtFlow), in the message processing thread, when receiving corresponding subject matter, filling the generated data content into the template data, when all the data in the template are generated, replacing the corresponding place-occupying variable in the template according to the data content, displaying and rendering according to the content format, generating a Docx format analysis report document, and issuing a dtReport subject matter message.
A document editor, subscribing to a dtReport topic: sub (dtReport); in the message processing thread, when a dtReport topic event is received, an analysis report is loaded in a document editor, and a user can view the contents of the edited report.
Still further, as shown in fig. 2, fig. 2 is a schematic diagram of a process flow of generating an analysis report driven by a data message in a GUI client, and when a target CFD simulation analysis report is generated, S201: selecting and opening a project, and extracting an analysis report meta-template according to the category of the professional field to which the project belongs; s202: carrying out post-treatment visualization analysis; the user performs post-processing analysis on the flow field data through a GUI operation interface, such as: the method comprises the steps of setting the number of contour lines, setting a plurality of contour line values to be observed according to a numerical range, generating various analysis operations such as contour graphs, and the like, wherein a system can record corresponding operation logs and record analysis methods and parameters used for analysis; s203: performing analysis report generation; a user clicks a report generation button through a GUI operation interface, and an analysis report meta-template is matched from a template set according to the project meta-information; s204: instantiating data generation script parameters in the analysis report meta template according to the post-processing analysis operation log to generate an analysis report template; and issues ctReport topic message psmessage.pub ("ctReport", [ "P" ]), starts data generation processing; s205: the script executor traverses the execution data to generate a script according to the analysis report template and issues a data content production message; specifically, according to the message subscription relationship, the script execution module receives a ctReport topic message, and performs the following processing: loading a project analysis report template, scanning all placeholder variables in the report template, generating a script according to the data of each placeholder variable, and issuing the following data generation messages: pub ("ctGridInfo", [ "get", "P" ], { "fkey": val ",. }); pub (ctSchem ", [" get "," P "], {" fkey ": val",.); psmessage.pub ("ctResudial", [ "curve", "P" ], { "data": residual.dat "}); pub (ctFlow, [ "con," "P" ], { "fkey": val, }); pub ("ctFlow", [ "steamline", "P" ], { "fkey": val ",.); s206: analyzing and processing the service response message, calling a post-processing analysis interface, and processing to generate corresponding analysis result data; according to the message subscription relationship, the analysis processing service receives and responds to process the following messages: for the ctGridInfo subject message, the analysis processing service analyzes the project grid file, obtains grid information, and issues dtGridInfo subject data psMessage.Pub (dtGridInfo ', { "type': ctGridInfo.get '," data' { "format ': string'," cnt ': grid information content' }); for the ctSchem topic message, the analysis processing service extracts the solution setting of the item and publishes dtSchem topic data psMessage.Pub (dtSchem, { "type": ctSchem "," data ": format": string "," cnt ": solution setting data information" }); for the ctResidual topic message, the analysis processing service calls a residual curve interface of a post-processing tool, draws a residual curve according to the residual data obtained by solving and calculating, and publishes dtResidual topic data psMessage. Pub (dtResidual ', { "type ': ctResidual '," data ' { "format ': png '," cnt ': residual). For the ctFlow topic message, the analysis processing service calls a post-processing tool to create a corresponding visual analysis image, and issues dtFlow topic data, including contour map contourr and flow map steadline: pub (dtFlow { "type": ctflow. Con), "data": format { "png": cnt ": con. Png" }); pub ("dtFlow", { "type": ctflow. Streamline "," data ": format": png "," cnt ": streamline. Png }); s207: the report generation module generates an analysis report document by using a template engine; according to the message subscription relationship, the report generation module receives subject data such as dtGridInfo, dtSchem, dtResidual, dtFlow and the like, sets the received data into data, replaces corresponding placeholder variables with data contents by a template engine, further performs display rendering processing on the data contents according to a display format script, generates an analysis report Docx document, and issues dtReport subject data psmE.Pub (dtReport, { "type": none, { "data" { "format": docx "," cnt ": report. Docx }); s208: loading and displaying an analysis report document by a document editor; according to the message subscription relationship, the GUI client can receive a dtReport topic data, the GUI client can open a report.
The method for generating a simulation analysis report disclosed by the embodiment comprises the following steps: after the target CFD simulation test is finished, extracting a target CFD simulation analysis report template corresponding to the target CFD simulation test; traversing each placeholder variable in the target CFD simulation analysis report template, and triggering and executing the data generation script corresponding to the placeholder variable; calling an analysis processing service based on a defined data generation function in the data generation script, and processing simulation test result data to generate corresponding analysis result data; and replacing the corresponding occupancy variable in the target CFD simulation analysis report template by the simulation test analysis result data, and performing corresponding format rendering processing to obtain a target simulation analysis report. Therefore, the data generation script is automatically executed through the script execution module based on the template, the simulation test result data is processed to generate corresponding analysis result data, and the obtained dynamic data content is embedded into the report template to generate the CFD simulation analysis report, so that the automation degree of analysis report generation processing is improved, and the report generation efficiency is improved.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, the embodiment of the present disclosure further provides a device for generating a simulation analysis report corresponding to the method for generating a simulation analysis report, and since the principle of solving the problem of the device in the embodiment of the present disclosure is similar to the method for generating a simulation analysis report in the embodiment of the present disclosure, the implementation of the device may refer to the implementation of the method, and repeated details are omitted.
Referring to fig. 3, fig. 3 is a schematic diagram of a simulation analysis report generation apparatus according to an embodiment of the present disclosure, and as shown in fig. 3, the simulation analysis report generation apparatus 300 according to the embodiment of the present disclosure includes:
the template management module 310 is configured to extract, according to a target CFD simulation test, a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test from an analysis report template set according to a template type; wherein the target CFD simulation analysis report meta-template includes at least one placeholder variable representing dynamic data content; each place-occupying variable corresponds to a data generation script;
the template instantiation module 320 is used for instantiating the data generation script parameters in the target CFD simulation analysis report meta-template according to the method parameters in the analysis operation message based on the post-processing analysis log data of the user to generate a target CFD simulation test report template;
the script execution module 330 is configured to traverse each placeholder variable in the target CFD simulation analysis report template, trigger execution of the data generation script corresponding to the placeholder variable, call an analysis processing service according to a processing method and parameters in a script function, and process test result data by the analysis processing service to generate analysis result data;
the analysis processing service module 340 is responsible for specifically executing a data content generation script, and when receiving a data generation message, calls a corresponding post-processing analysis function API interface according to an analysis method in the message, and processes test result data to generate analysis result data, such as a residual error curve, a flow field cloud chart, a flow chart, and the like;
the report generation module 350 is used for receiving analysis result data generated by each data generation script, replacing the placeholder variables with the data contents after the data contents of all the placeholder variables in the template are received, and performing corresponding display format rendering processing to obtain a target simulation analysis report;
and the message middleware module 360 is responsible for data communication among the modules and performs communication distribution of the data messages among the modules according to the subscription relation of the message subjects.
In an optional embodiment, the template management module 310 is configured to extract a target CFD simulation analysis report template corresponding to the target CFD simulation test according to the following steps:
based on the test information of the target CFD simulation test, extracting a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test from a template set according to the category of the professional field;
and instantiating data generation script parameters in the target CFD simulation analysis report meta-template according to the analysis operation method and parameters in the operation log in the post-processing analysis process of the target CFD simulation test result data to generate a target CFD simulation test report template.
In an optional embodiment, the template set used by the template management module 310 includes at least one type of target CFD simulation analysis report meta-template corresponding to a service domain, and each placeholder variable in the target CFD simulation analysis report meta-template obtains any one of the following data information:
the method comprises the steps of grid information of a target CFD simulation test, a solving scheme of the target CFD simulation test, a calculation residual error map of the target CFD simulation test and a flow field analysis map of the target CFD simulation test.
In an optional implementation manner, the script execution module 330 is specifically configured to: and calling an analysis processing service according to the processing method and the parameters in the data generation function based on the defined data generation function in the data generation script, and processing the simulation test result data by the analysis processing service to generate corresponding analysis result data.
In an optional implementation manner, the analysis processing service module 340 is specifically configured to: and responding to specific data generation information of the script execution module, specifically executing data content generation scripts, calling corresponding API (application program interface) interfaces of post-processing analysis functions according to an analysis method in the information when the data generation information is received, and processing the test result data to generate analysis result data, such as a residual error curve, a flow field cloud chart, a flow chart and the like.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
The device for generating the simulation analysis report disclosed by the embodiment of the disclosure is used for extracting a target CFD simulation analysis report template corresponding to a target CFD simulation test after the target CFD simulation test is completed through a template extraction module; wherein the target CFD simulation analysis report template includes at least one placeholder variable; each place-occupying variable corresponds to a data generation script; the script execution module is used for traversing each placeholder variable in the target CFD simulation analysis report template and executing the data generation script corresponding to the placeholder variable according to the position sequence of the placeholder variable; the data extraction module is used for automatically extracting simulation test analysis result data corresponding to each placeholder variable based on a defined data generation function in the data generation script; and the replacing module is used for replacing the corresponding position-occupying variable in the target CFD simulation analysis report template by using the simulation test analysis result data, and performing corresponding display format rendering processing to obtain a target simulation analysis report. Therefore, the CFD simulation analysis report is automatically generated by using the template, the automation degree of analysis report generation processing is improved, and the report generation efficiency is improved.
Based on the same technical concept, the embodiment of the application also provides the electronic equipment. An embodiment of the present disclosure further provides an electronic device 400, as shown in fig. 4, which is a schematic structural diagram of the electronic device 400 provided in the embodiment of the present disclosure, and includes:
a processor 410, a memory 420, and a bus 430; the memory 420 is used for storing execution instructions and includes a memory 421 and an external memory 422; the memory 421 is also referred to as an internal memory, and is configured to temporarily store operation data in the processor 410 and data exchanged with an external memory 422 such as a hard disk, the processor 410 exchanges data with the external memory 422 through the memory 421, and when the electronic device 400 operates, the processor 410 and the memory 420 communicate through the bus 430, so that the processor 410 may perform the steps of the simulation analysis report generation method shown in the above method embodiment.
The embodiments of the present disclosure also provide a computer storage medium, where a computer program is stored on the computer storage medium, and when the computer program is executed by a processor, the steps of the method for generating a simulation analysis report in the above method embodiments are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute the steps of the method for generating a simulation analysis report in the foregoing method embodiments, which may be referred to specifically for the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK) or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatus, storage medium and device may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus, storage medium, device and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units into only one type of logical function may be implemented in other ways, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, but not to limit the technical solutions, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes and substitutions do not depart from the spirit and scope of the embodiments disclosed herein, and they should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (9)

1. A method for generating a simulation analysis report, the method comprising:
after the target CFD simulation test is finished, extracting a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test according to the professional field type; wherein the target CFD simulation analysis report meta-template includes at least one placeholder variable representing dynamic data content; each place-occupying variable corresponds to a data generation script;
instantiating data generation script parameters in the target CFD simulation analysis report meta-template according to analysis operation methods and parameters in an operation log in a post-processing analysis process of target CFD simulation test result data to generate a target CFD simulation test report template;
traversing each placeholder variable in the target CFD simulation analysis report template, and triggering and executing the data generation script corresponding to the placeholder variable;
based on the defined data generation function in the data generation script, calling an analysis processing service according to the processing method and parameters in the data generation script, and processing the simulation test result data by the analysis processing service to generate corresponding analysis result data;
and replacing the corresponding placeholder variable in the target CFD simulation analysis report template by using the analysis result data, and performing corresponding format rendering processing to obtain a target simulation analysis report.
2. The method of claim 1, wherein a target CFD simulation test report template corresponding to the target CFD simulation test is generated according to the following steps:
based on the test information of the target CFD simulation test, extracting a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test from a template set according to the category of the professional field;
and instantiating data generation script parameters in the target CFD simulation analysis report meta-template according to the analysis operation method and parameters in the operation log in the post-processing analysis process of the target CFD simulation test result data to generate a target CFD simulation test report template.
3. The method according to claim 2, wherein the template set includes at least one type of target CFD simulation analysis report meta-template corresponding to the service domain, and each placeholder variable in the target CFD simulation analysis report meta-template acquires any one of the following data information:
the method comprises the steps of grid information of a target CFD simulation test, a solving scheme of the target CFD simulation test, a calculation residual error map of the target CFD simulation test and a flow field analysis map of the target CFD simulation test.
4. The method of claim 1, wherein processing the simulation test result data to generate corresponding analysis result data based on the defined data generating function in the data generating script comprises:
and generating a data generation function defined in the data generation script corresponding to each placeholder variable in the target CFD simulation analysis report template, and calling an analysis processing service according to a processing method and parameters in the data generation function to generate simulation test analysis result data corresponding to the placeholder variable.
5. An apparatus for generating a simulation analysis report, the apparatus comprising:
the template management module is used for extracting a target CFD simulation analysis report meta-template corresponding to the target CFD simulation test from an analysis report template set according to the professional field type according to the target CFD simulation test; wherein the target CFD simulation analysis report meta-template includes at least one placeholder variable representing dynamic data content; each place-occupying variable corresponds to a data generation script;
the template instantiation module is used for instantiating the data generation script parameters in the target CFD simulation analysis report meta-template according to the method parameters in the analysis operation message based on the operation log data in the user post-processing analysis process to generate a target CFD simulation test report template;
the script execution module is used for traversing each placeholder variable in the target CFD simulation analysis report template, triggering and executing the data generation script corresponding to the placeholder variable, calling an analysis processing service according to a processing method and parameters in a script function, and processing test result data by the analysis processing service to generate analysis result data;
the analysis processing service module is responsible for specifically executing the data content generation script, and when receiving the data generation message, calls a corresponding post-processing analysis function API interface according to an analysis method in the message, and processes the test result data to generate analysis result data;
the report generation module is used for receiving analysis result data generated by the analysis processing service, replacing the position-occupying variables with the data contents after the data contents of all the position-occupying variables in the template are received, and performing corresponding format rendering processing to obtain a target simulation analysis report;
and the message middleware is responsible for data communication among the modules and carries out communication distribution of the data messages among the modules according to the subscription relation of the message subjects.
6. The apparatus of claim 5, wherein the template management module is configured to extract and generate a target CFD simulation analysis report template corresponding to the target CFD simulation test according to the following steps:
extracting the target CFD simulation analysis report meta-template corresponding to the target CFD simulation test from a template set according to the professional field type based on the test information of the target CFD simulation test;
and instantiating the data generation script parameters in the target CFD simulation analysis report meta-template according to the method parameters in the operation log message based on the post-processing analysis operation log of the target CFD simulation test result data to generate a target CFD simulation analysis report template aiming at the target CFD simulation test.
7. The apparatus according to claim 5, wherein the template management module is specifically configured to enable the template set to include a target CFD simulation analysis report meta-template corresponding to at least one type of professional field, and each placeholder variable in the target CFD simulation analysis report meta-template is corresponding to any one of the following data information:
the method comprises the steps of grid information of a target CFD simulation test, a solving scheme of the target CFD simulation test, a calculation residual error map of the target CFD simulation test and a flow field analysis map of the target CFD simulation test.
8. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the method of generating a simulation analysis report according to any of claims 1 to 4.
9. A computer storage medium, characterized in that the computer storage medium has stored thereon a computer program which, when being executed by a processor, performs the steps of the method of generating a simulation analysis report according to any of claims 1 to 4.
CN202210956006.0A 2022-08-10 2022-08-10 Simulation analysis report generation method, device, equipment and storage medium Pending CN115310420A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210956006.0A CN115310420A (en) 2022-08-10 2022-08-10 Simulation analysis report generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210956006.0A CN115310420A (en) 2022-08-10 2022-08-10 Simulation analysis report generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115310420A true CN115310420A (en) 2022-11-08

Family

ID=83859963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210956006.0A Pending CN115310420A (en) 2022-08-10 2022-08-10 Simulation analysis report generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115310420A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115658241A (en) * 2022-12-28 2023-01-31 北京云道智造科技有限公司 Method and device for determining simulation result
CN115796405A (en) * 2023-02-03 2023-03-14 阿里巴巴达摩院(杭州)科技有限公司 Solution report generation method for optimization model and computing equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115658241A (en) * 2022-12-28 2023-01-31 北京云道智造科技有限公司 Method and device for determining simulation result
CN115796405A (en) * 2023-02-03 2023-03-14 阿里巴巴达摩院(杭州)科技有限公司 Solution report generation method for optimization model and computing equipment
CN115796405B (en) * 2023-02-03 2023-05-02 阿里巴巴达摩院(杭州)科技有限公司 Solution report generation method and computing device for optimization model

Similar Documents

Publication Publication Date Title
CN108319547B (en) Test case generation method, device and system
US11327749B2 (en) System and method for generating documentation for microservice based applications
CN115310420A (en) Simulation analysis report generation method, device, equipment and storage medium
CN108984155B (en) Data processing flow setting method and device
CN109448100B (en) Three-dimensional model format conversion method, system, computer device and storage medium
CN108205674B (en) Social APP content identification method, electronic device, storage medium and system
US20160283848A1 (en) Automated decision support provenance and simulation
US9418241B2 (en) Unified platform for big data processing
CN110929489A (en) Form generation and form data processing method and system
CN110633959A (en) Method, device, equipment and medium for creating approval task based on graph structure
CN106779582B (en) TWS (two way service) process configuration method and device
CN116340260A (en) Building model data rendering method and device, electronic equipment and readable storage medium
CN113052322A (en) Machine learning modeling method and device, storage medium and processor
CN117235527A (en) End-to-end containerized big data model construction method, device, equipment and medium
CN115757639A (en) Data source synchronization method and device, electronic equipment and storage medium
CN110990104B (en) Texture rendering method and device based on Unity3D
CN114022105A (en) Data processing method and device, electronic equipment and readable storage medium
CN110618881B (en) Method and system for simulating message queue
CN114416840A (en) Data acquisition method and device combining RPA and AI, server and storage medium
CN112257450A (en) Data processing method, device, readable storage medium and equipment
CN114066110A (en) System for providing machine learning service for user
CN111309706A (en) Model training method and device, readable storage medium and electronic equipment
KR101273374B1 (en) System and Method for executing simulation workflow based on plug-in
CN116383095B (en) Smoking test method and system based on RPA robot and readable storage medium
CN112948244B (en) Method, device and equipment for industrial internet information model test

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