Valve generation method, device, equipment and medium used in chemical process simulation software
By pre-creating the valve prefabricated body in the chemical process simulation software and automatically adjusting it based on the insertion point, the problem of low valve generation efficiency in the chemical process simulation software is solved, and fast and accurate interactive valve generation is achieved.
Patent Information
- Application Number
- CN202411464404.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-21
AI Technical Summary
In chemical process simulation software, the process of manually designing and adjusting valves is time-consuming and labor-intensive, and the valve modeling is complex in complex chemical model structures and hidden environments, making it difficult to quickly and accurately generate interactive valves.
The target interactive valve is generated by pre-creating prefabricated bodies of various types of valves and automatically adjusting the prefabricated bodies based on the insertion points in the three-dimensional virtualization factory model.
It improves the generation efficiency of interactive valves, reduces the time and effort of manual design and adjustment, and is suitable for valve modeling in complex chemical models and hidden environments.
Smart Images

Figure CN118981856B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional virtual simulation technology, and in particular to a valve generation method, device, equipment and medium applied to chemical process simulation software. Background Art
[0002] The chemical process simulation software uses a real chemical plant as the simulation object. By establishing a three-dimensional virtual factory that is consistent with the chemical plant, students can perform real operations in the three-dimensional virtual factory.
[0003] When starting and stopping operations in chemical process simulation software, a large number of valves need to be operated. Due to the different thicknesses of pipelines, the types, heights, and handwheel sizes of valves are also different. At the same time, it is necessary to make switch animations for the interaction of valves. In addition, for complex chemical model structures or chemical equipment in hidden environments, the complexity of valve modeling is high. Therefore, when art modelers model the 3D virtual factory, they need to manually design valves one by one and adjust their size and position, which will consume a lot of time and energy.
[0004] Therefore, how to provide a technical solution that can quickly and accurately generate interactive valves is a technical problem that needs to be solved urgently by technical personnel in this field. Summary of the invention
[0005] The present application provides a valve generation method, device, equipment and medium for chemical process simulation software, which improves the generation efficiency of interactive valves by creating prefabricated bodies for various types of valves in advance and realizing automatic adjustment of the prefabricated bodies based on insertion points.
[0006] According to one aspect of the present application, a valve generation method for chemical process simulation software is provided, the method comprising: obtaining at least one type of valve model and generating a prefabricated body corresponding to the valve model; wherein the valve model comprises a valve virtual object and an interactive action corresponding to the valve virtual object; determining the type of valve required for the target pipeline based on a pre-set insertion point of a target pipeline in a valve installation section in a three-dimensional virtual chemical plant model; determining the pipe diameter of the target pipeline based on a positional relationship between the insertion point and the valve installation section, and determining the size of the valve required for the target pipeline according to the pipe diameter; generating a target interactive valve at the insertion point according to the prefabricated body corresponding to the type and the size.
[0007] According to another aspect of the present application, a valve generation device for chemical process simulation software is provided, the device comprising: a prefabricated body generation module, for acquiring at least one type of valve model, and generating a prefabricated body corresponding to the valve model; wherein the valve model comprises a valve virtual object and an interactive action corresponding to the valve virtual object; a valve type determination module, for determining the type of valve required for the target pipeline based on a pre-set insertion point of the target pipeline in the valve installation section in a three-dimensional virtual chemical plant model; a valve size determination module, for determining the pipe diameter of the target pipeline based on the positional relationship between the insertion point and the valve installation section, and determining the size of the valve required for the target pipeline according to the pipe diameter; an interactive valve generation module, for generating a target interactive valve at the insertion point according to the prefabricated body corresponding to the type and the size.
[0008] According to another aspect of the present application, an electronic device is provided, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the valve generation method applied to chemical process simulation software described in any embodiment of the present application.
[0009] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the valve generation method for chemical process simulation software described in any embodiment of the present application when executed.
[0010] The technical solution provided by the present application is to obtain at least one type of valve model and generate a prefabricated body corresponding to the valve model; wherein the valve model includes a valve virtual object and an interactive action corresponding to the valve virtual object; based on the pre-set insertion point of the target pipeline in the valve installation section in the three-dimensional virtual factory model, determine the type of valve required for the target pipeline; based on the positional relationship between the insertion point and the valve installation section, determine the pipe diameter of the target pipeline, and determine the size of the valve required for the target pipeline according to the pipe diameter; and generate the target interactive valve at the insertion point according to the prefabricated body and size corresponding to the type. This technical solution improves the generation efficiency of interactive valves by creating prefabricated bodies for various types of valves in advance and realizing automatic adjustment of the prefabricated bodies based on the insertion points.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 A flow chart of a valve generation method applied to chemical process simulation software provided in Example 1 of the present application.
[0014] Figure 2 A flow chart of a valve generation method applied to chemical process simulation software provided in Example 2 of the present application.
[0015] Figure 3 A structural schematic diagram of a valve generation device applied to chemical process simulation software provided in Example 3 of the present application.
[0016] Figure 4 It is a structural schematic diagram of a device for implementing a valve generation method applied to chemical process simulation software in an embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0018] It should be noted that the terms "target", "preset", "required", etc. in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments of the present application 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 comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0019] Embodiment 1
[0020] Figure 1This is a flowchart of a valve generation method applied to chemical process simulation software provided in the first embodiment of the present application. This embodiment is applicable to the generation of valves in three-dimensional virtual simulation. The method can be executed by a valve generation device applied to chemical process simulation software. The valve generation device applied to chemical process simulation software can be implemented in the form of hardware and / or software. The valve generation device applied to chemical process simulation software can be configured in a device with data processing capabilities. Figure 1 As shown, the method includes the following steps.
[0021] S110: Acquire at least one type of valve model, and generate a prefabricated body corresponding to the valve model.
[0022] The valve model includes a valve virtual object and an interactive action corresponding to the valve virtual object.
[0023] Valves are devices that control and regulate fluid systems in the production process of chemical plants. For example, valve types may include stop valves, ball valves, butterfly valves, regulating valves, safety valves, and reversing valves.
[0024] The valve model can be a digital representation of the actual valve in a virtual environment, including the appearance, shape, structure, etc. of the valve. Specifically, the valve model can be independently constructed or downloaded from an available 3D model resource library.
[0025] The valve virtual object can be obtained by art modeling personnel using modeling software to construct and assemble the valve core, valve body, valve stem and other components of the valve in combination with actual valve product drawings, photos or real objects, and rendering them with appropriate material textures to obtain the valve virtual object.
[0026] The interactive action can be the action generated when the valve is opened or closed. For example, the user opens or closes the valve by clicking the valve virtual object, or adjusts the valve opening by dragging. In addition, special effects such as light and shadow changes and particle effects can be added to enhance the visual effect.
[0027] For example, for a ball valve, a rotation animation of the valve core may be created to simulate the opening and closing process of the valve.
[0028] Among them, the prefab can be a pre-created reusable template that contains specific components, properties and behavior settings, which can be quickly instantiated into specific application scenarios to improve development efficiency.
[0029] Specifically, the valve model can be imported into the 3D design software, and the valve model can be further adjusted and optimized, such as setting material properties, adjusting lighting effects, adding collision bodies, etc., to generate a prefabricated body.
[0030] Optionally, generating a prefabricated body corresponding to the valve model includes: creating a prefabricated body model of the valve virtual object using Unity3D software; creating an interactive script of the prefabricated body model according to interactive actions corresponding to the valve virtual object, so that the prefabricated body model performs corresponding interactive actions based on user input instructions; and generating a prefabricated body corresponding to the valve model according to the prefabricated body model and the interactive script.
[0031] Use Unity3D software to create a prefabricated model of the valve virtual object. Select a suitable folder in the project view of Unity3D software, drag and drop the valve virtual object file (such as fbx format or obj format, etc.) into the folder for import; and place the valve virtual object in a suitable position in the scene view, and adjust its size, rotation angle and other properties to ensure that its appearance and position in the scene meet expectations. In addition, necessary components can be added to the valve virtual object, such as collision body components, transformation components, rendering components, animation components, etc.
[0032] To create an interactive script for the prefab model, you can add an interactive script to the prefab model in Unity's script editor using C language or UnityScript language, based on the interactive action and valve control logic, so that the valve triggers the interactive action when responding to the preset operation. Specifically, in the interactive script, you can define functions to handle different interactive actions, such as OnMouseDown, OnMouseUp and other functions for detecting mouse click events.
[0033] Furthermore, the prefab model and its corresponding interactive script may be combined to generate a prefab so that it can be reused later.
[0034] S120, determining the type of valve required for the target pipeline based on a preset insertion point of the target pipeline in the valve installation section in the three-dimensional virtual factory model.
[0035] The 3D virtual chemical plant model is a virtual factory environment created using computer technology and 3D modeling software, which presents the layout, equipment, and pipelines of the chemical plant in 3D form.
[0036] The valve installation section can be a specific location on the target pipeline for installing the valve. Specifically, it can be determined according to the pipeline layout, process requirements and operational convenience.
[0037] The insertion point can be a point on the valve installation section where the target interactive valve is assembled, and can include information such as the installation location, type, size, and operation method of the required valve. The insertion point can be a point pre-created by the modeler when building a 3D virtual factory model, and can be represented in the 3D virtual factory model through a specific graphic mark or coding method, or through an insertion point information list.
[0038] Optionally, the insertion point is a placeholder, and the placeholder is used to indicate the insertion position and type of the required valve.
[0039] The placeholder can be a general mark or symbol representing a valve, or a mark or symbol for a specific valve. Specifically, the placeholders of each valve can be named according to the design drawings of the 3D virtual factory, and the insertion position and type of the required valve can be determined by the meaning of each part of the placeholder name.
[0040] Furthermore, the type of valve required for the target pipeline is determined based on the insertion point. The type of valve required for the target pipeline can be determined based on the role of the insertion point in the process flow, the characteristics of the fluid transported in the target pipeline, and industry standards and specifications.
[0041] For example, if the target pipeline is responsible for transporting liquid chemical raw materials with certain corrosiveness, it can be determined that the type of valve required for the target pipeline is a fluorine-lined butterfly valve or other valve that is easy to operate and has good tolerance to corrosive media.
[0042] S130. Determine the pipe diameter of the target pipe based on the positional relationship between the insertion point and the valve installation cross section, and determine the size of the valve required for the target pipe according to the pipe diameter.
[0043] The positional relationship may be a plane positional relationship between the insertion point and the valve installation section. Specifically, a plane coordinate system may be established on the valve installation section to determine the coordinates of the insertion point on the coordinate system, thereby determining the relationship between the insertion point and the valve installation section.
[0044] In the present application, the pipe diameter of the target pipe can be determined by using a geometric relationship based on the relative position relationship between the insertion point and the valve installation section and the shape of the target pipe. For example, if the shape of the target pipe is rectangular, the distance from the insertion point to the four sides of the valve installation section is determined respectively to determine the pipe diameter of the target pipe. For another example, if the shape of the target pipe is circular, the straight line passing through the insertion point and the center of the valve installation section in the valve installation section is determined as the pipe diameter of the target pipe.
[0045] Furthermore, the size of the valve required for the target pipeline can be determined based on the matching relationship between the pipeline diameter and the required valve, the characteristics of the fluid transported in the target pipeline, and industry standards and specifications.
[0046] S140. Generate a target interactive valve at the insertion point according to the prefabricated body corresponding to the type and the size.
[0047] The size of the valve required for the target pipeline may be the nominal diameter, connection size, stem length, etc. of the valve required for the target pipeline. The nominal diameter may be determined according to the inner diameter of the target pipeline; the connection size includes flange connection size, threaded connection size, etc., which may be determined according to the pipeline connection method and the inner diameter of the pipeline; the stem length may be determined according to the installation space and the standard size range of the valve.
[0048] Specifically, according to the type of valve required by the target pipeline, a prefabricated body corresponding to the type can be selected from the prefabricated bodies generated in step S130; secondly, a specific type of prefabricated body is loaded through a resource loading function; finally, according to the size of the valve required by the target pipeline, the nominal diameter, connection size, valve stem length, etc. of the loaded prefabricated body are adjusted by reduction, enlargement, stretching or compression to generate a target interactive valve.
[0049] Optionally, a target interactive valve is generated at the insertion point according to a preform corresponding to the type and the size, including: determining a scaling ratio of the preform according to the preform corresponding to the type and the size; scaling the preform according to the scaling ratio, and generating the target interactive valve at the insertion point.
[0050] Specifically, the scaling ratio can be calculated for each key dimension of the valve, such as length, width, height or diameter, wherein the scaling ratio is the ratio of the required valve size to the original size of the prefabricated body.
[0051] For example, if the required stop valve has a diameter of 100 mm and the preform has a diameter of 80 mm, the scaling ratio in the diameter direction is 100 / 80=1.25.
[0052] Furthermore, if Unity3D software is used for development, you can select the instantiated object of the prefab or directly select the prefab in the project view; modify the Scale property in the Transform component of the prefab in the Inspector panel; the Scale property represents the scaling ratio of the object in the X, Y, and Z directions; apply the previously calculated scaling ratio to the corresponding dimension.
[0053] For example, if the scaling ratios in both the diameter and length directions are 1.25, you can set the Scale property to (1.25, 1.25, 1.25). If you only need to scale in a specific dimension, you can set the value of that dimension separately, such as (1.25, 1, 1) to scale in only one direction.
[0054] After scaling the prefab, the assembly suitability of the valve and the pipeline and the interactive action of the valve can be checked. If there is a problem, the scaling ratio can be further adjusted or an error prompt can be generated to remind the modeler to perform manual fine-tuning until the generated target interactive valve meets the requirements, ensuring that the target interactive valve can work properly.
[0055] The embodiment of the present invention provides a valve generation method applied to chemical process simulation software, which obtains at least one type of valve model and generates a prefabricated body corresponding to the valve model; wherein the valve model includes a valve virtual object and an interactive action corresponding to the valve virtual object; based on the pre-set insertion point of the target pipeline in the valve installation section in the three-dimensional virtual chemical plant model, the type of valve required for the target pipeline is determined; based on the positional relationship between the insertion point and the valve installation section, the pipe diameter of the target pipeline is determined, and the size of the valve required for the target pipeline is determined according to the pipe diameter; according to the prefabricated body and size corresponding to the type, the target interactive valve is generated at the insertion point. This technical solution improves the generation efficiency of interactive valves by creating prefabricated bodies for various types of valves in advance and realizing automatic adjustment of the prefabricated bodies based on the insertion points.
[0056] Embodiment 2
[0057] Figure 2 This is a flow chart of a valve generation method for chemical process simulation software provided in the second embodiment of the present application. This embodiment is optimized based on the above embodiment, and is specifically optimized to be that the positional relationship between the insertion point and the valve installation section is that the insertion point is at a non-center position inside the valve installation section. Figure 2 As shown, the method of this embodiment specifically includes the following steps.
[0058] S210, obtaining at least one type of valve model, and generating a prefabricated body corresponding to the valve model, wherein the valve model includes a valve virtual object and an interactive action corresponding to the valve virtual object.
[0059] S220, determining the type of valve required for the target pipeline based on a preset insertion point of the target pipeline in the valve installation section in the three-dimensional virtual factory model.
[0060] S230. Based on the positional relationship between the insertion point and the valve installation section, the insertion point is located at a non-center position inside the valve installation section, a preset number of groups of straight lines passing through the insertion point are determined on the valve installation section, and two intersection points of each group of straight lines with the valve installation section are determined.
[0061] The valve installation section is generally the target pipe section, that is, a circle. The positional relationship between the insertion point and the valve installation section can be that the insertion point is at the center of the valve installation section, or that the insertion point is at a non-center of the valve installation section.
[0062] According to the relative position relationship between the insertion point and the valve installation section, the corresponding method for determining the pipe diameter can be determined. For example, if the insertion point is at the center of the valve installation section, the length of any line segment passing through the insertion point in the valve installation section can be used as the pipe diameter; for another example, if the insertion point is not at the center of the valve installation section, multiple rays can be emitted based on the insertion point, and the longest line segment length of each ray passing through the valve installation section can be used as the pipe diameter.
[0063] In this application, the Physics.Raycast function in Unity3D software can be used to emit rays from the insertion point to the valve installation section. It is necessary to ensure that the direction and length of the ray can accurately intersect with the valve installation section so as to intercept the exact collision point. When the ray collides with the pipeline, the position of the collision point is recorded. The coordinate information of the collision point can usually be obtained through the return result of the ray detection.
[0064] Furthermore, the length function in Unity3D software can be used to calculate the length of each group of straight lines in the valve installation section. Specifically, Lenth = Vector.Distance (Point1, Point2), where the Vector.Distance function is used in the Unity engine to calculate the Euclidean distance between two points in three-dimensional space, and Point1 and Point2 represent the coordinates of the two intersection points.
[0065] S240. For each group of straight lines, determine the length of the straight line within the valve installation cross section according to the two intersection points, and use the longest length as the pipe diameter of the target pipe.
[0066] S250: Determine the size of the valve required for the target pipeline according to the pipeline diameter.
[0067] Specifically, the valve size that matches the pipe diameter can be used as the valve size required for the target pipe according to the design criteria. For example, if the pipe diameter is 100 mm, the valve size required for the target pipe can be determined to be 100 mm. For another example, if the valve size required for the target pipe needs to be slightly larger than the pipe diameter, the valve size required for the target pipe can be determined to be 110 mm.
[0068] S260. Generate a target interactive valve at the insertion point according to the prefabricated body corresponding to the type and the size.
[0069] The embodiment of the present invention provides a valve generation method applied to chemical process simulation software. When the position relationship between the insertion point and the valve installation section is that the insertion point is at a non-center position inside the valve installation section, a preset number of groups of straight lines passing through the insertion point are determined on the valve installation section, and two intersection points of each group of straight lines and the valve installation section are determined; for each group of straight lines, the length of the straight line in the valve installation section is determined according to the two intersection points, and the longest length is used as the pipe diameter of the target pipe, and the size of the valve required for the target pipe is determined according to the pipe diameter; and the target interactive valve is generated at the insertion point according to the prefabricated body and size corresponding to the type. This technical solution can realize automatic recognition of the pipe diameter and improve the generation efficiency of the interactive valve.
[0070] On the basis of the above embodiments, optionally, before generating a target interactive valve at the insertion point according to the preform corresponding to the type and the size, the method further includes: determining connection parameters of the valve required for the target pipeline; accordingly, after generating a target interactive valve at the insertion point according to the preform corresponding to the type and the size, the method further includes: connecting the target pipeline and the target interactive valve at the insertion point according to the connection parameters.
[0071] The connection parameters may be the connection method, sealing method, connection position and assembly size between the target pipeline and the valve. The connection method may include flange connection, threaded connection and welding connection. The sealing method may include gasket sealing and packing sealing. The connection position may be the assembly reference point or assembly reference surface between the target pipeline and the target interactive valve. The assembly size may be the matching size between the target interactive valve and the target pipeline or other equipment, such as thread depth, weld size, etc.
[0072] In the present application, the target interactive valve can be connected to the target pipeline at the insertion point according to the above connection parameters to improve the assembly applicability between the pipeline and the valve.
[0073] Embodiment 3
[0074] Figure 3 This is a schematic diagram of the structure of a valve generation device applied to chemical process simulation software provided in Example 3 of this application. Figure 3 As shown, the device includes the following modules.
[0075] The prefabricated body generation module 310 is used to obtain at least one type of valve model and generate a prefabricated body corresponding to the valve model; wherein the valve model includes a valve virtual object and an interactive action corresponding to the valve virtual object.
[0076] A valve type determination module 320, for determining the type of valve required for the target pipeline based on a preset insertion point of the target pipeline in the valve installation section in the three-dimensional virtualized plant model;
[0077] A valve size determination module 330, for determining the pipe diameter of the target pipe based on the positional relationship between the insertion point and the valve installation cross section, and determining the size of the valve required for the target pipe according to the pipe diameter;
[0078] The interactive valve generation module 340 is used to generate a target interactive valve at the insertion point according to the prefabricated body corresponding to the type and the size.
[0079] The embodiment of the present invention provides a valve generation device applied to chemical process simulation software, which obtains at least one type of valve model and generates a prefabricated body corresponding to the valve model; wherein the valve model includes a valve virtual object and an interactive action corresponding to the valve virtual object; based on the pre-set insertion point of the target pipeline in the valve installation section in the three-dimensional virtual chemical plant model, the type of valve required for the target pipeline is determined; based on the positional relationship between the insertion point and the valve installation section, the pipe diameter of the target pipeline is determined, and the size of the valve required for the target pipeline is determined according to the pipe diameter; according to the prefabricated body and size corresponding to the type, the target interactive valve is generated at the insertion point. This technical solution improves the generation efficiency of interactive valves by creating prefabricated bodies for various types of valves in advance and realizing automatic adjustment of the prefabricated bodies based on the insertion points.
[0080] Further, the positional relationship between the insertion point and the valve installation cross section is that the insertion point is located at a non-center position inside the valve installation cross section;
[0081] Correspondingly, the valve size determination module 330 includes: an intersection interception unit, which is used to determine a preset number of groups of straight lines passing through the insertion point on the valve installation section, and determine two intersection points of each group of straight lines with the valve installation section; a pipeline diameter determination unit, which is used to determine, for each group of straight lines, the length of the straight line within the valve installation section according to the two intersection points, and use the longest length as the pipeline diameter of the target pipeline.
[0082] Furthermore, the insertion point is a placeholder, and the placeholder is used to indicate the insertion position and type of the required valve.
[0083] Furthermore, the device also includes: a connection parameter determination module, which is used to determine the connection parameters of the valve required for the target pipeline before generating the target interactive valve at the insertion point according to the preform corresponding to the type and the size; accordingly, the device also includes: a valve connection module, which is used to connect the target pipeline and the target interactive valve at the insertion point according to the connection parameters after generating the target interactive valve at the insertion point according to the preform corresponding to the type and the size.
[0084] Furthermore, the interactive valve generation module 340 includes: a scaling ratio determination unit, used to determine the scaling ratio of the preform according to the preform corresponding to the type and the size; an interactive valve generation unit, used to scale the preform according to the scaling ratio, and generate a target interactive valve at the insertion point according to the preform corresponding to the type and the size.
[0085] Furthermore, the prefabricated body generation module 310 includes: a prefabricated body model creation unit, used to create a prefabricated body model of the valve virtual object using Unity3D software; an interactive script creation unit, used to create an interactive script of the prefabricated body model according to the interactive action corresponding to the valve virtual object, so that the prefabricated body model performs the corresponding interactive action based on the user input instruction; a prefabricated body generation unit, used to generate a prefabricated body corresponding to the valve model according to the prefabricated body model and the interactive script.
[0086] A valve generation device applied to chemical process simulation software provided in an embodiment of the present application can execute a valve generation method applied to chemical process simulation software provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
[0087] Embodiment 4
[0088] Figure 4 A schematic diagram of a device 10 that can be used to implement an embodiment of the present application is shown. The device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0089] like Figure 4As shown, the device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0090] A number of components in the device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0091] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a valve generation method applied to chemical process simulation software.
[0092] In some embodiments, the valve generation method applied to chemical process simulation software can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the valve generation method applied to the chemical process simulation software described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the valve generation method applied to the chemical process simulation software in any other appropriate manner (for example, by means of firmware).
[0093] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0094] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer programs are executed by the processor, the functions / operations specified in the flow charts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0095] In the context of the present application, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0096] To provide interaction with a user, the systems and techniques described herein may be implemented on a device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0097] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0098] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0099] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0100] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A valve generation method applied to chemical process simulation software, characterized in that: The method comprises: Acquire at least one type of valve model and generate a prefabricated body corresponding to the valve model; wherein the valve model includes a valve virtual object and an interactive action corresponding to the valve virtual object; Determine the type of valve required for the target pipeline based on a preset insertion point of the target pipeline in the valve installation section in the three-dimensional virtual factory model; Determine the pipe diameter of the target pipe based on the positional relationship between the insertion point and the valve installation cross section, and determine the size of the valve required for the target pipe according to the pipe diameter; A target interactive valve is generated at the insertion point according to the preform corresponding to the type and the size.
2. The method according to claim 1, characterized in that The positional relationship between the insertion point and the valve installation cross section is that the insertion point is located at a non-center position inside the valve installation cross section; Accordingly, based on the positional relationship between the insertion point and the valve installation cross section, determining the pipe diameter of the target pipe includes: Determining a preset number of groups of straight lines passing through the insertion point on the valve installation cross section, and determining two intersection points of each group of straight lines with the valve installation cross section; For each group of straight lines, the length of the straight line within the valve installation cross section is determined according to the two intersection points, and the longest length is used as the pipe diameter of the target pipe.
3. The method according to claim 1, characterized in that Before generating a target interactive valve at the insertion point according to the preform corresponding to the type and the size, the method further includes: Determine the connection parameters of the valve required for the target pipeline; Accordingly, after generating a target interactive valve at the insertion point according to the preform corresponding to the type and the size, the method further includes: The target pipeline and the target interactive valve are connected at the insertion point according to the connection parameters.
4. The method according to claim 1, characterized in that: Generating a target interactive valve at the insertion point according to the prefabricated body corresponding to the type and the size, including: Determining a scaling ratio of the preform according to the preform corresponding to the type and the size; The prefabricated body is scaled according to the scaling ratio, and a target interactive valve is generated at the insertion point.
5. The method according to claim 1, characterized in that Generating a prefabricated body corresponding to the valve model, including: Using Unity3D software to create a prefabricated model of the valve virtual object; Creating an interactive script for the prefabricated model according to the interactive action corresponding to the valve virtual object, so that the prefabricated model performs the corresponding interactive action based on the user input instruction; A prefabricated body corresponding to the valve model is generated according to the prefabricated body model and the interactive script.
6. The method according to claim 1, characterized in that The insertion point is a placeholder used to indicate the insertion position and type of the required valve.
7. A valve generation device applied to chemical process simulation software, characterized in that: The device comprises: A prefabricated body generation module, used to obtain at least one type of valve model and generate a prefabricated body corresponding to the valve model; wherein the valve model includes a valve virtual object and an interactive action corresponding to the valve virtual object; A valve type determination module, for determining the type of valve required for the target pipeline based on a pre-set insertion point of the target pipeline in the valve installation section in the three-dimensional virtual factory model; A valve size determination module, used to determine the pipe diameter of the target pipe based on the positional relationship between the insertion point and the valve installation cross section, and determine the size of the valve required for the target pipe according to the pipe diameter; An interactive valve generation module is used to generate a target interactive valve at the insertion point according to the prefabricated body corresponding to the type and the size.
8. The device according to claim 7, characterized in that The positional relationship between the insertion point and the valve installation cross section is that the insertion point is located at a non-center position inside the valve installation cross section; Accordingly, the valve sizing module comprises: An intersection point interception unit, used to determine a preset number of groups of straight lines passing through the insertion point on the valve installation cross section, and to determine two intersection points of each group of straight lines with the valve installation cross section; The pipeline diameter determination unit is used to determine the length of each group of straight lines within the valve installation section according to the two intersection points, and use the longest length as the pipeline diameter of the target pipeline.
9. An electronic device, characterized in that: The device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the valve generation method applied to chemical process simulation software as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the valve generation method for chemical process simulation software according to any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Three-dimensional virtual simulation method for underground water supply pipe network
CN113392485A
Valve generation method and device, computer equipment and storage medium
CN115600326A