A method, system and device for real-time display of flow field diagram
By cached the parameter information of the simulated object in the cache module and using the mapping database and interpolation template to calculate the update parameter value, the rapid update and real-time display of the flow field map are achieved, and the problem of inactivity of flow field map display in the prior art is solved.
Patent Information
- Application Number
- CN202411730574.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-29
AI Technical Summary
When existing fluid computing software displays flow field results, users need to actively enable the post-processing display module, which causes the data loading, conversion and rendering process to occupy computing resources and is not real-time. Especially when the calculation model is large, it is impossible to display the continuous evolution of the flow field map in real time.
By cache the parameter type and parameter value of each display point of the simulated object in the cache module, and after receiving the instruction signal, the parameter type that needs to be updated is judged based on the update parameter type, the unit list of the flow field graph is obtained, the mapping database and the cache module are called to calculate the update parameter value, and finally the update flow field graph is rendered.
The data processing process is simplified, the calculation amount is reduced, and the rapid update and real-time display of flow field maps are realized, solving the problem of in real-time display of flow field maps in the prior art.
Smart Images

Figure CN119227587B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to the technical field of flow field display, and in particular to a method, system and device for real-time display of flow field diagrams. Background Art
[0002] In the process of fluid mechanics simulation calculation, the real-time display of various residual curves is currently mainly used to display the convergence of the calculation, and the change trend of the convergence curve is used to evaluate whether the current simulation calculation is moving in the right direction. Under ideal simulation calculation conditions, the residual curve at the beginning of the calculation shows a steady downward trend. However, due to the complexity of the calculation model and the uneven quality of the calculation grid, the residual may oscillate or jump in the early stage of the calculation process. In this case, the simulation personnel need to make a judgment based on the flow field distribution.
[0003] Conventional fluid calculation software usually has the function of displaying residual curves in real time, while the display of calculated flow field results usually requires the user to actively enable the post-processing display module or other post-processing software to load and display. During the whole process, the software needs to load data, convert data, render data and other processing processes, which requires occupying some computing resources and waiting for a period of time.
[0004] Therefore, some new-generation fluid simulation software's post-processing modules have begun to add the function of real-time display of calculated flow field diagrams. The solution they adopt is that at certain intervals of calculation steps, the solver program actively sends all flow field data to the post-processing program through the network interface. After receiving all the data, the post-processing program performs data conversion, data rendering and other processing before displaying it. Although such a solution reduces the process of active data loading, the data processing process still needs to wait for some time, resulting in the interval of sending data cannot be too short when the calculation model is relatively large, so the continuous evolution process may not be displayed in real time. Summary of the invention
[0005] In view of the above defects or deficiencies in the prior art, it is desirable to provide a method, system and device for real-time display of flow field diagrams to solve the above problems.
[0006] A first aspect of the present invention provides a method for real-time display of a flow field diagram, comprising:
[0007] Receive terminal commands;
[0008] Processing the terminal command to obtain a command signal; the command signal is used to instruct to update the flow field map of the target object, the target object is a partial area of the simulated object, the flow field map includes a plurality of display units, a current parameter type corresponding to each of the display units, and a current parameter value;
[0009] Acquire an update parameter list of the command signal, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, acquire a unit list of the flow field map, wherein the unit list includes all the display units of the flow field map;
[0010] A mapping database is called according to the unit list to obtain a mapping set, wherein the mapping set includes a plurality of display points corresponding to each of the display units in the unit list; a cache module is called according to the plurality of display points and the update parameter type to obtain a read list, and a parameter value corresponding to the update parameter type for each of the display units in the unit list is calculated according to the read list and a pre-stored interpolation template; the mapping database includes all display units of the simulation object and the display points corresponding to each of the display units; the read list includes the update parameter value corresponding to the update parameter type for each of the display points in the mapping set;
[0011] The flow field map is updated by rendering according to the updated parameter value of each display unit in the mapping set.
[0012] According to the technical solution provided by the present invention, the method for establishing the mapping database includes:
[0013] Calculate and obtain all display units of the simulated object;
[0014] Select any one of the display units, and use the display points in all units of the simulated object that are connected or intersected with the display unit in geometric topology as the relevant display points of the display unit;
[0015] Establishing a set of mapping relationships between the display unit and the relevant display points corresponding to the display unit;
[0016] All display units are traversed to obtain a plurality of groups of mapping relationships, and the mapping database is established according to the plurality of groups of mapping relationships.
[0017] According to the technical solution provided by the present invention, the processing of the terminal command to obtain the instruction signal includes:
[0018] When it is determined that the terminal command is an update command, the terminal command is intercepted and parsed to obtain the instruction signal.
[0019] According to the technical solution provided by the present invention, the command signal further includes a first duration, which is the duration from the establishment of the simulation object to the generation of the command signal;
[0020] After the terminal command is processed to obtain the instruction signal, the method further includes:
[0021] Comparing the first duration and the second duration, the second duration being the current rendering duration of the flow field graph;
[0022] When it is determined that the first duration is greater than the second duration, the step of obtaining an update parameter list for the command signal is executed; when it is determined that the update parameter type in the update parameter list is different from the current parameter type, the step of obtaining a unit list for the flow field diagram includes all the display units of the flow field diagram.
[0023] According to the technical solution provided by the present invention, the simulated object includes a plurality of unit blocks, each of the unit blocks includes a portion of the display unit of the simulated object and a portion of the display points, and each of the unit blocks corresponds to a point range of the display points; the terminal command also includes the point range:
[0024] After determining that the first duration is greater than the second duration, the method further includes:
[0025] Determining whether all the displayed points of the flow field diagram belong to the point range;
[0026] When all the display points of the flow field diagram belong to the point range, the update parameter list of the command signal is obtained, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, the unit list of the flow field diagram is obtained, and the unit list includes all the display units of the flow field diagram.
[0027] According to the technical solution provided by the present invention, the method for establishing the interpolation template includes:
[0028] Acquire the center point of the display unit and calculate a first distance, where the first distance is the distance between the relevant display point corresponding to the display unit and the center point;
[0029] Calculating coefficients of the relevant display points by using an inverse distance interpolation method according to the topological structure of the simulated object and the first distance;
[0030] The product of the parameter value corresponding to each display point and the coefficient is calculated, and the products corresponding to all the display points are added together to obtain the parameter value corresponding to the display unit, which is used as the interpolation template.
[0031] According to the technical solution provided by the present invention, the instruction signal also includes a cache file path, and the cache file path is used to establish a mapping with the cache module.
[0032] A second aspect of the present invention provides a flow field map real-time display system, comprising:
[0033] a multi-core solver configured to receive terminal commands;
[0034] A monitoring module, wherein the monitoring module is configured to process the terminal command to obtain a command signal; the command signal is used to instruct to update a flow field map of a target object, wherein the target object is a partial area of a simulated object, and the flow field map includes a plurality of display units, a current parameter type corresponding to each of the display units, and a current parameter value;
[0035] A post-processing display module, wherein the post-processing display module is configured to obtain an update parameter list of the command signal, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, obtain a unit list of the flow field diagram, wherein the unit list includes all the display units of the flow field diagram;
[0036] A mapping module, the mapping module is configured to call a mapping database according to the unit list to obtain a mapping set, the mapping set includes a plurality of display points corresponding to each of the display units in the unit list; call a cache module according to the plurality of display points and the update parameter type to obtain a read list, and calculate a parameter value corresponding to the update parameter type for each of the display units in the unit list according to the read list and a pre-stored interpolation template; the mapping database includes all display units of the simulation object and the display points corresponding to each of the display units; the read list includes the update parameter value corresponding to the update parameter type for each of the display points in the mapping set;
[0037] The post-processing display module is further configured to render according to the updated parameter value of each of the display units in the mapping set to update the flow field map;
[0038] A cache module is configured to cache parameter information updated in real time, wherein the parameter information includes all the display points of the simulation object, and all the parameter types and parameter values corresponding to each display point.
[0039] According to the technical solution provided by the present invention, the multi-core solver is also configured to simulate all the parameter types and parameter values corresponding to each display point of the simulated object, and cache them in real time into the cache module.
[0040] A third aspect of the present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for real-time display of a flow field diagram as described in any one of the above when executing the computer program.
[0041] Compared with the prior art, the beneficial effect of the present invention is that: the present invention caches the parameter type and parameter value of the simulation object at each display point in the cache module, and after receiving the command signal, when it is determined that the parameter type displayed on the current flow field map needs to be updated according to the update parameter type in the command signal, the unit list corresponding to the current flow field map is obtained, and the display points on the simulation object related to the display units in the unit list can be mapped by calling the mapping database, and then the update parameter value corresponding to the update parameter type at each related display point is retrieved from the cache module, and the update parameter value corresponding to the update parameter type of each display unit in the unit list is calculated according to the retrieved parameter value through a preset interpolation template, and finally the update parameter value corresponding to all the display units in the unit list is rendered to update the flow field map. The present invention pre-stores the mapping database, retrieves and calculates the relevant parameter values in the cache module according to the mapping relationship between the display unit and the display point, simplifies the data processing process, reduces the amount of calculation, and can quickly update the flow field map to achieve real-time display of the flow field map. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0043] Figure 1 A flow chart of the steps of the method for real-time display of flow field diagrams provided in Example 1;
[0044] Figure 2 A schematic diagram of the structure of the real-time display system of flow field diagram provided in Example 2;
[0045] Figure 3 This is a schematic diagram of the structure of the terminal device provided in Example 3.
[0046] Reference numerals: 10, multi-core solver; 20, monitoring module; 30, post-processing display module; 40, mapping module; 50, cache module; 100, memory; 200, processor. DETAILED DESCRIPTION
[0047] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0048] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0049] Example 1
[0050] Please refer to Figure 1 This embodiment provides a method for real-time display of a flow field diagram, comprising:
[0051] S1, receiving terminal commands;
[0052] S2, processing the terminal command to obtain a command signal; the command signal is used to instruct to update the flow field map of the target object, the target object is a partial area of the simulated object, the flow field map includes a plurality of display units, the current parameter type and the current parameter value corresponding to each of the display units;
[0053] S3, obtaining an update parameter list of the command signal, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, obtaining a unit list of the flow field map, wherein the unit list includes all the display units of the flow field map;
[0054] S4, calling a mapping database according to the unit list to obtain a mapping set, wherein the mapping set includes a plurality of display points corresponding to each of the display units in the unit list; calling a cache module according to the plurality of display points and the update parameter type to obtain a read list, and calculating a parameter value corresponding to the update parameter type for each of the display units in the unit list according to the read list and a pre-stored interpolation template; the mapping database includes all display units of the simulation object and the display points corresponding to each of the display units; the read list includes the update parameter value corresponding to the update parameter type for each of the display points in the mapping set;
[0055] S5. Rendering according to the updated parameter value of each of the display units in the mapping set to update the flow field map.
[0056] It should be noted that a simulated object is obtained by simulating the flow field of a certain entity. The simulated object is composed of multiple display points. In addition, the simulated object is divided into multiple display units, and different parameter types and corresponding parameter values displayed by the display units can be selectively displayed. The parameter types include temperature, pressure, speed, etc. The display unit is a larger unit than the display points. The display unit may or may not include display points, and each display point and each display unit are numbered separately.
[0057] Specifically, after obtaining the simulated object, a plurality of surfaces and a plurality of cross sections are divided on the simulated object, each surface or each cross section is used as a target object, the target object includes a plurality of display units, and the unit numbers of the display units included in each target object are stored as a unit list. The flow field graph displays one target object each time, and the display units constituting the target object are displayed on the flow field graph, and the parameter value corresponding to at least one parameter type is displayed at the position of the display unit.
[0058] The method provided in this embodiment is executed based on the real-time display system of the flow field diagram, such as Figure 2 As shown, the system includes a multi-core solver 10, a monitoring module 20, a post-processing display module 30, a mapping module 40 and a cache module 50. The multi-core solver 10 is connected to the post-processing display module 30 through the monitoring module 20, the multi-core solver 10 is also connected to the cache module 50, the post-processing display module 30 is connected to the mapping module 40, and the mapping module 40 is also connected to the cache module 50.
[0059] Before executing steps S1-S5, it is first necessary to simulate the simulated object, and then process the simulation data of the simulated object through the multi-core solver 10 and the post-processing display module 30 respectively, wherein a target object is selected on the post-processing display module 30, and the simulation data of the target object is initialized to display the flow field diagram of the target object on the post-processing display module 30, that is, as the current flow field diagram; at the same time, the multi-core solver 10 performs real-time simulation of the temperature value, pressure value, speed value and other parameter values of all display points according to the simulation data of the simulated object, and stores the simulated parameter values in the form of a structured cache file in the cache module 50. It should be noted that the multi-core solver 10 uses mathematical methods for real-time simulation, which belongs to the prior art and is not described in detail here.
[0060] Based on the above-mentioned flow field map real-time display system, the method provided in this embodiment is specifically as follows:
[0061] In step S1, the multi-core solver 10 first receives a terminal command issued by the software end, and after receiving the terminal command, the multi-core solver 10 forwards it to the monitoring module 20 for processing.
[0062] In step S2, after the monitoring module 20 receives the terminal command, it obtains a command signal according to the terminal command and forwards it to the post-processing display module 30, wherein the command signal at least includes an update parameter list, and the update parameter list may include one, two or more update parameter types, or may not include an update parameter type. The command signal is used to instruct the post-processing display module 30 to update the current flow field diagram. The update here only updates the parameter type and parameter value corresponding to each display unit on the flow field diagram, and does not update the target object displayed on the flow field diagram. If you want to update the target object, you need to re-initialize the simulation data of the new target object on the post-processing display module 30.
[0063] Further, the processing of the terminal command to obtain the instruction signal includes:
[0064] When it is determined that the terminal command is an update command, the terminal command is intercepted and parsed to obtain the instruction signal.
[0065] Specifically, the multi-core solver 10, as the core processor of the system, is responsible for interacting with the software. The terminal commands issued by the software are forwarded by the multi-core solver 10 and monitored in real time by the monitoring module 20. When the monitoring module 20 detects that the terminal command is output information in the form of an update command, it intercepts and parses the terminal command to obtain a command signal, and then sends the command signal to the post-processing display module 30. When the monitoring module 20 detects that the terminal command is a regular solution log output information, it outputs the log to the post-processing display module 30 to display it in the log output column of the display interface of the post-processing display module 30.
[0066] In step S3, after receiving the command signal, the post-processing display module 30 obtains the update parameter list in the command signal. If the update parameter list is empty, it indicates that there is no need to update the current flow field map, and the current flow field map continues to update the parameter value corresponding to the parameter type on the current flow field map; if the update parameter list is not empty, it is determined whether the update parameter type in the update parameter list is the same as the current parameter type displayed by the current flow field map. If they are the same, it also indicates that there is no need to update the current flow field map. If they are different, it indicates that the current flow field map needs to be updated, then the cell list obj_cell_list of the target object displayed by the current flow field map is obtained and sent to the mapping module 40. The cell list obj_cell_list is shown in Table 1 below:
[0067] Table 1
[0068]
[0069] The target object 1 in the above unit list can be understood as the target object displayed in the current flow field map, and the display units included in the target object 1 are the display units numbered 1, 3, 5, and 6 among all the display units on the simulation object.
[0070] In step S4, a mapping database is pre-stored in the mapping module 40, and the mapping database includes the unit numbers of all display units of the simulation object and the point numbers of the relevant display points corresponding to each display unit. After the mapping module 40 receives the cell list obj_cell_list of the target object 1, it calls the mapping database according to the cell list of the target object 1, and then obtains a mapping set corresponding to the mapping database, and the mapping set includes the unit numbers of all display units in the cell list and the point numbers of the relevant display points corresponding to each display unit. The mapping set is shown in Table 2 below:
[0071] Table 2
[0072]
[0073] In the above mapping set, target object 1 represents the target object displayed in the current flow field map, and the point number is the number of the display point in the simulation object that is related to the display unit. It can be seen from the above table that each display unit corresponds to four related display points. In fact, the number of related display points corresponding to each display unit is unlimited. In theory, the more related display points there are, the more accurate the simulation results will be, but the amount of calculation will increase accordingly. The display unit includes two-dimensional units and three-dimensional units, where the number of related display points corresponding to the three-dimensional unit is greater than the number of related display points corresponding to the two-dimensional unit.
[0074] After obtaining the mapping set, the mapping module 40 calls the cache module 50 according to the display point and the update parameter type in the mapping set to obtain the parameter value corresponding to the display point and the update parameter type corresponding to each point number in the mapping set of Table 3; for example, the current flow field diagram displays the temperature at each display unit position, and the update parameter type is pressure, then the mapping module 40 calls the pressure value of each display point in the cache module 50. It should be noted that the update parameter type may not be unique and may include multiple. After obtaining the parameter value corresponding to each display point in the mapping set, the pressure value corresponding to each display unit in the mapping set can be calculated according to the interpolation template and the parameter value corresponding to the display point, where the interpolation template refers to the following formula (I):
[0075] Formula (I)
[0076] Among them, OBJ_DATA01 represents the parameter value corresponding to the display unit and the update parameter type. , , , Respectively represent the display points numbered 101, 102, 104, and 105 and the parameter values corresponding to the update parameter types. , , , Respectively , , , The coefficient of .
[0077] At this point, the parameter values corresponding to the multiple display units on the flow field diagram to be displayed are obtained according to the command signal and sent to the post-processing display module 30 .
[0078] It should be noted that after the system is started and before the flow field diagram is displayed, the mapping module 40 needs to be initialized. The initialization of the mapping module 40 includes the establishment of a mapping database and an interpolation template.
[0079] Furthermore, the method for establishing the mapping database includes:
[0080] A1. Calculate and obtain all display units of the simulated object;
[0081] A2. Select any one of the display units and use the display points of all units in the simulated object that are connected or intersected with the display unit in geometric topology as the relevant display points of the display unit;
[0082] A3, establishing a set of mapping relationships according to the display unit and the relevant display points corresponding to the display unit;
[0083] A4. Traverse all display units to obtain several groups of mapping relationships, and establish the mapping database according to the several groups of mapping management.
[0084] Specifically, first, when calculating all the display units of the simulated object, the position and size of the display unit need to be considered. The position of the display unit is considered to facilitate the correspondence with the display points of the simulated object in the later stage, and the size of the display unit is considered to ensure that a target object can be obtained through multiple display units. The position and size of the display unit can be set by yourself. In addition, the shape of the display unit can be selected as a two-dimensional unit or a three-dimensional unit, which can also be set by yourself. Then, in step A1, any one of all the display units determined by the simulation image is selected, and the display point related to the display unit is selected from all the display points of the simulated object according to the shape of the display unit and the topological structure of the simulated object. Then, a set of mapping relationships as shown in a row in the above Table 2 is established based on the display unit and the display points related to it. Finally, all the display units of the simulated object are traversed to obtain a mapping relationship between several groups of display units and related display points, and several groups of mapping relationships are integrated to obtain a mapping database as shown in Table 3 below:
[0085] Table 3
[0086]
[0087] Specifically, in step A2, the connection situation can also be specifically analyzed based on the shape of the display unit:
[0088] When determining that the display unit is a two-dimensional unit, the display points on all units in the simulated object located around the display unit including the vertices of the display unit are taken as the relevant display points of the display unit; when determining that the display unit is a three-dimensional unit, the display points on all units in the simulated object located around the display unit and having a common connection surface with the display unit are taken as the relevant display points of the display unit.
[0089] In step A2, the intersection situation can also be analyzed specifically:
[0090] Regardless of whether the display unit is a two-dimensional unit or a three-dimensional unit, the display points on the units around the display unit and intersecting with the display unit are taken as the relevant display points of the display unit. The intersecting units can be understood as the cross-section of the unit being coplanar with the surface of the display unit, or the surface of the unit being coplanar with the cross-section of the display unit.
[0091] It should be noted that only a few methods of determining the relevant display points of the display unit are listed here. The purpose is only to determine the relevant display points of the display unit, and the specific determination method is not limited. The method can be used as long as the relevant display points can be determined in the units around the display unit.
[0092] Furthermore, the method for establishing the interpolation template includes:
[0093] B1. Obtain the center point of the display unit and calculate a first distance, where the first distance is the distance between the relevant display point corresponding to the display unit and the center point;
[0094] B2. Calculating coefficients of the relevant display points by using an inverse distance interpolation method according to the topological structure of the simulated object and the first distance;
[0095] B3. Calculate the product of the parameter value corresponding to each display point and the coefficient, and add the products corresponding to all the display points to obtain the parameter value corresponding to the display unit, which is used as the interpolation template.
[0096] Specifically, the interpolation template is as shown in the above formula (I). The key to establishing the interpolation template is to determine the coefficient of the parameter value at the display point. The present invention calculates the distance between the center point of the display unit and the display point related to the display unit, and then calculates the coefficient of the parameter value by the inverse distance interpolation method. It utilizes the characteristics that the parameter value of the display point far from the center point has a small influence on the parameter value of the display unit, and the parameter value of the display point close to the center point has a large influence on the parameter value of the display unit, so that the calculated parameter value of the updated parameter type corresponding to the display unit is more accurate.
[0097] In step S4, after receiving the data returned by the mapping module 40, the post-processing display module 30 renders according to all display units of the target object to be displayed and the parameter value of the updated parameter type corresponding to each display unit, and displays the updated flow field diagram on the display interface.
[0098] When the post-processing display module 30 does not update the current flow field map according to the terminal command, the parameter value corresponding to each display unit position in the current flow field map is still updated by calling the update information in the cache module 50 and according to the interpolation template.
[0099] Furthermore, the command signal further includes a first duration, which is the duration from the establishment of the simulation object to the generation of the command signal;
[0100] After the terminal command is processed to obtain the instruction signal, the method further includes:
[0101] Comparing the first duration and the second duration, the second duration being the current rendering duration of the flow field graph;
[0102] When it is determined that the first duration is greater than the second duration, the step of obtaining an update parameter list for the command signal is executed; when it is determined that the update parameter type in the update parameter list is different from the current parameter type, the step of obtaining a unit list for the flow field diagram includes all the display units of the flow field diagram.
[0103] Specifically, in addition to determining whether the flow field diagram is updated by updating the parameter list, the post-processing display module 30 also determines by duration, so the command signal includes the first duration in addition to the update parameter list, and the first duration is a timestamp. After receiving the command signal, the post-processing display module 30 first determines whether the flow field diagram needs to be updated by the first duration, the first duration is the time interval from the moment when the simulation object is obtained after the system is started to the moment when the command signal is generated, and the second duration is the time interval from the moment when the current flow field diagram is initialized to the moment when the post-processing display module 30 receives the command signal; under normal circumstances, the first duration is greater than the second duration in most cases, and rarely equal to the second duration, but because the multi-core solver 10 may have the problem of current step back when working, in order to avoid the problem of erroneous update in this case, the size of the first duration and the second duration is first determined.
[0104] Further, the simulated object includes a plurality of unit blocks, each of the unit blocks includes a portion of the display unit of the simulated object and a portion of the display points, and each of the unit blocks corresponds to a point range of the display points; the terminal command also includes the point range:
[0105] After determining that the first duration is greater than the second duration, the method further includes:
[0106] Determining whether all the displayed points of the flow field diagram belong to the point range;
[0107] When all the display points of the flow field diagram belong to the point range, the update parameter list of the command signal is obtained, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, the unit list of the flow field diagram is obtained, and the unit list includes all the display units of the flow field diagram.
[0108] It should be noted that, in order to further reduce the amount of calculation in the process of updating the flow field map, in addition to dividing the simulated object into multiple display units, the simulated object is divided in another way, that is, dividing the simulated object into multiple unit blocks, which are units with a larger range than the display unit, and a unit block may include multiple target objects. For example, assuming that the simulated object is an airplane, the corresponding unit blocks may include a fuselage, a wing, etc., and different unit blocks include different display points. If the display points included in the fuselage are points numbered 101-200, the display points included in the wing are points numbered 201-300, where 101-200 and 201-300 are both used as point ranges.
[0109] Specifically, the command signal also includes a point range. After the post-processing display module 30 receives the command signal, after determining that the current flow field map needs to be updated through the first time length, it continues to determine whether the current flow field map needs to be updated through the point range. Assuming that the target object displayed by the current flow field map is the target object 1 in the above Table 3, it can be determined that it belongs to the range of the unit block representing the fuselage in the above example according to its point number. If the point range in the terminal command is 101-200 above, it is determined that the point number corresponding to the target object 1 belongs to the point range, and the post-processing display module 30 Then, it is determined whether the current flow field map needs to be updated by updating the parameter list; if the point range in the terminal command is 201-300 as mentioned above, it is determined that the point number corresponding to the target object 1 does not belong to the point range, which can be understood as the need to update the target object on the wing, and the target object displayed in the current flow field map is on the fuselage. Since the point range of the command signal does not correspond to the target object displayed in the current flow field map, the current flow field map is not updated. At this time, if the flow field map of the target object on the wing is to be displayed, it is necessary to perform an initialization operation through the post-processing display module 30. By dividing the simulated object into multiple unit blocks and adding the judgment of the point number, when updating the current flow field map, it can be based only on the unit block where the target object is located. The number of display points that need to be considered during calculation is less than the number of all display points on the simulated object, thereby reducing the amount of calculation and further realizing the rapid update of the flow field map.
[0110] Furthermore, the instruction signal also includes a cache file path, and the cache file path is used to establish a mapping with the cache module 50.
[0111] Example 2
[0112] Based on the same inventive concept, the present invention also provides a flow field map real-time display system, the principle of solving the problem by the system is similar to the principle of solving the problem by any of the above-mentioned flow field map real-time display methods, and the repeated parts will not be repeated.
[0113] Please refer to Figure 2 This embodiment provides a flow field map real-time display system, including:
[0114] A multi-core solver 10, wherein the multi-core solver 10 is configured to receive a terminal command;
[0115] A monitoring module 20, wherein the monitoring module 20 is configured to process the terminal command to obtain a command signal; the command signal is used to instruct to update a flow field map of a target object, wherein the target object is a partial area of a simulated object, and the flow field map includes a plurality of display units, a current parameter type corresponding to each of the display units, and a current parameter value;
[0116] A post-processing display module 30, wherein the post-processing display module 30 is configured to obtain an update parameter list of the command signal, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, obtain a unit list of the flow field diagram, wherein the unit list includes all the display units of the flow field diagram;
[0117] A mapping module 40, wherein the mapping module 40 is configured to call a mapping database according to the unit list to obtain a mapping set, wherein the mapping set includes a plurality of display points corresponding to each of the display units in the unit list; call a cache module 50 according to the plurality of display points and the update parameter type to obtain a read list, and calculate a parameter value corresponding to the update parameter type for each of the display units in the unit list according to the read list and a pre-stored interpolation template; the mapping database includes all display units of the simulated object and the display points corresponding to each of the display units; the read list includes an update parameter value corresponding to the update parameter type for each of the display points in the mapping set;
[0118] The post-processing display module 30 is also configured to render according to the updated parameter value of each of the display units in the mapping set to update the flow field map;
[0119] The cache module 50 is configured to cache parameter information updated in real time, wherein the parameter information includes all the display points of the simulation object, and all the parameter types and parameter values corresponding to each display point.
[0120] Furthermore, the multi-core solver 10 is also configured to simulate all the parameter types and parameter values corresponding to each display point of the simulated object, and cache them in the cache module 50 in real time.
[0121] Example 3
[0122] Based on the same inventive concept, the present invention also provides a terminal device, the principle of solving the problem by the device is similar to the principle of solving the problem by any of the above-mentioned flow field diagram real-time display methods, and the repeated parts will not be repeated.
[0123] refer to Figure 3 This embodiment provides a terminal device, including a memory 100, a processor 200, and a computer program stored in the memory 100 and executable on the processor 200. When the processor 200 executes the computer program, the steps of the method for real-time display of a flow field diagram as described in Example 1 are implemented:
[0124] S1, receiving terminal commands;
[0125] S2, processing the terminal command to obtain a command signal; the command signal is used to instruct to update the flow field map of the target object, the target object is a partial area of the simulated object, the flow field map includes a plurality of display units, the current parameter type and the current parameter value corresponding to each of the display units;
[0126] S3, obtaining an update parameter list of the command signal, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, obtaining a unit list of the flow field map, wherein the unit list includes all the display units of the flow field map;
[0127] S4, calling a mapping database according to the unit list to obtain a mapping set, wherein the mapping set includes a plurality of display points corresponding to each of the display units in the unit list; calling a cache module according to the plurality of display points and the update parameter type to obtain a read list, and calculating a parameter value corresponding to the update parameter type for each of the display units in the unit list according to the read list and a pre-stored interpolation template; the mapping database includes all display units of the simulation object and the display points corresponding to each of the display units; the read list includes the update parameter value corresponding to the update parameter type for each of the display points in the mapping set;
[0128] S5. Rendering according to the updated parameter value of each of the display units in the mapping set to update the flow field map.
[0129] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) to form a technical solution.
Claims
1. A method for real-time display of a flow field diagram, characterized in that: include: Receive terminal commands; Processing the terminal command to obtain a command signal; The instruction signal is used to instruct to update the flow field map of the target object, the target object is a partial area of the simulated object, and the flow field map includes a plurality of display units, a current parameter type corresponding to each of the display units, and a current parameter value; Acquire an update parameter list of the command signal, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, acquire a unit list of the flow field map, wherein the unit list includes all the display units of the flow field map; A mapping database is called according to the unit list to obtain a mapping set, wherein the mapping set includes a plurality of display points corresponding to each of the display units in the unit list; a cache module is called according to the plurality of display points and the update parameter type to obtain a read list, and a parameter value corresponding to the update parameter type for each of the display units in the unit list is calculated according to the read list and a pre-stored interpolation template; the mapping database includes all display units of the simulation object and the display points corresponding to each of the display units; the read list includes the update parameter value corresponding to the update parameter type for each of the display points in the mapping set; Rendering to update the flow field map according to the updated parameter value of each of the display units in the mapping set; The method for establishing the mapping database comprises: Calculate and obtain all display units of the simulated object; Select any one of the display units, and use the display points in all units of the simulated object that are connected or intersected with the display unit in geometric topology as the relevant display points of the display unit; Establishing a set of mapping relationships between the display unit and the relevant display points corresponding to the display unit; All display units are traversed to obtain a plurality of groups of mapping relationships, and the mapping database is established according to the plurality of groups of mapping relationships.
2. The method for real-time display of flow field diagram according to claim 1, characterized in that: The processing of the terminal command to obtain an instruction signal comprises: When it is determined that the terminal command is an update command, the terminal command is intercepted and parsed to obtain the instruction signal.
3. The method for real-time display of flow field diagram according to claim 2, characterized in that: The command signal further includes a first duration, which is the duration from the establishment of the simulation object to the generation of the command signal; After the terminal command is processed to obtain the instruction signal, the method further includes: Comparing the first duration and the second duration, the second duration being the current rendering duration of the flow field graph; When it is determined that the first duration is greater than the second duration, the step of obtaining an update parameter list for the command signal is executed; when it is determined that the update parameter type in the update parameter list is different from the current parameter type, the step of obtaining a unit list for the flow field diagram includes all the display units of the flow field diagram.
4. The method for real-time display of flow field diagram according to claim 3, characterized in that: The simulated object includes a plurality of unit blocks, each of which includes a portion of the display unit of the simulated object and a portion of the display points, and each of which corresponds to a point range of the display points; the terminal command also includes the point range: After determining that the first duration is greater than the second duration, the method further includes: Determine whether all the displayed points of the flow field diagram belong to the point range; When all the display points of the flow field diagram belong to the point range, the update parameter list of the command signal is obtained, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, the unit list of the flow field diagram is obtained, and the unit list includes all the display units of the flow field diagram.
5. The method for real-time display of flow field diagram according to claim 4, characterized in that: The method for establishing the interpolation template comprises: Acquire the center point of the display unit and calculate a first distance, where the first distance is the distance between the relevant display point corresponding to the display unit and the center point; Calculating coefficients of the relevant display points by using an inverse distance interpolation method according to the topological structure of the simulated object and the first distance; The product of the parameter value corresponding to each display point and the coefficient is calculated, and the products corresponding to all the display points are added together to obtain the parameter value corresponding to the display unit, which is used as the interpolation template.
6. The method for real-time display of flow field diagram according to claim 5, characterized in that: The instruction signal also includes a cache file path, and the cache file path is used to establish a mapping with the cache module.
7. A flow field map real-time display system, characterized in that: The method for real-time display of a flow field diagram as claimed in any one of claims 1 to 6 comprises: a multi-core solver configured to receive terminal commands; A monitoring module, wherein the monitoring module is configured to process the terminal command to obtain a command signal; the command signal is used to instruct to update a flow field map of a target object, wherein the target object is a partial area of a simulated object, and the flow field map includes a plurality of display units, a current parameter type corresponding to each of the display units, and a current parameter value; A post-processing display module, wherein the post-processing display module is configured to obtain an update parameter list of the command signal, and when it is determined that the update parameter type in the update parameter list is different from the current parameter type, obtain a unit list of the flow field diagram, wherein the unit list includes all the display units of the flow field diagram; A mapping module, the mapping module is configured to call a mapping database according to the unit list to obtain a mapping set, the mapping set includes a plurality of display points corresponding to each of the display units in the unit list; call a cache module according to the plurality of display points and the update parameter type to obtain a read list, and calculate a parameter value corresponding to the update parameter type for each of the display units in the unit list according to the read list and a pre-stored interpolation template; the mapping database includes all display units of the simulation object and the display points corresponding to each of the display units; the read list includes the update parameter value corresponding to the update parameter type for each of the display points in the mapping set; The post-processing display module is further configured to render according to the updated parameter value of each of the display units in the mapping set to update the flow field map; A cache module is configured to cache parameter information updated in real time, wherein the parameter information includes all the display points of the simulation object, and all the parameter types and parameter values corresponding to each display point.
8. The flow field map real-time display system according to claim 7, characterized in that: The multi-core solver is also configured to simulate all the parameter types and parameter values corresponding to each display point of the simulated object, and cache them in real time into the cache module.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for real-time display of a flow field diagram according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Sea area flow field and erosion and deposition depth real-time hydrological monitoring big data display and space query method and system
CN113076373A
Multi-physics field simulation processing method and device, electronic equipment and storage medium
CN115879322A