Mold filling simulation method and device for high-pressure casting

By using the GPU parallel computing technology in the high -pressure charging simulation method, the problem of low efficiency in the existing technology is solved, the efficient simulation computing is achieved, and high -precision results are provided.

CN119358059AInactive Publication Date: 2025-01-24SHENZHEN SHICHUANG TENGYANG TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411919725.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing high-voltage charging simulation methods have inefficiency problems in computing efficiency, especially in the charging process of frequent data exchange, the communication time may exceed the calculation time, which seriously affects the overall efficiency.

Method used

By obtaining the regular hexahedral grid, volume ratio function and filling calculation configuration file of the model casting to be filled, the inlet information and physical property parameters of the molten metal are set, and the volume ratio function and physical property parameters are initialized as macroscopic quantities of the flow field. Then, the initial flow field macroscopic quantities and the flow field equilibrium distribution function in each velocity direction are copied to the GPU, and parallel calculations are performed based on the lattice Boltzmann equation to obtain the distribution function of each grid unit. Calculate the macroscopic quantities of the target flow field through the distribution function, and update the macroscopic quantities of the flow field to determine whether the output conditions are met, and if so, output.

Benefits of technology

By introducing GPU parallel computing technology, the calculation efficiency of simulation is significantly improved, providing high-precision simulation results under complex casting process conditions, while effectively reducing calculation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358059A_ABST
    Figure CN119358059A_ABST
Patent Text Reader

Abstract

The invention discloses a mold filling simulation method and device for high-pressure casting, which can be applied to the technical field of high-pressure casting, and comprises the following steps: acquiring a regular hexahedron grid, a volume ratio function and a mold filling calculation configuration file of a casting to be subjected to mold filling, and setting inlet information and physical property parameters of molten metal; the method comprises the following steps: initializing a flow field macroscopic quantity and a volume ratio function of molten metal according to inlet information, calculating an equilibrium state distribution function in each discrete velocity direction according to the flow field macroscopic quantity, copying the initial macroscopic quantity and the distribution function to a GPU (Graphics Processing Unit), and calculating a distribution function of each grid unit by utilizing a lattice Boltzmann equation; and updating the target flow field macroscopic quantity through the distribution function, judging whether the target flow field macroscopic quantity meets output conditions or not, and outputting the updated flow field macroscopic quantity if the target flow field macroscopic quantity meets the output conditions. Therefore, by introducing the GPU parallel computing technology, the simulation computing efficiency is remarkably improved, and the computing time is effectively shortened while a high-precision simulation result is provided under the complex casting process condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of high-pressure casting, and in particular to a high-pressure casting mold filling simulation method and device. Background Art

[0002] In the simulation of high-pressure filling process, the amount of calculation often increases sharply due to the high-pressure environment and complex flow pattern that the liquid will experience during the filling process. However, in order to accurately capture the flow state of the liquid and the details of the filling process, the simulation needs to solve a large number of partial differential equations, which not only describe the physical quantities such as pressure and velocity of the liquid, but also involve the coupling of many other factors. In addition, the simulation usually needs to be divided using high-resolution grids to improve the calculation accuracy, which undoubtedly further increases the calculation burden.

[0003] Therefore, in order to cope with such a huge amount of computing, the simulation program is usually deployed on a high-performance computing (HPC) cluster and multi-core CPU is used for parallel computing. Specifically, the message passing interface (MPI) framework is adopted to decompose the complex computing task into multiple subtasks, and these tasks are assigned to different nodes of the cluster. Then, each node is calculated independently, and then data is exchanged through MPI when necessary to ensure coordination and synchronization between the subtasks.

[0004] However, MPI exchanges data through message passing, which will cause the communication overhead to increase with the increase of computing scale and the number of processes. Especially in the filling process, more frequent data exchange is required for simulation, which may cause the communication time to exceed the computing time, thus seriously affecting the overall efficiency. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a high-pressure casting filling simulation method and device to solve the problem of low calculation efficiency brought about by the prior art.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a high pressure casting filling simulation method, comprising:

[0008] Obtaining a regular hexahedral mesh, a volume ratio function, and a filling calculation configuration file of a mold casting to be filled;

[0009] According to the filling calculation configuration file, the inlet information and physical property parameters of the molten metal are set, and the volume ratio function and the physical property parameters are used as flow field macro quantities;

[0010] Initializing the flow field macro quantity to obtain the initial flow field macro quantity, and injecting the molten metal into the regular hexahedral grid according to the inlet information of the molten metal;

[0011] Calculating the flow field equilibrium distribution function of each discrete velocity direction in the regular hexahedral grid according to the inlet information of the molten metal and the macroscopic quantity of the flow field;

[0012] The initial flow field macro quantity and the flow field equilibrium state distribution function of each discrete velocity direction are copied to the GPU, and in the GPU, based on the flow field equilibrium state distribution function of each discrete velocity direction, the lattice Boltzmann equation is calculated to obtain the distribution function of each grid unit contained in the regular hexahedral grid;

[0013] Calculating a target flow field macro quantity according to the distribution function of each grid unit, and updating the initial flow field macro quantity to the target flow field macro quantity to obtain an updated flow field macro quantity;

[0014] Determining whether the updated flow field macro quantity meets the output condition;

[0015] If the updated flow field macro quantity meets the output condition, the updated flow field macro quantity is output.

[0016] Optionally, in the above-mentioned high pressure casting filling simulation method, the obtaining of the regular hexahedral mesh of the model casting to be filled includes:

[0017] Obtaining a geometric model of a mold casting to be filled;

[0018] According to the size and accuracy requirements of the geometric model, the geometric model is discretized into a regular hexahedral grid.

[0019] Optionally, in the above-mentioned high-pressure casting filling simulation method, the flow field equilibrium distribution function of each discrete velocity direction in the regular hexahedral grid is calculated according to the inlet information of the molten metal and the macroscopic quantity of the flow field, including:

[0020] According to the metal liquid inlet and the metal liquid velocity in the metal liquid inlet information, boundary conditions are set for the fluid velocity in the regular hexahedral grid to obtain a target fluid velocity;

[0021] Extracting fluid density from the flow field macroscopic quantity;

[0022] According to the target fluid velocity and the fluid density, a flow field equilibrium distribution function in each discrete velocity direction in the regular hexahedral grid is calculated using a discrete velocity model and a lattice sound velocity.

[0023] Optionally, in the above-mentioned high-pressure casting filling simulation method, in the GPU, based on the flow field equilibrium state distribution function in each discrete velocity direction, the lattice Boltzmann equation is calculated to obtain the distribution function of each grid unit contained in the regular hexahedral grid, including:

[0024] In the GPU, the lattice Boltzmann equation is decomposed into a collision equation and a migration equation;

[0025] In each grid unit included in the regular hexahedral grid, the collision equation is iteratively calculated according to the flow field equilibrium state distribution function and the dimensionless relaxation coefficient based on each discrete velocity direction to obtain a collision function corresponding to each grid unit; wherein the dimensionless relaxation coefficient is calculated in advance based on the grid sound velocity, the kinematic viscosity coefficient and the grid time step of the regular hexahedral grid;

[0026] According to the collision function corresponding to each of the grid cells, the migration equation is iteratively calculated to obtain the migration function corresponding to each of the grid cells;

[0027] The migration function corresponding to each of the grid cells is used as the distribution function of each grid cell included in the regular hexahedral grid.

[0028] Optionally, in the above-mentioned high pressure casting filling simulation method, the target flow field macro quantity is calculated according to the distribution function of each grid unit, including:

[0029] According to the distribution function of each of the grid cells, the fluid density is updated using a fluid density update algorithm to obtain an updated fluid density;

[0030] According to the distribution function of each of the grid cells, the fluid velocity is updated using a velocity update algorithm to obtain an updated velocity;

[0031] Based on the mass of the liquid contained in the regular hexahedral grid and the updated fluid density, an updated volume ratio function is calculated to obtain an updated volume ratio function;

[0032] The updated fluid density, the updated speed and the updated volume ratio function are used as target flow field macroscopic quantities.

[0033] Optionally, in the above-mentioned high pressure casting filling simulation method, it also includes:

[0034] If the updated flow field macro quantity does not meet the output condition, the process returns to the GPU and calculates the lattice Boltzmann equation based on the flow field equilibrium state distribution function in each discrete velocity direction to obtain the distribution function of each grid unit contained in the regular hexahedral grid.

[0035] The second aspect of the present application provides a high pressure casting filling simulation device, comprising:

[0036] A data acquisition unit, used to acquire a regular hexahedral mesh, a volume ratio function and a filling calculation configuration file of a mold casting to be filled;

[0037] A setting unit, used to set the inlet information and physical property parameters of the molten metal according to the filling calculation configuration file, and use the volume ratio function and the physical property parameters as flow field macro quantities;

[0038] An initialization unit, used to initialize the flow field macro quantity, obtain the initial flow field macro quantity, and inject the molten metal into the regular hexahedral grid according to the inlet information of the molten metal;

[0039] A distribution function calculation unit, used for calculating the flow field equilibrium distribution function in each discrete velocity direction in the regular hexahedral grid according to the inlet information of the molten metal and the macroscopic quantity of the flow field;

[0040] An equation calculation unit, used for copying the initial flow field macroscopic quantity and the flow field equilibrium state distribution function of each discrete velocity direction to the GPU, and in the GPU, based on the flow field equilibrium state distribution function of each discrete velocity direction, calculating the lattice Boltzmann equation to obtain the distribution function of each grid unit contained in the regular hexahedral grid;

[0041] A macro-quantity calculation unit, used to calculate a target flow field macro-quantity according to the distribution function of each grid unit, and update the initial flow field macro-quantity to the target flow field macro-quantity to obtain an updated flow field macro-quantity;

[0042] A judging unit, used to judge whether the updated flow field macro quantity meets the output condition;

[0043] An output unit is used to output the updated flow field macro quantity if the updated flow field macro quantity meets the output condition.

[0044] Optionally, in the above-mentioned high pressure casting filling simulation device, the data acquisition unit includes:

[0045] A model acquisition unit, used to acquire a geometric model of a mold casting to be filled;

[0046] The discrete unit is used to discretize the geometric model into a regular hexahedral grid according to the size and accuracy requirements of the geometric model.

[0047] Optionally, in the above-mentioned high pressure casting filling simulation device, the distribution function calculation unit includes:

[0048] A setting unit, configured to set boundary conditions for the fluid velocity in the regular hexahedral grid according to the metal liquid inlet and the metal liquid velocity in the metal liquid inlet information, so as to obtain a target fluid velocity;

[0049] An extraction unit, used for extracting fluid density from the macroscopic quantity of the flow field;

[0050] The distribution function calculation subunit is used to calculate the flow field equilibrium distribution function in each discrete velocity direction in the regular hexahedral grid according to the target fluid velocity and the fluid density using a discrete velocity model and a lattice sound velocity.

[0051] Optionally, in the above-mentioned high pressure casting filling simulation device, the equation calculation unit includes:

[0052] A decomposition unit, used for decomposing the lattice Boltzmann equation into a collision equation and a migration equation in the GPU;

[0053] A first iterative calculation unit is used to iteratively calculate the collision equation in each grid unit included in the regular hexahedral grid according to the flow field equilibrium state distribution function based on each discrete velocity direction and the dimensionless relaxation coefficient, so as to obtain a collision function corresponding to each grid unit; wherein the dimensionless relaxation coefficient is calculated in advance based on the grid sound velocity, the kinematic viscosity coefficient and the grid time step of the regular hexahedral grid;

[0054] A second iterative calculation unit, used for iteratively calculating the migration equation according to the collision function corresponding to each of the grid cells, to obtain the migration function corresponding to each of the grid cells;

[0055] The first is used as a unit, and is used to use the migration function corresponding to each of the grid cells as the distribution function of each grid cell included in the regular hexahedral grid.

[0056] Optionally, in the above-mentioned high pressure casting filling simulation device, the macro quantity calculation unit includes:

[0057] A first updating unit, configured to update the fluid density by using a fluid density updating algorithm according to the distribution function of each of the grid cells to obtain an updated fluid density;

[0058] A second updating unit, configured to update the fluid density using a speed updating algorithm according to the distribution function of each of the grid cells to obtain an update speed;

[0059] A calculation unit, configured to calculate an updated volume ratio function based on the mass of the liquid contained in the regular hexahedral grid and the updated fluid density, to obtain an updated volume ratio function;

[0060] The second is used as a unit for taking the updated fluid density, the updated speed and the updated volume ratio function as target flow field macroscopic quantities.

[0061] Optionally, in the above-mentioned high pressure casting filling simulation device, it also includes:

[0062] The execution unit is used to return to the execution of the flow field equilibrium state distribution function in each discrete velocity direction in the GPU to calculate the lattice Boltzmann equation and obtain the distribution function of each grid cell contained in the regular hexahedral grid if the updated flow field macro quantity does not meet the output condition.

[0063] The present application provides a high-pressure casting filling simulation method, which obtains the hexahedral grid, volume ratio function and filling calculation configuration file of the casting to be filled. The inlet information and physical property parameters of the molten metal are set according to the configuration file, and the volume ratio function and physical property parameters are initialized as flow field macro quantities. The molten metal is injected into the hexahedral grid according to the inlet information, and the flow field equilibrium distribution function of each discrete velocity direction is calculated. The initial flow field macro quantity and the flow field equilibrium distribution function are copied to the GPU, and the distribution function of each grid unit is calculated based on the lattice Boltzmann equation. The target flow field macro quantity is calculated by the distribution function, and the flow field macro quantity is updated. It is judged whether the updated macro quantity meets the output condition. If it does, the updated macro quantity is output. Therefore, by introducing GPU parallel computing technology, the calculation efficiency of the simulation is significantly improved, so that under complex casting process conditions, while providing high-precision simulation results, the calculation time is effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0065] Figure 1 A schematic diagram of a flow chart of a high pressure casting mold filling simulation method provided in an embodiment of the present application;

[0066] Figure 2 A schematic flow chart of a method for obtaining a regular hexahedral mesh provided in another embodiment of the present application;

[0067] Figure 3 A schematic diagram of a casting geometric model and a mesh after segmentation provided in another embodiment of the present application;

[0068] Figure 4A schematic flow chart of a method for calculating a flow field equilibrium distribution function provided in another embodiment of the present application;

[0069] Figure 5 A schematic diagram of the structure of a D3Q19 discrete velocity model provided in another embodiment of the present application;

[0070] Figure 6 A schematic diagram of a flow chart of a method for calculating a distribution function provided in another embodiment of the present application;

[0071] Figure 7 A schematic flow chart of a method for calculating a target flow field macro quantity provided in another embodiment of the present application;

[0072] Figure 8 A schematic structural diagram of the interface changes of a molten metal during the filling process provided by another embodiment of the present application;

[0073] Fig. 9 A schematic structural diagram of a high-pressure casting filling simulation device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0074] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0075] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0076] The present application embodiment provides a high pressure casting filling simulation method, such as Figure 1 As shown, the specific steps include:

[0077] S101, obtaining a regular hexahedral mesh, a volume ratio function, and a filling calculation configuration file of a model casting to be filled.

[0078] Specifically, in order to obtain the hexahedral mesh and volume ratio function of the model casting to be filled, it is necessary to mesh the model casting to be filled. Usually, CAD modeling tools (such as SolidWorks, AutoCAD) or meshing software (such as Ansys, GMSH, OpenFOAM) are used for geometric modeling, and then a mesh conforming to the regular hexahedron (Cubic) structure is generated. This mesh structure is simple and easy to implement parallel computing.

[0079] The Volume Fraction Function describes the ratio of the volume of the molten metal in each grid cell to the volume of the grid cell. For casting simulation, the Volume Fraction Function is usually used to represent the state of the molten metal filling the cavity.

[0080] During the casting process, the initial value of the volume ratio function is usually set to 0 (indicating a cavity) in the cavity area, and is set to 1 (indicating molten metal occupation) at the injection port of the molten metal or in the fluid area. Therefore, after obtaining the regular hexahedral mesh of the model casting to be filled, the system will obtain the volume ratio function of the model casting to be filled.

[0081] In addition, the filling calculation configuration file is generated in advance based on the process parameters given by the staff.

[0082] Optionally, in another embodiment of the present application, a specific implementation method of obtaining the mesh degree of the regular hexahedron of the mold casting to be filled in step S101 is as follows: Figure 2 As shown, the following steps are included:

[0083] S201, obtaining a geometric model of a mold casting to be filled.

[0084] Specifically, a geometric model is created using computer-aided design (CAD) software according to the geometric structure of the mold casting to be filled.

[0085] S202. Discretize the geometric model into a regular hexahedral mesh according to the size and accuracy requirements of the geometric model.

[0086] Specifically, before discretizing into a regular hexahedral mesh, the geometric model can be preprocessed to ensure that it is suitable for meshing, that is, to remove unnecessary details, such as small features, overlapping parts, fracture surfaces, etc. These small features may cause mesh generation failure. Then, depending on the shape and size of the geometric model, it may be necessary to use unstructured mesh generation technology. Finally, according to the accuracy requirements, set an appropriate mesh size to obtain a regular hexahedral mesh. For details, please refer to Figure 3 The schematic diagram of the casting geometry model and the structure of the mesh after segmentation is shown.

[0087] S102. According to the filling calculation configuration file, the inlet information and physical property parameters of the molten metal are set, and the volume ratio function and the physical property parameters are used as flow field macro quantities.

[0088] Specifically, the system sets the corresponding metal liquid inlet information and physical property parameters in the calculation program according to the process parameters set by the staff, so as to fill the casting mold according to the actual situation. Among them, the physical property parameters include fluid density and speed.

[0089] S103, initializing the flow field macroscopic quantity to obtain the initial flow field macroscopic quantity, and injecting the molten metal into the regular hexahedral grid according to the inlet information of the molten metal.

[0090] It should be noted that in order to ensure that subsequent calculations can converge stably during the iteration process, it is necessary to initialize the macroscopic quantities of the flow field and give a reasonable initial state.

[0091] In addition, after all calculation work is prepared, the molten metal needs to be injected into the regular hexahedral grid according to the pre-set molten metal inlet and molten metal speed, so as to start the calculation. Among them, the inlet information may include the molten metal inlet and the molten metal speed.

[0092] S104. Calculate the flow field equilibrium distribution function in each velocity direction in the regular hexahedral grid according to the inlet information of the molten metal and the macroscopic quantity of the flow field.

[0093] Specifically, the flow field equilibrium distribution function describes the distribution of particles in space and time. It is usually related to the macroscopic quantities of the flow field (such as density and velocity). Therefore, through the inlet information of the molten metal and the macroscopic quantities of the flow field, the flow field equilibrium distribution function for each velocity direction in the regular hexahedral grid can be calculated.

[0094] Optionally, in another embodiment of the present application, a specific implementation of step S104 is as follows: Figure 4 As shown, the following steps are included:

[0095] S401. According to the molten metal inlet and the molten metal velocity in the molten metal inlet information, boundary conditions are set for the fluid velocity in the regular hexahedral grid to obtain a target fluid velocity.

[0096] It is understandable that the boundary condition setting of the fluid velocity will affect the distribution function on the grid boundary. Therefore, the target fluid velocity will be obtained based on the metal liquid inlet velocity given by the user, and the flow field velocity in other places is 0.

[0097] S402. Extract fluid density from flow field macroscopic quantities.

[0098] It is understandable that the flow field macroscopic quantity includes other parameters in addition to the fluid density. Therefore, in order to flexibly and effectively calculate the distribution function later, the fluid density can be extracted from the flow field macroscopic quantity in advance.

[0099] S403. According to the target fluid velocity and fluid density, the flow field equilibrium distribution function in each velocity direction in the regular hexahedral grid is calculated using a discrete velocity model and a lattice sound velocity.

[0100] It should be noted that the calculation expression of the flow field equilibrium distribution function is:

[0101]

[0102] Among them, w a is the weight coefficient. The embodiment of the present application solves the equilibrium distribution function of the flow field for three-dimensional conditions, which also involves a discrete velocity model and adopts the D3Q19 model. Figure 5 , the weight coefficient of the D3Q19 model is:

[0103]

[0104] is the fluid density, u is the target fluid velocity, e a The speed configuration of the D3Q19 model is as follows:

[0105]

[0106] C s is the lattice speed of sound, defined as:

[0107]

[0108] Where c is the grid velocity, It is calculated that △x is the grid space step, and △t is the grid time step, where △x and △t are obtained by physical transformation in space.

[0109] S105, copying the initial flow field macroscopic quantity and the flow field equilibrium state distribution function in each velocity direction to the GPU, and calculating the lattice Boltzmann equation in the GPU based on the flow field equilibrium state distribution function in each velocity direction to obtain the distribution function of each grid cell contained in the regular hexahedral grid.

[0110] It should be emphasized that after obtaining the initial flow field macroscopic quantities and the flow field equilibrium state distribution function in each velocity direction, the initial flow field macroscopic quantities and the flow field equilibrium state distribution function in each velocity direction need to be copied from the CPU to the GPU for parallel calculation. The advantage of the GPU lies in its large-scale parallel processing capability, which is particularly suitable for processing highly parallel algorithms such as the lattice Boltzmann method. Then, in the GPU, the kernel function code is written according to the lattice Boltzmann equation. The kernel function will be scheduled by the CPU and calculated in parallel on the GPU to obtain the distribution function of each grid cell contained in the regular hexahedral grid.

[0111] Optionally, in another embodiment of the present application, in step S105, in the GPU, based on the flow field equilibrium state distribution function in each discrete velocity direction, the lattice Boltzmann equation is calculated to obtain a specific implementation of the distribution function of each grid cell contained in the regular hexahedral grid, such as Figure 6 As shown, the following steps are included:

[0112] S601. In the GPU, decompose the lattice Boltzmann equation into a collision equation and a migration equation.

[0113] Specifically, the calculation expression of the lattice Boltzmann equation is:

[0114]

[0115] Where x and t represent the Euler grid coordinate and time of the fluid, respectively, △t is the grid time step, and e a is the discrete velocity in direction a, is the dimensionless relaxation coefficient of the velocity field, f a is the distribution function of the velocity field, is the equilibrium distribution function of the velocity field. It can be obtained by the kinematic viscosity coefficient ν, which can be expressed as:

[0116]

[0117] Where △t is the grid time step, ν is the kinematic viscosity coefficient, c s is the lattice speed of sound.

[0118] S602. In each grid unit included in the regular hexahedral grid, according to the flow field equilibrium state distribution function and the dimensionless relaxation coefficient based on each discrete velocity direction, the collision equation is iteratively calculated to obtain a collision function corresponding to each grid unit.

[0119] Specifically, the calculation expression of the collision equation is:

[0120]

[0121] in, The dimensionless relaxation coefficient is calculated in advance based on the grid sound velocity, the kinematic viscosity coefficient and the grid time step of the regular hexahedral grid. For specific parameter explanations, please refer to the explanation in step S601.

[0122] It should be noted that the iterative calculation of the collision equation is performed according to the number of grids, and it is only necessary to perform calculations at the local fluid grid points.

[0123] S603: According to the collision function corresponding to each grid unit, the migration equation is iteratively calculated to obtain the migration function corresponding to each grid unit.

[0124] Specifically, the calculation expression of the migration equation is: .

[0125] in, represents the collision function, e a is the discrete velocity in the a direction, x and t represent the Euler grid coordinate and time of the fluid respectively, and △t is the grid time step.

[0126] It should be noted that the iterative calculation of the migration equation is also performed according to the number of grids, and the migration process requires the exchange of distribution functions with the surrounding fluid grid points.

[0127] S604: Use the migration function corresponding to each grid unit as the distribution function of each grid unit included in the regular hexahedral grid.

[0128] S106. Calculate the target flow field macro quantity according to the distribution function of each grid unit, and update the initial flow field macro quantity to the target flow field macro quantity.

[0129] It should be noted that after calculating the distribution function of each grid cell, the volume ratio function, fluid density and velocity need to be updated. The calculation of the target flow field macro quantity includes the calculation of the volume ratio function, fluid density and velocity. Specifically, the kernel function code can be written according to the distribution function of each grid cell. The kernel function will be scheduled by the CPU and calculated in parallel on the GPU to complete the update of the flow field volume ratio function, density and velocity.

[0130] Optionally, in another embodiment of the present application, a specific implementation method of calculating the target flow field macro quantity according to the distribution function of each grid unit in step S106 is as follows: Figure 7 As shown, the following steps are included:

[0131] S701. According to the distribution function of each grid unit, the fluid density is updated by using a fluid density update algorithm to obtain an updated fluid density.

[0132] Specifically, the calculation expression of the fluid density update algorithm is:

[0133]

[0134] in, To update the fluid density, f a is the distribution function of each grid cell, and a is the direction of each discrete velocity in the discrete velocity model.

[0135] S702: According to the distribution function of each grid unit, the speed is updated by using a speed update algorithm to obtain an updated speed.

[0136] Specifically, the calculation expression of the speed update algorithm is:

[0137]

[0138] Where u is the update speed, To update the fluid density, e a is the discrete velocity in direction a, f a is the distribution function of each grid cell.

[0139] S703. Based on the liquid mass contained in the regular hexahedral grid and the updated fluid density, an updated volume ratio function is calculated to obtain an updated volume ratio function.

[0140] It should be noted that the calculation formula for updating the volume ratio function is:

[0141]

[0142] Where m is the mass of the liquid contained within the grid, divided by the updated fluid density The volume fraction of the fluid in the grid unit can be obtained, that is, the volume ratio function According to formula (1), the fluid mass exchange between two grids can be calculated, where f a (x+e a , t) represents the distribution function entering the grid unit, f a (x, t) represents the distribution function out of the grid cell. According to formula (2), the fluid mass exchange in all directions of the D3Q19 model is statistically , plus the mass fraction of the previous time step, we can get the fluid mass m(x, t+△t) contained in the grid cell at the current time step. Finally, according to formula (3), the volume ratio function of the current time step can be completed: renew.

[0143] S704, updating the fluid density, updating the speed and updating the volume ratio function as the target flow field macroscopic quantity.

[0144] S107, judging whether the updated flow field macro quantity meets the output condition.

[0145] Specifically, whether the updated flow field macro quantity meets the output condition can be determined according to the percentage of molten metal filling or the number of iterative calculation steps. Therefore, if the updated flow field macro quantity meets the output condition, it means that the percentage of molten metal filling or the number of iterative calculation steps have reached the output condition, so step S108 is executed.

[0146] Optionally, after executing step S107, the method further includes:

[0147] If the updated flow field macro quantity does not meet the output conditions, it returns to the GPU for execution. Based on the flow field equilibrium state distribution function in each discrete velocity direction, the lattice Boltzmann equation is calculated to obtain the distribution function of each grid cell contained in the regular hexahedral grid.

[0148] It is understandable that when the updated flow field macroscopic quantity does not meet the output conditions, it means that the percentage of molten metal filling or the number of iterative calculation steps have not reached the output conditions. Therefore, it is necessary to return to execute step S105 in the GPU, calculate the lattice Boltzmann equation based on the flow field equilibrium state distribution function in each discrete velocity direction, and obtain the distribution function of each grid unit contained in the regular hexahedral grid until the updated flow field macroscopic quantity meets the output conditions.

[0149] S108. Output the updated flow field macro quantity.

[0150] Specifically, when the updated flow field macro quantity meets the output condition, the updated flow field macro quantity is copied from the GPU to the CPU, and the updated flow field macro quantity is output and saved.

[0151] Optionally, the updated flow field macroscopic quantities can be visualized using post-processing software.

[0152] In addition, the structural diagram of the interface changes of the metal liquid during the filling process can be seen in Figure 8 The content shown.

[0153] The present application provides a high-pressure casting filling simulation method, which obtains the hexahedral grid, volume ratio function and filling calculation configuration file of the casting to be filled. The inlet information and physical property parameters of the molten metal are set according to the configuration file, and the volume ratio function and physical property parameters are initialized as flow field macro quantities. The molten metal is injected into the hexahedral grid according to the inlet information, and the flow field equilibrium distribution function of each discrete velocity direction is calculated. The initial flow field macro quantity and the flow field equilibrium distribution function are copied to the GPU, and the distribution function of each grid unit is calculated based on the lattice Boltzmann equation. The target flow field macro quantity is calculated by the distribution function, and the initial flow field macro quantity is updated. It is judged whether the updated macro quantity meets the output condition. If it does, the updated macro quantity is output. Therefore, by introducing GPU parallel computing technology, the calculation efficiency of the simulation is significantly improved, so that under complex casting process conditions, while providing high-precision simulation results, the calculation time is effectively reduced.

[0154] Another embodiment of the present application provides a high pressure casting filling simulation device, such as Fig. 9 As shown, it includes the following units:

[0155] The data acquisition unit 901 is used to acquire the regular hexahedral mesh, volume ratio function and filling calculation configuration file of the model casting to be filled.

[0156] The setting unit 902 is used to set the inlet information and physical property parameters of the molten metal according to the filling calculation configuration file, and use the volume ratio function and the physical property parameters as the flow field macroscopic quantities.

[0157] The initialization unit 903 is used to initialize the flow field macroscopic quantity, obtain the initial flow field macroscopic quantity, and inject the molten metal into the regular hexahedral grid according to the inlet information of the molten metal.

[0158] The distribution function calculation unit 904 is used to calculate the flow field equilibrium distribution function in each discrete velocity direction in the regular hexahedral grid according to the inlet information of the molten metal and the macroscopic quantity of the flow field.

[0159] The equation calculation unit 905 is used to copy the initial flow field macroscopic quantity and the flow field equilibrium state distribution function of each discrete velocity direction to the GPU, and in the GPU, based on the flow field equilibrium state distribution function of each discrete velocity direction, calculate the lattice Boltzmann equation to obtain the distribution function of each grid unit contained in the regular hexahedral grid.

[0160] The macro-quantity calculation unit 906 is used to calculate the target flow field macro-quantity according to the distribution function of each grid unit, and update the initial flow field macro-quantity to the target flow field macro-quantity to obtain the updated flow field macro-quantity.

[0161] The judging unit 907 is used to judge whether the updated flow field macro quantity meets the output condition.

[0162] The output unit 908 is used to output the updated flow field macro quantity if the updated flow field macro quantity meets the output condition.

[0163] It should be noted that the specific working process of the above modules in the embodiment of the present application can refer to steps S101 to S108 in the above method embodiment, which will not be repeated here.

[0164] Optionally, in a high pressure casting filling simulation device provided in another embodiment of the present application, the data acquisition unit 901 includes:

[0165] The model acquisition unit is used to acquire the geometric model of the model casting to be filled.

[0166] Discrete units are used to discretize geometric models into regular hexahedral meshes according to the size and accuracy requirements of the geometric models.

[0167] Optionally, in a high pressure casting filling simulation device provided in another embodiment of the present application, the distribution function calculation unit 904 includes:

[0168] The setting unit is used to set boundary conditions for the fluid velocity in the regular hexahedral grid according to the metal liquid inlet and the metal liquid velocity in the metal liquid inlet information to obtain the target fluid velocity.

[0169] The extraction unit is used to extract the fluid density from the macroscopic quantity of the flow field.

[0170] The distribution function calculation subunit is used to calculate the flow field equilibrium distribution function in each discrete velocity direction in the regular hexahedral grid according to the target fluid velocity and fluid density, using the discrete velocity model and the lattice sound velocity.

[0171] Optionally, in a high pressure casting filling simulation device provided in another embodiment of the present application, the equation calculation unit 905 includes:

[0172] The decomposition unit is used to decompose the lattice Boltzmann equation into a collision equation and a migration equation in the GPU.

[0173] The first iterative calculation unit is used to iteratively calculate the collision equation in each grid unit contained in the regular hexahedral grid according to the flow field equilibrium state distribution function based on each discrete velocity direction and the dimensionless relaxation coefficient to obtain the collision function corresponding to each grid unit. The dimensionless relaxation coefficient is calculated in advance based on the grid sound velocity, the kinematic viscosity coefficient and the grid time step of the regular hexahedral grid.

[0174] The second iterative calculation unit is used to iteratively calculate the migration equation according to the collision function corresponding to each grid unit to obtain the migration function corresponding to each grid unit.

[0175] The first is used as a unit, and is used to use the migration function corresponding to each grid unit as the distribution function of each grid unit contained in the regular hexahedral grid.

[0176] Optionally, in a high pressure casting filling simulation device provided in another embodiment of the present application, the macro quantity calculation unit 906 includes:

[0177] The first updating unit is used to update the fluid density according to the distribution function of each grid unit by using the fluid density updating algorithm to obtain the updated fluid density.

[0178] The second updating unit is used to update the speed by using a speed updating algorithm according to the distribution function of each grid unit to obtain an updated speed.

[0179] The calculation unit is used to calculate the updated volume ratio function based on the liquid mass contained in the regular hexahedral grid and the updated fluid density to obtain the updated volume ratio function.

[0180] The second is used as a unit to update the fluid density, update the speed and update the volume ratio function as the target flow field macro quantity.

[0181] Optionally, a high pressure casting filling simulation device provided in another embodiment of the present application further includes:

[0182] The execution unit is used to return to the GPU for execution if the updated flow field macro quantity does not meet the output condition, calculate the lattice Boltzmann equation based on the flow field equilibrium state distribution function in each discrete velocity direction, and obtain the distribution function of each grid cell contained in the regular hexahedral grid.

[0183] It should be noted that the specific working process of each module provided in the above embodiments of the present application can refer to the corresponding steps in the above method embodiments, which will not be repeated here.

[0184] It should also be noted that the high-pressure casting filling simulation device provided in the embodiment of the present application has the technical effects of any of the above embodiments, and the embodiments of the present application will not be described in detail here.

[0185] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0186] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A high pressure casting filling simulation method, characterized in that: include: Obtaining a regular hexahedral mesh, a volume ratio function, and a filling calculation configuration file of a mold casting to be filled; According to the filling calculation configuration file, the inlet information and physical property parameters of the molten metal are set, and the volume ratio function and the physical property parameters are used as flow field macro quantities; Initializing the flow field macro quantity to obtain the initial flow field macro quantity, and injecting the molten metal into the regular hexahedral grid according to the inlet information of the molten metal; Calculating the flow field equilibrium distribution function of each discrete velocity direction in the regular hexahedral grid according to the inlet information of the molten metal and the macroscopic quantity of the flow field; The initial flow field macro quantity and the flow field equilibrium state distribution function of each discrete velocity direction are copied to the GPU, and in the GPU, based on the flow field equilibrium state distribution function of each discrete velocity direction, the lattice Boltzmann equation is calculated to obtain the distribution function of each grid unit contained in the regular hexahedral grid; Calculating a target flow field macro quantity according to the distribution function of each grid unit, and updating the initial flow field macro quantity to the target flow field macro quantity to obtain an updated flow field macro quantity; Determining whether the updated flow field macro quantity meets the output condition; If the updated flow field macro quantity meets the output condition, the updated flow field macro quantity is output.

2. The method according to claim 1, characterized in that The step of obtaining a regular hexahedral mesh of a mold casting to be filled includes: Obtaining a geometric model of a mold casting to be filled; According to the size and accuracy requirements of the geometric model, the geometric model is discretized into a regular hexahedral grid.

3. The method according to claim 1, characterized in that The step of calculating the flow field equilibrium distribution function in each discrete velocity direction in the regular hexahedral grid according to the inlet information of the molten metal and the macroscopic quantity of the flow field comprises: According to the metal liquid inlet and the metal liquid velocity in the metal liquid inlet information, boundary conditions are set for the fluid velocity in the regular hexahedral grid to obtain a target fluid velocity; Extracting fluid density from the flow field macroscopic quantity; According to the target fluid velocity and the fluid density, a flow field equilibrium distribution function in each discrete velocity direction in the regular hexahedral grid is calculated using a discrete velocity model and a lattice sound velocity.

4. The method according to claim 1, characterized in that: In the GPU, based on the flow field equilibrium state distribution function of each discrete velocity direction, the lattice Boltzmann equation is calculated to obtain the distribution function of each grid unit contained in the regular hexahedral grid, including: In the GPU, the lattice Boltzmann equation is decomposed into a collision equation and a migration equation; In each grid unit included in the regular hexahedral grid, the collision equation is iteratively calculated according to the flow field equilibrium state distribution function and the dimensionless relaxation coefficient based on each discrete velocity direction to obtain a collision function corresponding to each grid unit; wherein the dimensionless relaxation coefficient is calculated in advance based on the grid sound velocity, the kinematic viscosity coefficient and the grid time step of the regular hexahedral grid; According to the collision function corresponding to each of the grid cells, the migration equation is iteratively calculated to obtain the migration function corresponding to each of the grid cells; The migration function corresponding to each of the grid cells is used as the distribution function of each grid cell included in the regular hexahedral grid.

5. The method according to claim 1, characterized in that Calculating the target flow field macro quantity according to the distribution function of each grid unit includes: According to the distribution function of each of the grid cells, the fluid density is updated using a fluid density update algorithm to obtain an updated fluid density; According to the distribution function of each of the grid cells, the fluid velocity is updated using a velocity update algorithm to obtain an updated velocity; Based on the mass of the liquid contained in the regular hexahedral grid and the updated fluid density, an updated volume ratio function is calculated to obtain an updated volume ratio function; The updated fluid density, the updated speed and the updated volume ratio function are used as target flow field macroscopic quantities.

6. The method according to claim 1, characterized in that Also includes: If the updated flow field macro quantity does not meet the output condition, the process returns to the GPU and calculates the lattice Boltzmann equation based on the flow field equilibrium state distribution function in each discrete velocity direction to obtain the distribution function of each grid unit contained in the regular hexahedral grid.

7. A high pressure casting mold filling simulation device, characterized in that: include: A data acquisition unit, used to acquire a regular hexahedral mesh, a volume ratio function and a filling calculation configuration file of a mold casting to be filled; A setting unit, used to set the inlet information and physical property parameters of the molten metal according to the filling calculation configuration file, and use the volume ratio function and the physical property parameters as flow field macro quantities; An initialization unit, used to initialize the flow field macro quantity, obtain the initial flow field macro quantity, and inject the molten metal into the regular hexahedral grid according to the inlet information of the molten metal; A distribution function calculation unit, used for calculating the flow field equilibrium distribution function in each discrete velocity direction in the regular hexahedral grid according to the inlet information of the molten metal and the macroscopic quantity of the flow field; An equation calculation unit, used for copying the initial flow field macroscopic quantity and the flow field equilibrium state distribution function of each discrete velocity direction to the GPU, and in the GPU, based on the flow field equilibrium state distribution function of each discrete velocity direction, calculating the lattice Boltzmann equation to obtain the distribution function of each grid unit contained in the regular hexahedral grid; A macro-quantity calculation unit, used to calculate a target flow field macro-quantity according to the distribution function of each grid unit, and update the initial flow field macro-quantity to the target flow field macro-quantity to obtain an updated flow field macro-quantity; A judging unit, used to judge whether the updated flow field macro quantity meets the output condition; An output unit is used to output the updated flow field macro quantity if the updated flow field macro quantity meets the output condition.

8. The device according to claim 7, characterized in that The data acquisition unit comprises: A model acquisition unit, used to acquire a geometric model of a mold casting to be filled; The discrete unit is used to discretize the geometric model into a regular hexahedral grid according to the size and accuracy requirements of the geometric model.

9. The device according to claim 7, characterized in that The distribution function calculation unit comprises: A setting unit, configured to set boundary conditions for the fluid velocity in the regular hexahedral grid according to the metal liquid inlet and the metal liquid velocity in the metal liquid inlet information, so as to obtain a target fluid velocity; An extraction unit, used for extracting fluid density from the macroscopic quantity of the flow field; The distribution function calculation subunit is used to calculate the flow field equilibrium distribution function in each discrete velocity direction in the regular hexahedral grid according to the target fluid velocity and the fluid density using a discrete velocity model and a lattice sound velocity.

10. The device according to claim 7, characterized in that The equation calculation unit comprises: A decomposition unit, used for decomposing the lattice Boltzmann equation into a collision equation and a migration equation in the GPU; A first iterative calculation unit is used to iteratively calculate the collision equation in each grid unit included in the regular hexahedral grid according to the flow field equilibrium state distribution function based on each discrete velocity direction and the dimensionless relaxation coefficient, so as to obtain a collision function corresponding to each grid unit; wherein the dimensionless relaxation coefficient is calculated in advance based on the grid sound velocity, the kinematic viscosity coefficient and the grid time step of the regular hexahedral grid; A second iterative calculation unit, used for iteratively calculating the migration equation according to the collision function corresponding to each of the grid cells, to obtain the migration function corresponding to each of the grid cells; The first is used as a unit, and is used to use the migration function corresponding to each of the grid cells as the distribution function of each grid cell included in the regular hexahedral grid.

Citation Information

Patent Citations

  • GPU-accelerated fluid-structure coupling simulation method through immersion boundary and lattice Boltzmann methods

    CN104866695A

  • Fluid mechanics simulation method and device and storage medium

    CN111680456A

  • Methods and apparatus to improve fluid flow simulations

    US20220035975A1

Cited By

  • Calculation method and device for molten metal tracking

    CN119578123A