Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a powder melting numerical simulation method based on a height function-lattice boltzmann method, which is simple, reasonable in design, comprehensive in consideration factor, efficient and accurate, accurately calculates the required interface curvature through the height function method, and realizes efficient parallel calculation through the lattice boltzmann.
The invention is realized by the following technical scheme:
a powder melting numerical simulation method based on a height function-lattice Boltzmann method includes the steps of,
step 1, establishing a randomly distributed powder bed model;
step 2, establishing a lattice boltzmann equation for powder melting for the powder bed model; the lattice boltzmann equation for powder melting comprises a speed collision equation, a speed migration equation, a temperature collision equation, a temperature migration equation, a macroscopic quantity calculation equation and an external force calculation equation;
step 3, according to the determination of the powder bed model and the boundary conditions thereof, performing simulation calculation of a temperature field and a flow field on each grid through a lattice Boltzmann equation of powder melting to obtain an evolution result of the temperature and the flow field in the powder melting process;
and 4, simulating the change of the temperature and the speed of the powder bed along with time in the process of moving the laser on the powder bed according to the evolution results of the temperature and the flow field in the powder melting process and the temperature and the speed at different moments, and obtaining the evolution process after the simulated powder is melted and the finally solidified surface morphology.
Preferably, when step 1 is used to model a randomly distributed powder bed,
firstly, carrying out grid division on the space in a calculation domain consisting of a powder bed and a working region above the powder bed, firstly setting the whole space as a gas phase, setting a solid phase state in a region occupied by a substrate, and setting a gas-solid interface at a position adjacent to the gas phase;
and then, randomly generating a powder layer with a specified particle size above the substrate, setting the grid occupied by the powder layer as a solid phase, and setting the position, adjacent to the air, of the powder layer as a gas-solid interface to obtain the powder bed model.
Preferably, the velocity collision equation is:
wherein f isi(x, t) represents a distribution function in the direction of the grid velocity i at the x position at time t, τfDimensionless relaxation time, f, representing velocityi eq(x, t) is the equilibrium distribution function in the direction of the grid velocity i at time t and x position, FiIs a dimensionless volume force in the i direction;
the velocity migration equation is as follows:
fi(x+ei,t+Δt)=fi(x,t)
wherein f isi(x+eiT + Δ t) is x + e after migrationiThe distribution function of the velocity of the grid in the direction i at the time t + Deltat, eiIs a unit vector of the i direction;
the temperature collision equation is as follows:
wherein h is
i(x, t) represents the distribution function in the direction of the grid temperature i at the x position at time t, τ
hRepresents the dimensionless relaxation time of the temperature,
the equilibrium distribution function in the direction of the lattice temperature i at the x position at the time t;
the temperature migration equation is as follows:
hi(x+ei,t+Δt)=hi(x,t)
wherein h isi(x+eiT + Δ t) is x + e after migrationiThe distribution function of the temperature of the grid in the direction of i at the time t + Deltat, eiIs a unit vector of the i direction;
the macroscopic quantity calculation equation is as follows:
wherein ρ represents density, T represents temperature, and θ represents velocity;
the external force calculation equation is as follows:
wherein, FiRepresenting the distribution function of the external force, wiIs a weight, eiIs a velocity vector, Cs is a lattice sound velocity, FvIs the actual physical volumetric force.
Further, in step 2, a height function method is introduced into the lattice boltzmann equation to calculate the interfacial force to which the free surface is subjected after the powder is melted, that is, the actual physical volume force including the surface tension, the marangoni force and the recoil pressure, as shown in the following equation:
wherein, σ κ n is a surface tension term,
is the Marangoni convection term, P
vIn order to be the item of the recoil pressure,
the coefficient term for surface force to volume force conversion, κ is the interfacial curvature.
Still further, the interface curvature is calculated by a height function method:
wherein HxxIs the second partial derivative of the height function in the x direction, HyyIs the second partial derivative of the height function in the y-direction, HxIs the first partial derivative of the height function in the x direction, HyIs the first partial derivative of the height function in the y direction, HxyThe value of the partial derivative is first calculated for x and then for y for the height function.
Preferably, in step 3, the specific steps are as follows,
obtaining a distribution function after collision through a collision equation, carrying out migration evolution on the distribution function after collision to obtain the distribution function after migration, and updating the temperature and speed distribution function at the boundary through boundary conditions;
according to the obtained temperature and speed distribution function after migration, the temperature and speed of each grid at different moments can be obtained through a macroscopic quantity calculation equation, and the evolution results of the temperature and the flow field in the powder melting process are obtained.
Preferably, the speed boundary condition is obtained by using a single-phase free surface model, and the temperature boundary condition is shown in the following equation:
wherein h is the convective heat transfer coefficient, TrIs the ambient temperature, σsIs the Stefan-Boltzmann constant, the epsilon emissivity, qevapThe heat removed by evaporation.
Compared with the prior art, the invention has the following beneficial technical effects:
according to the invention, a three-dimensional powder melting numerical model is established, and a lattice boltzmann method is adopted to calculate the temperature field and the flow field, so that the simulation efficiency is greatly improved, and a foundation is laid for the process optimization of the selective laser melting process; the evolution process after the powder is melted and the finally solidified surface morphology can be obtained through simulation, the forming reason of the defects on the surface of the molten pool can be deeply analyzed, and the dendritic crystal structure can be analyzed and predicted through temperature field data.
Furthermore, the surface tension, the Marangoni force and the recoil pressure are comprehensively considered, and the forces are accurately calculated by a height function method, so that the evolution of the interface morphology is consistent with the actual process.
Detailed Description
The present invention will now be described in further detail with reference to specific examples, which are intended to be illustrative, but not limiting, of the invention.
The invention relates to a powder melting numerical simulation method based on a height function-lattice boltzmann method, which comprises the following steps,
step 1, establishing a randomly distributed powder bed model;
firstly, carrying out grid division on the space in a calculation domain consisting of a powder bed and a working region above the powder bed, firstly setting the whole space as a gas phase, setting a solid phase state in a region occupied by a substrate, and setting a gas-solid interface at a position adjacent to the gas phase;
then, a powder layer with a predetermined particle size is randomly generated above the substrate, the grid occupied by the powder layer is a solid phase, and the place where the powder layer is adjacent to the air is a gas-solid interface, and the obtained powder bed model is as shown in fig. 1.
Step 2, establishing a lattice boltzmann equation for melting the following powder for the powder bed model;
velocity collision equation:
wherein f isi(x, t) represents a distribution function in the direction of the grid velocity i at the x position at time t, τfDimensionless relaxation time, f, representing velocityi eq(x, t) is the equilibrium distribution function in the direction of the grid velocity i at time t and x position, FiIs a dimensionless volume force in the i direction.
Velocity migration equation:
fi(x+ei,t+Δt)=fi(x,t)
wherein f isi(x+eiT + Δ t) is x + e after migrationiThe distribution function of the velocity of the grid in the direction i at the time t + Deltat, eiIs an i-direction unit vector.
Temperature collision equation:
wherein h is
i(x, t) represents the distribution function in the direction of the grid temperature i at the x position at time t, τ
hRepresents the dimensionless relaxation time of the temperature,
the equilibrium distribution function in the direction of the lattice temperature i at the x position at time t.
Temperature migration equation:
hi(x+ei,t+Δt)=hi(x,t)
wherein h isi(x+eiT + Δ t) is x + e after migrationiThe distribution function of the temperature of the grid in the direction of i at the time t + Deltat, eiIs an i-direction unit vector.
Macroscopic quantity calculation equation:
wherein ρ represents density, T represents temperature, and θ represents velocity;
external force calculation equation:
wherein, FiRepresenting the distribution function of the external force, wiIs a weight, eiIs the velocity vector, Cs is the lattice sound velocity, and Fv is the actual physical volume force.
Step 3, according to the determination of the powder bed model and the boundary conditions thereof, performing simulation calculation of a temperature field and a flow field on each grid through a lattice Boltzmann equation of powder melting to obtain an evolution result of the temperature and the flow field in the powder melting process;
the invention adopts a lattice boltzmann method to calculate a temperature field and a flow field, mainly comprises two steps of calculating a collision equation and a migration equation, for each position in a calculation domain, the dimensionless volume force in different directions of each lattice needs to be calculated when the collision equation is calculated, which is an important part for determining the calculation precision. These actual physical volumetric forces are shown in the following equations:
wherein, σ κ n is a surface tension term,
is the Marangoni convection term, P
vIn order to be the item of the recoil pressure,
is a coefficient term for the conversion of surface force into volumetric force.
Specifically, the interface curvature on the right of the calculation equation is calculated by using a height function method, and the calculation formula is as follows:
wherein HxxIs the second partial derivative of the height function in the x direction, HyyIs the second partial derivative of the height function in the y-direction, HxIs the first partial derivative of the height function in the x direction, HyIs the first partial derivative of the height function in the y-direction, HxyThe value of the partial derivative is first calculated for x and then for y for the height function.
After the collision equation is calculated, the obtained distribution function after collision is subjected to migration evolution to obtain the distribution function after migration, and the temperature and speed distribution function at the boundary is updated through the boundary condition. Wherein the speed boundary condition is obtained by adopting a single-phase free surface model, and the temperature boundary condition is shown as the following equation:
where h is the convective heat transfer coefficient, TrIs the ambient temperature, σsIs the Stefan-Boltzmann constant, the epsilon emissivity coefficient qevapThe heat removed by evaporation.
After the distribution functions after migration are obtained, the temperature and the speed of each grid at different moments can be obtained through a macroscopic quantity calculation equation.
According to the temperature and the speed at different moments, the change of the temperature and the speed of the powder bed along with the time in the process of moving the laser on the powder bed is simulated, and then the evolution process after the powder is melted and the finally solidified surface morphology can be finally obtained.
Through the above steps, various interfacial forces are accurately captured, and the powder melting behavior is analyzed through the method, so that the powder melting behavior under the action of gravity and surface tension is obtained, fig. 2a is the powder melting process under the action of only gravity, so that the powder is basically not subjected to melting deformation and a continuous molten pool is not formed, and fig. 2b is the powder melting process under the action of only surface tension, so that the powder is subjected to an obvious melting process under the action of surface tension and a molten pool is formed. Fig. 3 is a view of the temperature and flow field distribution of the molten bath in consideration of surface tension, marangoni force and recoil pressure, and fig. 4 is a view of the topography of the molten bath at different scanning rates, and it can be seen that as the scanning rate is increased from fig. 4a-b, the length of the molten bath is increased first and then decreased. Fig. 5 shows the effect of different powder particle sizes on the melting behavior and defects of the powder, and fig. 5a shows that the melting channel is flat and continuous in the 16-32 micron powder, and as the powder particle size increases, the melting channel starts to twist and the upper surface also appears to undulate significantly, so that the melting channel is no longer continuous, as shown in fig. 5 c.