CFD simulation processing method, apparatus and device, and medium
By dynamically adjusting the speed upper limit in stages and removing overspeed grid cells, the problem of computing divergence in CFD simulation is solved, and the accuracy and reliability of simulation results are improved.
Patent Information
- Application Number
- CN202510378862.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-08
AI Technical Summary
The existing CFD simulation analysis methods have computational divergence problems in the passenger compartment simulation, which leads to unreliable simulation results and affects subsequent processing and report generation.
By dividing the simulation processing process into multiple stages, dynamically adjusting the speed upper limit according to the current maximum speed in each stage, removing grid cells that exceed the target speed upper limit, and combining grid optimization technology to ensure the stability and accuracy of the calculation.
It effectively avoids computational divergence, improves the accuracy and reliability of simulation results, and ensures the quality of subsequent processing and report generation.
Smart Images

Figure CN120278066A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle simulation, and particularly to a CFD simulation processing method, device, equipment and medium. Background Art
[0002] With the development of processor technology and the automotive industry, CFD simulation analysis has become an important means to evaluate the performance of occupant compartment air conditioners.
[0003] However, due to a large number of grids with poor quality in the three-dimensional grid model, abnormal velocities may occur in the simulation process, affecting the reliability of the flow field results. The existing interface-based simulation analysis assistance method based on StarCCM+ simplifies the simulation process by automatically generating model settings, calculations, post-processing and reporting steps, but fails to effectively solve the problem of calculation divergence, resulting in unreliable simulation results and thus affecting subsequent post-processing and report generation.
[0004] Therefore, when performing occupant compartment simulation analysis, how to avoid and solve the problem of calculation divergence is still a challenge to be urgently solved. Summary of the Invention
[0005] The present application provides a CFD simulation processing method, device, equipment and medium, achieving the technical effect of effectively avoiding and solving calculation divergence.
[0006] To achieve the above object, the main technical solutions adopted by the present application include: In a first aspect, an embodiment of the present application provides a CFD simulation processing method, which is applied to a simulation model of vehicle occupant compartment fluid dynamics. The method includes: Obtaining the current maximum velocity in all grid cells within the fluid domain or porous medium domain of the simulation model; Dividing the CFD simulation processing into multiple stages, and dynamically adjusting the velocity upper limit according to the current maximum velocity in each stage to obtain a target velocity upper limit. The stages include a first stage, a second stage and a third stage. The first stage represents the stage where the velocity in the initial stage of calculation is higher than a preset threshold. The second stage represents the stage where the maximum velocity decreases at a first preset rate. The third stage represents the stage where the maximum velocity converges at a second preset rate. The first preset rate is greater than the second preset rate; In the case where the current maximum velocity exceeds the target velocity upper limit, removing the grid cells with the current velocity exceeding the target velocity upper limit from the simulation model.
[0007] A CFD simulation processing method provided by this embodiment can effectively avoid abnormal speed problems during processing by dividing the processing process of the simulation model into multiple stages and dynamically adjusting the speed limit according to the characteristics of each stage. In the first stage, in view of the situation that the speed is relatively high at the initial stage of calculation, a relatively high speed limit is set to ensure the smooth progress of processing; in the second stage, as the maximum speed rapidly decreases, the speed limit is appropriately adjusted to maintain the stability of the calculation; in the third stage, when the speed tends to be stable and slowly converges, the speed limit is further tightened to ensure the reliability of the processing result. When the current maximum speed exceeds the target speed limit, the grid cells exceeding the speed limit are removed from the simulation model to further eliminate abnormal grids that may affect the calculation accuracy and stability. Through this method of dynamic adjustment and grid optimization, it is possible to effectively avoid calculation divergence, improve the accuracy and reliability of the simulation results, and ensure the quality of subsequent processing and report generation.
[0008] In one embodiment, when the stage is the first stage, the specified preset initial speed value is determined as the target speed limit corresponding to the first stage.
[0009] This embodiment sets the preset initial speed value as the target speed limit corresponding to the first stage, which can ensure the stability and continuity of the simulation process in the initial stage. This approach avoids the situation where the simulation becomes unstable or is prematurely interrupted due to too high an initial speed, ensuring the smooth progress of the processing. By reasonably setting the speed limit, the system can adapt to a relatively high initial speed, avoiding premature speed limitations, thereby improving the fluency and stability of the processing.
[0010] In one embodiment, when the stage is the second stage, multiple groups of historical maximum speeds corresponding to the current iteration step are obtained; Based on the multiple groups of historical maximum speeds and the current maximum speed, the corresponding speed limit is adjusted step by step according to the gradient to obtain the target speed limit corresponding to the second stage.
[0011] In this embodiment, by dynamically obtaining the historical maximum speed and the current maximum speed, the simulation system can timely monitor the potential risk of calculation divergence. When it is found that the current speed is significantly lower than the historical maximum speed or there are abnormal fluctuations, the system will comprehensively analyze based on historical data and current data and automatically adjust the speed limit to avoid calculation divergence. This adjustment is achieved by controlling the speed limit step by step according to the gradient, ensuring that too high a speed limit will not cause system instability, and at the same time avoiding too low a speed limit from affecting the calculation accuracy. Through this refined adjustment mechanism, the system can make a smooth transition and respond to speed changes in real time, thereby effectively preventing calculation divergence, ensuring that the model can normally calculate reasonable results, and ensuring the stability and accuracy of the simulation process.
[0012] In one embodiment, the end conditions for dynamically adjusting the speed limit in the second stage include: obtaining the current maximum speed corresponding to the current iteration step and multiple sets of historical maximum speeds corresponding to the current iteration step; Determining the target difference between the current maximum speed and the multiple sets of historical maximum speeds; When the target difference is less than or equal to a first preset value and the current maximum speed is less than a second preset value, end the dynamic adjustment of the speed limit in the second stage; When the current iteration step reaches a preset step threshold, end the dynamic adjustment of the speed limit in the second stage.
[0013] In this embodiment, by setting the thresholds for the current maximum speed and the target difference, the system can avoid excessive adjustment and meaningless processing, thereby reducing the computational burden and optimizing resource utilization. At the same time, the conditional judgment ensures that there will be no drastic fluctuations in the speed adjustment process of the system, guaranteeing the smoothness and accuracy of the adjustment. In addition, through the step threshold and the adaptive adjustment mechanism, the system can flexibly respond to different application scenarios, dynamically adjust the end timing, and ensure to reach the best stable state.
[0014] In one embodiment, when the stage is the third stage, determine the target speed limit corresponding to the third stage based on the current maximum speed, the current iteration step number, and a preset safety threshold.
[0015] In this embodiment in the third stage, by dynamically adjusting the speed limit, the situation where the maximum speed tends to be stable can be effectively handled. The adjustment rule gradually refines the adjustment of the speed limit to ensure that the speed limit can follow the change of the maximum speed in a timely manner, while avoiding the problem that the speed limit is too high to handle the computational divergence in a timely manner. By setting a reasonable adjustment rule, the stability and efficiency of the calculation can be effectively balanced.
[0016] In one embodiment, when the current maximum speed exceeds the target speed limit, removing the grid cells whose current speed exceeds the target speed limit from the simulation model includes: Obtaining the current maximum speed corresponding to the current iteration step in the CFD simulation process; When the current maximum speed exceeds the target speed limit, traverse all grid regions in the simulation model to find whether the current speed of any grid cell in any grid region exceeds the target speed limit; If the current speed of the grid cell exceeds the target speed limit, mark the corresponding grid cell as a high-speed grid cell; Remove the high-speed grid cell from the simulation model.
[0017] This embodiment provides the basis data for subsequent judgment by obtaining the maximum speed in the current simulation model, ensuring the timely detection of possible abnormal flow rates. When the maximum speed exceeds the upper limit of the target speed, all grid cells are traversed to check whether there is a situation where the speed exceeds the upper limit. This comprehensive check can prevent local unstable areas from affecting the overall simulation results. For the grid cells with excessive speed, they are marked and removed, thereby avoiding their interference with the calculation and maintaining the stability and convergence of the simulation process. Through these operations, the calculation error can be reduced, the simulation efficiency can be optimized, and the accuracy of the simulation results can be ensured.
[0018] In one embodiment, the method further includes: Traverse the grid area in the simulation model, and mark the grid cells that do not meet the preset quality standards as invalid grid cells; wherein, the preset quality standards represent at least one of surface validity, grid quality, grid volume change, the number of adjacent grid cells, and grid volume; Remove the invalid grid cells from the simulation model.
[0019] By traversing the grid area in the simulation model, marking and removing the invalid grid cells that do not meet the preset quality standards, this embodiment can effectively improve the accuracy, stability, and calculation efficiency of the simulation model. The preset multi-dimensional quality standards evaluate from aspects such as the validity, quality, volume change of grid cells to the number of adjacent grids, ensuring that each grid cell meets certain quality requirements. This not only avoids the errors and instabilities brought by low-quality grid cells, but also improves the calculation efficiency and saves computing resources. The unified quality standards make the quality of grid cells consistent, reduce the deviation of the overall model, and further enhance the reliability and stability of the simulation model.
[0020] In one embodiment, the method further includes: Traverse the grid area in the simulation model. When the current grid area is not a solid domain or a porous medium domain, divide the current grid area into multiple independent new areas; For any new area, obtain the corresponding number of volume grids; Mark the new areas with the number of volume grids less than the preset number threshold as discontinuous areas; Remove the discontinuous areas from the simulation model.
[0021] By automatically identifying and removing discontinuous areas, this embodiment reduces the amount of calculation, thereby improving the calculation efficiency; at the same time, removing these discontinuous areas also avoids unstable calculation results, ensuring the accuracy and stability of the simulation model. In addition, the automated grid optimization process makes the entire simulation process more efficient and reliable, reducing the need for manual intervention.
[0022] In a second aspect, an embodiment of the present application provides a CFD simulation processing device, which includes: A maximum speed acquisition unit, configured to acquire the current maximum speed in all grid cells within the fluid domain or porous media domain of the simulation model; A speed upper limit adjustment unit, configured to divide the CFD simulation processing into multiple stages, and dynamically adjust the speed upper limit according to the current maximum speed in each stage to obtain a target speed upper limit; wherein, the stages include a first stage, a second stage, and a third stage; the first stage represents a stage where the calculation initial speed is higher than a preset threshold, the second stage represents a stage where the maximum speed decreases at a first preset rate, the third stage represents a stage where the maximum speed converges at a second preset rate, and the first preset rate is greater than the second preset rate; A grid cell removal unit, configured to remove the grid cells whose current speed exceeds the target speed upper limit from the simulation model when the current maximum speed exceeds the target speed upper limit.
[0023] In a third aspect, an embodiment of the present application provides a computer device, including: A memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the above-mentioned CFD simulation processing method.
[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the above-mentioned CFD simulation processing method. Description of the Drawings
[0025] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0026] Figure 1 It is a flowchart of a CFD simulation processing method provided by an embodiment of the present application; Figure 2 It is a flowchart of step S3 provided by an embodiment of the present application; Figure 3 It is a block diagram of a CFD simulation processing device provided by an embodiment of the present application; Figure 4Schematic diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0028] With the rapid development of computer technology and the automotive industry, CFD (Computational Fluid Dynamics) simulation analysis has become an important means for evaluating the performance of occupant compartment air conditioners. During the project development process, it is inevitable to perform a large number of simulation processes on the occupant compartment flow field. However, due to the huge number of grids in the three-dimensional grid model, approximately 8 million grids, which contain a large number of grids with poor quality, these grids may cause the appearance of abnormal velocities during the simulation process. These abnormal velocities will affect the flow field of the entire occupant compartment model, resulting in the unreliability of the simulation results.
[0029] Existing technical solutions, such as the interface-based occupant compartment simulation analysis assistance method and tool based on StarCCM+, attempt to simplify the simulation analysis process through an automated process. This solution includes the following steps: First, in response to the user's operation on the interface, read various parameters input by the user; then, call the model setting module macro file to generate a parameterized model setting module macro file based on the simulation analysis function, model file, and calculation parameters; next, call the StarCCM+ software to run the parameterized model setting module macro file to automatically generate a calculated simulation model; subsequently, call the model post-processing module macro file to generate a parameterized model post-processing module macro file through the post-processing auxiliary file; then, run the parameterized model post-processing module macro file to automatically generate a post-processing output file; finally, run the report generation program to automatically generate a simulation analysis report based on the post-processing output file.
[0030] Although this technical solution provides a convenient tool, simplifies the occupant compartment simulation analysis process, and helps to generate a simulation report, it fails to effectively solve the problem of calculation divergence in the occupant compartment simulation model. When the simulation model has calculation divergence, reliable simulation results cannot be obtained, which in turn affects the accuracy of subsequent post-processing steps and report generation. Therefore, when performing occupant compartment simulation analysis, how to avoid and solve the problem of calculation divergence remains an urgent challenge to be solved.
[0031] To solve the above technical problems, according to an embodiment of the present application, an embodiment of a CFD simulation processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0032] In this embodiment, a CFD simulation processing method is provided. Figure 1 As shown in the flowchart of a CFD simulation processing method provided by an embodiment of the present application, Figure 1 which is applied to a simulation model of vehicle occupant compartment fluid dynamics, the process includes the following steps: Step S1, obtain the current maximum speed in all grid cells within the fluid domain or porous media domain of the simulation model.
[0033] Step S3, divide the CFD simulation processing into multiple stages, and dynamically adjust the speed upper limit according to the current maximum speed in each stage to obtain the target speed upper limit; wherein, the stages include the first stage, the second stage and the third stage; the first stage represents the stage where the speed in the initial calculation is higher than the preset threshold, the second stage represents the stage where the maximum speed decreases at a first preset rate, and the third stage represents the stage where the maximum speed converges at a second preset rate, and the first preset rate is greater than the second preset rate.
[0034] Specifically, by adjusting the speed upper limit in stages and combining the change law of the maximum speed, the dynamic optimization of the speed upper limit is realized, which can balance the calculation stability and efficiency. According to the speed change rate and the characteristics of the maximum speed, the speed change can be divided into three stages: The first stage: the stage where the speed in the initial calculation is on the high side Characteristic: The maximum speed can reach 8000 m / s.
[0035] Speed change rate: The speed change rate > 10 m / s, the maximum speed > 150 m / s, and less than 4 out of 5 consecutive speed change rates are less than 0.
[0036] Duration: Usually ends within 10 steps.
[0037] Therefore, the stage where the speed in the initial calculation is higher than the preset threshold (such as 150 m / s) and ends within the preset number of steps (for example, 10 steps) is determined as the first stage.
[0038] The second stage: the stage where the maximum speed rapidly decreases Characteristic: The maximum speed rapidly decreases within 200 iterations and reaches basic stability.
[0039] Characteristic after stabilization: The oscillation amplitude of the maximum speed ≤ 10 m / s.
[0040] Rate of change of speed: The rate of change of speed > 10 m / s, the maximum speed > 150 m / s, and among five consecutive rates of change of speed, no less than four are less than 0.
[0041] Duration: Generally, the second stage does not exceed 200 steps.
[0042] Therefore, the stage where the maximum speed starts from higher than the preset threshold (such as 150 m / s), rapidly decreases at the first preset rate (such as 10 m / s), and reaches a substantially stable stage within the preset number of iterations (such as 200 times) is determined as the second stage.
[0043] Third stage: Slow convergence stage of the maximum speed Characteristic: The maximum speed is relatively stable and slowly converges.
[0044] Rate of change of speed: The rate of change of speed < 10 m / s, the maximum speed < 150 m / s.
[0045] Therefore, the stage where the maximum speed is lower than the preset threshold (such as 150 m / s), the rate of change of speed is less than the second preset rate (such as 1 m / s), and slowly converges to a stable value is determined as the third stage.
[0046] In each stage, the speed upper limit is dynamically adjusted according to the change of the current maximum speed to ensure that the speed upper limit is always within a reasonable range. The target speed upper limit in the first stage is set to a higher value to avoid accidentally triggering a change in the speed upper limit due to too low a speed upper limit at the initial stage. In the second stage, in the case where the maximum speed may have periodic oscillations, the logic for handling the oscillations of the maximum speed is added to ensure that the speed upper limit can adapt to the change of the maximum speed. In the third stage, as the number of iteration steps increases, the adjustment of the speed upper limit is gradually refined to make it closer to the current maximum speed. By dynamically adjusting the speed upper limit in stages and combining the change law of the maximum speed, it is possible to effectively prevent calculation divergence while taking into account the stability and efficiency of the calculation.
[0047] Step S5, in the case where the current maximum speed exceeds the target speed upper limit, remove the grid cells whose current speed exceeds the target speed upper limit from the simulation model.
[0048] Specifically, in the CFD simulation process, when it is detected that the current maximum speed exceeds the target speed limit, it is necessary to remove the grid cells in the simulation model whose current speed exceeds the target speed limit. Specifically, obtain the current maximum speed in the fluid domain or porous medium domain. Compare the current maximum speed with the target speed limit. If the current maximum speed exceeds the target speed limit, traverse all grid regions in the simulation model. For each grid region, traverse all grid cells therein. Check whether the current speed of each grid cell exceeds the target speed limit. If the current speed of a certain grid cell exceeds the target speed limit, mark the grid cell as a high-speed grid cell. Remove these high-speed grid cells from the simulation model.
[0049] A CFD simulation processing method provided in this embodiment divides the processing process of the simulation model into multiple stages, and dynamically adjusts the speed limit according to the characteristics of each stage, which can effectively avoid abnormal speed problems in the processing. In the first stage, for the case of high speed at the initial stage of calculation, set a higher speed limit to ensure the smooth progress of the processing; in the second stage, as the maximum speed rapidly decreases, appropriately adjust the speed limit to maintain the stability of the calculation; in the third stage, when the speed tends to be stable and slowly converges, further tighten the speed limit to ensure the reliability of the processing results. When the current maximum speed exceeds the target speed limit, remove the grid cells that exceed the speed limit from the simulation model to further eliminate abnormal grids that may affect the calculation accuracy and stability. Through this method of dynamic adjustment and grid optimization, it is possible to effectively avoid calculation divergence, improve the accuracy and reliability of the simulation results, and ensure the quality of subsequent processing and report generation.
[0050] In one implementation, when the stage is the first stage, determine the specified preset initial speed value as the target speed limit corresponding to the first stage.
[0051] Specifically, in the CFD simulation process, the goal of the first stage is to calculate the initial stage with a relatively high speed. Usually, it refers to the process where the simulation model gradually calculates from the initial state, and there may be some initial unstable or overly fast calculation processes. In this stage, when the speed is relatively high, the simulation process needs to flexibly respond to the speed changes to avoid calculation errors or instabilities caused by excessive speed. At the beginning of the calculation, the speed may be very fast (for example, close to or reaching 8000 m / s). In this case, if the preset target speed upper limit is too low, the simulation system may not be able to handle the instability caused by excessive speed in time, resulting in the system possibly triggering the speed upper limit in advance, thus blocking the calculation process and even causing a situation where convergence cannot be achieved (calculation divergence). To effectively handle the speed upper limit in this stage, a relatively high target speed upper limit, such as 30000 m / s, needs to be set, which can ensure that when the simulation process encounters a sudden increase in speed, the system will not mis-trigger the speed upper limit change and maintain the stability of the calculation. The main purpose of doing this is to avoid the abnormal progress of the simulation due to too low speed limit in the initial stage.
[0052] In this embodiment, the preset initial speed value is set as the target speed upper limit corresponding to the first stage, which can ensure the stability and continuity of the simulation process in the initial stage. This approach avoids the situation where the simulation becomes unstable or is interrupted prematurely due to excessive initial speed, ensuring the smooth progress of the calculation process. By reasonably setting the speed upper limit, the system can adapt to a relatively high initial speed, avoid premature speed limitation, and thus improve the fluency and stability of the calculation.
[0053] In one implementation, when the stage is the second stage, multiple groups of historical maximum speeds corresponding to the current iteration step are obtained; based on the multiple groups of historical maximum speeds and the current maximum speed, the corresponding speed upper limit is adjusted step by step according to the gradient to obtain the target speed upper limit corresponding to the second stage.
[0054] Specifically, in the CFD simulation process, the goal of the second stage is to avoid calculation instability or divergence caused by an overly high speed upper limit. The behavior of the simulation model in this stage is complex. Although the maximum speed usually decreases, there may also be occasional rebounds, which requires the calculation system to be able to respond dynamically to this change and adjust the speed upper limit to cope with the fluctuations of the maximum speed. To cope with this dynamic change, a strategy of adjusting the speed upper limit step by step according to the gradient is designed. Based on the speed history in the previous period (i.e., the maximum speeds in the previous 10 steps and the previous 5 steps), combined with the current maximum speed, the speed upper limit is adjusted. By analyzing the maximum speeds in the previous 10 steps (a), the previous 5 steps (b), and the current step (c), it is judged whether they are all lower than a certain threshold. If the condition is met and the current speed upper limit is too high, the adjustment is made according to the rules. Specifically: If a, b, and c are all less than 300 m / s and the current speed limit > 500 m / s, then the target speed limit is adjusted to 500 m / s.
[0055] If a, b, and c are all less than 500 m / s and the current speed limit > 700 m / s, then the target speed limit is adjusted to 700 m / s.
[0056] If a, b, and c are all less than 900 m / s and the current speed limit > 1100 m / s, then the target speed limit is adjusted to 1100 m / s.
[0057] If a, b, and c are all less than 1500 m / s and the current speed limit > 1700 m / s, then the target speed limit is adjusted to 1700 m / s.
[0058] If a, b, and c are all less than 2500 m / s and the current speed limit > 2700 m / s, then the target speed limit is adjusted to 2700 m / s.
[0059] If a, b, and c are all less than 2900 m / s and the current speed limit > 2900 m / s, then the target speed limit is adjusted to 3100 m / s.
[0060] This gradient adjustment method based on the historical maximum speed provides a balanced way for the simulation process, which can avoid overly restricting the fluctuations of calculation results while ensuring the simulation accuracy. It can not only effectively track the speed change trend but also avoid unnecessary misjudgment divergence during the simulation process. Through this dynamic adjustment strategy, the simulation system can more stably and reliably automatically handle the calculation divergence risk and ensure that the model can normally calculate reasonable results.
[0061] In this embodiment, by dynamically obtaining the historical maximum speed and the current maximum speed, the simulation system can timely monitor potential calculation divergence risks. When it is found that the current speed is significantly lower than the historical maximum speed or there are abnormal fluctuations, the system will comprehensively analyze based on historical data and current data and automatically adjust the speed limit to avoid calculation divergence. This adjustment is achieved by gradually controlling the speed limit through gradients, ensuring that too high a speed limit will not cause system instability, and at the same time avoiding too low a speed limit from affecting the calculation accuracy. Through this refined adjustment mechanism, the system can smoothly transition and respond to speed changes in real time, thereby effectively preventing calculation divergence, ensuring that the model can normally calculate reasonable results, and ensuring the stability and accuracy of the simulation process.
[0062] In one embodiment, the end conditions for dynamically adjusting the speed limit in the second stage include: obtaining the current maximum speed corresponding to the current iteration step and multiple sets of historical maximum speeds corresponding to the current iteration step; determining the target difference between the current maximum speed and the multiple sets of historical maximum speeds; ending the dynamic adjustment of the speed limit in the second stage when the target difference is less than or equal to the first preset value and the current maximum speed is less than the second preset value; ending the dynamic adjustment of the speed limit in the second stage when the current iteration step reaches the preset number of steps threshold.
[0063] Specifically, obtain the current maximum speed (c) corresponding to the current iteration step and multiple sets of historical maximum speeds (a and b) corresponding to the current iteration step. Calculate the differences between a, b, and c, i.e., |a - b|, |b - c|, and |a - c|, and find the maximum of these three differences as the target difference, which represents the maximum fluctuation degree between the current maximum speed and the historical maximum speeds. If this target difference is small enough, it indicates that the current maximum speed has tended to be stable and the adjustment can end. That is, if the target difference is less than or equal to the first preset value (the first preset value is preferably 10 m / s) and the current maximum speed c is less than the second preset value (the second preset value is preferably 150 m / s), then end the dynamic adjustment of the speed limit in the second stage and enter the third stage of dynamically adjusting the speed limit.
[0064] Even if the target difference has not yet been small enough to meet the conditions, if the current iteration step has reached the preset number of steps threshold (e.g., 200 steps), the second stage will also be forced to end and enter the third stage. This is because the maximum speed oscillates back and forth within a certain range (e.g., 20 - 50 m / s), and the maximum difference between the current maximum speed and multiple sets of historical maximum speeds is always greater than the first preset value (e.g., the oscillation amplitude is 20 - 30 m / s). This oscillation is periodic, indicating that there is no obvious trend in the speed. This oscillation may cause the simulation results not to converge because the instability of the speed will affect the stability of the entire simulation model. The control logic in the second stage is mainly aimed at the rapid reduction of the speed and is not good at dealing with the small-amplitude oscillation of the maximum speed. The speed limit in the third stage is closer to the current maximum speed and can adjust the speed limit more finely, and has the ability to handle the small-amplitude periodic oscillation of the maximum speed. The small-amplitude periodic oscillation of the maximum speed poses a potential risk of computational divergence. Even if there is no actual computational divergence, the small-amplitude periodic oscillation of the maximum speed may still cause the simulation results not to converge and be unreliable. This oscillation may mask the potential risk of computational divergence, making the simulation model actually deviate from the correct calculation path in a seemingly stable state. Therefore, it is necessary to force the end of the second stage to avoid waste of computing resources or other potential problems.
[0065] In addition, at the beginning of the second stage, the initial value of the speed upper limit is adaptively set according to the current maximum speed and historical multiple groups of maximum speeds, aiming to ensure that the maximum speed during the adjustment process will not be too high, preventing the system from entering a state of excessive speed prematurely, thus affecting subsequent adjustments or stability.
[0066] In this embodiment, by setting the threshold value of the difference between the current maximum speed and the target, the system can avoid excessive adjustment and meaningless calculations, thereby reducing the computational burden and optimizing resource utilization. At the same time, the conditional judgment ensures that there will be no violent fluctuations in the system during the speed adjustment process, guaranteeing the smoothness and accuracy of the adjustment. In addition, through the step threshold and the adaptive adjustment mechanism, the system can flexibly respond to different application scenarios, dynamically adjust the end time, and ensure to reach the best stable state.
[0067] In one implementation, when the stage is the third stage, the target speed upper limit corresponding to the third stage is determined based on the current maximum speed, the current iteration step number, and a preset safety threshold.
[0068] Specifically, in the third stage of the simulation model processing, the maximum speed has tended to be stable and there will be no large fluctuations during normal calculations. At this stage, the speed upper limit needs to be closer to the current maximum speed to handle the problem of computational divergence more timely. Specifically: Calculate the differences between a, b, and c, that is, |a - b|, |b - c|, and |a - c|, and find the maximum difference among these three differences as the target difference, which represents the maximum fluctuation degree between the current maximum speed and the historical maximum speed.
[0069] When the current iteration step number is between 300 and 600 steps, at this stage, the maximum speed may start to show periodic oscillations but has not reached the speed upper limit. By setting the speed upper limit to the maximum value among a, b, and c, the problem of maximum speed oscillation can be effectively handled. If the target difference ≤ 2 m / s, then the target speed upper limit = the current maximum speed + the preset safety threshold (8 m / s), while maintaining a certain margin and avoiding excessive fluctuations. If the target difference > 10 m / s, then the target speed upper limit is equal to the maximum value among a, b, and c to effectively suppress fluctuations and prevent computational divergence.
[0070] When the current iteration step number is between 600 and 1200 steps, as the iteration step number increases, the speed upper limit gradually approaches the current maximum speed to handle the problem of computational divergence more timely. If the target difference ≤ 2 m / s, then the target speed upper limit = the current maximum speed + the preset safety threshold (6 m / s). If the target difference > 5 m / s, then the target speed upper limit is equal to the maximum value among a, b, and c.
[0071] The current iteration step is between 1200 and 1500 steps. At this time, the simulation is approaching the convergence stage, and the change in speed has become very small. The adjustment range of the target speed upper limit is further reduced to ensure that the simulation converges more precisely. If the target difference ≤ 1 m / s, then the target speed upper limit = the current maximum speed + the preset safety threshold (4 m / s). If the target difference > 3 m / s, then the target speed upper limit is equal to the maximum value among a, b, and c.
[0072] It should be noted that when the current iteration step is between 0 and 300 steps, the second stage and the third stage coexist. In this stage, the speed upper limit is set relatively loosely. The main purpose is to prevent misjudgment and computational divergence problems in the initial stage. The change rule of the speed upper limit is relatively loose, allowing large fluctuations to ensure the stable progress of the simulation calculation. If the target difference ≤ 2 m / s, then the target speed upper limit = the current maximum speed + the preset safety threshold (10 m / s). If the target difference > 2 m / s, determine whether a, b, and c are all less than 50, 90, and 150 respectively. If satisfied, adjust the target speed upper limit to 60, 100, and 160. This can avoid simulation errors or instability caused by overly strict speed upper limits in the initial stage. When the current iteration step exceeds 1500 steps, the target speed upper limit is no longer adjusted because in this stage, the speed has tended to be stable, and the speed upper limit can reasonably ensure the accuracy of the calculation without frequent adjustment.
[0073] In the third stage of this embodiment, by dynamically adjusting the speed upper limit, the situation where the maximum speed tends to be stable can be effectively handled. The adjustment rule gradually refines the adjustment of the speed upper limit to ensure that the speed upper limit can follow the change of the maximum speed in a timely manner, while avoiding the problem that the speed upper limit is too high to handle computational divergence in a timely manner. By setting reasonable adjustment rules, the stability and efficiency of the calculation can be effectively balanced.
[0074] In addition, at the beginning of the third stage, the speed upper limit is adjusted to 200 m / s, aiming to ensure that the maximum speed during the adjustment process will not be too high, preventing the system from entering a state with too high speed prematurely, thus affecting subsequent adjustments or stability.
[0075] Figure 2 The flowchart of step S3 provided for the embodiment of this application can include the following steps: Step S31, obtain the current maximum speed corresponding to the current iteration step in the CFD simulation process.
[0076] Step S33, in the case where the current maximum speed exceeds the target speed upper limit, traverse all grid regions in the simulation model to find whether the current speed of any grid cell in any grid region exceeds the target speed upper limit.
[0077] Step S35: If the current speed of a grid cell exceeds the target speed upper limit, mark the corresponding grid cell as a high-speed grid cell.
[0078] Step S37: Remove the high-speed grid cells from the simulation model.
[0079] Specifically, in the simulation process, it is necessary to determine the maximum speed value in the fluid domain or porous medium domain at the current iteration step. If the flow velocity in a certain area is too large, it may lead to computational instability. Therefore, measures need to be taken to control and adjust it. If the current maximum speed exceeds the target speed upper limit, it means that the flow velocity in the simulation has changed abnormally, which may lead to instability or divergence. Since the velocity distribution in the fluid domain or porous medium domain is dynamically changing and the flow velocity may change after each iterative calculation, it is necessary to ensure that all grid cells that may exceed the speed limit are discovered and processed in a timely manner. If only a local area or some grid cells are checked, the grid cells that exceed the speed limit in other areas may be missed, resulting in an increase in the error of the simulation process and even possible computational divergence. By traversing all grid cells, it is ensured that all grid cells that exceed the speed limit can be captured in a timely manner.
[0080] Therefore, it is necessary to traverse all grid regions in the simulation model and further check the speed of each grid cell. If the speed of a grid cell exceeds the target speed upper limit, it needs to be marked as a "high-speed grid cell". This marking can help quickly identify and process these abnormal grid cells in subsequent operations. For the grid cells marked as high-speed grid cells, they need to be removed from the simulation model. Removing these grid cells can prevent them from affecting subsequent calculations. For example, the grid cells with excessive speed may cause abnormal local calculation results, which in turn affect the convergence of the entire simulation process. By removing these grid cells, it is ensured that the simulation can proceed more stably, effectively avoiding the influence of these grid cells on subsequent calculations and thus avoiding computational divergence.
[0081] In this embodiment, by obtaining the maximum speed in the current simulation model, it provides basic data for subsequent judgments and ensures that possible flow velocity anomalies can be discovered in a timely manner. When the maximum speed exceeds the target speed upper limit, all grid cells are traversed to check whether there are grid cells with speeds exceeding the upper limit. This comprehensive check can prevent local unstable regions from affecting the overall simulation results. For the grid cells with excessive speed, they are marked and removed, thus avoiding their interference with the calculation and maintaining the stability and convergence of the simulation process. Through these operations, it is possible to reduce computational errors, optimize simulation efficiency, and ensure the accuracy of simulation results.
[0082] In one embodiment, the method further includes: traversing grid regions in the simulation model, and marking grid cells that do not meet a preset quality standard as invalid grid cells; wherein the preset quality standard represents at least one of surface validity, grid quality, grid volume change, number of adjacent grid cells, and grid volume; and removing the invalid grid cells from the simulation model.
[0083] Specifically, in the simulation model, mesh generation is a fundamental task, and the quality of grid cells directly affects the reliability of simulation results. To ensure the effectiveness of simulation processing, it is necessary to traverse all grid regions and evaluate each grid cell according to the preset quality standard. The preset quality standard includes a minimum surface validity of 0.95, a minimum grid quality of 10 -5 , a minimum grid volume change of 10 -5 , a minimum number of adjacent grid cells of 0, and a minimum grid volume of 0.
[0084] Among them, surface validity represents an area-weighted measure of the correctness of the grid surface normal relative to the centroid of its associated grid cell. If the surface validity is lower than 0.95, it indicates that there may be problems with the geometric shape of the grid, which can lead to computational instability and even affect the accuracy of the solution. Grid quality is evaluated based on the geometric distribution and orientation of grid cells, and usually, the gradient of grid cells is calculated using a combination of Gaussian and least squares methods. If the grid cell quality is lower than 10 -5 , the grid cell is considered invalid. Grid volume change represents the ratio of the grid cell volume to the volume of its largest adjacent grid cell. If the grid volume change is less than 10 -5 , it indicates that the grid cell may be too flat or have an unbalanced volume ratio, resulting in unstable calculation results or an inability to accurately approximate the actual physical problem. The number of adjacent grid cells represents its connection relationship with surrounding grid cells. If a grid cell has no adjacent grid cells (the number is 0), the grid cell cannot participate in the simulation calculation. Grid volume represents that if the volume of a grid cell is 0, it indicates that there is an abnormality in the geometric size of the grid cell, which will also affect the simulation accuracy and even cause the calculation to fail. For each grid cell, check whether it meets the above preset quality standard. If a certain grid cell does not meet the preset quality standard, mark it as an invalid grid cell. Remove the invalid grid cells from the simulation model. The removed invalid grid cells will be moved to a separate area that does not participate in subsequent simulation calculations.
[0085] In this embodiment, by traversing the grid regions in the simulation model, marking and removing invalid grid cells that do not meet the preset quality standards, the accuracy, stability, and computational efficiency of the simulation model can be effectively improved. The preset multi-dimensional quality standards evaluate aspects such as the validity, quality, volume change of grid cells, and the number of adjacent grids to ensure that each grid cell meets certain quality requirements. This not only avoids errors and instabilities caused by low-quality grid cells but also improves computational efficiency and saves computational resources. The unified quality standards make the quality of grid cells consistent, reducing the deviation of the overall model and further enhancing the reliability and stability of the simulation model.
[0086] It should be noted that the removal of invalid grid cells in this application is triggered before the start of simulation calculation and after each removal of high-speed grid cells. Before the start of simulation calculation, directly excluding significant invalid grid cells can effectively avoid errors and instabilities caused by these invalid grid cells. After removing high-speed grid cells, new invalid grid cells may be generated. These invalid grid cells may be caused by local grid structure changes due to the removal operation. By checking and removing invalid grid cells again after each removal of high-speed grid cells, the integrity and stability of the simulation model can be ensured.
[0087] For the removal of high-speed grid cells, in order to avoid excessive removal resulting in the model losing its representativeness or being unable to complete the calculation, it is necessary to set an upper limit on the number of removals to control the removal operation. Create an integer variable dele with an initial value of 0. Each time the removal of high-speed grid cells is triggered, the value of dele is incremented by 1. Create an integer variable Maxdele as the upper limit on the number of removals. This value can be adjusted according to specific simulation requirements and model characteristics. After each loop calculation, check whether dele is greater than Maxdele. If dele is greater than Maxdele, then break out of the loop and end the simulation calculation.
[0088] In one implementation, the method further includes: traversing the grid regions in the simulation model, and when the current grid region is not a solid domain or a porous medium domain, dividing the current grid region into multiple independent new regions; for any new region, obtaining the corresponding number of volume grids; marking the new regions with the number of volume grids less than the preset number threshold as discontinuous regions; and removing the discontinuous regions from the simulation model.
[0089] Specifically, in complex hydrodynamic simulations, the model may contain multiple discontinuous regions, which may lead to abnormal behaviors due to the instability of numerical methods or model defects. To ensure the accuracy and stability of the simulation results, it is necessary to process the grid regions in the simulation model to remove these discontinuous regions. Specifically, traverse all the grid regions in the simulation model. For each grid region, it is necessary to determine whether it belongs to the solid domain or the porous medium domain. If the current grid region is neither the solid domain nor the porous medium domain, call the splitNonContiguousRegions function in the API of the simulation software (such as Star-CCM+). This function will split the current region into multiple independent new regions according to the grid continuity. For each split new region, read the number of volume grids. The number of volume grids represents the complexity and scale of a region. If the number of volume grids in this region is less than a preset threshold (for example, 2000 grid cells), then this region is considered a small-volume discontinuous region. In this way, based on the threshold of the number of volume grids, it is possible to automatically determine which regions may have little physical meaning or may cause unstable calculation results due to being too sparse. For all regions with the number of volume grids less than the threshold, they are marked as "discontinuous regions". These regions are usually caused by improper grid division or defects in the model itself and may introduce unnecessary errors during the simulation process. Therefore, after being marked as discontinuous regions, these regions will be removed from the simulation model. The operation of removing invalid regions can effectively avoid unnecessary calculations, improve the simulation efficiency, and ensure the accuracy and stability of the results.
[0090] In this embodiment, by automatically identifying and removing discontinuous regions, the amount of calculation is reduced, thereby improving the calculation efficiency; at the same time, removing these discontinuous regions also avoids unstable calculation results and ensures the accuracy and stability of the simulation model. In addition, the automated grid optimization process makes the entire simulation process more efficient and reliable and reduces the need for manual intervention.
[0091] In one implementation, traverse all the grid elements in the simulation model and determine whether there are volume grids.
[0092] If there are no volume grids, perform the grid generation operation until volume grids are obtained.
[0093] If there are volume grids, traverse all the grid differentiation units in the simulation model and determine the number of volume grids in each grid differentiation unit.
[0094] If the number of volume grids in any grid differentiation unit exceeds the preset quantity threshold, it is determined that there are volume grids in the simulation model and there is no need to perform the volume grid generation operation.
[0095] Specifically, before calculating the simulation model, it is necessary to determine whether to generate volume meshes. In the simulation model, mesh elements are the basic units that make up the model, including geometric shapes, imported models (import), and volume meshes. The purpose of traversing these mesh elements is to check whether there are volume meshes. A volume mesh is a mesh form used to simulate the behavior of fluids or solids in three-dimensional space. If the type of any mesh element is found to be "volume" during the traversal, it is considered that there is a volume mesh in the model. Specifically, hasVo() is a function used to determine whether there is a volume mesh. By default, hasVo() returns true, indicating that there is no volume mesh. By traversing all mesh elements, hasVo() checks whether there are mesh elements of the "volume" type. If a mesh element of the "volume" type is found, it returns false, indicating that there is a volume mesh. To further confirm whether the number of volume meshes meets specific conditions, by traversing all regions, the number of volume meshes in each region is counted. A quantity threshold (e.g., 1000) is preset to determine whether the number of volume meshes is sufficient. If the number of volume meshes in any region exceeds this threshold, it is considered that there are already sufficient volume meshes in the model, and there is no need to perform the volume mesh generation operation, thus saving computational resources and time. If there is a volume mesh and the number of volume meshes in any region exceeds the threshold, there is no need to perform the volume mesh generation operation. If the number of volume meshes in all regions does not exceed the preset quantity threshold, it is necessary to call the generateVolumeMesh() function to generate volume meshes to ensure that subsequent simulation calculations can proceed smoothly.
[0096] If hasVo() returns true (i.e., there is no volume mesh), the mesh generation operation needs to be performed. The mesh generation operation is completed by calling the API provided by the simulation software, generateVolumeMesh(). The mesh generation operation includes generating surface meshes on the model surface, which is the basis for volume mesh generation because surface meshes describe the boundaries of objects. Then, based on the generated surface meshes, the three-dimensional space is segmented to generate volume meshes. Volume meshes are usually composed of small units (such as tetrahedrons, hexahedrons, pyramids, etc.), and these units will fill the three-dimensional space of the entire object. The generated volume meshes will be used for subsequent simulation calculations to ensure that the simulation model can correctly simulate the behavior of fluids or solids in three-dimensional space.
[0097] Furthermore, to ensure the stability and data security of the simulation process, this application controls automatic saving by setting a saving step size and loop calculation. Specifically, by setting a relatively large saving step size (e.g., 5000 steps), it is used to control the saving frequency of simulation data. This setting effectively avoids the interference of frequent saving operations on simulation calculations. The calculation step size is relatively small (e.g., 2000 steps), which is used to control the number of iterations of simulation calculations. Since the calculation step size is smaller than the saving step size, the simulation software will not automatically trigger saving during the entire calculation process, reducing the system burden and improving the calculation efficiency. The simulation model completes the hydrodynamic solution through multiple calculation iterations. The maximum value of the velocity is updated in each iteration, and the change in velocity is recorded through a monitor. This ensures the real-time tracking and monitoring of the simulation calculation process, helping to grasp the calculation progress in real time. The single calculation process is set to run in a loop, with a total of 2000 iterations. This method makes the simulation process repetitive and controllable, helping to improve the stability and reliability of the calculation.
[0098] After each calculation iteration, it is checked whether the current iteration step number is an integer multiple of the saving step size. For example, when the saving step size is set to 50 steps, the saving operation is triggered only after every 50 steps of calculation are completed. This mechanism reduces the possible performance impact of frequent saving while ensuring the security and integrity of the data.
[0099] When the current step number is a multiple of the saving step size, the simulation system triggers the saving command to save the current state of the simulation model to the specified path. The saved file name format is "original file name + _ + loop step number +.sim". This naming method makes the files easy to manage and convenient for subsequent searching and data recovery.
[0100] The following is described in combination with a specific application example. In this specific application example, the numerical values of the iteration step number, maximum velocity, and velocity upper limit are shown in Table 1.
[0101] Table 1 Simulation Process Data Table As can be seen from the above table of the processing process, the velocity upper limit value gradually decreases as the calculated flow field gradually converges. The whole process can be divided into three stages: the first stage, the second stage, and the third stage.
[0102] The first stage (iteration step numbers 1 - 14): Before step 14, the calculation is in the first stage, and the velocity upper limit is constant at 30000 m / s. The calculation in this stage is mainly to perform the preliminary calculation of the flow field, and there is no obvious change in the velocity upper limit.
[0103] Second stage (iteration steps 15 - 69): Starting from step 15, it enters the second stage. In this stage, the upper speed limit shows an obvious gradient change as the flow field gradually converges. For example, at iteration steps 5, 10, 15, and 20, the maximum speeds are 841.1 m / s, 248.1 m / s, 209.3 m / s, and 176.3 m / s respectively. At step 15, the upper speed limit is adjusted to 1100 m / s, and at step 20, it is adjusted to 500 m / s. As the iteration progresses, the upper speed limit gradually decreases until it enters the subsequent third stage.
[0104] Third stage (iteration steps 70 and later): At step 70, the calculation enters the third stage. In this stage, the upper speed limit is adjusted following the maximum speed, and the upper speed limit = maximum speed + constant term. At this time, it is determined whether to enter the third stage by judging whether the second stage has ended. When the iteration step is 70, the maximum speeds at steps 60, 65, and 70 are 41.4 m / s, 37.3 m / s, and 37.3 m / s respectively, and the difference in the maximum speeds is 4.1 m / s (i.e., 41.4 - 37.3), and 37.3 m / s is less than 150 m / s, meeting the condition for the end of the second stage, and the upper speed limit is adjusted to 200 m / s.
[0105] Further analysis shows that at iteration step 85, the maximum speeds at steps 75, 80, and 85 are 43.6 m / s, 45.5 m / s, and 45.9 m / s respectively, the deviation among the three is greater than 2 m / s, and each value is less than 50 m / s. Therefore, the adjustment of the third stage is triggered, and the upper speed limit is adjusted from 200 m / s to 60 m / s.
[0106] At iteration step 90, the maximum speeds at steps 80, 85, and 90 are 45.5 m / s, 45.9 m / s, and 46.1 m / s respectively, the deviation among the three is less than 2 m / s, triggering the adjustment of the third stage, and the upper speed limit is updated to the maximum speed plus 10 m / s, that is, 46.1 m / s + 10 = 56.1 m / s.
[0107] Calculation divergence risk detection: At iteration step 95, it is found that the maximum speed has exceeded the current upper speed limit, and there is a risk of calculation divergence. To avoid calculation instability, the system promptly removes the abnormal grid to ensure the normal calculation of the overall model.
[0108] In summary, the adjustment process of the upper speed limit reasonably reflects the convergence process of the calculated flow field and ensures the stability and accuracy of the calculation. In each stage, the upper speed limit is precisely adjusted to adapt to the changes in the calculated flow field and prevent the risk of calculation divergence.
[0109] Correspondingly, please refer toFigure 3 The block diagram of a CFD simulation processing device provided by an embodiment of the present application. The device includes: A maximum speed acquisition unit 101, configured to acquire the current maximum speed in all grid cells within a fluid domain or a porous media domain in a simulation model; A speed upper limit adjustment unit 103, configured to divide the CFD simulation processing into multiple stages, and dynamically adjust the speed upper limit according to the current maximum speed in each stage to obtain a target speed upper limit; wherein, the stages include a first stage, a second stage, and a third stage; the first stage represents a stage where the speed in the initial calculation is higher than a preset threshold, the second stage represents a stage where the maximum speed decreases at a first preset rate, and the third stage represents a stage where the maximum speed converges at a second preset rate, and the first preset rate is greater than the second preset rate; A grid cell removal unit 105, configured to remove, from the simulation model, grid cells whose current speed exceeds the target speed upper limit when the current maximum speed exceeds the target speed upper limit.
[0110] In some alternative embodiments, when the stage is the first stage, a specified preset initial speed value is determined as the target speed upper limit corresponding to the first stage.
[0111] In some alternative embodiments, when the stage is the second stage, multiple groups of historical maximum speeds corresponding to the current iteration step are acquired; Based on the multiple groups of historical maximum speeds and the current maximum speed, the corresponding speed upper limit is adjusted step by step according to the gradient to obtain the target speed upper limit corresponding to the second stage.
[0112] In some alternative embodiments, the end conditions for dynamically adjusting the speed upper limit in the second stage include: acquiring the current maximum speed corresponding to the current iteration step, and multiple groups of historical maximum speeds corresponding to the current iteration step; Determining the target difference between the current maximum speed and the multiple groups of historical maximum speeds; When the target difference is less than or equal to a first preset value, and at the same time the current maximum speed is less than a second preset value, the dynamic adjustment of the speed upper limit in the second stage ends; When the current iteration step reaches a preset step threshold, the dynamic adjustment of the speed upper limit in the second stage ends.
[0113] In some alternative embodiments, when the stage is the third stage, the target speed upper limit corresponding to the third stage is determined based on the current maximum speed, the current iteration step number, and a preset safety threshold.
[0114] In some alternative embodiments, the grid cell removal unit 103 includes: Acquiring the current maximum speed corresponding to the current iteration step in the CFD simulation processing; When the current maximum speed exceeds the target speed upper limit, traverse all grid regions in the simulation model to find whether the current speed of any grid cell in any grid region exceeds the target speed upper limit; If the current speed of the grid cell exceeds the target speed upper limit, mark the corresponding grid cell as a high-speed grid cell; Remove the high-speed grid cells from the simulation model.
[0115] In some alternative embodiments, the device further includes: Traverse the grid regions in the simulation model, and mark the grid cells that do not meet the preset quality standard as invalid grid cells; wherein, the preset quality standard represents at least one of surface validity, grid quality, grid volume change, number of adjacent grid cells, and grid volume; Remove the invalid grid cells from the simulation model.
[0116] In some alternative embodiments, the device further includes: Traverse the grid regions in the simulation model, and when the current grid region is not a solid domain or a porous medium domain, divide the current grid region into multiple independent new regions; For any new region, obtain the corresponding number of volume grids; Mark the new regions with the number of volume grids less than the preset number threshold as discontinuous regions; Remove the discontinuous regions from the simulation model.
[0117] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding above embodiments, and will not be elaborated here.
[0118] A CFD simulation processing device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0119] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a computer device provided by an embodiment of the present application, as Figure 4As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 4 Taking one processor 10 as an example in
[0120] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.
[0121] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0122] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0123] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memories.
[0124] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0125] The embodiments of the present application also provide a computer-readable storage medium. The methods according to the embodiments of the present application can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the methods described herein can be stored as such software processes on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.
[0126] The devices and units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0127] For the convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0128] Those skilled in the art should understand that the embodiments of the present application can be provided as methods and devices. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0129] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices, and apparatuses according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a dedicated computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate for implementing the processFigure 1 one or more processes and / or blocks Figure 1 means for the functions specified in one or more blocks
[0130] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction means that implements the functions in the process Figure 1 one or more processes and / or blocks Figure 1 specified in one or more blocks
[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the process Figure 1 one or more processes and / or blocks Figure 1 specified in one or more blocks
[0132] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element
[0133] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments
[0134] The above are only the embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application
[0135] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations fall within the scope defined by the appended claims
Claims
1. A CFD simulation processing method, characterized in that, A simulation model applied to the fluid dynamics of an automotive occupant compartment, the method comprising: Obtaining the current maximum velocity in all grid cells within the fluid domain or porous media domain of the simulation model; Dividing the CFD simulation process into multiple stages, and dynamically adjusting the velocity upper limit according to the current maximum velocity in each stage to obtain a target velocity upper limit; wherein, the stages include a first stage, a second stage, and a third stage; the first stage represents the stage where the velocity in the initial stage of processing is higher than a preset threshold, the second stage represents the stage where the maximum velocity decreases at a first preset rate, the third stage represents the stage where the maximum velocity converges at a second preset rate, and the first preset rate is greater than the second preset rate; In the case where the current maximum velocity exceeds the target velocity upper limit, removing the grid cells whose current velocity exceeds the target velocity upper limit from the simulation model.
2. The method according to claim 1, wherein In the case where the stage is the first stage, determining a specified preset initial velocity value as the target velocity upper limit corresponding to the first stage.
3. The method according to claim 1, wherein: In the case where the stage is the second stage, obtaining multiple sets of historical maximum velocities corresponding to the current iteration step; Based on the multiple sets of historical maximum velocities and the current maximum velocity, gradually adjusting the corresponding velocity upper limit step by step according to the gradient to obtain the target velocity upper limit corresponding to the second stage.
4. The method according to claim 1, characterized in that, The end conditions for dynamically adjusting the velocity upper limit for the second stage include: Obtaining the current maximum velocity corresponding to the current iteration step, and multiple sets of historical maximum velocities corresponding to the current iteration step; Determining the target difference between the current maximum velocity and the multiple sets of historical maximum velocities; In the case where the target difference is less than or equal to a first preset value and at the same time the current maximum velocity is less than a second preset value, ending the dynamic adjustment of the velocity upper limit for the second stage; In the case where the current iteration step reaches a preset step threshold, ending the dynamic adjustment of the velocity upper limit for the second stage.
5. The method according to claim 1, characterized in that In the case where the stage is the third stage, determining the target velocity upper limit corresponding to the third stage based on the current maximum velocity, the current iteration step number, and a preset safety threshold.
6. The method according to claim 1, wherein The step of, in the case where the current maximum velocity exceeds the target velocity upper limit, removing the grid cells whose current velocity exceeds the target velocity upper limit from the simulation model includes: obtaining the current maximum velocity corresponding to the current iteration step in the CFD simulation process; In the case where the current maximum velocity exceeds the target velocity upper limit, traversing all grid regions in the simulation model to find whether the current velocity of any grid cell in any grid region exceeds the target velocity upper limit; If the current velocity of the grid cell exceeds the target velocity upper limit, marking the corresponding grid cell as a high-speed grid cell; Removing the high-speed grid cell from the simulation model.
7. The method according to claim 1, characterized in that, The method further includes: Traverse the grid regions in the simulation model, and mark the grid cells that do not meet the preset quality criteria as invalid grid cells; wherein, the preset quality criteria characterize at least one of surface validity, grid quality, grid volume change, number of adjacent grid cells, and grid volume. Remove the invalid grid cells from the simulation model.
8. The method according to claim 1, characterized in that, The method further includes: Traverse the grid regions in the simulation model, and when the current grid region is not a solid domain or a porous medium domain, divide the current grid region into multiple independent new regions. For any new region, obtain the corresponding number of volume grids. Mark the new regions with the number of volume grids less than the preset number threshold as discontinuous regions. Remove the discontinuous regions from the simulation model.
9. A CFD simulation processing device, characterized in that, The apparatus includes: A maximum speed acquisition unit, configured to acquire the current maximum speed among all grid cells in the fluid domain or the porous medium domain in the simulation model. A speed upper limit adjustment unit, configured to divide the CFD simulation process into multiple stages, and dynamically adjust the speed upper limit according to the current maximum speed in each stage to obtain a target speed upper limit; wherein, the stages include a first stage, a second stage, and a third stage; the first stage represents the stage where the speed in the initial stage of processing is higher than a preset threshold, the second stage represents the stage where the maximum speed decreases at a first preset rate, the third stage represents the stage where the maximum speed converges at a second preset rate, and the first preset rate is greater than the second preset rate. A grid cell removal unit, configured to remove the grid cells with the current speed exceeding the target speed upper limit from the simulation model when the current maximum speed exceeds the target speed upper limit.
10. A processor device, characterized in that, Includes: A memory and a processor, which are communicatively connected to each other. The memory stores processor instructions, and the processor executes the CFD simulation processing method according to any one of claims 1 to 8 by executing the processor instructions.
11. A processor-readable storage medium, characterized in that, Processor instructions are stored on the processor-readable storage medium, and the processor instructions are used to cause the processor to execute the CFD simulation processing method according to any one of claims 1 to 8.