CN112528570A - Simulation method for laser powder bed melting process based on lattice Boltzmann method for Python - Google Patents

Simulation method for laser powder bed melting process based on lattice Boltzmann method for Python Download PDF

Info

Publication number
CN112528570A
CN112528570A CN202011235298.6A CN202011235298A CN112528570A CN 112528570 A CN112528570 A CN 112528570A CN 202011235298 A CN202011235298 A CN 202011235298A CN 112528570 A CN112528570 A CN 112528570A
Authority
CN
China
Prior art keywords
laser
temperature
python
scanning
energy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011235298.6A
Other languages
Chinese (zh)
Other versions
CN112528570B (en
Inventor
张冬云
邓钧元
李泠杉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Technology filed Critical Beijing University of Technology
Priority to CN202011235298.6A priority Critical patent/CN112528570B/en
Publication of CN112528570A publication Critical patent/CN112528570A/en
Application granted granted Critical
Publication of CN112528570B publication Critical patent/CN112528570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/08Thermal analysis or thermal optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • Fluid Mechanics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Powder Metallurgy (AREA)

Abstract

The invention discloses a simulation method for a laser powder bed melting process based on a lattice Boltzmann method for Python, which completely depends on the Python language and extension packages such as Numpy, Mayavi and the like to realize the whole processes of modeling, calculation and data visualization. Different from the traditional CFD method, the method does not need to be based on continuity assumption, only needs to treat the operation points as particles capable of mutually colliding and transmitting, can efficiently solve and can highly flexibly customize simulation requirements through Python codes. The numerical simulation method of the invention provides a new idea, obtains the influence of profile scanning on entity scanning in the printing process, and the temperature field and flow field conditions at the laser corner, provides reference for the optimization of process parameters, and is simultaneously used as an efficient numerical simulation method, aiming at providing a novel solution for the analysis of the temperature field and the flow field of a molten pool in the melting process of a single-layer multi-channel laser powder bed.

Description

Simulation method for laser powder bed melting process based on lattice Boltzmann method for Python
Technical Field
The invention belongs to the field of laser powder bed melting, and particularly relates to a numerical simulation method for a laser powder bed melting process by using a lattice Boltzmann method based on Python.
Background
Laser Powder Bed Fusion (LPBF) is a technique in which high-melting-point alloy powder such as nickel-based alloy, steel, titanium alloy, etc. is used as a main material, a laser beam is used to focus a microspot, and the obtained microspot with high energy density is used to heat and melt the powder for reshaping. The processing process comprises the following steps: the part to be machined is modeled by CAD software, then processed by slicing software, the three-dimensional model is reconstructed into a two-dimensional thin layer with a certain thickness (usually tens of microns), different laser powers, scanning speeds and light spot intervals are set in different areas of the powder bed (such as a contour scanning area, a filling area between the contour and a solid scanning area and the solid scanning area), and then the machining is finished by scanning layer by layer.
The key of forming parts by adopting the LPBF technology is that the action process of laser and powder is well treated, and in the actual processing process, different laser processing parameters (power, speed and the like) and powder properties (grain diameter, material thermophysical property and the like) can influence the final forming quality due to violent molten pool reaction. And because the action process of the laser and the powder is extremely short, complex physical phenomena in the action process cannot be directly observed and analyzed through a traditional experimental method, numerical simulation is introduced into the research of the LPBF process as a method for saving time cost and experimental cost.
With the continuous development of computer technology, the numerical simulation technology gradually deepens to research of mesoscopic molten pool evolution and microscopic crystallization processes from simple temperature field calculation in LPBF process research, and is mainly realized by using Flow-3D, Fluent and COMSOL Multiphysics software through a finite volume method, a finite element method or a finite difference method. In recent years, with the development of a lattice Boltzmann method, the method becomes an important means for fluid simulation research, the method for solving the N-S equation is different from the traditional finite element method or the finite volume method, and the problem that Laplace operator calculation occupies a large amount of calculation resources is avoided in the solving process, so that the method has unique advantages in the process of solving the N-S equation, but the existing commercial software based on the lattice Boltzmann method is not mature, and is realized by programming by adopting C + +, Matlab and Fortran.
Disclosure of Invention
In view of the above, the invention is based on the lattice Boltzmann method, the LPBF process is programmed by Python, and the preprocessing, calculating and post-processing processes involved in the numerical simulation process are compiled and operated by adopting mature macro-packets Numpy, Math, Scipy, Matplotlib and Mayavi, so that the temperature field and flow field evolution of the single-layer multi-channel LPBF processing model with contour scanning can be obtained by benefiting from the superiority of the lattice Boltzmann method in comparison with the traditional method in calculation and the flexible applicability of Python self-programming, and the purpose of guiding actual processing can be achieved.
In order to achieve the purpose, the invention provides a numerical simulation method for performing a laser powder bed melting process by using a lattice Boltzmann method based on Python, which specifically comprises the following steps:
the first step is as follows: establishing a 1.5mm multiplied by 0.5mm laser powder bed melting geometric model, and planning a scanning path;
the second step is to divide the grid cells and initialize D3Q15A model;
step three, dimensionless conversion and normalization processing are carried out on the thermal physical parameters, and matrix creation and initialization processing are carried out on each physical quantity;
the fourth step: establishing a laser volume heat source model with energy attenuation along the z-axis direction and Gaussian distribution of an xy plane;
the fifth step: adding energy and momentum boundary conditions;
and a sixth step: using Python coupling iteration to solve an energy and momentum transfer equation based on a lattice Boltzman method to obtain distribution functions at different times and different positions;
the seventh step: and carrying out visualization processing on the obtained data, and drawing a time evolution graph of the temperature field and the flow field.
The invention is also characterized in that:
the first step is specifically carried out according to the following method:
according to the actual processing condition, a single-layer multi-channel scanning model with the boundary scanning of 1.5mm multiplied by 0.5mm is established. Wherein the length of the edge-hooking scanning line is 0.94mm, the length of the entity scanning line is 0.84mm, the light spot interval between the entity and the outline is 0.05mm, and the light spot interval between the entity scanning lines is 0.12 mm.
In the second step: dividing lattice units, wherein each lattice unit is a regular hexahedron with the side length of 10 mu m, 150 lattices in the x direction, 150 lattices in the y direction and 50 lattices in the z direction; in the lattice Boltzmann method, D is often used in a three-dimensional model to clarify the motion direction of particles and thus describe the evolution of the collision-transfer process in a specific space3Q15Description of (1), D3Q15The model can sufficiently reflect the three-dimensional motion characteristics, wherein D3Representing three dimensions, Q15The representative movement can be performed in 15 directions, and needs to be performed on D3Q15Weight ω that a distribution function may transfer to various directions after a collision in a modelαOrientation cx,cy,czInitializing the matrix, and determining the weights in all directions according to the matrix equation required to be satisfied by the equilibrium distribution equation, wherein cx,cy,czThree one-dimensional matrices of 15 elements represent 15 different directions of motion, 0-14, by setting the combination of three values-1, 0,1, while D3Q15The weights for each direction of models 0-14 are 16/72, 8/72, 8/72, 8/72, 8/72, 8/72, 8/72, 1/72, 1/72, 1/72, 1/72, 1/72, 1/72, 1/72, 1/72, respectively.
In the third step: setting the Rayleigh number
Figure BDA0002766605250000031
Prandtl number
Figure BDA0002766605250000032
Number of Stefan
Figure BDA0002766605250000033
Dynamic viscosityUpsilon, solid phase heat capacity CρAnd liquid phase heat capacity CplIn which g is the acceleration of gravity (9.8 m/s)2) Beta is a thermal expansion coefficient (1/K), lsIs the unit length (m) of the lattice, and upsilon is the dynamic viscosity (N.s/m)2) And α is the thermal diffusivity (m)2/s), Δ T is the temperature difference (K) between the liquidus temperature and the substrate temperature of the powdered material, TlIs the liquidus temperature (K), T of the powder materialsIs the solidus temperature (K), C of the powder materialplIs the liquid phase heat capacity (J/kg/K) of the powder material; initial density p for powder material0Solidus temperature TsLiquidus temperature TlThe evaporation temperature TvInitial temperature (room temperature) T0And substrate temperature TbNormalization is carried out, and latent heat L and initial enthalpy h are obtained0Enthalpy of solid phase hsEnthalpy of liquid phase hlEnthalpy of vaporization hvA dimensionless value of (a); velocity v in x directionxVelocity v in y-directionyVelocity v in the z directionzEnthalpy h, temperature T, density ρ, liquid phase volume fraction fl, density distribution function fin, temperature distribution function gin, creating a matrix and initializing the matrix, wherein h is h after initialization0,ρ=ρ0,vx=vy=vz=0,fl=0,T=T0Fin and gin initialize the quality and enthalpy according to the weights different in 15 directions, and the density is set as rho in initialization0Temperature is set to T0
In the fourth step: a three-dimensional volume heat source model is compiled by using Python, the energy density is in Gaussian distribution in the action range of a laser spot and is attenuated along the direction of a z axis:
Figure BDA0002766605250000034
in the formula, Δ z is the equivalent size (μm) of the laser energy unit, and the length of one lattice unit is 10 μm, fΔzThe energy proportion of the unit is different, the energy proportion of the unit lattices with different layers is different, but the sum of the energy proportion of the unit lattices is 1; q is laser power (W); r is the laser spot radius (mum); eta is the laser absorption rate; x is the abscissa (μm) of the laser action position; x is the number of0For initiation of laser action sitesAbscissa (μm); y is the ordinate (μm) of the laser action position; y is0The starting ordinate (. mu.m) of the laser action position.
In the fifth step: the momentum boundary conditions are added first, the momentum boundary conditions of the upper surface with the laser are set to the unbalanced extrapolation format, which is set for the free interface, and the remaining five surfaces are set to the bounce format, at D3Q15In the model, five directions of 6,8,9,11 and 14 are set as the action directions of the unbalanced extrapolation format, and the density distribution function at the outermost boundary of the surface on the three-dimensional model is balanced by a second outer boundary balanced distribution function feqNon-equilibrium distribution function fneqAnd a density distribution function fin operation. Meanwhile, the bounce format means that the momentum of the boundary condition at the boundary is transferred in the opposite direction, at D3Q15In the model, the directions 1,2,3,4,5,7,10 and 12 are set as the action directions of the rebound format, and momentum transfer to the boundary is carried out in the reverse direction of the original magnitude. Adding thermal conduction, thermal convection and radiation heat dissipation energy boundary conditions on the upper surface acted by the laser, and setting the energy boundary conditions of the other surfaces as thermal insulation, wherein the energy boundary conditions of the thermal conduction, the thermal convection and the radiation heat dissipation are as follows:
Figure RE-GDA0002935145050000041
kappa is the powder bed thermal conductivity (W/m/K); h iscIs the convection heat transfer coefficient (W/(m)2·K));σbIs a Stefan-Boltzmann constant with a value of 5.67X 10-8W/(m2·K4);T0Initial temperature, value 300K; t is the laser transient temperature (K); epsilon is the radiation emissivity; q. q.sinHeat input (W/m) absorbed for powder layer2)。
In the sixth step: using Python coupling iteration to solve an energy conservation equation and a momentum conservation equation based on a lattice Boltzman method, and comprising the following steps of:
based on a lattice Boltzmann method, an energy conservation equation based on enthalpy change is compiled by adopting Python language:
the conventional energy equation is used, enthalpy change, latent heat and liquid phase volume fraction are introduced, the phase change process is simulated from the angle of energy continuous change, and an energy conservation equation based on the enthalpy change is compiled.
Based on a lattice Boltzmann method, a momentum conservation equation containing an external force term is compiled by adopting Python language:
writing a momentum conservation equation containing buoyancy, surface tension and solid-liquid interfacial force, wherein the buoyancy fb=ρβ(T-T0) g, rho is the material density (kg/m)3) G is the acceleration of gravity (m/s)2) Beta is thermal expansion coefficient (1/K); solid-liquid interfacial force
Figure RE-GDA0002935145050000051
Figure RE-GDA0002935145050000052
As the fluid velocity (m/s),
Figure RE-GDA0002935145050000053
is the velocity at the interface (m/s), flIs the liquid phase volume fraction, Δ t is the time step(s); surface tension:
Figure RE-GDA0002935145050000054
gamma is the surface tension coefficient (N/m) and kappa is the interfacial curvature (m)-1),
Figure RE-GDA0002935145050000055
Is a normal vector of the surface,
Figure RE-GDA0002935145050000056
the Marangoni effect caused by surface tension consisting of a surface tension coefficient with temperature as an independent variable is shown.
Setting initial time step k to 0 and simulating total time step number
Figure BDA0002766605250000057
Setting processing parameters of profile scanning laser power (W), entity scanning laser power (W), profile scanning laser speed (mm/s), light spot interval (mm) and profile and entity light spot interval (mm) according to the processing parametersAnd loading a Gaussian volume laser heat source on the planned scanning route.
Python program is initialized, the value brought by the program when the program just starts to run is the initial temperature T set by the third step0Initial velocity vx、vy、vzInitial enthalpy h0Initial density ρ0Initialization values of physical quantities.
Judging whether k reaches the last step (namely whether k is larger than N), if k is less than or equal to N, entering the main operation of the program: according to the calculation logic of 'collision-transfer' of the lattice Boltzmann method, firstly, a collision process is carried out, distribution functions fin and gin which cause changes under the influence of temperature, enthalpy, density, specific heat capacity, liquid-phase volume fraction and external force items are obtained, then a transfer process is carried out, wherein values at the upper surface are calculated by an unbalanced extrapolation format due to the action of temperature and surface tension at the boundary, and finally, the distribution functions fin and gin are accumulated to obtain a macroscopic velocity field and a temperature field in the machining process, and the macroscopic velocity field and the temperature field are continuously brought into the iterative 'collision-transfer' process until the operation is finished (k > N).
In the seventh step: and (4) importing the calculated data (npy file) into codes compiled based on Mayavi and Matplotlib macro packages, and outputting a group of operation results every 50 steps for visualization so as to obtain temperature field and flow field distribution images. And (4) sorting and marking the data, finishing the data processing of the simulation result, and analyzing the temperature field and the flow field of the contour and the entity laser scanning result.
Compared with the existing numerical simulation technology, the innovation points of the invention are as follows:
in the past, due to the limitation of computing power, the laser powder action of a single channel of several millimeters is mostly used as a main research object, however, the flatness of a boundary is usually ensured through contour scanning during actual processing, the processing parameters of the boundary are obviously different from those of the conventional entity scanning parameters in the aspects of scanning speed and laser power, and the influence of a multi-channel entity scanning molten pool, a contour scanning molten pool and a heat affected zone thereof on the processing process in the process of actually scanning a certain layer can be further researched by the aid of the advantages of computing efficiency and the like through building a grid Boltzmann method model. Therefore, the invention provides a numerical simulation technology for the evolution of a temperature field and a flow field based on a single-layer multichannel LPBF processing model with contour scanning, and realizes the whole processes of modeling, calculation and data visualization based on Python and Numpy, Math, Scipy, Matplotlib and Mayavi expansion packets thereof, and obtains the influence of the contour scanning on entity scanning in the printing process and the conditions of the temperature field and the flow field at a laser corner, thereby providing reference for the optimization of process parameters.
Description of the drawings:
the accompanying drawings, which form a part hereof, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention without limiting the invention to its proper form. In the drawings:
FIG. 1 is a schematic diagram showing the solid-liquid phase distribution in the embodiment of the present invention
FIG. 2 is a schematic diagram of the laser scanning path during the melting of the laser powder bed in the embodiment of the present invention
FIG. 3 is a diagram of the lattice Boltzmann method D in an embodiment of the present invention3Q15Model diagram
FIG. 4 shows the dynamic process of the corner of the molten pool during the melting of the laser powder bed in the embodiment of the present invention (a) at a position 20 μm before the corner; (b) a corner; (c) second bath start
FIG. 5 is a schematic representation of a cross-section of (a) xy in a non-profile, physically scanned flow field, temperature field during melting of a laser powder bed in an embodiment of the present invention; (b) xz cross section; (c) yz section
FIG. 6 is a schematic view (a) of xy cross section of profile-solid scanning flow field and temperature field during the melting process of the laser powder bed in the embodiment of the present invention; (b) yz section; (c) xz section
FIG. 7 is a graph of the change in the temperature of the center of the laser spot during the melting of the laser powder bed for the non-profile solid scan and the profile solid scan of the present invention
FIG. 8 is a graph of the change in midpoint temperature of each molten pool (a) of the first pool; (b) a second molten pool; (c) corner of the molten bath
The specific implementation mode is as follows:
the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The numerical simulation method for carrying out the melting process of the laser powder bed by using the lattice Boltzmann method based on Python adopts the following technology:
1. a numerical simulation method based on the lattice Boltzmann method;
different from the finite volume, finite element and finite difference methods adopted by the traditional laser powder bed melting numerical simulation, the numerical simulation method of the invention adopts a lattice Boltzmann method, and when solving the problems of mass, momentum and energy transmission through a Navier-Stokes equation, the method is different from the traditional method in that: the traditional CFD method needs to be based on continuity assumption and disperse the equation to be solved to a node, a unit or a volume for solving, and essentially, iterative solution is carried out on a differential equation of a nonlinear equation; the lattice Boltzmann method takes operation points as particles which can collide with each other, the particles are transmitted along a certain direction after colliding with the particles, and a collision-transmission process is carried out at the next lattice point, the algorithm is a display algorithm, and the problem of solving a large number of large linear equations in an implicit algorithm can not be generated.
2. Programming based on Python language;
the LPBF process is programmed by adopting Python, the method mainly depends on an extended program library Numpy for carrying out array operation, a Math library or a Scipy library is used for solving partial differential equations and algebraic equations, and the operation result is visually processed by Matplotlib (conventional line graph, field function) and Mayavi (three-dimensional vector). The obvious advantages are as follows: 1) the whole process of numerical simulation is realized in a Python open source environment without considering license fee and without exporting an operation result to Tecplot or Paraview for visual operation; 2) through the Numpy and other operation libraries, the traditional 'for loop' can be replaced by matrix operation, the operation efficiency is greatly improved (by 90 times), and the code readability is strong; 3) from a longer perspective, if means such as genetic algorithm, neural network and the like are introduced to the data processing in numerical simulation to further improve the application of the traditional CFD, the Python has great potential; 4) the operational logic of the lattice Boltzmann method pays attention to the high efficiency of parallel operation, and the parallel operation can still be realized through Python.
3. Conversion of lattice units of physical quantities;
the lattice Boltzmann method is used for calculating the actual engineering problem, the dimension of the lattice Boltzmann method is required to be unified, the lattice Boltzmann method can be directly introduced into an actual physical unit for calculation, and can also be converted into a dimensionless lattice unit for calculation through a similarity criterion. However, in the LPBF process, the calculation scale is in the order of 100 μm, and therefore it is not difficult to presume that the numerical difference of the calculation easily appears 10 when the units of the physical quantities involved in the calculation are unified (for example, energy density viscosity or surface tension)4~107And in the measurement stage, from the view point of numerical calculation, the operation of a maximum value and a minimum value easily generates larger accumulated errors in the process of multiple iterations, and the operation stability is influenced. Therefore, the invention makes the physical unit non-dimensionalized, on one hand, improves the stability of the operation, and on the other hand, can also improve the operation efficiency to a certain extent.
4. Liquid phase volume fraction treatment of solid-liquid interface
Because the LPBF process has solid-liquid and gas-liquid phase change process, the temperature change of the process is not linear any more from the analysis of phase change dynamics, in the temperature range close to the melting point and the temperature range close to the boiling point, taking the solid-liquid phase change as an example, a solid-liquid mixing area exists, because latent heat exists in the phase change process, the temperature of the area is not changed, but the solid-liquid phase change is still carried out, and the energy of the system is changed continuously. Therefore, the conventional energy equation is needed to introduce the concept of enthalpy change, latent heat and liquid phase volume fraction, and the phase change process is simulated from the perspective of continuous change of energy, so as to derive the lattice Boltzmann equation based on enthalpy change.
The volume fraction of the liquid phase is a function of enthalpy, the solid-liquid phase change process can be smoothly transited by constructing a piecewise function, a pasty zone is formed in a solid-liquid phase change temperature range, and the flow speed, density change and heat transfer process of the zone are influenced by the proportion of the solid phase and the liquid phase. The solid-liquid phase distribution determined by the liquid phase volume fraction is shown in fig. 1, with the left side of the dotted line being the liquid phase region and the right side of the solid line being the solid phase region. Due to the influence of the liquid phase volume fraction, a solid-liquid mixing area is arranged in the middle of the solid phase and the liquid phase, and the liquid phase volume fraction is transited from a dotted line 1 to a solid line 0. Meanwhile, interfacial force in the solid-liquid mixing zone is also determined by the volume fraction of the liquid phase, and the volume fraction of the liquid phase is a function of enthalpy, so that the phase change process can be reflected by the change of the enthalpy, and the position and stress of the mushy zone are continuously changed along with the change of the enthalpy. In addition, the temperature is also obtained by a piecewise function of the enthalpy, so in the Boltzmann equation, the calculation of the temperature is implicit, and due to the influence of the latent heat, in the solid-liquid line temperature interval, the temperature gradually transits in the 'mushy zone' according to the size of the enthalpy in the process of changing from low to high. Compared with the step setting of temperature caused by phase change, the method has better smoothness in numerical calculation, thereby ensuring the stability of calculation.
The invention relates to a numerical simulation method for carrying out a laser powder bed melting process by using a lattice Boltzmann method based on Python, which takes TC4 powder material as an example to carry out concrete implementation explanation and mainly comprises the following steps:
the first step is as follows: establishing a 1.5mm multiplied by 0.5mm laser powder bed melting geometric model, and planning a scanning path;
the mathematical model is established based on the specific characteristics of the research object, and meanwhile, the computing capability of a computer needs to be considered, so that the computing efficiency is ensured while the physical process is simulated as accurately as possible. In the actual processing process, according to the slicing condition of a processed workpiece, a forming surface is mostly a scanning surface consisting of a profile and solid scanning, and the invention establishes a laser powder bed melting geometric model with the same size and plans a scanning path on the basis of a cube of 1.5mm multiplied by 0.5mm appearing in an experiment.
The scanning path is as shown in fig. 2, wherein an outermost black line frame is a boundary of the model, and a certain area is left between the boundary and the outline for simulating an actual heat dissipation condition; the length of a profile scanning line (a solid line of a secondary peripheral arrow) is 0.94mm, and the time steps are 1726 steps per pass; the length of a solid scanning line (an arrow solid line) is 0.84mm, the time steps are 826 steps per pass, and the main reason of the step difference between the profile and the solid laser scanning time is caused by the inconsistency of the scanning length and the scanning speed; the spot interval between the solid and the outline (between the solid line of the sub-peripheral arrow and the solid line of the arrow) was 0.05mm, and the spot interval between the solid scanning lines (between the solid lines of the arrow) was 0.12 mm.
The second step is that: dividing the cells into cells and initializing D3Q15A model;
the grid units are divided, each grid unit is a regular hexahedron with the side length of 10 mu m, and 150 grids in the x direction, 150 grids in the y direction and 50 grids in the z direction can be known from the geometric dimension of the model.
In the lattice Boltzmann method, in order to clarify the motion direction of particles and thus describe the evolution situation of the collision-transfer process in a specific space, a description mode D is often adoptednQmWhere n represents the dimension: d1,D2,D3Respectively represent 1 dimension, 2 dimension and 3 dimension; m indicates that the motion can be performed in m directions. Use of D in the invention3Q15The model is required to describe the fluid flow and temperature evolution involved in the LPBF process as accurately as possible, for D3Q15Weight ω that a distribution function may transfer to various directions after a collision in a modelαDirection of rotation cx,cy,czInitializing the matrix, and determining the weights in all directions according to the matrix equation required to be satisfied by the equilibrium distribution equation, wherein cx,cy,czThree one-dimensional matrices of 15 elements represent 15 different directions of motion, 0-14, by setting the combination of three values-1, 0,1, and as shown in fig. 3, D3Q15The weights of the models 0-14 in the directions are 16/72, 8/72, 8/72, 8/72, 8/72, 8/72, 8/72, 1/72, 1/72, 1/72, 1/72, 1/72, 1/72, 1/72 and 1/72 respectively, the weights are different according to the directions, and the difference of the values represents the difference of the weights of the distribution function in the collision transfer process along the directions.
The third step: carrying out dimensionless conversion and normalization processing on each thermal physical parameter of TC4, and carrying out matrix creation and initialization processing on each physical quantity;
the core of the dimensionless processing is based on the similarity principle, after the dimensionless number related to the model is determined, as long as the dimensionless number is ensured not to be changed, the physical quantities forming the dimensionless number can be scaled according to the requirement, and the operation results have consistency.
The model involved in the method comprises the processes of three aspects of fluid motion, solid-liquid phase change and heat transmission, and the dimensionless parameters involved in the method are Rayleigh numbers
Figure BDA0002766605250000101
Prandtl number
Figure BDA0002766605250000102
Number of Stefan
Figure BDA0002766605250000103
Dynamic viscosity upsilon, solid phase heat capacity CρAnd liquid phase heat capacity CplIs a dimensionless number of (c), wherein g is the acceleration of gravity (m/s)2) A value of 9.8; beta is a thermal expansion coefficient (1/K) of 8.0X 10-6;lsIs a unit length (m) of the lattice and has a value of 1.0X 10-5(ii) a Upsilon is dynamic viscosity (N.s/m)2) Value of 6.67X 10-6(ii) a Alpha is the thermal diffusivity (m)2S) value of 9.027X 10-6(ii) a Δ T is the temperature difference (K) between the liquidus temperature of the powder material and the substrate temperature, and has a value of 1630; t islIs the liquidus temperature (K) of the powder material and has the value of 1930; t issIs the solidus temperature (K) of the powdered material, with a value of 1860; cplIs the liquid phase heat capacity (J/kg/K) of the powdered material, and has a value of 831; the Rayleigh number Ra of the TC4 material is 4.5 multiplied by 105Prandtl number Pr 0.075, Stefan number Stel 5.3, kinematic viscosity upsilon 0.005, and solid phase heat capacity Cρ17911.33 and liquid phase heat capacity Cpl=18000.0。
Initial density p for TC4 powder material0Solidus temperature TsLiquidus temperature TlTemperature of evaporationDegree TvInitial temperature (room temperature) T0And substrate temperature TbNormalization is carried out, and after normalization, rho is respectively obtained0=1.0,Ts=0.4718,Tl=0.4883,Tv=1.0,T0=0,Tb0.6703 and thereby obtaining latent heat L, initial enthalpy h0Enthalpy of solid phase hsEnthalpy of liquid phase hlEnthalpy of vaporization hvAre each L-56.04, h0=0,hs=8450.56,hl=8802.14, hv=12132.65。
Velocity v in x directionxVelocity v in y-directionyVelocity v in the z directionzThe enthalpy h, the temperature T, the density ρ, and the liquid phase volume fraction fl are subjected to three-dimensional matrix creation with the numerical value of each lattice set to 0, and simultaneously, four-dimensional matrix creation is performed on the density distribution function fin and the temperature distribution function gin, where the fourth dimension is 15 movement directions in which particle movement is likely to occur.
Initializing the created matrices, respectively, wherein the enthalpy h ═ h0,ρ=ρ0,vx=vy=vz=0,fl=0,T=T0Fin and gin initialize the quality and enthalpy according to the weights different in 15 directions, and the density is set as rho in initialization0Temperature is set to T0
The fourth step: a three-dimensional volume heat source model is compiled by using Python, the energy density is in Gaussian distribution in the action range of a laser spot and is attenuated along the z-axis direction, and a mathematical model is defined as follows:
Figure BDA0002766605250000111
in the formula, Δ z is the equivalent size (μm) of the laser energy unit, and the length of one lattice unit is 10 μm; f. ofΔzIn the calculation process, a first layer of unit interface irradiated by laser is tracked in real time, then the position of a unit cell acted by the laser is searched along the gravity direction by taking the first layer of unit interface as a starting point, and finally the sum of the laser energy ratios of all layers of unit cells is ensured to be 1; q is laser power, wherein the profile laser scanning power is 100W, physical laserThe optical scanning power is 275W; the radius R of the laser spot is 50 μm; the laser absorption rate eta is 0.4; x is the abscissa (μm) of the laser action position; x is the number of0The initial abscissa of the laser action position is 0 μm; y is the ordinate (μm) of the laser action position; y is0The starting ordinate of the laser action position is 0 μm.
The fifth step: adding energy and momentum boundary conditions;
adding momentum boundary conditions: in the simulation of the LPBF process, the laser and powder action interface is a free interface, so that the boundary condition of a common rebound format has certain limitation, meanwhile, the temperature boundary is not a constant temperature or constant heat flow density boundary, the momentum boundary condition of the upper surface acted with the laser is set to be an unbalanced extrapolation format, the other five surfaces are set to be the rebound format, the unbalanced extrapolation format is set aiming at the free interface, the momentum condition at the boundary is influenced by a balanced distribution function and an unbalanced distribution function together, and the method is characterized in that D3Q15In the model, five directions of 6,8,9,11 and 14 are set as the action directions of the unbalanced extrapolation format, and the density distribution function at the outermost boundary of the surface on the three-dimensional model is balanced by a secondary outer boundary distribution function feqNon-equilibrium distribution function fneqAnd a density distribution function fin operation. Meanwhile, the bounce format means that the momentum of the boundary condition at the boundary is transferred in the opposite direction, at D3Q15In the model, the directions 1,2,3,4,5,7,10 and 12 are set as the action directions of the rebound format, and momentum is transmitted to the boundary to transmit in the reverse direction of the original magnitude.
Adding energy boundary conditions, adding heat conduction, heat convection and radiation heat dissipation energy boundary conditions to the upper surface acted by the laser, setting the rest surfaces as heat insulation, wherein the energy boundary conditions are as follows:
Figure RE-GDA0002935145050000112
in the formula, kappa is the powder bed thermal conductivity (W/m/K) and the value is set to be 8.76; h iscIs the convective heat transfer coefficient (W/(m)2K)), the value is set to 10.0; sigmabIs a Stefan-Boltzmann constant with a value of 5.67X 10-8W/(m2·K4);T0The initial temperature value is 300K; t is the laser transient temperature (K); ε is the emissivity of radiation, and the value is set as temperature dependent: 0.154+ 1.838X 10-4×(T-300);qinHeat input (W/m) absorbed for powder layer2)。
And a sixth step: using Python coupling iteration to solve an energy and momentum transfer equation based on a lattice Boltzman method;
the lattice Boltzmann equation solution adopts Python to program, and has the advantages of open source and data input and output uniformity. The practical characteristics of Python operation are combined, the 'for cycle' is changed into array calculation through Numpy, and the calculation capacity is greatly improved. Aiming at the calculation of the array, the 'if-else' judgment logic related to the piecewise function is changed into 'irrelevant numerical value return to zero' operation logic, so that the calculation of the piecewise functions of different numerical values in the array is completed on the premise of not influencing the operation efficiency.
Specifically, based on a lattice Boltzmann method, an energy conservation equation based on enthalpy change and a momentum conservation equation containing an external force term are written by adopting Python language, and the external force term considered in the model has buoyancy, surface tension and solid-liquid interfacial force.
Based on a lattice Boltzmann method, an energy conservation equation based on enthalpy change is compiled by adopting Python language:
the conventional energy equation is used, enthalpy change, latent heat and liquid phase volume fraction are introduced, the phase change process is simulated from the angle of energy continuous change, and an energy conservation equation based on the enthalpy change is compiled.
Based on a lattice Boltzmann method, a momentum conservation equation containing an external force term is compiled by adopting Python language:
writing the equation of conservation of momentum including buoyancy, surface tension, and solid-liquid interfacial force, and buoyancy fb=ρβ(T-T0) g, rho are densities (kg/m) of the material at different temperatures3) G is the acceleration of gravity (m/s)2) The value is 9.8, beta is the coefficient of thermal expansion (1/K), the value is 8.0X 10-6(ii) a Solid-liquid interfacial force
Figure RE-GDA0002935145050000121
Figure RE-GDA0002935145050000122
As the fluid velocity (m/s),
Figure RE-GDA0002935145050000123
is the velocity at the interface (m/s), flIs the liquid phase volume fraction, Δ t is the time step(s); surface tension:
Figure RE-GDA0002935145050000124
gamma is the surface tension coefficient (N/m), the value is 1.52, and kappa is the interfacial curvature (m)-1),
Figure RE-GDA0002935145050000125
Is a normal vector of the surface,
Figure RE-GDA0002935145050000126
the Marangoni effect caused by surface tension consisting of a surface tension coefficient with temperature as an independent variable is shown.
Setting an initial time step k to be 0 and a simulated total time step, wherein the total time step k of the profile scanning is 1726, the total time step k of the physical scanning is 826, setting processing parameters of profile scanning laser power (100W), physical scanning laser power (275W), profile scanning laser speed (650mm/s), physical scanning speed (1100mm/s), spot interval (0.08mm) and boundary and internal spot interval (0.05mm), and loading the Gaussian volume laser heat source according to a planned scanning route.
Then carrying out Python program initialization to ensure that the value brought by the program just starting to run is the initial temperature T set in the third step0Initial velocity vx、vy、vzInitial enthalpy h0Initial density ρ0Initialization values of physical quantities.
Judging whether k reaches the last step, judging whether k is smaller than or equal to 1726 for contour scanning, judging whether k is smaller than or equal to 826 for entity scanning, and entering the main operation of the program if k of contour scanning is smaller than or equal to 1726 or k of entity scanning is smaller than or equal to 826: according to the calculation logic of 'collision-transfer' of the lattice Boltzmann method, firstly, a collision process is carried out, distribution functions fin and gin which cause changes under the influence of temperature, enthalpy, density, specific heat capacity, liquid-phase volume fraction and external force items are obtained, then a transfer process is carried out, wherein values at the upper surface are calculated by an unbalanced extrapolation format due to the action of temperature and surface tension at the boundary, finally, the distribution functions fin and gin are accumulated, a macroscopic velocity field and a temperature field in the machining process are obtained, and the macroscopic velocity field and the temperature field are continuously brought into the iterative 'collision-transfer' process until the operation is finished.
Furthermore, the whole calculation process is a mutual coupling iterative process of energy and momentum conservation equations based on a lattice Boltzemann method, momentum is calculated firstly, the obtained value is substituted into the energy conservation equation to solve the flowing heat dissipation condition, then the temperature distribution calculated by the energy conservation equation is substituted into the momentum conservation equation, and as the external force item and the volume fraction of the interface liquid phase are functions taking temperature as an independent variable, the updated temperature distribution is substituted into the momentum conservation equation to obtain new momentum distribution, and the iteration is carried out in sequence.
The seventh step: for the contour scanning, if k >1726 or for the entity scanning k >826, indicating that the simulation calculation is finished, the calculated data (. npy file) is imported into the code compiled based on the Mayavi and Matplotlib macro packet, and a group of operation results are output every 50 steps for visualization so as to obtain the temperature field and flow field distribution images. And (4) sorting and marking the data, finishing the data processing of the simulation result, and analyzing the temperature field and the flow field of the contour and the entity laser scanning result.
As can be seen from the flow regime and flow conditions at the corners of the bath of FIG. 4, the flow regime of the bath undergoes an increase and then a gradual decrease at the corners, and the bath flow rate decreases at the corners, and the bath temperature field increases by 150K at the corners.
As can be seen from the schematic diagram of the outline-free solid scanning flow field and the temperature field in the attached FIG. 5, the melt flow rate of the first half section of the first molten pool is gradually increased in the fluctuation and then tends to be stable. Under the action of surface tension of the molten pool, the fluid generates Marangoni effect, and the melt flows upwards in the high-temperature zone and then flows to the surrounding low-temperature zone.
As can be seen from the schematic diagram of the flow field and the temperature field of the profile-solid scanning in the attached FIG. 6, the size and the evolution characteristics of the molten pool at the corner are basically consistent with those of the molten pool without the profile solid scanning. The main difference is that the melt pool at the beginning of the physical scan is affected by the profile melt pool due to the close proximity of the end of the profile to the beginning of the physical scan, which is distinguished from the very fast flow in the beginning of the non-profile melt pool, where the melt flow is only about 4/5 at the non-profile.
As can be seen from the non-profile-solid scanning and profile-solid scanning spot center temperature variation diagram of FIG. 7, the bath temperature is basically around 3200K, which is near the boiling point and far above the liquidus temperature of TC 4; the non-profile-entity-scan puddle temperature is generally lower than the profile-entity-scan puddle except for the first puddle because the heat affected zone of the four profiles has a large range but the temperature rise at the entity scan is limited, so the profile-based entity-scan puddle temperature is about 100K higher.
As can be seen from the temperature change of the middle point of each molten pool in the attached figure 8, the middle point temperature of the molten pool with the contour is slightly higher than that of the molten pool without the contour, but the difference is very small; after the laser spot passes through the middle point, the high-temperature melt flows backwards from the front end in the convection heat dissipation process, so that the cooling speed of the point is slightly slower than the heating speed, and the absolute value of the cooling slope is smaller than the heating slope in the figure. When the first molten pool is scanned, the middle point of the second molten pool is simultaneously influenced, the temperature is increased by about 200K, but the first heating hardly influences the third molten pool. When the laser scans to the midpoint of the second molten pool, the temperature of the first molten pool and the third molten pool is respectively increased by about 100K and 200K; when the laser sweeps to the middle point of the third molten pool, the temperature of the second molten pool rises by about 100K, but the first molten pool is not influenced.
The invention discloses a numerical simulation method for a laser powder bed melting process by using a lattice Boltzmann method based on Python, which has the key points that:
(1) based on a lattice Boltzmann method, Python self-programming is completely adopted, an iterative process is converted into array operation by means of Numpy, Math and other expansion packets, the calculation efficiency is improved by about 90 times compared with that of a 'for loop', a model composed of 150 multiplied by 50 grid points is taken as an example, under the condition of not adopting parallel operation, the CPU operation time on an Intel Xeon E5-2620 v4 sixteen-core computer is about 2h, and the calculation efficiency is obviously improved compared with that of a traditional method.
(2) And each physical quantity is normalized, and a physical unit is converted into a lattice unit, so that the operation stability is improved, and the operation efficiency can be improved to a certain extent.
(3) In the lattice Boltzmann method, D is used3Q15The model describes the evolution situation of the collision-transfer process in a specific space, and the calculation of the fluid flow and the temperature distribution is refined as much as possible.
(4) The influence of contour scanning on entity scanning in the processing process, the temperature field and the flow field at the corner of the laser are obtained through the method, and reference is provided for optimization of technological parameters.
The above description is only an example of the present invention and should not be taken as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A simulation method for carrying out a laser powder bed melting process by using a lattice Boltzmann method based on Python is characterized by comprising the following steps: the first step is as follows: establishing a 1.5mm multiplied by 0.5mm laser powder bed melting geometric model, and planning a scanning path; the second step is to divide the grid cells and initialize D3Q15A model; step three, dimensionless conversion and normalization processing are carried out on the thermal physical parameters, and matrix creation and initialization processing are carried out on each physical quantity; the fourth step: establishing a laser volume heat source model with energy attenuation along the z-axis direction and Gaussian distribution of an xy plane; the fifth step: adding energy and momentum boundary conditions; and a sixth step: using Python coupling iteration to solve an energy and momentum transfer equation based on a lattice Boltzman method to obtainDistribution functions to different locations at different times; the seventh step: and carrying out visualization processing on the obtained data, and drawing a time evolution graph of the temperature field and the flow field.
2. The method for simulating a laser powder bed melting process based on the lattice Boltzmann method for Python according to claim 1, wherein the first step is specifically performed as follows: establishing a single-layer multi-channel scanning model with 1.5mm multiplied by 0.5mm and contour scanning; wherein the length of the profile scanning line is 0.94mm, the length of the entity scanning line is 0.84mm, the light spot interval between the entity and the profile is 0.05mm, and the light spot interval between the entity scanning lines is 0.12 mm.
3. The method for simulating a laser powder bed melting process based on the lattice Boltzmann method for Python according to claim 1, wherein the second step is specifically performed as follows: dividing lattice units, wherein each lattice unit is a regular hexahedron with the side length of 10 mu m, 150 lattices in the x direction, 150 lattices in the y direction and 50 lattices in the z direction; in the lattice Boltzmann method, D is adopted in a three-dimensional model3Q15In the description of (1), wherein D3Representing three dimensions, Q15Representing that the movement can be performed in 15 directions 0-14, for D3Q15Weight ω that a distribution function may transfer to various directions after a collision in a modelαDirection of rotation cx,cy,czInitializing the matrix, and determining the weights in all directions according to the matrix equation required to be satisfied by the equilibrium distribution equation, wherein cx,cy,czThree one-dimensional matrices of 15 elements represent 15 different directions of motion, 0-14, by setting the combination of three values-1, 0,1, while D3Q15The weights for each direction of models 0-14 are 16/72, 8/72, 8/72, 8/72, 8/72, 8/72, 8/72, 1/72, 1/72, 1/72, 1/72, 1/72, 1/72, 1/72, 1/72, respectively.
4. The lattice Boltzmann square for Python according to claim 1Method for simulating the melting process of a laser powder bed, characterized in that the third step is carried out in particular according to the following method: setting the Rayleigh number
Figure FDA0002766605240000021
Prandtl number
Figure FDA0002766605240000022
Number of Stefan
Figure FDA0002766605240000023
Dynamic viscosity upsilon, solid phase heat capacity CρAnd liquid phase heat capacity CplIn which g is the acceleration of gravity (9.8 m/s)2) Beta is the coefficient of thermal expansion (1/K), lsIs the unit length (m) of the lattice, and upsilon is the dynamic viscosity (N.s/m)2) And α is the thermal diffusivity (m)2/s), Δ T is the temperature difference (K) between the liquidus temperature and the substrate temperature of the powdered material, TlIs powder material liquid phase line temperature (K), TsIs the solidus temperature (K), C of the powder materialplIs the liquid phase heat capacity (J/kg/K) of the powder material; initial density p for powder material0Solidus temperature TsLiquidus temperature TlThe evaporation temperature TvInitial temperature (room temperature) T0And substrate temperature TbPerforming a normalization process, wherein T0The normalized value is 0 and from this the latent heat L, the initial enthalpy h are obtained0Enthalpy of solid phase hsEnthalpy of liquid phase hlEnthalpy of vaporization hvA dimensionless value of (a); velocity v in x directionxVelocity v in y-directionyVelocity v in the z directionzEnthalpy h, temperature T, density ρ, liquid phase volume fraction fl, density distribution function fin, temperature distribution function gin, creating a matrix and initializing the matrix, wherein h is h after initialization0,ρ=ρ0,vx=vy=vz=0,fl=0,T=T0Fin and gin initialize the quality and enthalpy according to the weights different in 15 directions, and the density is set as rho in initialization0Temperature is set to T0
5. The method for simulating a laser powder bed melting process based on the lattice Boltzmann method for Python according to claim 1, wherein the fourth step is specifically performed according to the following method: a three-dimensional volume heat source model is compiled by using Python, the energy density of the model is in Gaussian distribution in the action range of a laser spot, and the model is attenuated along the z-axis direction:
Figure FDA0002766605240000024
in the formula, Δ z is the equivalent size (μm) of the laser energy unit, and the length of one lattice unit is 10 μm; f. ofΔzThe energy proportion of the unit lattices is different, the energy proportion of the unit lattices with different layers is different, but the sum of the energy proportion of the unit lattices is 1; q is laser power (W); r is the laser spot radius (mum); eta is the laser absorption rate; x is the abscissa (μm) of the laser action position; x is the number of0The starting abscissa (μm) as the position of laser action; y is the ordinate (μm) of the laser action position; y is0The starting ordinate (. mu.m) of the laser action position.
6. The method for simulating a laser powder bed melting process based on the lattice Boltzmann method for Python according to claim 1, wherein the fifth step is specifically performed according to the following method: adding momentum boundary conditions, setting the momentum boundary conditions of the upper surface acted on by the laser to be in unbalanced extrapolation format, and setting the rest five surfaces to be in rebound format, wherein the unbalanced extrapolation format is specific to the free interface, and the D3Q15In the model, five directions of 6,8,9,11 and 14 are set as the action directions of the unbalanced extrapolation format, and the density distribution function at the outermost boundary of the surface on the three-dimensional model is balanced by a second outer boundary balanced distribution function feqNon-equilibrium distribution function fneqAnd a density distribution function fin operation; meanwhile, the bounce format means that the momentum of the boundary condition at the boundary is transferred in the opposite direction, at D3Q15In the model, the directions 1,2,3,4,5,7,10 and 12 are set as the action directions of the rebound format, and momentum is transmitted to the boundary and is transmitted in the reverse direction of the original magnitude; adding energy boundariesAdding thermal conduction, thermal convection and radiation heat dissipation energy boundary conditions on the upper surface acted by the laser, and setting the energy boundary conditions of the other surfaces as thermal insulation, wherein the thermal conduction, thermal convection and radiation heat dissipation energy boundary conditions are as follows:
Figure RE-FDA0002935145040000031
kappa is the powder bed thermal conductivity (W/m/K); h iscIs the convective heat transfer coefficient (W/(m)2·K));σbIs a Stefan-Boltzmann constant with a value of 5.67X 10-8W/(m2·K4);T0Initial temperature, value 300K; t is the laser transient temperature (K); epsilon is the radiation emissivity; q. q.sinHeat input (W/m) absorbed for powder layer2)。
7. The method for simulating a laser powder bed melting process based on the lattice Boltzmann method for Python according to claim 1, wherein the sixth step is specifically performed according to the following method:
1) based on a lattice Boltzmann method, adopting Python language based on a traditional energy equation, introducing enthalpy change, latent heat and liquid phase volume fraction, simulating a phase change process from the angle of continuous change of energy, and compiling an energy conservation equation based on enthalpy change;
2) based on a lattice Boltzmann method, a momentum conservation equation containing buoyancy, surface tension and solid-liquid interfacial force is compiled by adopting Python language, wherein the buoyancy fb=ρβ(T-T0) g, rho is the material density (kg/m)3) G is the acceleration of gravity (m/s)2) Beta is thermal expansion coefficient (1/K); solid-liquid interfacial force
Figure RE-FDA0002935145040000032
Figure RE-FDA0002935145040000033
As the fluid velocity (m/s),
Figure RE-FDA0002935145040000034
is the speed at the interfaceDegree (m/s), flIs the liquid phase volume fraction, Δ t is the time step(s); surface tension:
Figure RE-FDA0002935145040000035
gamma is the surface tension coefficient (N/m) and kappa is the interfacial curvature (m)-1),
Figure RE-FDA0002935145040000036
Is a normal vector of the surface,
Figure RE-FDA0002935145040000037
the Marangoni effect caused by surface tension consisting of a surface tension coefficient with temperature as an independent variable is shown;
3) setting an initial time step k to 0 and a total simulated time step k to N,
Figure RE-FDA0002935145040000041
loading a Gaussian volume laser heat source according to a planned scanning route after processing parameters of profile scanning laser power (W), entity scanning laser power (W), profile scanning laser speed (mm/s), spot interval (mm) and profile and entity spot interval (mm) are set;
4) python program is initialized, the value brought by the program when the program just starts to run is the initial temperature T set by the third step0Initial velocity vx、vy、vzInitial enthalpy h0Initial density ρ0An initialization value of the physical quantity;
5) judging whether k reaches the last step, namely whether k is larger than N, if k is not larger than N, entering the main operation of the program: according to the calculation logic of 'collision-transfer' of a lattice Boltzmann method, firstly, a collision process is carried out, a density distribution function fin and an energy distribution function gin which cause changes under the influence of temperature, enthalpy, density, specific heat capacity, liquid phase volume fraction and external force items are obtained, then, a transfer process is carried out, finally, the distribution functions fin and gin are accumulated, a macroscopic velocity field and a temperature field in the machining process are obtained, and the macroscopic velocity field and the temperature field are continuously brought into an iterative execution 'collision-transfer' process until the operation is finished (k is greater than N).
8. The method for simulating a laser powder bed melting process based on the lattice Boltzmann method for Python according to claim 1, wherein the seventh step is specifically performed according to the following method: importing the calculated data into codes compiled based on Mayavi and Matplotlib macro packets, and outputting a group of operation results for visualization every 50 steps so as to obtain temperature field and flow field distribution images; and (4) sorting and marking the data, finishing the data processing of the simulation result, and analyzing the temperature field and the flow field of the contour and the entity laser scanning result.
CN202011235298.6A 2020-11-09 2020-11-09 Simulation method for carrying out laser powder bed melting process by using lattice Boltzmann method based on Python Active CN112528570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011235298.6A CN112528570B (en) 2020-11-09 2020-11-09 Simulation method for carrying out laser powder bed melting process by using lattice Boltzmann method based on Python

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011235298.6A CN112528570B (en) 2020-11-09 2020-11-09 Simulation method for carrying out laser powder bed melting process by using lattice Boltzmann method based on Python

Publications (2)

Publication Number Publication Date
CN112528570A true CN112528570A (en) 2021-03-19
CN112528570B CN112528570B (en) 2024-06-18

Family

ID=74979803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011235298.6A Active CN112528570B (en) 2020-11-09 2020-11-09 Simulation method for carrying out laser powder bed melting process by using lattice Boltzmann method based on Python

Country Status (1)

Country Link
CN (1) CN112528570B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113139314A (en) * 2021-04-29 2021-07-20 四川大学 Heat source numerical simulation method for laser additive manufacturing process
CN115213549A (en) * 2022-07-15 2022-10-21 广州大学 Multi-pass laser processing method, system, device and storage medium
CN116186809A (en) * 2023-04-26 2023-05-30 北京科技大学 Laser powder bed melting multichannel multilayer scanning simulation method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111062121A (en) * 2019-11-29 2020-04-24 西北工业大学 Powder melting numerical simulation method based on height function-lattice boltzmann method
CN111283192A (en) * 2020-01-22 2020-06-16 南京理工大学 Laser powder bed melting additive manufacturing molten pool monitoring and pore control method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111062121A (en) * 2019-11-29 2020-04-24 西北工业大学 Powder melting numerical simulation method based on height function-lattice boltzmann method
CN111283192A (en) * 2020-01-22 2020-06-16 南京理工大学 Laser powder bed melting additive manufacturing molten pool monitoring and pore control method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113139314A (en) * 2021-04-29 2021-07-20 四川大学 Heat source numerical simulation method for laser additive manufacturing process
CN113139314B (en) * 2021-04-29 2022-09-27 四川大学 Heat source numerical simulation method for laser additive manufacturing process
CN115213549A (en) * 2022-07-15 2022-10-21 广州大学 Multi-pass laser processing method, system, device and storage medium
CN115213549B (en) * 2022-07-15 2024-07-12 广州大学 Multi-pass laser processing method, system, device and storage medium
CN116186809A (en) * 2023-04-26 2023-05-30 北京科技大学 Laser powder bed melting multichannel multilayer scanning simulation method

Also Published As

Publication number Publication date
CN112528570B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
CN112528570A (en) Simulation method for laser powder bed melting process based on lattice Boltzmann method for Python
Cai et al. Physics-informed neural networks for heat transfer problems
Attarzadeh et al. Multi-objective optimization of TPMS-based heat exchangers for low-temperature waste heat recovery
Dao et al. Simulations of laser assisted additive manufacturing by smoothed particle hydrodynamics
Smolentsev et al. An approach to verification and validation of MHD codes for fusion applications
Moges et al. Hybrid modeling approach for melt-pool prediction in laser powder bed fusion additive manufacturing
Mesmoudi et al. A 2D mechanical–thermal coupled model to simulate material mixing observed in friction stir welding process
JP2004503005A (en) A homogeneous order method for fluid flow simulation
Bonner-Hutton et al. Analysis of gyroid heat exchangers for superconducting electric motors
Weber et al. Comparison of Shape Optimization Methods for Heat Exchanger Fins Using Computational Fluid Dynamics
Plankovskyy et al. Circular layout in thermal deburring
Xiao et al. An explicit coupled method of FEM and meshless particle method for simulating transient heat transfer process of friction stir welding
US20210117597A1 (en) Method and Apparatus for Automatic Underhood Thermal Modeling
Garg et al. Accelerated element-free Galerkin method for analysis of fracture problems
Potočnik et al. Genetic Algorithm-Based Framework for Optimization of Laser Beam Path in Additive Manufacturing
Hashemi et al. A physics-informed neural networks modeling with coupled fluid flow and heat transfer–Revisit of natural convection in cavity
Bänsch et al. Simulation and multi-objective optimization to improve the final shape and process efficiency of a laser-based material accumulation process
Sheu et al. Multiple states, topology and bifurcations of natural convection in a cubical cavity
Mirsajedi et al. A multizone moving mesh algorithm for simulation of flow around a rigid body with arbitrary motion
Liu et al. Vortex particle‐in‐cell method for three‐dimensional viscous unbounded flow computations
Wu et al. Performance analysis, modeling and prediction of a parallel multiblock lattice Boltzmann application using prophesy system
Liu et al. Gradient Smoothing Methods with Programming: Applications to Fluids and Landslides
CN113673177A (en) Grid void space identification and automatic seed setting detection
Ravi Casting solidification feed-path computation and industrial application
Bian et al. Scalability of Nek5000 on High-Performance Computing Clusters Toward Direct Numerical Simulation of Molten Pool Convection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant