Chemical process simulation method, electronic equipment and storage medium
By obtaining chemical process design information and selecting and configuring the target simulation model in the multi-source model management module, the problems of information isolation and redundancy in chemical process simulation are solved, and the efficient integration and interoperability of the model are achieved.
Patent Information
- Application Number
- CN202411996286.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
AI Technical Summary
In the chemical process simulation, the existing technology has different interfaces, difficulty in integration and difficulty in sharing data in different sources, resulting in information isolation and information redundancy.
By obtaining the process flow design information of the chemical process to be simulated, based on this information, selecting the target simulation model in the multi-source model management module, and configuring it parameters, and finally controlling the simulation model to simulate the chemical process to obtain the simulation results.
By fusion modeling of multi-source models, the fit and integration between different models are simplified, the compatibility and interoperability of models are improved, and the problems of information isolation and redundancy are solved.
Smart Images

Figure CN119905155A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of chemical process processing, and in particular to a chemical process simulation method, electronic equipment and storage medium. Background Art
[0002] As a core technology in the field of chemical engineering, chemical process simulation plays a vital role in improving production efficiency, optimizing process flow and reducing costs. Traditionally, this technology mainly relies on mechanism models based on first principles, that is, describing chemical processes through fixed assumptions and simplified mathematical expressions. However, with the increasing complexity of industrial processes, traditional single mechanism models can no longer meet actual needs, and their accuracy and applicability are seriously challenged.
[0003] At present, data-driven modeling methods and integrated models from multiple sources can make full use of a large amount of historical data and provide more accurate model output. However, data-driven models are not interpretable enough and have poor generalization capabilities. Integrated models have significant differences in data sources, interface specifications, format standards, etc., leading to the emergence of "model islands".
[0004] The lack of unified standards and interfaces between models from different sources results in the ineffective integration of data, knowledge and resources, reducing overall efficiency and collaboration capabilities.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a chemical process simulation method, electronic device and storage medium to at least solve the technical problems of information isolation and information redundancy caused by different simulation model interfaces, integration difficulties and difficulty in sharing data from different sources during the simulation of chemical processes in related technologies.
[0007] According to one embodiment of the present invention, a chemical process simulation method is provided, comprising: obtaining process design information of a chemical process to be simulated; selecting in a multi-source model management module based on the process design information to obtain a target simulation model, wherein the multi-source model management module includes at least one preset simulation model; configuring parameters of the target simulation model based on the process design information to obtain a target configuration result; and controlling the target simulation model to simulate the chemical process to be simulated based on the configuration result to obtain a simulation result.
[0008] Optionally, parameter configuration of a target simulation model is performed based on the process flow design information to obtain a target configuration result, including: acquiring stream information of the chemical process to be simulated based on the process flow design information, wherein the stream information includes: inlet stream information and outlet stream information; parameter configuration of a target simulation model is performed based on the inlet stream information and the outlet stream information to obtain a target configuration result.
[0009] Optionally, the chemical process simulation method also includes: obtaining flash type information in the outlet flow information; in response to the flash type being temperature-pressure, obtaining a target configuration result; in response to determining that the target configuration result does not include molar flow, temperature and pressure, supplementing the molar flow, temperature and pressure to the target configuration result.
[0010] Optionally, configuring parameters of the target simulation model based on the process flow design information to obtain the target configuration result also includes: in response to the absence of parameters corresponding to the process flow design information in the target simulation model, obtaining parameter information in the custom variable control model; configuring parameters of the target simulation model based on the parameter information to obtain the target configuration result.
[0011] Optionally, based on the configuration results, the target simulation model is controlled to simulate the chemical process to be simulated, and the simulation results obtained include: obtaining initial input data in the process design information; using the target simulation model to perform data preprocessing on the initial input data to obtain first input data; using the objective function in the target simulation model to process the first input data to obtain the simulation results.
[0012] Optionally, the chemical process simulation method also includes: obtaining file information of each preset model in the multi-source model management module; storing the file information in a target database; and in response to selecting a target simulation model in the multi-source model management module, loading the target simulation model based on the target database.
[0013] Optionally, the file information includes: calculation file information, dependent file information and help file information.
[0014] According to another aspect of one of the embodiments of the present invention, there is also provided a chemical process simulation device, including: an acquisition module, used to acquire process flow design information of a chemical process to be simulated; a processing module, used to select in a multi-source model management module based on the process flow design information to obtain a target simulation model, wherein the multi-source model management module includes at least one preset simulation model; a configuration module, used to configure parameters of the target simulation model based on the process flow design information to obtain a target configuration result; and a control module, used to control the target simulation model to simulate the chemical process to be simulated based on the configuration result to obtain a simulation result.
[0015] Optionally, the acquisition module is also used to acquire the flow stream information of the chemical process to be simulated based on the process flow design information, wherein the flow stream information includes: inlet flow stream information and outlet flow stream information; the configuration module is also used to perform parameter configuration of the target simulation model based on the inlet flow stream information and the outlet flow stream information to obtain the target configuration result.
[0016] Optionally, the acquisition module is also used to: obtain the flash type information in the outlet flow information; in response to the flash type being temperature-pressure, obtain the target configuration result; the configuration module is also used to, in response to determining that the target configuration result does not include molar flow, temperature and pressure, supplement the molar flow, temperature and pressure to the target configuration result.
[0017] Optionally, the acquisition module is also used to obtain parameter information in the custom variable control model in response to the absence of parameters corresponding to the process flow design information in the target simulation model; the configuration module is also used to configure parameters of the target simulation model based on the parameter information to obtain a target configuration result.
[0018] Optionally, the acquisition module is also used to acquire initial input data in the process flow design information; the control module is also used to: use the target simulation model to perform data preprocessing on the initial input data to obtain first input data; use the objective function in the target simulation model to process the first input data to obtain simulation results.
[0019] Optionally, the acquisition module is also used to obtain file information of each preset model in the multi-source model management module; the processing module is also used to: store the file information in the target database; in response to selecting a target simulation model in the multi-source model management module, load the target simulation model based on the target database.
[0020] Optionally, the file information includes: calculation file information, dependent file information and help file information.
[0021] According to one embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the above-mentioned address data processing method is executed when the program is running.
[0022] According to one embodiment of the present invention, a computer-readable storage medium is provided, including: the computer-readable storage medium includes a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute the above-mentioned address data processing method.
[0023] According to one embodiment of the present invention, a computer program product is further provided, comprising: a computer program, and when the computer program is executed by a processor, the above-mentioned address data processing method is implemented.
[0024] In an embodiment of the present invention, a method of obtaining process design information of a chemical process to be simulated is adopted, a target simulation model is obtained by selecting in a multi-source model management module based on the process design information, and parameters of the target simulation model are configured based on the process design information to obtain a target configuration result, and finally the target simulation model is controlled based on the configuration result to simulate the chemical process to be simulated to obtain a simulation result. By fusing and modeling multi-source models, the purpose of simplifying the fit and integration between different models is achieved, thereby achieving the technical effect of improving the compatibility and interoperability of the model, and further solving the technical problems of information isolation and information redundancy caused by different simulation model interfaces, integration difficulties and difficulty in sharing data from different sources in the process of simulating chemical processes in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 is a hardware structure block diagram of a chemical process simulation method according to one embodiment of the present invention;
[0027] Figure 2 is a flow chart of a chemical process simulation method according to one embodiment of the present invention;
[0028] Figure 3 is a schematic diagram of a chemical process simulation method according to one embodiment of the present invention;
[0029] Figure 4 is a schematic diagram of another chemical process simulation method according to one embodiment of the present invention;
[0030] Figure 5 It is a structural block diagram of an address data processing device according to one embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] According to an embodiment of the present invention, a method embodiment of a chemical process simulation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] In the related art, related multi-model integration methods include the following:
[0035] (1) Secondary development: To achieve model fusion, each process simulation software needs to be customized for secondary development, which is a huge workload and leads to high software costs. In addition, after the software version is upgraded, the developed integrated simulation controls may become invalid and need to be redeveloped, which increases the complexity of use, maintenance and after-sales.
[0036] (2) Ensemble learning method: multiple base learners (such as decision trees, support vector machines, etc.) are combined to form a more robust prediction model. Although ensemble learning can improve model accuracy, the lack of physical phenomena in chemical process simulation makes it difficult to deeply understand the model results. In addition, for complex chemical processes, the ensemble model may not provide effective physical background support, limiting its scope of application.
[0037] (3) CapeOpen standards: a set of open standards for chemical process simulation and emulation software. Through the CapeOpen standards, users can exchange and share unit operations, thermodynamic calculations, and other model components between different software tools without being restricted to specific software developers or platforms. CapeOpen provides several standardized interfaces to promote interoperability between different process simulators and models, and is widely used in chemical process simulation. Although the CapeOpen standard improves the compatibility between models, it is mainly limited to standard unit models and is difficult to cope with highly customized process requirements. In addition, there are still technical barriers to the integration of user-defined models, data models, and existing models, which limits the widespread application of the model.
[0038] In summary, the main disadvantages of the prior art include:
[0039] (1) Limited model capabilities: When faced with complex processes, a single model lacks explanatory power and adaptability and is unable to meet the needs of high-precision simulation.
[0040] (2) Lack of unified standards: Although there are standardized interfaces, interface wizards and standardization support between models are still insufficient, which hinders the smooth integration of multi-source models.
[0041] (3) Difficulty in integration: Models from different sources have inconsistent interfaces and formats, making the integration process complex and inefficient.
[0042] (4) High maintenance cost: The workload caused by secondary development is huge and the software maintenance cost is high.
[0043] The chemical process simulation method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 is a hardware structure diagram of a chemical process simulation method according to one embodiment of the present invention. Figure 1 As shown, the computer terminal 10 (or electronic device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0044] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or electronic device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0045] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the chemical process simulation method in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned chemical process simulation method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0046] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0047] The display may be, for example, a touch screen type liquid crystal display (LCD), which may enable a user to interact with a user interface of the computer terminal 10 (or electronic device).
[0048] It should be noted that, in some optional embodiments, the above Figure 1 The computer device (or electronic device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the above-described computer device (or electronic device).
[0049] Figure 2 is a flow chart of a chemical process simulation method according to one embodiment of the present invention, such as Figure 2 As shown, the method comprises the following steps:
[0050] Step S20, obtaining process design information of the chemical process to be simulated;
[0051] Specifically, all process design information about the chemical process to be simulated is collected. The process design information includes but is not limited to: stream settings, experimental purpose, required raw materials, reaction conditions (such as temperature, pressure, catalyst, etc.), expected products and their properties, etc.
[0052] Step S22, selecting in a multi-source model management module based on the process design information to obtain a target simulation model, wherein the multi-source model management module includes at least one preset simulation model;
[0053] In step S22, the preset simulation model may have different sources, wherein the sources of the preset simulation model include but are not limited to: calculation models written in C++, python, matlab, etc.
[0054] Specifically, one or more target simulation models that best match the chemical process to be simulated are selected in the multi-source model management module. The preset simulation models in the multi-source model management module are constructed based on different chemical principles, mathematical models or calculation methods and are used to simulate different types of chemical processes. The goal of the selection is to find a model that can accurately reflect the experimental conditions and expected results based on the process design information.
[0055] Step S24, configuring parameters of the target simulation model based on the process design information to obtain a target configuration result;
[0056] Specifically, the parameters of the target simulation model are configured according to the process design information, including but not limited to: setting the input parameters (such as raw material composition, reaction conditions, etc.) and output parameters (such as product properties, reaction rate, etc.) of the target model, and configuring the calculation accuracy, number of iterations and other parameters required for the model operation.
[0057] Step S26, based on the configuration result, the target simulation model is controlled to simulate the chemical process to obtain a simulation result.
[0058] Specifically, the configured target simulation model is used to simulate the chemical process to be simulated. The target simulation model is run, the configured parameters are input, and the target simulation model is waited for to calculate the simulation results. The simulation results include, but are not limited to, the temperature, pressure, concentration changes during the reaction, the output and quality of the product, and other information.
[0059] Based on the above steps S20 to S26, a method of obtaining process design information of the chemical process to be simulated is adopted, a selection is made in the multi-source model management module based on the process design information to obtain a target simulation model, and parameters of the target simulation model are configured based on the process design information to obtain a target configuration result, and finally the target simulation model is controlled based on the configuration result to simulate the chemical process to be simulated to obtain a simulation result. By fusing and modeling multi-source models, the purpose of simplifying the fit and integration between different models is achieved, thereby achieving the technical effect of improving the compatibility and interoperability of the model, and further solving the technical problems of information isolation and information redundancy caused by different simulation model interfaces, integration difficulties and difficulty in sharing data from different sources in the process of simulating chemical processes in related technologies.
[0060] Optionally, in step S24, parameters of the target simulation model are configured based on the process design information, and the target configuration result obtained includes:
[0061] Step S241, acquiring stream information of the chemical process to be simulated based on the process design information, wherein the stream information includes: inlet stream information and outlet stream information;
[0062] Step S242, configuring parameters of the target simulation model based on the inlet stream information and the outlet stream information to obtain a target configuration result.
[0063] Specifically, streams are channels for the flow of materials in a chemical process, and are usually divided into inlet streams and outlet streams. Inlet streams are materials that enter a chemical process, while outlet streams are materials that flow out of a chemical process. Stream information includes stream names and component bases, where stream names are used to characterize the names of streams connected to the user model, and component bases are used to select the component proportions of the streams input into the target simulation model. Component bases include three bases: mole, mass, and standard molar volume.
[0064] Furthermore, the outlet stream includes unique configurations: whether the composition is normalized, effective phase, and flash type. Whether the composition is normalized is used to determine whether normalization is performed when the component basis is mole fraction. Effective phase specifies the effective phase of the outlet stream. Flash type is used to select whether flash completion is performed. The flash types that can be selected include: no flash, "temperature-pressure" flash.
[0065] Specifically, according to the design information of the chemical process, the stream information involved in the experiment is extracted. According to the extracted inlet stream information and outlet stream information, the parameters of the target simulation model are configured. The configuration content includes the component proportion, effective phase state, flash type, etc. of the stream.
[0066] Based on the above steps S241 to S242, the flow stream information of the chemical process to be simulated is obtained based on the process flow design information; the parameters of the target simulation model are configured based on the inlet flow stream information and the outlet flow stream information to obtain the target configuration results, thereby ensuring that the material flow channel in the model is consistent with the actual experiment and improving the accuracy of the simulation.
[0067] Optionally, the chemical process simulation method further includes:
[0068] Step S251, obtaining flash type information in the outlet stream information;
[0069] Step S252, in response to the flash type being temperature-pressure, obtaining a target configuration result;
[0070] Step S253, in response to determining that the target configuration result does not include the molar flow rate, temperature and pressure, the molar flow rate, temperature and pressure are added to the target configuration result.
[0071] Specifically, in order to improve the target configuration results, all parameters that need to be completed are specified as CONSTANT. Select the parameters to be completed according to the needs, including: parameter type, parameter name, unit and value. At the same time, the corresponding physical type will be automatically matched according to the parameter name. The completion rules are as follows:
[0072] (1) Existing parameters do not need to be supplemented: Variables that already appear in the output variable list do not need to be supplemented. Output variables are used to represent key parameters or variables calculated and output by the target simulation model.
[0073] (2) Stream information completion rules: Stream variables include molar flow rate, temperature, pressure, molar enthalpy, molar volume, molar mass and molar composition. When the export stream is set to "No flash", it is necessary to check and complete the stream variables that are not listed in the "Output variables".
[0074] (3) Flash type matches output variables: If the flash type is set to "temperature-pressure", the output variables must include variables related to temperature, pressure, and flow. If missing, they need to be completed. Under this flash type, the output variables are only allowed to include the molar flow, temperature, pressure, and composition of the stream. If other types of variables are included, it will be prompted that the flash type does not match the output variables.
[0075] (4) Composition variable completion: If the output variables do not contain the composition variables of the export components, the composition variables of the stream need to be completed.
[0076] Furthermore, the type of the completed composition variable must be consistent with the component basis selected in the stream configuration.
[0077] Based on the above steps S251 to S253, the flash type information in the outlet stream information is obtained; in response to the flash type being temperature-pressure, the target configuration result is obtained; in response to determining that the target configuration result does not include molar flow, temperature and pressure, the molar flow, temperature and pressure are added to the target configuration result, and the variables of the outlet stream are checked and completed. This ensures the comprehensiveness and accuracy of the stream information, which helps to more accurately simulate the material flow and state changes in the chemical process.
[0078] Optionally, in step S24, parameter configuration of the target simulation model is performed based on the process design information, and obtaining the target configuration result further includes:
[0079] Step S243, in response to the fact that there is no parameter corresponding to the process flow design information in the target simulation model, obtaining parameter information in the custom variable control model;
[0080] Step S244, configuring the parameters of the target simulation model based on the parameter information to obtain a target configuration result.
[0081] Specifically, the model configuration parameters other than the flow information are controlled by custom variables. Custom variables include input variables and output variables, and their characteristics include labels, physical types, units, and descriptions. Input variables must also include the value feature.
[0082] Based on the above steps S243 to S244, in response to the fact that there are no parameters corresponding to the process design information in the target simulation model, the parameter information in the custom variable control model is obtained; the target simulation model is parameter configured based on the parameter information to obtain the target configuration result, and the useful information in the custom variable control model is integrated into the target simulation model. Through this fusion and integration, the target simulation model is improved and includes all parameter information required for the experimental design, thereby improving the integrity of the model so that it can more accurately reflect the actual chemical process.
[0083] Optionally, in step S26, the target simulation model is controlled based on the configuration result to simulate the chemical process to be simulated, and the obtained simulation results include:
[0084] Step S261, obtaining initial input data in the process flow design information;
[0085] Step S262, using the target simulation model to perform data preprocessing on the initial input data to obtain first input data;
[0086] Step S263, using the objective function in the target simulation model to process the first input data to obtain a simulation result.
[0087] Specifically, the initial input data in the process flow design information is obtained, and the initial input data is preprocessed by unit conversion, normalization and other preprocessing to obtain the first input data. The first input data is processed by the objective function in the target simulation model to obtain the simulation result, wherein the simulation result needs to be unit converted and denormalized to obtain the final output result of the target simulation model.
[0088] Furthermore, in process simulation, the solution methods are usually divided into simultaneous equation method, sequential module method and simultaneous module method. The simultaneous equation method establishes an overall model containing all variables and equations, usually a nonlinear set of equations. When solving, all equations will be solved at the same time to ensure that the mutual influence between variables is fully considered. The simultaneous equation method can flexibly change the independent variables, dependent variables, and dof to achieve simulation and optimization of different mathematical problems. The sequential module method decomposes the model components into multiple modules or unit operations and solves them in turn. Each module calculates the output based on the input data, and then passes the result to the next module. This method is intuitive and easy to implement, but it is troublesome to converge in multi-cycle processes. When calculating the optimization problem, an optimizer must be used. The inaccurate second-order derivative can easily lead to optimization failure. Simultaneous module method: This is a method that combines the characteristics of the first two. In the joint module method, the calculation equations and variables inside the module are treated as black boxes. When solving, you only need to care about the import and export variables. This can improve the success rate of solving optimization problems while maintaining the advantages of modularity. When the black box models inside the module are models from different sources, multi-source model fusion modeling is realized, and the integrated model can meet the simulation and optimization of different scenario applications.
[0089] The target simulation model based on the joint module, when solving the joint solution, will describe the unit model outlet equations into a nonlinear equation group for solution. The nonlinear equation group is written in the form of an open equation, one side of the equal sign is the relationship between all variables, including inlet variables, outlet variables, custom input variables and custom output variables, and the other side is the residual. When the residuals of the equation group are all 0 or less than the set tolerance value, the target simulation model is considered to have converged.
[0090] Based on the above steps S261 to S263, the initial input data in the process flow design information is obtained; the initial input data is preprocessed using the target simulation model to obtain first input data; the first input data is processed using the objective function in the target simulation model to obtain simulation results. The initial input data may come from different sources and have different units and formats. By obtaining the initial input data in the process flow design information and performing preprocessing such as unit conversion and normalization, the consistency and comparability of the data are ensured, and it helps to simplify the fitting process between different models.
[0091] Optionally, the chemical process simulation method further includes:
[0092] Step S271, obtaining file information of each preset model in the multi-source model management module;
[0093] Step S272, storing the file information in the target database;
[0094] Step S273, in response to selecting a target simulation model in the multi-source model management module, loading the target simulation model based on the target database.
[0095] Specifically, the file information of each model in the multi-source model management module is obtained. The file information includes but is not limited to the model type, model name, input variables, output variables, dependent file path, running logic description, etc. This information is crucial for entering the model information into the database in the subsequent steps and accurately matching the model when loading. After obtaining the file information of all preset models, the next step is to store this file information in the target database. The design of the template database needs to be able to support information storage of different types of models and have sufficient flexibility and scalability to accommodate new model types that may be added in the future. When the target simulation model is selected from the multi-source model management module, the model can be loaded based on the information in the target database. This includes steps such as reading the file information of the model from the database, configuring the environment required for the model to run, and loading the model file. After successful loading, the user can use the selected target model for simulation or calculation.
[0096] Furthermore, according to the relevant usage statement method of the template database, corresponding data for starting the target simulation model and the attribute information of the model are generated for different types of target simulation models. The target simulation model is loaded by using an external model loading module, wherein the external model loading module includes an external model type and a user project name. The external model type is used for the user to select the type of target simulation model to be called, including: dll, CapeOpen, python, matlab, third-party software and other subroutine types. The user model name is used to select the file to be called as the target simulation model.
[0097] Specifically, when the target simulation model has been encapsulated as a dynamic link library, when loading the model, the external model loading module is responsible for importing the dynamic link library, and it is also necessary to select its entry function to use the functions in the link library to achieve the purpose of calling the model. When the operation of the target simulation model must rely on its original environment and needs to call third-party software, you can choose to communicate through the http protocol. At this time, you need to configure the software server address to achieve the purpose of calling the model. For models that exist in matlab, use the C++ MATLAB engine API to compile MATLAB functions into C++ dynamic link libraries for calling; in the process of interacting with C++, necessary processing is required to transfer data between them, and convert MATLAB data types into C++ data types. For models written in Python, ensure that the target simulation model starts the Python environment and installs necessary libraries. Start the http service, set the software server address, and be responsible for loading .pt files and processing requests.
[0098] Based on the above steps S271 to S273, the file information of each preset model in the multi-source model management module is obtained; the file information is stored in the target database; in response to selecting the target simulation model in the multi-source model management module, the target simulation model is loaded based on the target database, thereby realizing the unified management and storage of model information, and by storing the model information in the database, the efficiency of model management is improved. At the same time, the design of the target database has sufficient flexibility and scalability to adapt to new model types that may be added in the future, ensuring the continuity and maintainability of the multi-source model management module.
[0099] Optionally, the file information includes: calculation file information, dependent file information and help file information.
[0100] Specifically, Figure 3 is a schematic diagram of a chemical process simulation method according to one embodiment of the present invention, such as Figure 3 As shown in the figure, the file information of each preset model is divided into: calculation file information, dependent file information and help file information. The calculation file information includes: model type (such as dynamic link library, Python, MATLAB, third-party software) and model information, where the model information includes: model name (for unique identification), model address (pointing to the specific location of the model file), model description (briefly describing the purpose, function and implementation principle of the model), input variable table and output variable table (listing in detail the sequence number, bit number, type, physical type, unit and upper and lower limit information of each variable, variable types include mass flow, volume flow, etc.), and entry function (the main execution function of the model).
[0101] Specifically, the dependent file information includes the file name (clearly indicating the file content or purpose), the file address (to facilitate the system to locate and load the file) and the file description (to explain the file function, content and model association). Help file information mainly stores user manuals or operation documents to facilitate users to use the model.
[0102] Furthermore, an innovative storage solution is designed to solve the problem that different preset models have different numbers of variables or files in the input variable table, output variable table and dependent file information. The traditional method describes this information through a separate XML file, but this method fails to fully utilize the advantages of fast access to the database, and the information is not intuitive enough and the search efficiency is low. The present invention adopts a stacking method to store this information in the database according to the three columns of type, index and description, and uses ";" as a separator between different variables or files.
[0103] Based on the above operations, a high degree of inclusiveness and scalability of inconsistent model parameters from different sources is ensured, and unified management and efficient use of model information from different sources can be achieved.
[0104] Figure 4 is a schematic diagram of another chemical process simulation method according to one embodiment of the present invention, such as Figure 4 As shown, according to one embodiment of the present invention, a chemical process simulation system is provided, which includes an inlet stream configuration module, a target simulation model, a model loading module, an interactive variable configuration module, an output variable completion module, a custom variable configuration module and an outlet stream configuration module.
[0105] Specifically, the target simulation model is selected based on the process design information of the chemical process to be simulated, and the target simulation model is loaded using the model. The raw materials and reaction conditions required for the experiment are input through the inlet stream configuration module. The calculation module is used to perform simulation calculations based on the inlet stream and the model. The interactive variable configuration module is used for data transfer and processing between the system and the subroutine. In addition, users can create and configure specific custom variables through the custom variable configuration module. During the simulation process, the output variable completion module automatically supplements the missing variable information. Finally, the user views and analyzes the results of the simulation experiment through the outlet stream configuration module.
[0106] Furthermore, in the interactive variable configuration module, when the system interacts with the subroutine, the system transmits the input variables in the form of key-value pairs (bit number and value), transmits the input variables to the target simulation model in the form of key-value pairs, and the target simulation model obtains the output result after calculating the key value, and returns the output result to the system, and the system converts the output result into the form of an open equation for solving. The interactive variables are divided into input interactive variables and output interactive variables, and their characteristics include sequence number, bit number, physical type, upper and lower limits, unit, and variable type.
[0107] The sequence number determines the order in which the variables are passed to the calculation model. The bit number serves as the key for the input and output of the calculation model. The physical type is the physical type of the bit number, which is provided by the target simulation model. It is necessary to ensure that the physical type of the interaction variable is consistent with the physical type of this bit number.
[0108] Upper and lower limits: The upper and lower limits of the interaction variable are provided by the target simulation model and can also be modified by the user. After the calculation is completed, check whether the range of the variable is within the upper and lower limits.
[0109] Unit: The unit used to interact with the calculation model, which can be modified by the user.
[0110] Variable type: You can select stream variables and custom variables to pair with the target simulation model bit number. For input interaction variables, you can only select custom input variables and inlet stream variables, and for output interaction variables, you can only select custom output variables and outlet stream variables.
[0111] The physical type of the interactive variable and the target simulation model bit number must match. When the variable type is a stream variable, the stream name and the belonging variable can be selected. The belonging variables include mass flow rate, standard volume flow rate, molar flow rate, temperature, pressure, molar enthalpy, molar volume, molar mass, molar composition, mass composition, and standard volume composition.
[0112] Based on the above embodiments, a simple and efficient integration mechanism is constructed through unified interface standards, so that multiple models from different sources can be efficiently and flexibly integrated and applied, thereby improving the quality and efficiency of chemical process simulation.
[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.
[0114] In an embodiment of the present invention, a chemical process simulation device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions thereof will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and contemplated.
[0115] Figure 5 is a structural block diagram of an address data processing device according to one embodiment of the present invention. Figure 5 As shown, the device comprises:
[0116] An acquisition module 501 is used to acquire process design information of a chemical process to be simulated;
[0117] A processing module 502 is used to select a target simulation model from a multi-source model management module based on the process design information, wherein the multi-source model management module includes at least one preset simulation model;
[0118] Configuration module 503, used to configure parameters of the target simulation model based on the process design information to obtain a target configuration result;
[0119] The control module 504 is used to control the target simulation model to simulate the chemical process to be simulated based on the configuration result to obtain a simulation result.
[0120] Optionally, the acquisition module 501 is also used to acquire the flow stream information of the chemical process to be simulated based on the process flow design information, wherein the flow stream information includes: inlet flow stream information and outlet flow stream information; the configuration module 503 is also used to configure parameters of the target simulation model based on the inlet flow stream information and the outlet flow stream information to obtain the target configuration result.
[0121] Optionally, the acquisition module 501 is also used to: obtain the flash type information in the outlet flow information; in response to the flash type being temperature-pressure, obtain the target configuration result; the configuration module 503 is also used to, in response to determining that the target configuration result does not include molar flow, temperature and pressure, supplement the molar flow, temperature and pressure to the target configuration result.
[0122] Optionally, the acquisition module 501 is also used to obtain parameter information in the custom variable control model in response to the absence of parameters corresponding to the process flow design information in the target simulation model; the configuration module 503 is also used to configure parameters of the target simulation model based on the parameter information to obtain a target configuration result.
[0123] Optionally, the acquisition module 501 is also used to acquire initial input data in the process flow design information; the control module 504 is also used to: use the target simulation model to perform data preprocessing on the initial input data to obtain first input data; use the objective function in the target simulation model to process the first input data to obtain a simulation result.
[0124] Optionally, the acquisition module 501 is also used to obtain the file information of each preset model in the multi-source model management module; the processing module 502 is also used to: store the file information in the target database; in response to selecting the target simulation model in the multi-source model management module, load the target simulation model based on the target database.
[0125] Optionally, the file information includes: calculation file information, dependent file information and help file information.
[0126] According to one embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the above-mentioned address data processing method is executed when the program is running.
[0127] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0128] Step S1, obtaining process design information of a chemical process to be simulated;
[0129] Step S2, selecting in a multi-source model management module based on the process design information to obtain a target simulation model, wherein the multi-source model management module includes at least one preset simulation model;
[0130] Step S3, configuring parameters of the target simulation model based on the process design information to obtain a target configuration result;
[0131] Step S4, based on the configuration result, the target simulation model is controlled to simulate the chemical process to obtain a simulation result.
[0132] According to one embodiment of the present invention, a computer-readable storage medium is provided, including: the computer-readable storage medium includes a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute the above-mentioned address data processing method.
[0133] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0134] Step S1, obtaining process design information of a chemical process to be simulated;
[0135] Step S2, selecting in a multi-source model management module based on the process design information to obtain a target simulation model, wherein the multi-source model management module includes at least one preset simulation model;
[0136] Step S3, configuring parameters of the target simulation model based on the process design information to obtain a target configuration result;
[0137] Step S4, based on the configuration result, the target simulation model is controlled to simulate the chemical process to obtain a simulation result.
[0138] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0139] According to one embodiment of the present invention, a computer program product is further provided, comprising: a computer program, and when the computer program is executed by a processor, the above-mentioned address data processing method is implemented.
[0140] Optionally, in this embodiment, the computer program product may be configured to store computer program instructions for performing the following steps:
[0141] Step S1, obtaining process design information of a chemical process to be simulated;
[0142] Step S2, selecting in a multi-source model management module based on the process design information to obtain a target simulation model, wherein the multi-source model management module includes at least one preset simulation model;
[0143] Step S3, configuring parameters of the target simulation model based on the process design information to obtain a target configuration result;
[0144] Step S4, based on the configuration result, the target simulation model is controlled to simulate the chemical process to obtain a simulation result.
[0145] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0146] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0147] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0148] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0150] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0152] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A chemical process simulation method, characterized in that: include: Obtain process design information of the chemical process to be simulated; Selecting in a multi-source model management module based on the process flow design information to obtain a target simulation model, wherein the multi-source model management module includes at least one preset simulation model; Performing parameter configuration on the target simulation model based on the process design information to obtain a target configuration result; Based on the configuration result, the target simulation model is controlled to simulate the chemical process to be simulated to obtain a simulation result.
2. The chemical process simulation method according to claim 1, characterized in that: The target simulation model is parameterized based on the process design information to obtain the target configuration result, including: Based on the process flow design information, the stream information of the chemical process to be simulated is obtained, wherein the stream information includes: inlet stream information and outlet stream information; The target simulation model is parameterized based on the inlet stream information and the outlet stream information to obtain a target configuration result.
3. The chemical process simulation method according to claim 2, characterized in that: The method further comprises: Obtaining flash type information in the outlet stream information; In response to the flash type being temperature-pressure, acquiring the target configuration result; In response to determining that the target configuration result does not include the molar flow rate, the temperature, and the pressure, the molar flow rate, the temperature, and the pressure are supplemented to the target configuration result.
4. The chemical process simulation method according to claim 1, characterized in that: Parameter configuration of the target simulation model is performed based on the process design information to obtain the target configuration result, and the result further includes: In response to the target simulation model not having parameters corresponding to the process flow design information, acquiring parameter information in a custom variable control model; The target simulation model is parameterized based on the parameter information to obtain the target configuration result.
5. The chemical process simulation method according to claim 1, characterized in that: Based on the configuration result, the target simulation model is controlled to simulate the chemical process to be simulated, and the simulation results obtained include: Obtaining initial input data in the process design information; Using the target simulation model to perform data preprocessing on the initial input data to obtain first input data; The first input data is processed using the objective function in the target simulation model to obtain the simulation result.
6. The chemical process simulation method according to claim 1, characterized in that: The method further comprises: Obtaining file information of each preset model in the multi-source model management module; Storing the file information in a target database; In response to selecting the target simulation model in the multi-source model management module, the target simulation model is loaded based on the target database.
7. The chemical process simulation method according to claim 6, characterized in that: The file information includes: calculation file information, dependent file information and help file information.
8. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program, when running, executes the chemical process simulation method described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the storage medium is located is controlled to execute the chemical process simulation method described in any one of claims 1 to 7.
10. A computer program product, characterized in that It comprises a computer program which, when executed by a processor, implements the chemical process simulation method according to any one of claims 1 to 7.