Method and equipment for simulating heat transfer process in visual flow and storage medium
The solution to the thermal function and hotline in computational fluid mechanics through the lattice Boltzmann method is solved, and the problem of difficult grid generation under complex boundary conditions is achieved, and efficient multiphase flow simulation and visualization is achieved.
Patent Information
- Application Number
- CN202311630501.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-05-30
AI Technical Summary
The existing computational fluid mechanics simulation methods are difficult to effectively generate grids when dealing with complex boundaries in multiphase flow, resulting in difficulty in solving Poisson's equations.
The lattice Boltzmann method is used to calculate the thermal function and draw the hotline through the collision and migration of the distribution function to realize the visualization of the heat transfer behavior in two-dimensional flow. This method is suitable for two-phase flow systems with pure flow and fluid-solid coupling.
It realizes efficient solution to thermal functions and hotlines under complex boundary conditions, simplifies the grid generation process, is suitable for multiphase flow simulation, and improves calculation efficiency and visualization effects.
Smart Images

Figure CN120072078A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the fields of computational fluid dynamics and numerical heat transfer, and particularly relates to a method, device, and storage medium for simulating heat transfer processes in visual flows. Background Art
[0002] The heat transfer process is accompanied by fluid flow behavior, which is extremely common in industrial equipment, such as heat exchangers, chemical reactors, etc. Understanding the heat transfer behavior in equipment is of great significance for the design and operation of the equipment. Simulation calculations based on computational fluid dynamics are one of the important methods for studying such problems, which can effectively reduce the test cost and improve the efficiency.
[0003] Hot lines are similar to streamlines and can effectively visualize the heat transfer process accompanied by fluid flow. In addition to the conductive heat transfer reflected by isotherms, the heat transfer process represented by hot lines also includes convective heat transfer. Hot lines are of great significance in aspects such as heat transfer, mixing, and thermal energy management.
[0004] After obtaining the velocity field and temperature field of the fluid flow, the calculation of the heat function can be carried out. This is usually achieved by solving a Poisson equation for the heat function, whose source term is related to the velocity and temperature distributions of the flow field. By connecting the points in space where the heat function is equal, hot lines can be obtained, which indicate the routes of heat transfer; while the difference in the heat function between adjacent hot lines reflects the intensity of heat transfer.
[0005] The solution of the Poisson equation can be carried out by traditional solvers, such as the finite volume method, the finite element method, etc. However, these methods often encounter difficulties in grid generation when dealing with complex boundaries in multiphase flow problems. As an emerging mesoscopic method, the lattice Boltzmann method has advantages such as a good physical picture, simple boundary conditions, and easy parallelization, and has been widely applied to computational fluid dynamics, especially the simulation of multiphase flows. The lattice Boltzmann method usually uses a uniform Cartesian grid, avoiding the difficulty of grid generation. However, for the determination of the distribution function on complex boundaries, it cannot be directly determined through boundary conditions. Summary of the Invention
[0006] According to the first aspect of this application, a method for simulating heat transfer processes in visual flows is provided. Based on the lattice Boltzmann method, the heat function and hot lines are solved to realize the visualization of the heat transfer behavior in two-dimensional flow processes. This method is applicable not only to the heat transfer process of pure fluid flow but also to the two-phase flow system of fluid-structure interaction.
[0007] The method for simulating heat transfer processes in visual flows includes:
[0008] (1) Determine the full-field source term f(x) and boundary condition H based on the fluid flow velocity field and temperature field datab (x);
[0009] (2) The distribution function n i (x, t) undergoes collisions under the action of the full-field source term f(x) to obtain
[0010] (3) Process the collisions of the distribution function at the boundaries;
[0011] (4) Transfer the collided distribution function to the adjacent grid according to the discrete lattice velocity;
[0012] (5) Calculate the heat function H(x, t) = ∑ i n i (x, t);
[0013] (6) Calculate the change in the full-field heat function and perform termination judgment;
[0014] (7) Visualize the heat line distribution according to the heat function distribution.
[0015] Optionally, step (1) includes:
[0016] (11) For the heat transfer problem of a steady two-dimensional passive incompressible flow, define its temperature field using the following control equation:
[0017]
[0018] where u is the flow velocity field; is the Hamiltonian operator; T is the temperature field; α is the thermal diffusivity; is the Laplace operator;
[0019] (12) Define the total heat (heat conduction, heat convection) flux:
[0020]
[0021]
[0022] where J x is the total heat flux in the x direction, u is the component of the flow velocity field in the x direction, J y is the total heat flux in the y direction, and v is the component of the fluid velocity field in the y direction;
[0023] Define the heat function H(x):
[0024]
[0025]
[0026] where x = (x, y) is a two-dimensional coordinate;
[0027] (13) The following Poisson equation is obtained from the heat function:
[0028]
[0029] which is the full-field source term;
[0030] (14) Set H = 0 at x = (0, 0), and calculate the boundary value of H(x) by integrating J x and J y on the boundary. b (x).
[0031] Optionally, step (2) includes constructing the following evolution equation for the distribution function followed by the collision process:
[0032]
[0033] where τ is the relaxation time, τ = 2α + 0.5, α is the thermal diffusion coefficient; i is the discrete lattice velocity e i direction, is the equilibrium distribution function, w i is the weight coefficient at the corresponding discrete lattice velocity; F i = w i αf is the discrete source term, i is the discrete lattice velocity e i direction.
[0034] Optionally, when the D2Q4 model is used for the collision process, i = 0,..., 3, and the weight coefficients at the discrete lattice velocities In addition to the D2Q4 model, other velocity models can be selected, such as the D2Q5 model, etc.
[0035] Optionally, step (3) includes:
[0036] (31) Use the Dirichlet boundary condition as the boundary condition for the solution region during the heat function solution process, i.e., H(x) = H b (x);
[0037] (32) Calculate the distribution function 0 on the direction (i
[0038]
[0039] where n i (x) is the distribution function;
[0040] The distribution function Calculation of the distribution function for the collision step.
[0041] Optionally, during the process of solving the heat function and the heat line distribution, the computational domain adopts a Cartesian grid. For the boundaries in the computational domain where the grid may not be body-fitted, at least one of the following numerical methods is used to process the distribution function on the boundaries: Guo non-equilibrium extrapolation format, Yu double-difference rebound format, immersed boundary method.
[0042] Optionally, in step (4), the distribution function after collision Is migrated according to the following formula:
[0043]
[0044] where x = (x, y) is a two-dimensional coordinate; e i Is the discrete lattice velocity, i is the direction of the discrete lattice velocity; δt is the time interval.
[0045] Optionally, the convergence condition in step (6) is defined by the following formula:
[0046]
[0047] where ε is the convergence target; x = (x, y) is a two-dimensional coordinate; H(x, t) is the heat function; δt is the time interval;
[0048] If the current heat function distribution does not meet the convergence condition, repeat steps (2) to (5).
[0049] According to the second aspect of the present application, a simulation device for heat transfer process in visualized flow is provided, including: at least one processor; and,
[0050] A memory communicatively connected to the at least one processor, storing instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, implementing some or all of the steps in the above-mentioned simulation method for heat transfer process in visualized flow.
[0051] According to the third aspect of the present application, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, implementing some or all of the steps in the above-mentioned simulation method for heat transfer process in visualized flow.
[0052] The beneficial effects that the present application can produce include:
[0053] 1) The simulation method for heat transfer process in visualized flow provided by the present application is based on the lattice Boltzmann method, and has good parallel performance and a simple boundary format.
[0054] 2) The visualization method for simulating heat transfer process in fluid flow provided by this application also has good applicability to non-body-fitted grids, and for the boundaries with complex shapes, by using uniform Cartesian grids, it is beneficial to generate grids in preprocessing of calculations, thus achieving simple processing. Description of the Drawings
[0055] Figure 1 It is a flowchart of the visualization method for simulating heat transfer process in fluid flow in an implementation manner of this application;
[0056] Figures 2A - 2B It is the streamline, isotherm, heat line and heat function diagram in the natural convection of a square cavity provided in Embodiment 1 in an implementation manner of this application.
[0057] Figures 3A - 3B It is the streamline, isotherm, heat line and heat function diagram in the mixed convection of a square cavity with blockage provided in Embodiment 2 in an implementation manner of this application. Detailed Embodiment
[0058] The following describes this application in detail with reference to embodiments, but this application is not limited to these embodiments.
[0059] This application provides a visualization method for simulating heat transfer process in fluid flow, which mainly solves the heat function and heat line based on the lattice Boltzmann method. The method includes the following steps:
[0060] (1) According to the flow velocity field u(x) and the temperature field T(x), calculate the value of the full-field source term f(x) and the value of the heat function H b (x) on the boundary. Where x = (x, y) is a two-dimensional coordinate.
[0061] In a specific implementation manner, the step (1) includes:
[0062] (11) For the heat transfer problem of a steady two-dimensional passive incompressible flow, its temperature field can be described and defined by the following control equation:
[0063]
[0064] Where α is the thermal diffusivity, is the Hamiltonian operator, is the Laplace operator.
[0065] (12) Define the total heat (heat conduction, heat convection) flux:
[0066]
[0067]
[0068] Where Jx is the total heat flux in the x direction, u is the component of the flow velocity field in the x direction, and J y is the total heat flux in the y direction, and v is the component of the fluid velocity field in the y direction;
[0069] (13) Define the heat function:
[0070]
[0071]
[0072] Thus, the heat function satisfies the Poisson equation:
[0073]
[0074] Therefore, is the full-field source term as described.
[0075] The boundary value of the heat function requires the heat function value at a point in the flow field as a reference value. Generally, H = 0 can be set at x = (0, 0), and by integrating J x and J y on the boundary, the boundary value of H can be calculated.
[0076] (2) Distribution function n i (x, t) undergoes collisions at grid points under the action of the full-field source term f(x) to obtain
[0077] In a specific implementation manner, the step (2) includes:
[0078] The process of the collision follows the following evolution equation of the distribution function:
[0079]
[0080] where τ is the relaxation time, τ = 2α + 0.5, and α is the thermal diffusion coefficient; i is the direction of the discrete lattice velocity e i of, is the equilibrium distribution function, and w i is the weight coefficient at the corresponding discrete lattice velocity; F i = w i αf is the discrete source term, and i is the direction of the discrete lattice velocity e i of.
[0081] For the discrete lattice velocity, models such as D2Q4 and D2Q5 can be adopted.
[0082] When the D2Q4 model is adopted, i = 0,..., 3, the discrete velocity weight coefficient
[0083] (3) Before implementing the migration of the distribution function, it is necessary to separately process the distribution function that migrates into the computational domain from outside the boundary.
[0084] In a specific embodiment, the step (3) includes:
[0085] (31) For the boundary of the computational domain, first confirm the boundary conditions. Generally, the boundary involved in the solution process of the heat function is the Dirichlet boundary condition, that is, H(x) = H b (x).
[0086] (32) Then, according to the distribution function n 0 in the direction i i0 that migrates into the computational domain from outside the computational domain can be calculated, which can be used for the calculation of the distribution function in the further collision step. Among them, n i (x) is the distribution function.
[0087] In addition, since the problem is solved using a Cartesian grid, there may be non-body-fitted boundaries in the computational domain. To handle the distribution function on such boundaries, the Guo non-equilibrium extrapolation format, the Yu double-difference rebound format, etc. can be used, or the Immersed Boundary Method can also be used.
[0088] (4) Migrate the collided distribution function to the adjacent grid according to the discrete lattice velocity. In a specific embodiment, the migration of the distribution function is carried out according to .
[0089] (5) Solve the heat function value at the grid point through the formula H(x, t) = ∑ i n i (x, t).
[0090] (6) Calculate the change of the heat function over the entire field and perform termination judgment.
[0091] In a specific embodiment, the step (6) includes:
[0092] Define the convergence condition:
[0093]
[0094] where ε is the convergence target; x = (x, y) is the two-dimensional coordinate; H(x, t) is the heat function; δt is the time interval;
[0095] If the current heat function distribution does not meet the convergence condition, repeat steps (2) to (5).
[0096] (7) Obtain the isotherms of the heat function based on the convergence result, which are the heat line distributions.
[0097] Example 1
[0098] Calculate the heat line distribution in the natural convection of a square cavity. An incompressible Newtonian fluid fills a vertically placed square cavity with side length L. The left wall of the cavity is maintained at T H , and the right wall is at T C , and the upper and lower walls are adiabatic. Two dimensionless parameters used to characterize the flow characteristics in the cavity are respectively:
[0099]
[0100]
[0101] where β is the coefficient of thermal expansion, v is the kinematic viscosity, and α is the thermal diffusivity.
[0102] In this example, the values of each parameter are: T H = 1, T C = 0, Ra = 1.4×10 5 , Pr = 7.
[0103] First, by numerical methods, such as the lattice Boltzmann method with double distribution functions, solve the flow and heat transfer behaviors in the cavity to obtain the velocity and temperature distributions, as shown in Figure 2A . Further, solve the heat function and heat line distribution by the method of the present application. The computational domain uses a uniform Cartesian grid of 250×250, and no-slip boundary conditions are adopted on the four sides. The convergence target is ε = 10 -7 , and a judgment is made every 100 iterations. The solution results of the heat lines are shown in Figure 2B . The numbers marked on the heat lines are the heat function values of the regions passed by the corresponding heat lines. Different from the isotherms shown in Figure 2A , the heat lines are no longer in a centrosymmetric form. From the distribution of the heat lines, the route of heat transfer from the high-temperature wall on the left to the low-temperature wall on the right can be seen. In addition, it can also be observed that part of the heat transfer forms a loop in the central region of the cavity. This is jointly caused by heat conduction due to the temperature difference in the cavity and heat convection due to the flow. In addition, the difference in the heat function between two points on the wall also reflects the Nusselt number on the wall between these two points, quantitatively representing the strength of heat transfer.
[0104] Example 2
[0105] Calculate the heat line distribution in the mixed convection of a square cavity with a blockage.
[0106] An incompressible Newtonian fluid fills a vertically placed square cavity with side length L. The fluid in the cavity is driven by the left and right walls, with the velocity of the left wall being U L , and the wall temperature is maintained at T H , the velocity of the right wall is U R , and the temperature is T C . The upper and lower walls are adiabatic. A square adiabatic block with side length B is fixed at the center of the cavity. The dimensionless parameters used to describe the flow and heat transfer behavior in the cavity are:
[0107]
[0108]
[0109]
[0110] In this embodiment, U L = 1, U R = -1, T H = 1, T C = 0, B = 0.3L, Ri = 0.1, Re = 50, Pr = 0.71.
[0111] First, by numerical methods, the flow and heat transfer behavior in the cavity are solved to obtain the velocity and temperature distributions, as Figure 3A shown. During the process of solving the heat function and the heat line, a 500×500 uniform Cartesian grid is used for the computational domain. For the block inserted at the center of the cavity, the boundary is treated with the Guo non-equilibrium extrapolation format. The specific procedure is as follows:
[0112] The boundary point x w falls between two grid points and the boundary condition at this point is H(x w ). To obtain the distribution function b that migrates from the outer grid point x 0 outside the computational domain into the computational domain grid point x f along the i direction after collision,
[0113]
[0114] where the superscripts "eq" and "neq" refer to the equilibrium state and the non-equilibrium state respectively. Then, the collision is performed at the x b grid point to obtain To obtain the equilibrium and non-equilibrium parts, q needs to be discussed by classification.
[0115] If q ≥ 0.75, then interpolate to obtain the heat function value of x b :
[0116] H(x b )=(H(x w )+(q - 1)H(x f )) / q
[0117] The equilibrium part of the distribution function is
[0118]
[0119] The non - equilibrium part is:
[0120]
[0121] If q < 0.75, grid points x ff data are interpolated to obtain the thermal function value of x b :
[0122] H(x b )=((3 - q)H(x w )-(1 - q 2 )H(x f )-(1 - q) 2 H(x ff )) / (1 + q)
[0123] The equilibrium part of the distribution function is:
[0124]
[0125] The non - equilibrium part is:
[0126]
[0127] The convergence target is ε = 10 -7 , and a determination is made every 100 iterations. The solution results of the hotline are as Figure 3B shown. The distribution of the hotline surrounds the square blockage, demonstrating the heat transfer process from the left wall to the right wall. The adiabatic blockage surface is the same as the upper and lower boundaries of the square cavity, which are surfaces with equal thermal functions, indicating that the total heat flux at these places is zero. The hotline is dense above the blockage and sparse below, indicating that the heat transfer above is stronger. This is because the direction of heat convection above is the same as the direction of heat conduction, and their contributions to heat transfer are superimposed; while below, the two directions are opposite and weaken each other.
[0128] This application also provides a simulation device for visualizing the heat transfer process in fluid flow, including: at least one processor; and,
[0129] A memory communicatively connected to the at least one processor, having instructions stored thereon that are executable by the at least one processor, and when the instructions are executed by the at least one processor, implementing some or all of the steps in the above-described method for simulating heat transfer processes in a visualized flow.
[0130] The present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, implementing some or all of the steps in the above-described method for simulating heat transfer processes in a visualized flow.
[0131] The above are only several embodiments of the present application and do not impose any form of limitation on the present application. Although the present application is disclosed above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art, without departing from the scope of the technical solution of the present application, making some changes or modifications using the technical content disclosed above is equivalent to equivalent implementation cases and all fall within the scope of the technical solution.
Claims
1. A method for simulating heat transfer in a visualized flow. It is characterized in that The method includes: (1) Determine the full-field source term f(x) and boundary condition H b (x) according to the flow velocity field and temperature field data; (2) Distribution function n i (x, t) is obtained by collision under the action of the full-field source term f(x) (3) Dealing with distribution function collisions at boundaries; (4) Transfer the distribution function after collision to the adjacent grid according to the discrete lattice velocity; (5) Calculate the heat function H(x,t) = Σ i n i (x,t); (6) Calculate the change of the full-field thermal function and make termination judgment; (7) Visualize the heat line distribution based on the heat function distribution.
2. The method for simulating heat transfer in a visualized flow according to claim 1, It is characterized in that The step (1) comprises: (11) For the heat transfer problem of a stable two-dimensional passive incompressible flow, the following governing equation is used to define its temperature field: Where u is the flow velocity field; T is the temperature field; α is the thermal diffusion coefficient; (12) Define the total heat flux: Among them, J x is the total heat flux in the x direction, u is the component of the flow velocity field in the x direction, J y is the total heat flux in the y direction, and v is the component of the fluid velocity field in the y direction; Define the heat function H(x): Where x = (x, y) is a two-dimensional coordinate; (13) According to the heat function, the following Poisson equation is obtained: Namely, it is the full-field source term; (14) Set H = 0 at x=(0,0), and obtain the boundary values of H x and J y by calculating the integrals of J b (x) on the boundary.
3. The method for simulating heat transfer in a visualized flow according to claim 1, It is characterized in that The step (2) comprises constructing the following evolution equation of the collision process following the distribution function: Among them, τ is the relaxation time, τ = 2α + 0.5, where α is the thermal diffusion coefficient; i is the discrete lattice velocity e i direction, is the equilibrium distribution function, w i is the weight coefficient at the corresponding discrete lattice velocity; F i = w i αf is the discrete source term, and i is the discrete lattice velocity e i direction.
4. The method for simulating heat transfer in a visualized flow according to claim 3, It is characterized in that When the collision process adopts the D2Q4 model, i = 0, …, 3, the weight coefficients at the discrete lattice velocities 5. The method for simulating heat transfer in a visualized flow according to claim 1, It is characterized in that The step (3) comprises: (31) The Dirichlet boundary condition is adopted as the boundary condition of the solution region in the solution process of the heat function, that is, H(x) = H b (x); (32) Calculate the distribution function on the direction i that migrates from outside the computational domain into the computational domain according to the following formula 0 where n i (x) is the distribution function; The distribution function is used to calculate the distribution function for the collision step.
6. The method for simulating heat transfer in a visualized flow according to claim 5, It is characterized in that In the process of solving the heat function and the heat line distribution, the calculation domain adopts the Cartesian grid. For the boundaries in the calculation domain where there may be non-grid-fitting boundaries, at least one of the following numerical methods is used to process the distribution function on the boundary: Guo non-equilibrium extrapolation format, Yu double difference rebound format, and immersed boundary method.
7. The method for simulating heat transfer in a visualized flow according to claim 1, It is characterized in that In step (4), the distribution function after the collision is migrated according to the following formula: where x = (x, y) is a two-dimensional coordinate; e i is the discrete lattice velocity, i is the direction of the discrete lattice velocity; δt is the time interval.
8. The method for simulating heat transfer in a visualized flow according to claim 1, It is characterized in that The convergence condition of step (6) is defined as follows: Where ε is the convergence target; x = (x, y) is the two-dimensional coordinate; H (x, t) is the heat function; δt is the time interval; If the current heat function distribution does not meet the convergence condition, repeat steps (2) to (5).
9. A device for simulating heat transfer in a visualized flow. It is characterized in that include: at least one processor; as well as, A memory communicatively connected to the at least one processor stores instructions executable by the at least one processor, wherein the instructions, when executed by the at least one processor, implement the method for simulating a heat transfer process in a visualized flow as described in any one of claims 1-8.
10. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the method for simulating a heat transfer process in a visualized flow according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
CFD simulation method for conjugate heat transfer process of TPMS porous structure
CN120745505A
A CFD simulation method for conjugate heat transfer process in TPMS porous structures
CN120745505B