Phase field simulation method and device based on physical constraint deep learning and electronic equipment
By incorporating physical equation constraints through an improved LSTM network and a physical constraint deep learning method, the problems of low computational efficiency in phase-field simulation and non-conservation in data-driven models are solved, achieving efficient and accurate prediction of material microstructure evolution, which is suitable for industrial applications of multi-material systems.
Patent Information
- Application Number
- CN202511052153.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-12-16
AI Technical Summary
Traditional phase-field methods are computationally inefficient and data-driven models do not conserve physical properties, limiting their industrial applications. Existing deep learning solutions cannot meet the needs of real-time optimization and multi-scale simulation.
A phase-field simulation method based on physical constraints deep learning is adopted. By using an improved LSTM network, a hybrid forward propagation strategy and a parameter coupling mechanism, a neural network is trained with a hybrid loss function and a split-path gradient backpropagation strategy, and physical equation constraints are embedded to achieve efficient and accurate prediction of the microstructure evolution of materials.
It achieves a 20-fold increase in phase-field simulation calculation efficiency, with prediction results strictly following physical laws, supporting rapid adaptation to multi-material systems, and meeting the needs of industrial applications.
Smart Images

Figure CN121145593A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial intelligent simulation and computational materials science, and particularly relates to a phase field simulation method and device based on physical constraint deep learning and an electronic equipment. BACKGROUND
[0002] The phase field method is a numerical simulation technology for studying the evolution of material microstructure, which avoids the problem of sharp interface tracking by introducing a diffuse interface treatment, but has the following inherent defects:
[0003] (1) Low computational efficiency. Traditional explicit solving needs to iteratively calculate nonlinear terms such as chemical potential and flux divergence terms. According to the measurement, a single time step takes 15.6 seconds per step on a 512x512 grid, and the total calculation time of high-resolution simulation (such as 1024x1024 grid) is more than 100 hours, which is difficult to meet the real-time optimization demand;
[0004] (2) Large memory resource consumption. The storage demand of global Jacobian matrix in three-dimensional simulation is huge, and usually needs to rely on supercomputing clusters, which limits its application in actual industrial scenarios.
[0005] In related technologies, deep learning is tried to be used to accelerate phase field calculation, but new problems are caused due to mismatch of physical laws: (1) In terms of violation of conservation law, the total amount of solute predicted by the pure data-driven LSTM (Long Short-Term Memory) model fluctuates greatly, which violates the law of conservation of mass, and leads to deviation of key morphological features such as dendrite growth direction and secondary dendrite spacing from the real evolution law; (2) In terms of parameter decoupling failure, key physical parameters such as mobility coefficient (M) and solute diffusion rate (D) are not coupled with the model architecture, which makes the same network unable to generalize to different alloy systems, and needs to be independently modeled for each material; (3) In terms of long-term prediction stability, the single-step prediction error accumulates exponentially with the iteration step length, and the mean square error of the phase field morphology after 10 steps exceeds 0.15, which cannot support the multi-scale simulation demand of the solidification process. More seriously, the existing model lacks sensitivity to physical quantities such as interface curvature and anisotropy strength, which leads to a prediction error of dendrite tip speed of more than 30%, which may cause catastrophic misjudgment in directional solidification and other process scenarios. The superimposed effect of this physical distortion and technical bottleneck makes the current deep learning acceleration scheme still limited to the laboratory verification stage, and has not yet formed an industrial-level solution.
[0006] Therefore, the traditional phase field method strictly follows the physical equation but is limited by high computing cost, and the pure data-driven model is significantly accelerated but is distorted due to the departure from the physical constraint, and the two cannot form a synergistic mechanism; meanwhile, the deep learning framework lacks mathematical embedding of differential operators such as gradient and divergence, so that the prediction result deviates from the essence of the phase field equation, and the mobility coefficient (M) and solute diffusion rate (D) and other key parameters are decoupled from the network structure, which cannot represent the coupling effect of multiple physical fields, and need to be solved urgently. SUMMARY
[0007] The application provides a phase field simulation method and device based on physical constraint deep learning and electronic equipment to solve the problems of low phase field simulation calculation efficiency and data-driven model physical non-conservation in related technologies.
[0008] The first aspect of the application provides a phase field simulation method based on physical constraint deep learning, comprising the following steps:
[0009] Obtaining the phase field parameters of the material to be predicted, wherein the phase field parameters include the initial phase field value, the initial material mobility tensor and the initial free energy density coefficient;
[0010] Inputting the initial phase field value, the initial material mobility tensor and the initial free energy density coefficient into a pre-trained prediction model to obtain the phase field simulation result of the material to be predicted, wherein the pre-trained prediction model is based on an improved LSTM network, a preset hybrid forward propagation strategy and a preset parameter coupling mechanism, and is trained by using a hybrid loss function and a split-path gradient backpropagation strategy to obtain a preset neural network.
[0011] According to one embodiment of the application, before obtaining the pre-trained prediction model based on the improved LSTM network, the preset hybrid forward propagation strategy and the preset parameter coupling mechanism, by using the hybrid loss function and the split-path gradient backpropagation strategy to train the preset neural network, it further comprises:
[0012] Obtaining input features with multiple dimensional tensors;
[0013] Based on the input features of the multiple dimensional tensors, the chemical potential distribution of the current time step is calculated in real time before the hidden state is updated;
[0014] Based on the chemical potential distribution calculation result, a preset flux constraint is applied after the forget gate activation function to complete the correction of the gating mechanism and obtain the improved LSTM network.
[0015] According to one embodiment of the application, the preset hybrid forward propagation strategy comprises:
[0016] Obtaining time series data related to the phase field equation;
[0017] extracting time-series features from the time-series data based on a preset standard ConvLSTM (Convolutional Long Short-Term Memory);
[0018] performing flux divergence calculation according to the time-series features to obtain a physical evolution correction result, and performing gradient clipping on the physical evolution correction result based on a preset stability stage strategy.
[0019] According to an embodiment of the present application, the preset stability stage strategy is:
[0020] φ t+1 = clip(φ t+1 , -0.2, 1.2);
[0021] wherein φ t+1 is a phase field order parameter at time step t+1.
[0022] According to an embodiment of the present application, the preset parameter coupling mechanism comprises:
[0023] determining the preset parameter coupling mechanism based on a preset mobility dynamic injection strategy and a preset free energy parameter adaptive strategy, wherein,
[0024] the preset mobility dynamic injection strategy is:
[0025] M eff = M·(1+∈·tanh(AvgPool(H t )));
[0026] wherein AvgPool is an average pooling operation to extract macro statistical features of hidden state H t ; the tanh function ensures that the parameter perturbation range is controllable; M eff is an effective mobility tensor (containing spatial modulation); ∈ is a learnable coupling coefficient; and M is a material mobility tensor.
[0027] the preset free energy parameter adaptive strategy is:
[0028] κ eff = κ·σ(W κ ·MaxPool(H t ));
[0029] wherein W κ is a learnable weight matrix; MaxPool is a maximum pooling operation; k is a free energy density coefficient; and σ is a Sigmoid activation function.
[0030] According to the phase field simulation method based on physical constraint deep learning provided in the embodiments of the present application, the phase field parameters of a material to be predicted are obtained, including initial phase field values, initial material mobility tensors and initial free energy density coefficients, and the phase field parameters are input into a pre-trained prediction model, so as to obtain a phase field simulation result of the material to be predicted, wherein the pre-trained prediction model is based on an improved LSTM network, a preset hybrid forward propagation strategy and a preset parameter coupling mechanism, and is obtained by training a preset neural network by using a hybrid loss function and a split-path gradient back propagation strategy. Thus, the problems of low phase field simulation calculation efficiency and physical non-conservation of data-driven models in the related art are solved, the physical equation constraint is embedded into the neural network through a hybrid model architecture, and efficient and accurate prediction of material microstructure evolution is realized.
[0031] The second aspect of the embodiments of the present application provides a phase field simulation device based on physical constraint deep learning, comprising:
[0032] The acquisition module is configured to acquire phase field parameters of a material to be predicted, wherein the phase field parameters include initial phase field values, initial material mobility tensors and initial free energy density coefficients.
[0033] The prediction module is configured to input the initial phase field values, the initial material mobility tensors and the initial free energy density coefficients into a pre-trained prediction model, so as to obtain a phase field simulation result of the material to be predicted, wherein the pre-trained prediction model is based on an improved LSTM network, a preset hybrid forward propagation strategy and a preset parameter coupling mechanism, and is obtained by training a preset neural network by using a hybrid loss function and a split-path gradient back propagation strategy.
[0034] According to an embodiment of the present application, before the pre-trained prediction model is obtained by training a preset neural network by using a hybrid loss function and a split-path gradient back propagation strategy based on an improved LSTM network, a preset hybrid forward propagation strategy and a preset parameter coupling mechanism, the prediction module further comprises:
[0035] The first acquisition unit is configured to acquire input features of a plurality of dimensional tensors.
[0036] The calculation unit is configured to calculate a chemical potential distribution of a current time step in real time before updating a hidden state based on the input features of the plurality of dimensional tensors.
[0037] The correction unit is configured to apply a preset flux constraint after a forgetting gate activation function based on a chemical potential distribution calculation result, so as to complete correction of a gating mechanism, and obtain the improved LSTM network.
[0038] According to an embodiment of the present application, the prediction module comprises:
[0039] The second acquisition unit is used to acquire time series data related to the phase field equation;
[0040] The extraction unit is used to extract time-series features based on the time-series data using a preset standard ConvLSTM.
[0041] The gradient limiting unit is used to calculate flux divergence based on the time-series characteristics, obtain physical evolution correction results, and perform gradient limiting on the physical evolution correction results based on a preset stability stage strategy.
[0042] According to one embodiment of this application, the preset stability phase strategy is as follows:
[0043] φ t+1 =clip(φ t+1 (, -0.2, 1.2);
[0044] Where, φ t+1 For time step t+1, the phase field sequence parameter is t+1.
[0045] According to one embodiment of this application, the preset parameter coupling mechanism includes:
[0046] The determining unit is used to determine the preset parameter coupling mechanism based on a preset mobility dynamic injection strategy and a preset free energy parameter adaptive strategy, wherein,
[0047] The preset mobility dynamic injection strategy is as follows:
[0048] M eff =M·(1+∈·tanh(AvgPool(H) t )));
[0049] Where AvgPool is the average pooling operation used to extract the hidden state H. t Macroscopic statistical characteristics; the tanh function ensures that the parameter perturbation range is controllable; M eff ∈ is the effective mobility tensor (including spatial modulation); ∈ is the learnable coupling coefficient; M is the material mobility tensor;
[0050] The preset free energy parameter adaptive strategy is as follows:
[0051] κ eff =κ·σ(W κ ·MaxPool(H t ));
[0052] Among them, W κ σ is the learnable weight matrix; MaxPool is the max pooling operation; k is the free energy density coefficient; σ is the sigmoid activation function.
[0053] According to the phase-field simulation device based on physically constrained deep learning according to the embodiments of this application, the phase-field parameters of the material to be predicted are obtained, including the initial phase-field value, the initial material mobility tensor, and the initial free energy density coefficient. These phase-field parameters are then input into a pre-trained prediction model to obtain the phase-field simulation results of the material. The pre-trained prediction model is based on an improved LSTM network, a preset hybrid forward propagation strategy, and a preset parameter coupling mechanism. It is trained using a hybrid loss function and a multi-path gradient backpropagation strategy to obtain the preset neural network. This solves the problems of low computational efficiency in phase-field simulation and lack of physical conservation in data-driven models in related technologies. By embedding physical equation constraints into the neural network through a hybrid model architecture, efficient and accurate prediction of the microstructure evolution of materials is achieved.
[0054] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the phase-field simulation method based on physically constrained deep learning as described in the above embodiments.
[0055] A fourth aspect of this application provides a computer-readable storage medium storing computer instructions for causing the computer to perform the phase-field simulation method based on physically constrained deep learning as described in the above embodiments.
[0056] A fifth aspect of the present invention provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the phase-field simulation method based on physical constraint deep learning as described in the above embodiments.
[0057] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0058] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0059] Figure 1 This is a flowchart of a phase-field simulation method based on physically constrained deep learning provided according to an embodiment of this application;
[0060] Figure 2 This is a flowchart illustrating the overall solution according to one embodiment of this application;
[0061] Figure 3 This is a flowchart illustrating the implementation of a convolution kernel according to an embodiment of this application;
[0062] Figure 4This is a schematic diagram comparing the actual phase field and the predicted phase field according to an embodiment of this application;
[0063] Figure 5 This is an example diagram of a phase-field simulation device based on physically constrained deep learning according to an embodiment of this application;
[0064] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0065] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0066] The following description, with reference to the accompanying drawings, describes a phase-field simulation method, apparatus, and electronic device based on physically constrained deep learning according to embodiments of this application. Addressing the problems of low computational efficiency and physical non-conservation in data-driven models in related technologies mentioned in the background, this application provides a phase-field simulation method based on physically constrained deep learning. In this method, phase-field parameters of the material to be predicted are obtained, including initial phase-field values, initial material mobility tensor, and initial free energy density coefficient. These phase-field parameters are then input into a pre-trained prediction model to obtain the phase-field simulation results of the material. The pre-trained prediction model is based on an improved LSTM network, a preset hybrid forward propagation strategy, and a preset parameter coupling mechanism. It is trained using a hybrid loss function and a multi-path gradient backpropagation strategy to obtain a preset neural network. This solves the problems of low computational efficiency and physical non-conservation in data-driven models in related technologies. By embedding physical equation constraints into the neural network through a hybrid model architecture, efficient and accurate prediction of the microstructure evolution of materials is achieved.
[0067] Specifically, Figure 1 This is a flowchart illustrating a phase-field simulation method based on physically constrained deep learning, as provided in an embodiment of this application.
[0068] like Figure 1 As shown, this phase-field simulation method based on physically constrained deep learning includes the following steps:
[0069] In step S101, the phase field parameters of the material to be predicted are obtained, including the initial phase field value, the initial material mobility tensor, and the initial free energy density coefficient.
[0070] The material to be predicted can be selected by those skilled in the art based on actual prediction needs, such as various alloys including aluminum, magnesium, and copper, without being specifically limited here.
[0071] Specifically, such as Figure 2 As shown, existing technologies suffer from a disconnect between physical modeling and data-driven methods, resulting in problems such as low efficiency in phase-field simulation and non-conservation of physical properties in data-driven models. Therefore, this application embodiment achieves efficient and accurate prediction of the microstructure evolution of the material to be predicted through a physics-guided deep learning architecture. This requires further prediction based on the phase-field parameters of the material to be predicted, including the initial phase-field value, the initial material mobility tensor, and the initial free energy density coefficient.
[0072] In step S102, the initial phase field value, initial material mobility tensor, and initial free energy density coefficient are input into the pre-trained prediction model to obtain the phase field simulation results of the material to be predicted. The pre-trained prediction model is based on the improved LSTM network, the preset hybrid forward propagation strategy, and the preset parameter coupling mechanism. It is obtained by training the preset neural network using the hybrid loss function and the split path gradient backpropagation strategy.
[0073] According to one embodiment of this application, before training a pre-trained prediction model using a hybrid loss function and a path gradient backpropagation strategy based on an improved LSTM network, a preset hybrid forward propagation strategy, and a preset parameter coupling mechanism, the method further includes: acquiring input features with multi-dimensional tensors; calculating the chemical potential distribution at the current time step in real time based on the input features of the multi-dimensional tensors before updating the hidden state; and applying a preset flux constraint after the forget gate activation function based on the chemical potential distribution calculation result to complete the gating mechanism correction and obtain the improved LSTM network.
[0074] The preset hybrid forward propagation strategy and the preset parameter coupling mechanism can be selected by those skilled in the art according to actual prediction needs, and no specific limitations are imposed.
[0075] Specifically, traditional LSTM networks mainly rely on statistical features of data in time series prediction. However, in scenarios with strong physical constraints such as phase field dynamics, pure data-driven methods are prone to producing prediction results that violate the laws of thermodynamics (such as mass non-conservation and abnormal energy dissipation). Therefore, firstly, it is necessary to modify the LSTM unit structure to directly encode the physical rules of the phase field equation into the neural network computation graph, so as to achieve deep integration of mechanism and data.
[0076] Specifically, since the input of a traditional LSTM only contains the phase field value φ tSince the spatial distribution characteristics of material parameters cannot be perceived, this embodiment requires input feature expansion, i.e., obtaining input features with multiple dimensions, such as using mobility M and free energy coefficient κ as additional channel inputs to form three-dimensional tensor input features. This enables the network to learn parameter-sensitive dynamic evolution laws, such as the physical characteristics of accelerated phase separation in high mobility regions. The specific formula can be expressed as:
[0077]
[0078] Where H and W are the height and width of the spatial grid (in pixels), respectively; φ t M is the phase field order parameter at time step (t) (range [0, 1]); M is the material mobility tensor (unit: m). 2 / (s·mol)); κ is the free energy density coefficient (unit: J·m). 2 / mol).
[0079] Furthermore, since the chemical potential is the driving force of phase field evolution, μ is calculated in advance. t This provides a prerequisite for subsequent physical corrections, avoids resource waste caused by repeated calculations, and ensures that subsequent predictions conform to physical laws. Therefore, based on the input features of the multi-dimensional tensors obtained above, the chemical potential distribution at the current time step needs to be calculated in real time before updating the hidden state, such as... Figure 3 As shown, the discrete Laplacian operator La is implemented using a convolution kernel, and the specific formula can be expressed as:
[0080]
[0081] Where, μ t Δx represents the chemical potential field (unit: J / mol); Δx represents the spatial dispersive step size (unit: m); (i, j) represents the coordinate index of the two-dimensional grid; La(φ) i,j For phase field sequence parameter φ t The discrete Laplace operator, whose physical essence is the curvature energy density of the phase interface; φ i+1,j φ is the phase field order parameter (dimensionless, 0 = liquid phase, 1 = solid phase) at position (i+1, j) in the two-dimensional grid; i-1,j φ is the phase field order parameter at position (i-1, j) in the two-dimensional grid; i,j+1 φ is the phase field order parameter at position (i, j+1) in the two-dimensional grid; i,j-1 φ is the phase field order parameter at position (i, j-1) in the two-dimensional grid; i,j The phase field order parameter at position (i, j) in the dimensional grid.
[0082] Furthermore, when the chemical potential gradient When the value is large (e.g., due to drastic phase boundary changes), the exponential decay term will suppress the opening degree of the forget gate. In this case, forget gate enhancement is required. That is, based on the chemical potential distribution calculation results, a preset flux constraint is applied after the forget gate activation function to force the LSTM network to retain more historical state information, thereby completing the gating mechanism correction and finally obtaining an improved LSTM network. This avoids prediction instability caused by physical abrupt changes. Its expression is:
[0083]
[0084] Among them, f t σ is the output tensor of the forget gate; W is the sigmoid activation function; f b is the weight matrix of the forget gate; f For the forgetting gate bias term; |·|2 is the L2 norm (used to quantify the chemical potential gradient strength); H t-1 The hidden state of the LSTM at the previous time step t-1 stores the temporal characteristics of the historical phase field evolution; X t The input features (dimension: m×1) for the previous time step t include: phase field value φ t And material parameters M, κ.
[0085] According to one embodiment of this application, a preset hybrid forward propagation strategy includes: acquiring time series data related to the phase-field equation; extracting time series features based on the time series data using a preset standard ConvLSTM; calculating flux divergence based on the time series features to obtain physical evolution correction results; and applying gradient limiting to the physical evolution correction results based on a preset stability stage strategy.
[0086] Specifically, since the physical information neural network in related technologies only applies physical constraints through the loss function, the training efficiency is low and it is difficult to meet the hard real-time requirements. Therefore, the embodiments of this application innovatively embed the explicit discrete steps of the phase-field equation into the forward propagation to form a two-stage computing architecture of "data prediction + physical correction".
[0087] Specifically, firstly, time-series data related to the phase-field equations are acquired, and based on a pre-defined standard ConvLSTM, temporal features are extracted from the time-series data. Compared to fully connected networks, the local sensing characteristics of ConvLSTM are more suitable for the spatial correlation characteristics of phase-field evolution, such as short-range interactions of grain boundary migration. Therefore, preliminary prediction results can be output using ConvLSTM, the expression of which is:
[0088]
[0089] Secondly, flux divergence is calculated based on time series characteristics, and physical evolution correction is performed to obtain the physical evolution correction result. This ensures that the prediction results not only have good time series prediction capabilities but also strictly follow physical laws. The expression for flux divergence calculation is as follows:
[0090]
[0091] in, The chemical potential gradient, gradient and divergence This can be achieved using a differentiable operator, where the gradient kernel is:
[0092]
[0093] Divergence kernel:
[0094]
[0095] Where Δt is the time interval from the walk (unit: s); Calculate the convolution kernel for the gradient in the x-direction; Calculate the convolution kernel for the gradient in the y-direction (structure and) (Transpose symmetry)
[0096] Finally, based on the preset stability stage strategy, gradient limiting is applied to the physical evolution correction results to obtain the preset hybrid forward propagation strategy, wherein the preset stability stage strategy expression is:
[0097] φ t+1 =clip(φ t+1 (, -0.2, 1.2);
[0098] Where, φ t+1 The phase field order parameter at time step t+1 is used to describe the phase distribution of the material. The theoretical range of its value should be [0, 1] (0 represents pure solid phase, 1 represents pure liquid phase), but in actual calculations, slight overshoot is allowed to maintain numerical stability. φmin = -0.2, φmax = 1.2: empirical thresholds, allowing 10% overshoot to avoid numerical oscillations; the cutoff threshold is calibrated by the material thermodynamic data (such as the stability range of the β phase of titanium alloys).
[0099] According to one embodiment of this application, the preset parameter coupling mechanism includes: determining the preset parameter coupling mechanism based on a preset mobility dynamic injection strategy and a preset free energy parameter adaptive strategy.
[0100] Specifically, such as Figure 2As shown, since material parameters (such as mobility M) in industrial scenarios often change due to fluctuations in process conditions, traditional hard-coding methods require retraining the model and cannot meet the requirements of online control. Therefore, this application embodiment uses a dynamic parameter injection mechanism to enable the model to have rapid adaptability across material systems.
[0101] First, dynamic mobility injection is performed, expanding the scalar parameter (M) into a spatially adaptive tensor, allowing the model to automatically adjust according to different process conditions. The preset dynamic mobility injection strategy is as follows:
[0102] M eff =M·(1+∈·tanh(AvgPool(H) t )));
[0103] Wherein, AvgPool is the average pooling operation (window size 3×3), which extracts the hidden state H. t Macroscopic statistical characteristics; the tanh function ensures that the parameter perturbation range is controllable; M eff is the effective mobility tensor (including spatial modulation); ∈ is the learnable coupling coefficient (initial value 0.1).
[0104] Secondly, an attention mechanism is used to adjust the free energy parameter to improve the model's adaptability to different material systems. The preset free energy parameter adaptive strategy is as follows:
[0105] κ eff =κ·σ(W κ ·MaxPool(H t ));
[0106] Among them, W κ κ is the learnable weight matrix (256×1); MaxPool is the max pooling operation (window size 5×5), used to capture the local features in the hidden state that have the most significant impact on the interface energy; κ is the free energy density coefficient (unit: J·m). 2 / mol); σ is the Sigmoid activation function.
[0107] Furthermore, since traditional single loss functions are difficult to balance data accuracy and physical rationality, in order to ensure that the LSTM model can adhere to physical rules while maintaining high accuracy and improving overall performance, the embodiments of this application are based on a hybrid loss function and a multi-path gradient backpropagation strategy to achieve synergistic optimization of physical constraints and data features.
[0108] Specifically, first, a hybrid loss function is defined, which combines data accuracy and physical plausibility, and balances the relationship between the two by dynamically adjusting the weighting coefficients. This can be expressed as:
[0109]
[0110] Among them, the weight adjustment is set at (λ = 0.1) in the initial training stage and gradually increased to (λ = 1.0) in the later stage, so that the network first fits the data distribution and then strengthens the physical consistency. λ is the physical loss weight coefficient (dynamic adjustment range 0.1-1.0); T is the total number of time steps of the training sequence. The phase field value predicted by the model (time step t); This represents the true phase field value; To measure the gradient of chemical potential.
[0111] Secondly, network parameters are optimized from the data loss path and physical residual path respectively to ensure that the final model can accurately fit the data and meet the physical consistency requirements. The data loss path refers to optimizing the temporal feature extraction capability through backpropagation of LSTM units and calculating automatic differentiation. The physical residual path refers to improving the discretization accuracy of the equations by optimizing the parameters of the physical correction module and directly calculating... in, Indicates the loss of data items. This represents the loss of the physics term, thereby ensuring that the LSTM model can adhere to the physics rules while maintaining high accuracy, thus improving overall performance.
[0112] Therefore, based on the improved LSTM network obtained above, the preset hybrid forward propagation strategy and the preset parameter coupling mechanism, the preset neural network is trained using the hybrid loss function and the split-path gradient backpropagation strategy to obtain the prediction model.
[0113] Furthermore, to verify the prediction accuracy and physical rationality of the LSTM model, the embodiments of this application can visualize the comparison system and achieve quantitative and qualitative dual evaluation through the following dimensions.
[0114] Specifically, firstly, spatial distribution comparison is performed, that is, the predicted result φpred is compared with the true value φtrue pixel by pixel to intuitively evaluate the accuracy of the model; secondly, key indicators are calculated, automatically generating quantitative indicators such as MSE (Mean Squared Error), SSIM (Structural Similarity Index Measure), and mass conservation rate; finally, the quantitative indicators are calculated, and the phase-field simulation results of the material to be predicted are output, such as... Figure 4 As shown, the measured MSE = 0.0032 and SSIM = 0.961, proving that the model has excellent accuracy in predicting dendrite morphology. The specific expression is as follows:
[0115]
[0116] Where C1 = (0.01L) 2 C2==(0.03L) 2 Dynamic range L = 2; MSE is mean squared error (quantifying the pixel-level difference between two images in the figure); SSIM is structural similarity index (evaluating the similarity of petal morphology in the figure); H, W is image height / width (in the figure, H = W = 500 pixels); μ true This is the mean of the true phase field (corresponding to the global average value of the left image in the figure); Let (i, j) be the predicted phase field value for grid point (i, j). Let be the true phase field value of grid point (i, j).
[0117] To facilitate a better understanding of the technical solution of this application by those skilled in the art, the following description will be provided in conjunction with specific embodiments:
[0118] 1. Simulation parameter configuration:
[0119] This simulation focuses on the solidification process, with the following key parameters set: the initial solute concentration c0 of the system is 7.8 wt.%; the mobility M, which describes the atomic diffusion rate, is set to 1.5 × 10⁻⁶. -15 m 2 / (s·mol), while the free energy density coefficient κ, which determines the interfacial capacity, is set to 3.2×10. -7 J·m 2 / mol; In terms of numerical calculation, the spatial discretization accuracy is achieved through a spatial step size Δx of 0.45μm, and a 512×512 element grid is constructed accordingly to define the computational domain; the temporal discretization adopts a time step size Δt of 0.12ms, and the total duration of the entire simulation coverage is 1.5 seconds.
[0120] 2. Phase-field evolution process:
[0121] (1) Initial field generation:
[0122] 1) Initial phase field: The initial state φ (t=0) of the phase field φ at any point (x, y) is expressed as:
[0123]
[0124] Where, A0 = 0.8 (initial amplitude), N p =6 (number of dendrites), ∈0 represents Gaussian white noise with an amplitude of 0.1.
[0125] 2) Solute field distribution: Sinusoidal concentration fluctuations are introduced to simulate compositional fluctuations in the melt.
[0126]
[0127] (2) LSTM prediction stage:
[0128] Feature tensor construction: The phase field order parameter φ t The mobility M and free energy density coefficient κ are concatenated along the channel dimension to form a 512×512×3 three-dimensional tensor, which serves as the input X for the current time step. t ,
[0129] 1) Input dimensions: 512×512×3 (φ t ,M,κ);
[0130] 2) Real-time calculation of chemical potential: Before updating the hidden state, the chemical potential field is calculated in real time using the current input, serving as the basis for subsequent physical constraints. The specific calculation formula is as follows:
[0131]
[0132] The discrete Laplacian operator is implemented using a fixed 3x3 convolution kernel, and its form is as follows:
[0133]
[0134] 3) Physical constraint gating: To prevent the loss of too much historical information in regions of drastic phase change (i.e. regions with large chemical potential gradients), continuous physical constraints are applied to the forget gate for correction.
[0135] 3. Physical calibration module:
[0136] (1) Adaptive parameter adjustment:
[0137] 1) Mobility space modulation: To enable the model to perceive local dynamic changes, the hidden state H is used. t The effective mobility is dynamically adjusted, where AvgPool is used to extract macroscopic statistical features of the hidden state, and ∈ is a learnable coupling coefficient. In this simulation, its final learned value is 0.18. The specific calculation formula is as follows:
[0138] M eff =M·(1+∈·tanh(AvgPool(H) t )));
[0139] 2) Free energy coefficient optimization: Adaptive strategy, which can be achieved through a learnable weight matrix W. κ To dynamically optimize the free energy coefficient, MaxPool is used to capture the local features that have the most significant impact on the interface energy in the hidden state, and σ is the Sigmoid activation function, calculated as follows:
[0140] κ eff =κ·σ(W κ ·MaxPool(H t));
[0141] (2) Flux correction calculation (this step ensures that evolution strictly follows the law of conservation of mass), the calculation process is corrected to a physically correct two-step method:
[0142] 1) Calculation of flux field (J): First, the flux term is calculated by applying the gradient operator (implemented via a central difference convolution kernel) to the chemical potential field μt:
[0143]
[0144] 2) Calculate flux divergence Secondly, the divergence operator (also implemented through a convolution kernel) is applied to the flux field J to obtain the rate of change of the substance concentration;
[0145] 3) Update the phase field: Add the calculated physical correction term to the ConvLSTM prediction result, as shown in the following formula:
[0146]
[0147] (3) Stability treatment:
[0148] 1) Phase field value truncation: To maintain the stability of numerical calculation, the updated phase field values are truncated to a reasonable range φ∈[-0.2,1.2];
[0149] 2) Solute field update: Based on the changes in the phase field, the solute field is updated synchronously to satisfy solute conservation, where c max and c min Let be the solute concentrations in the solid and liquid phases at equilibrium, respectively, and be a known material constant. The specific calculation formula is as follows:
[0150] c t+1 =c t +(φ t -φ t+1 )·(c max -c min );
[0151] (4) Verification results:
[0152] Accuracy Verification: The prediction accuracy of the model is quantitatively evaluated by comparing it with the high-precision solution results of the traditional finite element method.
[0153] 1) Visual comparison: such as Figure 4 As shown, the phase field predicted by the model is highly consistent with the real phase field in key features such as dendrite morphology, growth direction and secondary arm spacing.
[0154] 2) Quantitative indicators:
[0155] Mean squared error (MSE): 0.0032, far below the common threshold of 0.01, indicating extremely low pixel-level error;
[0156] Structural similarity (SSIM): 0.961, which is above the excellent threshold of 0.92, proving that the model perfectly reproduces the complex structure of dendrites.
[0157] In summary, based on the problems existing in the related technologies, the embodiments of this application propose three innovative technical features: (1) Physically constrained hybrid architecture: the phase field evolution trend is quickly predicted by LSTM network, and then the mass / energy conservation law is forced to be satisfied by physical correction module, so as to achieve the unity of computational efficiency and physical accuracy. Taking the 512×512 grid system as an example, the calculation time of a single time step is greatly reduced from 15.6 seconds of the traditional finite element method to 800 milliseconds, and the efficiency is improved by 20 times.
[0158] (2) Differential operator hard coding technique: innovative gradient embedding divergence The numerical discrete form of the equal differential operator (central difference template) is forced to satisfy the law of conservation of mass, and a neural network with strict mathematical constraints is constructed to ensure that the prediction results strictly satisfy the phase field control equation. On the other hand, through stability truncation and gradient limiting techniques, the prediction accuracy is strictly guaranteed through a dual mechanism.
[0159] (3) Multi-parameter dynamic coupling mechanism: Through the dynamic parameter coupling mechanism, the mobility coefficient (M) and other physical property parameters are used as dynamic input nodes to control the phase field flux in real time. The network weight is controlled in real time through the flux calculation layer, so that the single model can be generalized to different alloy systems and process conditions such as Al, Mg, and Cu without repeated training.
[0160] According to the phase-field simulation method based on physically constrained deep learning in this application, the phase-field parameters of the material to be predicted are obtained, including the initial phase-field value, the initial material mobility tensor, and the initial free energy density coefficient. These phase-field parameters are then input into a pre-trained prediction model to obtain the phase-field simulation results of the material. The pre-trained prediction model is based on an improved LSTM network, a preset hybrid forward propagation strategy, and a preset parameter coupling mechanism. It is trained using a hybrid loss function and a multi-path gradient backpropagation strategy to obtain the preset neural network. This solves the problems of low computational efficiency in phase-field simulation and lack of physical conservation in data-driven models in related technologies. By embedding physical equation constraints into the neural network through a hybrid model architecture, efficient and accurate prediction of the microstructure evolution of materials is achieved.
[0161] Next, referring to the accompanying drawings, a phase-field simulation device based on physically constrained deep learning proposed according to an embodiment of this application is described.
[0162] Figure 5This is a block diagram of a phase-field simulation device based on physical constraint deep learning according to an embodiment of this application.
[0163] like Figure 5 As shown, the phase-field simulation device 10 based on physical constraint deep learning includes: an acquisition module 100 and a prediction module 200.
[0164] The acquisition module 100 is used to acquire the phase field parameters of the material to be predicted, including the initial phase field value, the initial material mobility tensor, and the initial free energy density coefficient.
[0165] The prediction module 200 is used to input the initial phase field value, the initial material mobility tensor and the initial free energy density coefficient into the pre-trained prediction model to obtain the phase field simulation results of the material to be predicted. The pre-trained prediction model is based on the improved LSTM network, the preset hybrid forward propagation strategy and the preset parameter coupling mechanism, and is obtained by training the preset neural network using the hybrid loss function and the split path gradient backpropagation strategy.
[0166] According to one embodiment of this application, before training a pre-trained prediction model using a hybrid loss function and a path gradient backpropagation strategy based on an improved LSTM network, a preset hybrid forward propagation strategy, and a preset parameter coupling mechanism, the prediction module 200 further includes:
[0167] The first acquisition unit is used to acquire input features with multi-dimensional tensors;
[0168] The computational unit is used to calculate the chemical potential distribution at the current time step in real time before the hidden state is updated, based on the input features of multi-dimensional tensors.
[0169] The correction unit is used to apply a preset flux constraint after the forget gate activation function based on the chemical potential distribution calculation results, so as to complete the gating mechanism correction and obtain the improved LSTM network.
[0170] According to one embodiment of this application, the prediction module 200 includes:
[0171] The second acquisition unit is used to acquire time series data related to the phase field equation;
[0172] The extraction unit is used to extract time-series features from time-series data based on a preset standard ConvLSTM.
[0173] The gradient limiting unit is used to calculate flux divergence based on temporal characteristics, obtain physical evolution correction results, and perform gradient limiting on the physical evolution correction results based on a preset stability stage strategy.
[0174] According to one embodiment of this application, the preset stability phase strategy is as follows:
[0175] φ t+1 =clip(φ t+1 (, -0.2, 1.2);
[0176] Where, φ t+1 For time step t+1, the phase field sequence parameter is t+1.
[0177] According to one embodiment of this application, the preset parameter coupling mechanism includes:
[0178] The determining unit is used to determine a preset parameter coupling mechanism based on a preset mobility dynamic injection strategy and a preset free energy parameter adaptive strategy, wherein...
[0179] The preset migration rate dynamic injection strategy is as follows:
[0180] M eff =M·(1+∈·tanh(AvgPool(H) t )));
[0181] Where AvgPool is the average pooling operation used to extract the hidden state H. t Macroscopic statistical characteristics; the tanh function ensures that the parameter perturbation range is controllable; M eff ∈ is the effective mobility tensor (including spatial modulation); ∈ is the learnable coupling coefficient; M is the material mobility tensor;
[0182] The preset adaptive strategy for free energy parameters is as follows:
[0183] k eff =κ·σ(W κ ·MaxPool(H t ));
[0184] Among them, W κ is the learnable weight matrix; MaxPool is the max pooling operation; κ is the free energy density coefficient; σ is the sigmoid activation function.
[0185] According to the phase-field simulation device based on physically constrained deep learning according to the embodiments of this application, the phase-field parameters of the material to be predicted are obtained, including the initial phase-field value, the initial material mobility tensor, and the initial free energy density coefficient. These phase-field parameters are then input into a pre-trained prediction model to obtain the phase-field simulation results of the material. The pre-trained prediction model is based on an improved LSTM network, a preset hybrid forward propagation strategy, and a preset parameter coupling mechanism. It is trained using a hybrid loss function and a multi-path gradient backpropagation strategy to obtain the preset neural network. This solves the problems of low computational efficiency in phase-field simulation and lack of physical conservation in data-driven models in related technologies. By embedding physical equation constraints into the neural network through a hybrid model architecture, efficient and accurate prediction of the microstructure evolution of materials is achieved.
[0186] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:
[0187] The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.
[0188] When the processor 602 executes the program, it implements the phase-field simulation method based on physical constraint deep learning provided in the above embodiments.
[0189] Furthermore, electronic devices also include:
[0190] Communication interface 603 is used for communication between memory 601 and processor 602.
[0191] The memory 601 is used to store computer programs that can run on the processor 602.
[0192] The memory 601 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0193] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation,Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0194] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0195] The processor 602 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0196] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described phase-field simulation method based on physical constraint deep learning.
[0197] This application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the phase-field simulation method based on physical constraint deep learning as described in the above embodiments.
[0198] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0199] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0200] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0201] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0202] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0203] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.
[0204] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0205] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A phase-field simulation method based on physically constrained deep learning, characterized in that, Includes the following steps: Obtain the phase field parameters of the material to be predicted, wherein the phase field parameters include the initial phase field value, the initial material mobility tensor, and the initial free energy density coefficient; The initial phase field value, the initial material mobility tensor, and the initial free energy density coefficient are input into the pre-trained prediction model to obtain the phase field simulation results of the material to be predicted. The pre-trained prediction model is based on an improved LSTM network, a preset hybrid forward propagation strategy, and a preset parameter coupling mechanism. It is obtained by training a preset neural network using a hybrid loss function and a path gradient backpropagation strategy.
2. The method according to claim 1, characterized in that, Before obtaining the pre-trained prediction model by training a pre-defined neural network using a hybrid loss function and a path gradient backpropagation strategy based on an improved LSTM network, a pre-defined hybrid forward propagation strategy, and a pre-defined parameter coupling mechanism, the process further includes: Obtain input features with multi-dimensional tensors; Based on the input features of the multi-dimensional tensors, the chemical potential distribution at the current time step is calculated in real time before the hidden state is updated. Based on the chemical potential distribution calculation results, a preset flux constraint is applied after the forget gate activation function to complete the gating mechanism correction and obtain the improved LSTM network.
3. The method according to claim 1, characterized in that, The preset hybrid forward propagation strategy includes: Obtain time-series data related to the phase-field equation; Based on a preset standard ConvLSTM, temporal features are extracted from the time-series data; Flux divergence is calculated based on the time-series characteristics to obtain physical evolution correction results, and gradient limiting is applied to the physical evolution correction results based on a preset stability stage strategy.
4. The method according to claim 3, characterized in that, The preset stability phase strategy is as follows: f t+1 =clip(φ t+1 ,-0.2,1.2); Where, φ t+1 For time step t+1, the phase field sequence parameter is t+1.
5. The method according to claim 1, characterized in that, The preset parameter coupling mechanism includes: The preset parameter coupling mechanism is determined based on a preset mobility dynamic injection strategy and a preset free energy parameter adaptive strategy, wherein, The preset mobility dynamic injection strategy is as follows: M eff =M·(1+∈·tanh(AvgPool(H t ))); Where AvgPool is the average pooling operation used to extract the hidden state H. t Macroscopic statistical characteristics; the tanh function ensures that the parameter perturbation range is controllable; M eff ∈ is the effective mobility tensor (including spatial modulation); ∈ is the learnable coupling coefficient; M is the material mobility tensor. The preset free energy parameter adaptive strategy is as follows: k eff =k·s(W κ ·MaxPool(H t )); Among them, W κ σ is the learnable weight matrix; MaxPool is the max pooling operation; k is the free energy density coefficient; σ is the sigmoid activation function.
6. A phase-field simulation device based on physically constrained deep learning, characterized in that, include: The acquisition module is used to acquire the phase field parameters of the material to be predicted, wherein the phase field parameters include the initial phase field value, the initial material mobility tensor, and the initial free energy density coefficient. The prediction module is used to input the initial phase field value, the initial material mobility tensor, and the initial free energy density coefficient into the pre-trained prediction model to obtain the phase field simulation results of the material to be predicted. The pre-trained prediction model is based on an improved LSTM network, a preset hybrid forward propagation strategy, and a preset parameter coupling mechanism. It is obtained by training a preset neural network using a hybrid loss function and a path gradient backpropagation strategy.
7. The apparatus according to claim 6, characterized in that, Before obtaining the pre-trained prediction model by training a pre-defined neural network using a hybrid loss function and a path gradient backpropagation strategy based on an improved LSTM network, a pre-defined hybrid forward propagation strategy, and a pre-defined parameter coupling mechanism, the prediction module further includes: The first acquisition unit is used to acquire input features with multi-dimensional tensors; The computing unit is used to calculate the chemical potential distribution at the current time step in real time before the hidden state is updated, based on the input features of the multi-dimensional tensors. The correction unit is used to apply a preset flux constraint after the forget gate activation function based on the chemical potential distribution calculation results, so as to complete the gating mechanism correction and obtain the improved LSTM network.
8. The apparatus according to claim 6, characterized in that, The prediction module includes: The second acquisition unit is used to acquire time series data related to the phase field equation; The extraction unit is used to extract time-series features based on the time-series data using a preset standard ConvLSTM. The gradient limiting unit is used to calculate flux divergence based on the time-series characteristics, obtain physical evolution correction results, and perform gradient limiting on the physical evolution correction results based on a preset stability stage strategy.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the phase-field simulation method based on physically constrained deep learning as described in any one of claims 1-5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the phase-field simulation method based on physically constrained deep learning as described in any one of claims 1-5.
Citation Information
Cited By
Steel slag asphalt interface adhesion work prediction method based on physical neural network
CN121999892A