Manuscript Offprint
arXiv:2611.07458Physics-informed latent conditional flow matching for generative modeling of granular flows on inclined planes
Abstract
The internal kinematic and mechanical states of granular flows are difficult to observe or measure, limiting the interpretation of internal particle interactions and their role in flow evolution. In this study, we propose a physics-informed latent conditional flow matching (PI-LCFM) framework for reconstructing complete multivariable flow sequences from partial boundary observations. A variational autoencoder and temporal flow-matching model learn a reusable latent prior over velocity, granular temperature, stress, and solid volume fraction. During inference, boundary-velocity or basal-stress observations and mass- and momentum-conservation constraints guide the latent trajectory through the decoded physical fields, without retraining either model. The results demonstrate that the model accurately reconstructs full spatiotemporal fields from observations containing only 0.3% of the complete field information, extrapolates beyond the training ranges of inclination and particle number, and recovers key trends in runout scaling, energy evolution, and stress profiles. Compared with a frame-by-frame conditional flow-matching baseline, PI-LCFM reduces the mean velocity-component root-mean-square error by 45.2%, while observation-guided reconstruction of 500-frame sequences achieves an approximately 44-fold speedup. Physics guidance further improves conservation consistency, supporting the broader potential of this framework for inferring hidden states in particulate systems, with potential applications envisioned in geophysical hazard assessment and industrial process monitoring.
Keywords: Granular mechanics, Diffusion model, Generative AI, Physics-constrained inference, Uncertainty quantification, Inverse problem
1. Introduction
Granular flows are widely encountered in industrial processes and geophysical hazards, including particle transport, feedstock handling, landslides, rock avalanches, and debris flows [1, 2, 3, 4]. Understanding their internal kinematics and mechanical responses is essential for interpreting flow evolution and evaluating associated hazards. However, the internal states of dense granular flows are difficult to access directly in experiments. For example, in inclined plane or flume experiments, measurements are generally limited to the free surface, sidewalls, basal boundaries, or a small number of sensor locations [5, 6, 7, 8]. Consequently, internal velocity fluctuations, stress transmission, and other mechanical quantities remain largely unobservable [9, 10]. This limited visibility obscures the mechanisms and compromises the assessment of runout and impact loads in geophysical hazards and predictions of disruptive blockages in industrial handling systems [11]. Inferring these inaccessible quantities from limited measurements is thus an important inverse problem for understanding granular-flow mechanics and supporting reliable hazard assessment and process design.
Numerical simulations and conventional data-driven models provide complementary approaches to resolving the internal dynamics of granular materials. Particle-scale approaches such as the discrete element method (DEM) explicitly resolve particle motion and contact interactions [12, 13, 14], while coupling DEM with computational fluid dynamics enables the modeling of particle-fluid interactions and hydro-mechanical failures [15, 16, 17]. Continuum-based methods, including finite-element [18, 19], smoothed particle hydrodynamics [20], and the material point method [21], describe bulk motion through governing equations and constitutive relations [22, 23]. Although these approaches provide detailed mechanical information, repeated parameter calibration and high-fidelity simulations are computationally expensive for inverse reconstruction. Reduced-order methods, such as proper orthogonal decomposition [24] and dynamic mode decomposition [25], can reduce the computational cost by constructing lower-dimensional representations of complex flow fields, but they usually struggle to represent strongly nonlinear and transient processes outside the
*Corresponding author Email address: yimin.lu@ttu.edu (Yimin Lu) dominant modes captured by the training data. Deep learning algorithms provide nonlinear alternatives for field reconstruction [26, 27] and surrogate modeling [28, 29]. However, conventional deterministic models produce a single prediction and do not directly represent the non-uniqueness associated with sparse, noisy, or incomplete measurements [30]. Moreover, models trained for fixed observation inputs may also require redesign or retraining when the measured quantities or sensor configurations change, while maintaining physical consistency remains challenging.
Generative models provide a probabilistic alternative to deterministic models by representing multiple physical states compatible with incomplete measurements. For fluid-field reconstruction, Shu et al. [31] used a physics-informed diffusion model to recover turbulent fields from sparse measurements or low-resolution inputs, while Gao et al. [32] developed a Bayesian conditional diffusion model for spatiotemporal turbulence generation under different prescribed flow conditions. Du et al. [33] further combined neural-field compression with latent diffusion to reconstruct full spatiotemporal flows from sparse sensor data without retraining for each observation configuration. More recently, flow matching (FM) [34] has emerged as an efficient continuous generative formulation that transports samples from a reference distribution toward the target data distribution through a learned ordinary differential equation. Parikh et al. [35] applied FM to reconstruct near-wall turbulent velocity fluctuations from sparse wall measurements while quantifying predictive uncertainty. However, a corresponding framework for jointly reconstructing complete multivariable granular-flow sequences remains underdeveloped. Turbulent-velocity reconstruction formulations cannot be transferred directly to this problem without accounting for frictional contact stresses, evolving packing density, and dissipative particle fluctuations that couple the kinematic and mechanical fields during flow and arrest [22]. Our previous work [36] established a conditional FM framework for reconstructing internal granular-flow states from side-boundary velocity observations. However, frame-by-frame generation and a separately trained observation operator limited its efficiency and flexibility, while joint multivariable sequence generation with physical-conservation guidance remained unaddressed.
To address these limitations, this study develops a physics-informed latent conditional flow matching (PI-LCFM) framework for reconstructing granular-flow sequences from limited boundary observations. A variational autoencoder (VAE) [37, 38] compresses the high-dimensional physical fields, allowing FM to learn their temporal evolution jointly in a compact latent space. The pretrained model provides a reusable prior over sequences of velocity, granular temperature, stress, and solid volume fraction. During inference, observation discrepancies and mass- and momentum-conservation constraints are evaluated on the decoded fields, and their gradients are propagated through the fixed decoder to guide the latent trajectory. This formulation incorporates physical constraints directly into generation and accommodates either boundary-velocity or basal-stress observations without retraining the VAE or FM model. The framework is evaluated across held-out flow conditions and varying observation coverage and noise levels, using both reconstruction errors and granular-flow physics to assess its predictive fidelity.
The main contributions of this study are as follows:
-
Decoder-mediated guidance extends observation-based reconstruction to include mass- and momentum-conservation constraints during inference, enabling physical consistency without physics-informed retraining.
-
Joint latent sequence generation replaces frame-by-frame reconstruction [36], reducing computational cost while capturing temporal dependencies among coupled granular-flow fields.
-
A reusable multivariable prior recovers hidden kinematic and mechanical states from either velocity or stress observations, without observation-specific retraining.
-
The framework demonstrates generalization to held-out flow conditions and accommodates sparse and noisy observations, with fidelity assessed through both field accuracy and granular-flow physics.
Sparse or noisy observations generally do not uniquely determine the interior flow sequence since different internal states can produce similar measured responses [39, 40]. The objective is to approximate the conditional distribution , enabling plausible full-sequence reconstructions without repeated high-fidelity simulations. The unobserved fields are also physically related: velocity, stress, and solid volume fraction evolve under gravitational forcing and frictional interactions, subject to mass and momentum conservation [41]. These relationships provide additional constraints but do not necessarily eliminate the non-uniqueness. The central challenge is to recover plausible interior flow sequences that agree with the available observations while maintaining physical consistency.
3. Physics-informed latent conditional flow matching
Figure 1 illustrates the proposed PI-LCFM framework for the full-sequence reconstruction of granular-flow fields. The framework combines VAE-based dimensionality reduction, unconditional latent flow matching, and training-free guidance from observations and physical constraints. Particle-scale DEM outputs are first coarse-grained onto a fixed Eulerian grid by locally averaging particle kinematics and aggregating particle volumes and contact contributions (more details in Section 4.1). The VAE encodes the resulting fields from 4 x-z slices at selected transverse y positions into one compact latent vector at each recorded physical time, referred to as a frame (Figure 1(d)). These vectors are assembled into a latent matrix representing the complete temporal sequence. The unconditional FM model learns a continuous vector field that transports Gaussian noise toward the distribution of these latent matrices (Figure 1(c)). This formulation enables joint generation of the entire temporal sequence in a reduced-dimensional space.

Figure 1. The proposed physics-informed latent conditional flow matching (PI-LCFM) framework. (a) Overall generation process from initial noise to a physically constrained granular flow sequence. (b) Limited boundary observations as the condition for GenAI, with mass and momentum conservations as physics constraints. (c) Unconditional latent flow matching generating a full-sequence latent field from a noise matrix. (d) Latent-space representation of granular-flow sequence using variational autoencoder (VAE).
During inference, an initial Gaussian noise matrix evolves through the learned vector field, with observation and physics guidance applied iteratively (Figure 1(a)). At each integration step, the intermediate latent state is decoded into physical fields to evaluate the guidance losses. As illustrated in Figure 1(b), observation guidance measures discrepancies from available boundary velocity or stress measurements, while physics guidance penalizes mass- and momentum-conservation residuals. Gradients of the combined loss are propagated through the fixed VAE decoder to correct the latent trajectory. The final latent matrix is decoded to reconstruct the complete flow sequence. Both pretrained modules, VAE and unconditional FM, remain fixed during inference, allowing different observation configurations to be incorporated without retraining.
3.1. Latent representation using variational autoencoder network
The granular-flow state at each physical time step comprises multiple high-dimensional fields. A VAE [37] is employed to compress the multivariable physical fields into a compact latent representation for subsequent sequence modeling. Compared with a deterministic autoencoder, the VAE regularizes the latent representation toward a continuous probabilistic distribution through the Kullback–Leibler (KL) divergence term, producing a smoother and more structured latent space, which is more compatible with the Gaussian reference distribution and continuous probability transport used in flow matching. This structured latent space facilitates subsequent FM-based generative modeling, in which samples are continuously transported from a Gaussian reference distribution toward the latent data distribution. Let denote the multivariable flow state at time . The VAE comprises an encoder and a decoder , parameterized by and , respectively.
The encoder represents each input state by a Gaussian latent distribution with mean and standard deviation . A latent vector is sampled using the reparameterization,
where denotes elementwise multiplication. This formulation allows gradients to propagate through the sampling operation during training. The decoder reconstructs the physical state from the sampled latent vector, . The VAE is trained by minimizing a reconstruction loss together with a KL divergence term,
where measures the discrepancy between the input and reconstructed fields. The KL term regularizes toward a standard Gaussian prior, and controls its contribution to the training objective.
For subsequent FM training, the latent vectors from all frames of a simulation case are stacked into a sequence matrix:
where d is the latent dimension. Each row represents a single physical time step, while the complete matrix represents the temporal evolution of the flow. The encoder and decoder remain fixed during subsequent FM training and guided inference.
3.2. Probabilistic latent flow matching backbone
The latent FM model generates complete flow sequences in the latent space by learning a continuous transport from a Gaussian reference distribution to the distribution of latent sequence matrices [34]. The learned vector field evolves in generative time , which is distinct from the physical time t represented within each sequence. The latent dynamics are governed by:
where denotes the intermediate latent matrix at the generative time , and is the neural vector field.
Let denote the latent matrix encoded from a complete granular-flow sequence, and let denote a random matrix sampled from a standard Gaussian distribution with the same dimensions. Flow matching establishes a continuous probability path between the Gaussian reference distribution at and the latent data distribution at . For a linear probability path, the intermediate latent state is defined as
The corresponding target transport velocity is . A neural vector field is trained to approximate this target velocity by minimizing the difference between the predicted and analytical transport velocities.
(6) where denotes the standard Gaussian reference distribution, is the distribution of latent-encoded training sequences. The conditional velocity field specifies the transport direction along this path, while is trained to approximate this velocity field. During generation, the learned ODE is integrated from to , progressively transforming an initial Gaussian latent matrix into a complete granular flow latent sequence.
The neural vector field is parameterized by a temporal adaptation of the Diffusion Transformer (DiT) architecture [42], referred to here as Temporal DiT. Each row of the latent matrix corresponds to the flow state at one physical time step and is projected into a token embedding. Temporal positional embeddings encode the ordering of these tokens, while the generative time is embedded separately to condition the transformer blocks. Self-attention models dependencies across the temporal sequence, and a final projection maps the token features back to the latent dimension. The network outputs a matrix with the same dimensions as , representing the predicted latent transport velocity . The DiT architecture is thus used for FM velocity prediction rather than diffusion-based denoising.
3.3. Physics-informed training-free posterior sampling with observation guidance
The unconditional FM model provides a prior over complete flow sequences but does not incorporate case-specific observations or explicitly impose physical conservation laws. We introduce training-free guidance to incorporate both during inference, with the pretrained model parameters remaining fixed. From a Bayesian perspective, observations and physical constraints define an energy-weighted target distribution:
where X denotes the complete physical-field sequence and x denotes the available observations. The observation loss measures discrepancies between the reconstructed and observed quantities, while the physics loss penalizes mass- and momentum-conservation residuals. At each guidance step, the latent estimate is decoded, and the observation loss is the mean squared difference between the decoded predictions and measurements at the observed space-time locations. Unobserved entries do not contribute to this loss. The weights and control their relative contributions. When the weighted observation loss is defined as a negative log-likelihood, the observation term admits a measurement-likelihood interpretation.
The conservation constraints use the decoded velocity components and , stress components , and , and solid volume fraction . They are evaluated independently at each physical time and transverse slice using a two-dimensional formulation. The bulk density is defined as
where is the particle material density and is the solid volume fraction. The mass residual is
The two in-plane momentum residuals are
Adjective fluxes are evaluated by coarse-grained field, obtained by mapping the particle-scale DEM data onto a structured Eulerian grid through cell averaging (Section 4.1). The grid spacings are mm. The conservation constraints are evaluated independently at each recorded frame over interior cells occupied by granular material. Temporal derivative terms are omitted in the current implementation because the variation of solid fraction against time is relatively small, and the temporal evolution is included in the pretrained FM model. Let denote binary mask for physical time , transverse slice , and cell . The mask equals one only for interior cells whose own solid volume fraction and those of their four axial neighbors exceed , while all other entries are zero. The threshold is set to , corresponding to the solid volume fraction of a single particle within a grid cell. This excludes empty regions, cells adjacent to the granular free boundary, and the outermost grid cells where centered differences cannot be evaluated. The masked residual losses are defined as
The physics-guidance loss is defined as
where and weight the mass- and momentum-conservation residuals, respectively; their values are listed in Table C-1 (Appendix C). These constraints couple the velocity, stress, and solid volume fraction fields through the mass and momentum balances. Granular temperature is not explicitly included in the present physics guidance since its evolution requires a granular-energy balance accounting for fluctuation-energy production, transport, and dissipation, which are not explicitly modeled in the current formulation.
To guide generation toward states consistent with these constraints, an additional correction velocity is introduced into the latent dynamics
At each generative time , the intermediate latent matrix is decoded into physical fields using the fixed VAE decoder. The combined guidance loss is evaluated as
Its gradient is propagated through the decoder to obtain the latent correction velocity,
Here, b controls the correction magnitude relative to the learned FM velocity. For a nonzero guidance gradient, the correction follows the negative gradient of the combined loss, balancing agreement with observations and the imposed physical constraints. This procedure provides approximate posterior guidance motivated by the target distribution, rather than a guarantee of exact posterior sampling. The VAE and FM parameters remain fixed throughout inference, allowing different observation configurations and physical constraints to be incorporated without retraining either model.
4. Application to inclined granular flows
4.1. DEM simulations and dataset construction
The dataset was generated through particle-resolved simulations of gravity-driven granular flows using DEM. As illustrated in Figure 2(a), the computational domain consists of an inclined plane connected to a horizontal plane. Periodic boundary conditions were imposed in the transverse y direction. The inclination angle was varied from to . During initialization, a retaining plate located at the junction of the two planes (x = 0) confined the particles on the inclined plane.
(a)

(b)
(c)
(d)
Figure 2. Numerical modeling and construction of the granular-flow dataset. (a) Schematic view of the discrete element method (DEM) computational configuration. (b) Particle size distribution in DEM simulations. (c) Representative temporal evolution from release to deposition. (d) Representative coarse-grained results of velocity, granular temperature, and stress fields.
A polydisperse particle-size distribution was employed to represent particle-scale variability, as shown in Figure 2(b). The particles had a mean diameter of 2 mm, with 20,000~60,000 spherical particles per simulation. A Hookean linear spring-dashpot contact model was employed [43], with normal and tangential stiffnesses of N/cm and N/cm respectively, and a restitution coefficient of . The simulation time step was s, and particle data were recorded every 0.002 s. Further details of the DEM contact formulation are provided in our previous work [36].
Before release, the particles were allowed to settle under gravity until a mechanically stable packing was obtained. The retaining plate was then instantaneously removed, allowing the granular material to accelerate along the inclined plane, spread onto the horizontal plane, and eventually deposit. Representative snapshots of this temporal evolution are presented in Figure 2(c). The particle-scale results were coarse-grained onto a structured Eulerian grid to obtain fixed-dimensional continuum fields [44, 45, 46]. The computational domain measures m in the x, y, and z directions, respectively, with grid-cell dimensions of mm. Four x-z slices were extracted at selected transverse y positions, each containing cells. Each frame comprises 7 physical variables on these 4 slices: velocity components and , granular temperature T, stress components , , and , and solid volume fraction . The frame-level state is written as:
Each entry represents the corresponding field across all 4 slices. The solid volume fraction provides the bulk-density information needed to evaluate the mass- and momentum-conservation constraints. Representative coarse-grained fields are shown in Figure 2(d).
The cell-averaged velocity and granular temperature were calculated from particle velocities following the procedure described in our previous work [36]. The solid volume fraction was calculated as the total volume of particles whose centers lay within a grid cell divided by the cell volume. Each particle was assigned entirely to the cell containing its center. The cell-scale contact stress was calculated following the microscopic stress formulation [45] as
where is the cell volume, is the number of particles associated with the cell, is the number of contacts associated with particle , and and denote the -component of the branch vector and the -component of the contact force, respectively. To reduce particle-scale fluctuations, the raw stress fields were spatially averaged using a cells neighborhood, with boundary treatment following the procedure described in [46]. The averaging operation is detailed in Appendix A.
A series of simulations was conducted by varying the inclination angle, particle number, and random seed for particle initialization. The final dataset comprised 88 simulation cases, with each case containing 500 flow-field snapshots sampled at intervals of 0.002 s.
4.2. Training and implementation details
4.2.1. Data preprocessing and training strategy
The 88 DEM cases were divided into 73 training cases and 15 test cases, with all frames from each case assigned to the same subset. Selected inclination angles and particle numbers were reserved exclusively for testing to assess generalization to unseen flow conditions, and the details are shown in Appendix B.
The VAE was trained using individual frames as samples, without explicitly modeling their temporal dependence. Within the training cases, 80% of the frames were used for parameter optimization and the remaining 20% for validation. After VAE training, the encoder was frozen and used to construct the latent training set for the FM model. To augment the latent training data, 5 independently perturbed versions of each training sequence were generated by adding element-wise Gaussian noise, , where . The VAE parameters remained fixed throughout FM training.
4.2.2. Network architecture and hyperparameter configuration
The VAE uses a convolutional encoder-decoder architecture with a Gaussian latent representation. Each input frame contains 4 spatial slices, each with 7 variables. 4 convolutional layers downsample each slice independently, and two 3D convolutional layers fuse the resulting features across slices. Separate fully connected layers map the flattened features to the latent mean and log variance . A latent vector () is then sampled using the reparameterization trick, which is describe in Eq. (1). The decoder reconstructs each slice through 4 upsampling stages.
The latent FM backbone uses a Temporal DiT with 8 transformer blocks. Each row of the latent matrix is linearly projected to a 768-dimensional token and combined with a sinusoidal positional embedding. Each block contains eight-head self-attention and a feed-forward multilayer perceptron (MLP) with an expansion ratio of 4. The generative time modulates both branches through adaLN-Zero using shift, scale, and gating parameters. A final linear layer projects each token back to 256 dimensions, yielding the predicted latent transport velocity .
Both networks were trained using the Adam optimizer [47], with validation-based early stopping and a maximum of 2,000 epochs. Guided inference used the explicit Euler method to integrate the latent ODE over . Detailed network configurations and training and inference hyperparameters are provided in Table C-1 in the Appendix C.
4.3. Evaluation metrics
Reconstruction results were evaluated against the DEM reference fields using the mean absolute error (MAE), root-mean-square error (RMSE), and normalized root-mean-square error (NRMSE). For each variable , the MAE and RMSE were calculated over evaluated spatial and temporal entries:
where and denote the predicted and reference values of variable , respectively. Both metrics retain the physical units of the evaluated variable, with RMSE assigning greater weight to larger errors.
To account for differences in scale among the physical variables, RMSE was normalized by the range of the corresponding DEM reference field [48],
Lower metric values indicate closer agreement with the DEM reference fields.
5. Results
This section first examines unconditional sequence generation by the pretrained model, followed by reconstruction from partial observations. Reconstruction accuracy and physical consistency are then evaluated through several metrics.

Figure 3. Representative unconditional generation results. Columns correspond to , and 0.3 s. Rows show horizontal velocity , vertical velocity , granular temperature , stress components and , and mass- and momentum-conservation residuals.
5.1. Unconditional spatiotemporal sequence generation
Complete granular-flow sequences were generated from Gaussian latent noise using the pretrained FM model, without observation or physics guidance. Figure 3 shows representative generated fields at , and 0.30 s, together with mass- and momentum-conservation residuals evaluated on the decoded fields.
The generated sequences capture the main spatiotemporal features of the velocity, granular temperature, and stress fields without observation or physics guidance. These results support the use of the pretrained model as a generative prior for conditional reconstruction. Conservation residuals remain relatively small over most of the domain, with the largest deviations concentrated near the flow boundary at early times.
5.2. Conditional reconstruction from partial boundary observations
Conditional reconstruction was evaluated using two observation configurations: partial side-boundary velocity measurements and partial basal stress measurements. The velocity observations comprised and within a selected region of slice 0, and the stress observations comprised and within a selected basal region. In both configurations, the same pretrained VAE and FM models were used to reconstruct the complete multivariable flow sequence from limited observations. In each configuration, approximately 0.3% of the complete multivariable field data were used to reconstruct the full flow sequence. The observation fraction is defined as the number of observed scalar entries divided by the total number of scalar entries across all seven variables, four slices, and recorded time steps.
Figure 4(a) shows the side-boundary velocity observations used to reconstruct the 60°, 20,000-particle case. Both the inclination angle and particle number lie outside their respective training ranges, making this a joint extrapolation test. Figure 4(b) compares the DEM reference, GenAI prediction, and error fields for velocity magnitude, granular temperature, and pressure at s, demonstrating that the reconstruction captures the main spatial patterns. The pressure and shear stress were calculated from the stress tensor as defined in Appendix D. Granular temperature and pressure are recovered despite neither quantity being directly observed. The MAEs of the three variables were 0.05 m/s,
8.651 × 10⁻⁴ m²/s², and 3.713 kPa, respectively, and the corresponding RMSEs were 0.06 m/s, 2.25 × 10⁻³ m²/s², and 4.535 kPa.
(a)

(b)
(c)
Figure 4. Conditional generation from partial boundary velocity observations. (a) Schematic view of partial velocity observation: two velocity components and are observed within a rectangular window (red dashed box) on the slice 0. (b) Ground truth, GenAI prediction, and absolute error contour of the velocity magnitude , granular temperature , and pressure . (c) Temporal evolution of the mean absolute error (MAE) of individual velocity components, granular temperature, and stress components; solid lines denote mean over all test cases and shaded bands indicate the range across all test cases.
Figure 4(c) summarizes the temporal MAE evolutions of the observed and unobserved variables over 500 frames for 15 test cases. Solid lines indicate the case-averaged MAE, while shaded bands show the minimum–maximum range across cases. Velocity and granular-temperature errors generally decrease after the early transient stage. Averaged over all cases and 500 frames, the MAEs of and were 0.017 and 0.011 m/s, respectively. The corresponding averages were for granular temperature and 0.954, 1.333, and 0.322 kPa for , , and , respectively. These results extend the reconstruction assessment to the complete temporal sequences and quantify errors in both observed and unobserved variables.
Partial basal stress observations provide an alternative experimental measurement configuration motivated by experimental studies of granular-flow dynamics [5, 8, 49]. Figure E.9 in Appendix E presents the reconstruction for a representative 40° case at s, together with temporal error statistics across the 15 test cases. The reconstructed fields capture the main spatial patterns of velocity and granular temperature, although neither quantity is directly observed. Together with the velocity-conditioned results, it is demonstrated that the same pretrained prior can recover internal kinematic and mechanical fields from different observation modalities without retraining.
5.3. Evaluation of reconstructed granular flow physics
The physical characteristics of the PI-LCFM predictions were evaluated at three complementary levels: macroscopic runout scaling, temporal energy evolution, and local continuum-field profiles. These evaluations examine whether the generated sequences reproduce physical relationships that were not explicitly imposed by the observation guidance.
Previous studies have shown that the normalized runout distances of granular flows with different system sizes and inclination angles can be collapsed onto a master curve after accounting for finite-size effects and the effective mobilized length at small inclination angles [50]. Following this scaling relation, the scaled inclination parameter was defined as
and the scaled normalized runout distance was expressed as,
Here, is the initial granular column length, is the mean particle diameter, is the inclination angle, and is the final horizontal runout distance. The effective mobilized length is denoted by , while and are the corresponding scaling exponents.
Figure 5(a) compares the scaled runout distances predicted from PI-LCFM with the reference data reported in the previous study [50]. The predicted values follow the reference trend over the range represented by the evaluated cases. This agreement supports the recovery of macroscopic runout scaling behavior, although this scaling relation was not explicitly included in the training objective or inference guidance. Figure 5(b) compares the temporal evolution of the normalized energy, , obtained from PI-LCFM and the DEM reference. The total energy comprises kinetic, gravitational potential, and granular temperature contributions and was normalized by its initial value . The PI-LCFM prediction captures the rapid energy decrease followed by a slower approach to a nonzero plateau, while the predicted normalized energy remains above the DEM reference during much of the decay and at later times. Nevertheless, the prediction captures the overall timing and magnitude of the energy decay.
(a)

(b)
(c)
Figure 5. Evaluation of the physical consistency of PI-LCFM predictions. (a) Finite-size scaling of the normalized runout distance, where blue triangles were reported in a previous study [50] and dots are PI-LCFM predictions. (b) Evolution of the total energy normalized by its initial value, . Red circles denote PI-LCFM predictions, while the solid curve represents DEM ground truth. (c) Vertical profiles of the shear rate , pressure p, deviatoric stress q, and stress ratio q/p at x = 0 at t = 0.3 s (red) and 0.5 s (blue); circles with solid lines denote the ground truth, and crosses with dashed lines denote PI-LCFM predictions.
Shear-rate and stress profiles provide complementary measures of the local rheological response of granular flows [51]. The definitions of , , and are provided in Appendix D. Figure 5(c) compares the vertical profiles of the shear rate , pressure , deviatoric stress , and stress ratio . These quantities were extracted along the direction at at and 0.5 s. The predicted profiles reproduce the principal variations in the DEM reference during the two evaluated stages. At s, the MAEs of , , , and were 90.3 s, 0.346 kPa, 1.05 kPa, and 0.0263, respectively. At s, the corresponding MAEs were 48.3 s, 0.254 kPa, 1.06 kPa, and 0.0169. The lower errors in , , and at s indicate closer agreement during the later stage, whereas the pressure error remained similar at the two evaluated times. Together, these evaluations show that PI-LCFM recovers key granular-flow physical characteristics at both the bulk and local-field levels. Agreement in runout scaling, energy evolution, and stress-related profiles provides evidence of physical fidelity beyond pointwise reconstruction accuracy.
6. Analyses and discussion
6.1. Comparison with other AI frameworks
The performance of PI-LCFM was compared with alternative neural architectures and generative models in terms of reconstruction accuracy and computational cost. Three complementary comparisons were conducted: 1) MLP, temporal MLP, U-Net [52], and Temporal DiT (this study) were compared to examine the influence of backbone architecture; 2) PI-LCFM was compared with the score-based denoising diffusion probabilistic model (DDPM) and noise conditional score network (NCSN) models; 3) PI-LCFM was compared with the pixel-space conditional flow matching model developed in our previous study [36]. All models were evaluated using the same test data and observation settings within each comparison. For each model, the best-performing hyperparameter configuration was selected based on validation-set performance under the same model-selection criterion. The selected architectures, training settings, and inference hyperparameters are summarized in Appendix F.
Figure 6(a) compares the reconstruction performance of the 4 backbone architectures over different inclination-angle test cases. Physical consistency was evaluated using the mass- and momentum-conservation residuals defined in Eqs. (9-13), with identical evaluation procedures applied to the reconstructed and DEM fields. Reconstruction accuracy was evaluated using the normalized RMSEs of , , , , , and . The MLP and U-Net produced larger relative conservation residuals than the DEM ground truth, while the temporal MLP achieved residuals close to the reference values. Temporal DiT produced the lowest relative mass and momentum residuals, at 3.9% and 5.52%, respectively. It also achieved the lowest or nearly lowest NRMSEs across the 6 reconstructed variables. The stronger performance of the temporal architectures supports the use of temporal dependencies in full-sequence reconstruction.
Figure 6(b) compares the time-resolved reconstruction errors of PI-LCFM with two representative score-based generative models, the DDPM and the NCSN [53]. PI-LCFM generally achieved lower RMSEs than both baselines and exhibited substantially smaller temporal fluctuations than NCSN. Its time-averaged RMSEs for velocity magnitude, granular temperature, and pressure were 0.028 m/s, m/s, and 0.44 kPa, respectively. The corresponding values were 0.033 m/s, m/s, and 0.51 kPa for DDPM, and 0.069 m/s, m/s, and 0.89 kPa for NCSN. Relative to DDPM, PI-LCFM reduced the time-averaged RMSEs of velocity magnitude, granular temperature, and pressure by 14.2%, 8.8%, and 12.9%, respectively.
The physical consistency of the three models was further assessed by examining global mass and momentum balance. The complete temporal comparisons are provided in Figure G.10 of Appendix G. Among the three generative models, PI-LCFM produced the lowest mass and momentum errors. Compared with DDPM, it reduced the mass and momentum errors by 5.6% and 15.3%, respectively. Compared with NCSN, the corresponding reductions were 44.7% and 34.0%. The PI-LCFM mass error remained close to the DEM reference, while its momentum error was lower under the adopted residual metric.
Figure 6(c) compares the velocity RMSEs of PI-LCFM and frame-by-frame CFM [36] at three interior slices. PI-LCFM achieved lower time-averaged errors for both horizontal velocity and vertical velocity at every slice, with an overall mean RMSE reduction of 45.2%. The improvement was greatest during active flow, while both models showed smaller

(b)
(c)
Figure 6. Comparison of PI-LCFM against alternative neural architectures and generative models. (a) Backbone comparison using an MLP, a temporal MLP, a U-Net, and Temporal DiT (this study). The left panel shows relative mass- and momentum-balance residuals (%), with the DEM results included as a reference. The right panel shows the normalized RMSEs of each reconstructed variable. (b) Time-resolved RMSEs of velocity magnitude, granular temperature, and pressure obtained using PI-LCFM, DDPM, and NCSN. (c) Time-resolved velocity RMSEs obtained using PI-LCFM and the previous frame-by-frame CFM framework [36] at three interior slices. Solid and dashed curves denote and , respectively.
errors after s. Table 1 summarizes the computational costs of generating a 500-frame sequence using an NVIDIA RTX 4090 GPU and an Intel Core i9-13900K processor. With 100 sampling steps, PI-LCFM required 1.25 s for unconditional generation and 43.28 s for observation-guided reconstruction. Including physics guidance increased the PI-LCFM inference time to 69.19 s because the physical fields were decoded and the conservation losses were evaluated at each integration step.
The previous frame-by-frame CFM model required 1905.64 s for conditional reconstruc-
Table 1. Computational cost of different models
| Model | Sampling time (s) | ||
|---|---|---|---|
| Unconditional | Observation-guided | Observation + physics | |
| PI-LCFM | 1.25 | 43.28 | 69.19 |
| CFM | – | 1905.64 | – |
tion of the same number of frames. Each frame required an independent guided ODE integration, whereas PI-LCFM generated the complete latent sequence through one single integration process. Under observation guidance, PI-LCFM achieved an approximately 44-fold speedup relative to CFM. Together with the lower velocity reconstruction errors, this comparison demonstrates the practical benefit of joint latent sequence generation for the evaluated granular flows.
6.2. Uncertainty quantification
Limited observations can admit multiple compatible interior states, motivating an assessment of the variability among reconstructed fields. We characterized the spatial and temporal distribution of ensemble spread and examined the contributions of different sources of variability. Five test cases at plane inclination angles of 20°, 30°, 37.5°, 47.5°, and 55° were evaluated using boundary-velocity observations. For each case, 4 independently trained FM models were combined with 3 realizations of 10% observation noise and 10 inference initializations. This yielded 120 reconstructed sequences per case and 600 sequences in total. The VAE was fixed throughout this analysis.
6.2.1. Spatial and temporal distribution of ensemble spread
Figure 7(a) compares the DEM reference, ensemble mean, absolute reconstruction error, and ensemble standard deviation of at three representative times. The ensemble mean reproduced the main spatial features of the reference fields. Elevated standard deviations occurred near the advancing flow front and in regions of high velocity or steep velocity gradients. The slowly moving interior exhibited lower ensemble spread. As the material propagated downstream, the region of elevated spread moved with the front and became more localized during deceleration.
(a)

(b)
Figure 7. Uncertainty characterization of PI-LCFM for a representative test case. (a) DEM Ground truth, ensemble mean, absolute reconstruction error, total ensemble standard deviation, and component standard deviations associated with inference initialization, FM training, and observation perturbations for at s, 0.2 s, and 0.5 s (top to bottom). The component standard deviations are the square roots of the variance components defined in Appendix H. (b) Temporal evolution of the domain-averaged across 120 reconstructions (left) and under different observation-noise levels (right). The shaded region denotes the 5th–95th percentile interval.
The temporal evolution of the domain-averaged showed a corresponding pattern (Figure 7(b), left). The 5th–95th percentile interval across the 120 reconstructions was widest during active flow and narrowed as the material approached deposition. The ensemble mean followed the DEM trajectory over the same period. These intervals describe the dispersion of the sampled domain-averaged responses.
6.2.2. Sources of ensemble spread and sensitivity to observation noise
The ensemble combined variability from inference initialization, observation perturbations, and independent training of the FM model. Table 2 summarizes their contributions under the hierarchical variance decomposition defined in Appendix H. Inference initialization accounted for 80.4% of the normalized variance on average, followed by model-training variability at 16.4% and observation perturbations at 3.2%. The initialization contribution was largest in every case. The training contribution ranged from 4.6% at 47.5° to 34.9% at 20°, whereas the observation contribution ranged from 1.9% to 5.0%. Thus, within the specified sampling design and decomposition, inference initialization accounted for most of the observed ensemble spread.
Table 2. Hierarchical decomposition of the normalized predictive variance
| Case | (%) | (%) | (%) | |
|---|---|---|---|---|
| 20° | 62.1 | 3.0 | 34.9 | 0.0088 |
| 30° | 85.5 | 1.9 | 12.6 | 0.0170 |
| 37.5° | 73.8 | 2.5 | 23.7 | 0.0352 |
| 47.5° | 91.6 | 3.7 | 4.6 | 0.0286 |
| 55° | 88.9 | 5.0 | 6.1 | 0.0312 |
| Case average | 80.4 | 3.2 | 16.4 | 0.0242 |
A separate noise-sensitivity analysis examined reconstruction performance as the relative observation-noise level increased from 0% to 20% (Figure 7(b), right). At the field level, the case-averaged NRMSE of increased by approximately 1.4% at 20% noise relative to the noise-free baseline. These results indicate limited sensitivity of reconstruction accuracy to the tested observation-noise levels.
6.3. Ablation study
Two ablation studies were conducted to examine the effects of conservation guidance and spatial observation coverage on reconstruction performance. The first evaluates whether mass- and momentum-conservation guidance improves the physical consistency of the generated fields without substantially compromising reconstruction accuracy, while the second investigates the amount of spatial observation required for reliable full-field reconstruction.
6.3.1. Effectiveness of the physics-informed guidance
The effect of physics-informed guidance was evaluated by comparing conditional reconstructions with and without mass- and momentum-conservation constraints. Each paired comparison used the same pretrained model, observations, numerical settings, and initial Gaussian noise, differing only in the inclusion of physics guidance. The comparison was performed for 6 inclination angles: , , , , , and . The bulk flow state was assessed using the relative Froude-number error, , following the procedure in Appendix I. Reconstruction accuracy was quantified using the aggregate normalized RMSE averaged equally across the 7 predicted variables, while physical consistency was evaluated using the mass and momentum residuals.
As shown in Figure 8(a), physics guidance reduced the relative Froude-number error at all 6 inclinations, including reductions from 4.0% to 1.2% at and from 4.8% to 3.1% at . These results show that physics guidance improved the reconstructed bulk flow state across the evaluated cases and substantially improved the reconstruction performance.
The conservation residuals exhibited more consistent improvements, as shown in Figure 8(b). At , the mass residual decreased from 61.2 to 36.8, and the momentum residual decreased from to . Improvements were also observed at the larger inclination angles. At , the mass and momentum residuals decreased by 8.38% and 6.61%, respectively. Conservation guidance consistently improves physical consistency while largely preserving field-reconstruction accuracy.
6.3.2. Sensitivity to spatial observation coverage
The sensitivity of the reconstruction to spatial observation coverage was evaluated separately for boundary-velocity and basal-stress observations, with coverage varied from 10% to 100% in each configuration. Reconstruction performance was measured using the full-field, full-sequence normalized RMSE averaged equally across the 7 predicted variables.

(b)
(c)

Figure 8. Ablation studies of physics-informed guidance and spatial observation coverage. (a) Relative error in the Froude number, , at different inclination angle with and without physics informed guidance. (b) Corresponding mass- and momentum-conservation residual RMSEs, indicated by circles and squares, respectively. (c) NRMSE averaged across the 7 reconstructed variables at different spatial observation coverages for boundary-velocity and basal-stress observations.
Figure 8(c) shows that increasing the spatial observation coverage generally improved reconstruction accuracy. For boundary-velocity observations, the mean NRMSE decreased from 3.25% at 10% coverage to 2.86%, 2.87%, and 2.78% at 30%, 50%, and 70% coverage, respectively. This corresponds to an overall reduction of 0.47% between 10% and 70% coverage. Increasing coverage to 100% yielded an NRMSE of 2.85%, indicating no further improvement. The basal-stress configuration exhibited a similar trend and lower mean NRMSEs across the reported coverages. Under the investigated conditions, both configurations showed limited additional benefit beyond approximately 50%–70% coverage. These results suggest that observations over a restricted spatial region can provide sufficient information for full-field reconstruction, whereas extending the measurements over the entire domain yields only a marginal additional improvement under the conditions considered here.
6.4. Limitations and future work
The framework has been trained and evaluated using DEM-generated data for an inclined-to-horizontal geometry with periodic transverse boundaries. Its performance with experimental measurements remains to be established. Extending the framework to irregular geometry and different basal or lateral boundary conditions will require suitable representations of geometry and boundary conditions, together with evaluation on configurations excluded from training.
The current physics constraints enforce in-plane mass- and momentum-conservation conditions and does not explicitly constrain granular temperature. Future work can extend the guidance to three-dimensional conservation laws and granular-energy constraints involving fluctuation-energy production, transport, and dissipation.
7. Conclusions
This study developed a physics-informed latent conditional flow matching (PI-LCFM) framework for reconstructing complete spatiotemporal granular-flow fields from partial boundary observations. The framework combines VAE-based dimensionality reduction, temporal flow matching, and training-free observation and physics guidance. This latent formulation enables efficient full-sequence generation while retaining the dominant spatial structures and temporal dynamics of the granular flow. The main conclusions are as follows:
-
The latent sequence generation enables efficient reconstruction of granular-flow dynamics. Compared with the frame-by-frame CFM framework, PI-LCFM reduced the velocity-component RMSE averaged across the evaluated interior slices and times by 45.2%. Observation-guided reconstruction of a 500-frame sequence achieved an approximately 44-fold speedup.
-
Without retraining, the same pretrained flow-matching prior reconstructs velocity, granular temperature, stress, and solid volume fraction from either partial boundary-velocity or basal-stress observations containing only ~ 0.3% of the complete field information, with a mean normalized RMSE of 3.18% over 6 flow variables. Reconstruction of the 60°, 20,000-particle unseen test case further demonstrated extrapolation beyond the training ranges of both inclination angle and particle number within the prescribed geometry.
-
Physics guidance reduced mass- and momentum-conservation residuals across the evaluated inclinations while largely preserving or improving field-reconstruction accuracy. The reconstructed sequences also recovered key trends in runout scaling, energy evolu-tion, and vertical shear-rate and stress profiles, providing evidence of physical fidelity beyond pointwise field agreement.
-
Ensemble spread was concentrated near the advancing flow front and regions of steep velocity gradients, with inference initialization contributing most to the variance under the adopted decomposition. Reconstruction accuracy exhibited limited sensitivity to the tested observation-noise levels.
Overall, PI-LCFM demonstrates that a single reusable latent prior, guided by limited observations and physical constraints, can efficiently reconstruct granular flow physics across measurement modalities without retraining. It also sheds light on exploring internal mechanisms governing flow evolution in applications such as geophysical hazard assessment and industrial process monitoring.
Acknowledgments
The authors acknowledge the Startup Funds from Texas Tech University (TTU) and the high performance computing resources from the Texas Advanced Computing Center (TACC) at The University of Texas at Austin. The DEM simulations were conducted using MechSys, an open-access multiphysics simulation library, and its source code is available at https://github.com/Axtal/mechsys.git.
CRediT authorship contribution statement
Ziqi Han: Methodology, Validation, Investigation, Software, Visualization, Formal analysis.
Kuang Shi: Data Curation, Software, Writing - Original Draft. Xuyang Li: Writing - Review & Editing. Teng Man: Software, Writing - Review & Editing. Yimin Lu: Conceptualization, Supervision, Resources, Funding acquisition, Visualization, Writing - Review & Editing.
References
[1] P. Tahmasebi, A state-of-the-art review of experimental and computational studies of granular materials: Properties, advances, challenges, and future directions, Progress in materials science 138 (2023) 101157.
[2] X. Lü, M. He, Q. Zhong, Y. Wang, Y. Shao, C. Chen, X. Liu, D. Xue, Hydro-mechanical reactivation of a dual-sliding-zone ancient landslide controlled by dry-density-dependent water sensitivity, Acta Geotechnica (2026) 1–21.
[3] Z. Wang, H. Zhou, Y. Li, Z. Wang, Numerical simulation of debris flow impact on pier with different cross-sectional shapes based on coupled cfd-dem, International Journal for Numerical and Analytical Methods in Geomechanics 49 (8) (2025) 2025–2046.
[4] W. Jin, Y. Lu, F. Chen, A. Hamed, N. Saha, J. Klinger, S. Dai, Q. Chen, Y. Xia, On the Fidelity of Computational Models for the Flow of Milled Loblolly Pine: A Benchmark Study on Continuum-Mechanics Models and Discrete-Particle Models, Frontiers in Energy Research 10 (2022).
[5] W. Li, D. Wang, I. Doi, G. Wang, Z. Zhang, S. Yan, S. He, Evolution of basal force fluctuations and seismic signals of granular flows and their proxy: Insights from laboratory flume experiments, Journal of Geophysical Research: Earth Surface 130 (1) (2025) e2024JF007980.
[6] T. Trewhela, C. Ancey, A conveyor belt experimental setup to study the internal dynamics of granular avalanches, Experiments in Fluids 62 (10) (2021) 207.
[7] L. Carleo, L. Sarno, M. Papa, Y.-C. Tai, P. Villani, Volume fraction and velocity fields of nearly uniform granular flows in a narrow channel geometry with smooth bed, Advanced Powder Technology 30 (10) (2019) 2379–2395.
[8] K. Li, Y. Wang, Q. Cheng, Q. Lin, Y. Wu, Y. Long, Insight into granular flow dynamics relying on basal stress measurements: From experimental flume tests, Journal of Geophysical Research: Solid Earth 127 (3) (2022) e2021JB022905.
[9] Y. Wu, T. Pähtz, Z. Guo, L. Jing, Z. Duan, Z. He, Unified flow rule of undeveloped and fully developed dense granular flows down rough inclines, Physical Review Letters 134 (2) (2025) 028201.
[10] T. Zhou, L. Mu, Y. Lu, M. Chen, M. Huang, Y. Li, Rate-dependent uplift behavior and soil failure mechanisms of suction anchors in loose sand: a transparent soil piv study, Ocean Engineering 341 (2025) 122555.
[11] W. Sun, Y. Lu, H. Sitaraman, Y. Xia, N. Deak, N. Saha, J. Klinger, Deciphering flow-jamming transition of milled fibrous biomass in asymmetric hoppers, Powder Technology (2026) 123231.
[12] Q. Shi, M. Sakai, Recent progress on the discrete element method simulations for powder transport systems: A review, Advanced Powder Technology 33 (8) (2022) 103664.
[13] N. Deak, H. Sitaraman, Y. Lu, N. Saha, J. Klinger, Y. Xia, A high-performance discrete-element framework for simulating flow and jamming of moisture bearing biomass feed-stocks, Powder Technology 452 (2025) 120548.
[14] W. Sun, Y. Xia, J. Klinger, A. Hamed, M. Yang, Y. Lu, Length-sensitive screening of elongated biomass particles in a pilot-scale orbital screen: Experiments, shape-resolved discrete element method simulations, and surrogate modeling, Biomass and Bioenergy 217 (2027) 110135.
[15] T. Shan, J. Zhao, A coupled cfd-dem analysis of granular flow impacting on a water reservoir, Acta Mechanica 225 (8) (2014) 2449–2470.
[16] P. Zhang, L. Mu, Y. Lu, M. Huang, J. Sun, Microscopic insights into suction bucket installation in sand: Coupled coarse-grained cfd-dem simulations, Computers and Geotechnics 167 (2024) 106060.
[17] S. Chen, Y. Lu, Z. Guo, L. Lei, J. Qiang, F. Zhang, A hybrid resolved-unresolved cfd-dem framework for two-phase flow and hydro-mechanical failure in multiscale complex-shaped granular media, Available at SSRN 7286222.
[18] Q. Zheng, A. Yu, Modelling the granular flow in a rotating drum by the eulerian finite element method, Powder technology 286 (2015) 361–370.
[19] Y. Lu, W. Jin, J. Klinger, S. Dai, Flow and arching of biomass particles in wedge-shaped hoppers, ACS Sustainable Chemistry & Engineering 9 (45) (2021) 15303–15314.
[20] C. T. Nguyen, C. T. Nguyen, H. H. Bui, G. D. Nguyen, R. Fukagawa, A new sph-based approach to simulation of granular flows using viscous damping and stress regularisation, Landslides 14 (1) (2017) 69–81.
[21] A. Haeri, K. Skonieczny, Three-dimensional granular flow continuum modeling via material point method with hyperelastic nonlocal granular fluidity, Computer Methods in Applied Mechanics and Engineering 394 (2022) 114904.
[22] K. Kamrin, K. M. Hill, D. I. Goldman, J. E. Andrade, Advances in modeling dense granular media, Annual Review of Fluid Mechanics 56 (1) (2024) 215–240.
[23] D. Xue, X. Lü, K.-W. Lim, G. Buscarnera, Nonlocal implicit gradient enhancements for strain localization informed by controllability criteria for plastic solids, Computer Methods in Applied Mechanics and Engineering 415 (2023) 116275.
[24] G. Berkooz, P. Holmes, J. L. Lumley, The proper orthogonal decomposition in the analysis of turbulent flows, Annual review of fluid mechanics 25 (1) (1993) 539–575.
[25] P. J. Schmid, Dynamic mode decomposition of numerical and experimental data, Journal of fluid mechanics 656 (2010) 5–28.
[26] K. Fukami, R. Maulik, N. Ramachandra, K. Fukagata, K. Taira, Global field reconstruction from sparse sensors with voronoi tessellation-assisted deep learning, Nature Machine Intelligence 3 (11) (2021) 945–951.
[27] P. Clark Di Leoni, K. Agarwal, T. Zaki, C. Meneveau, J. Katz, Reconstructing velocity and pressure from sparse noisy particle tracks using physics-informed neural networks, arXiv e-prints (2022) arXiv–2210.
[28] P. Dubois, T. Gomez, L. Planckaert, L. Perret, Machine learning for fluid flow reconstruction from limited measurements, Journal of Computational Physics 448 (2022) 110733.
[29] M. El Hassan, A. Mjalled, P. Miron, M. Mönnigmann, N. Bukharin, Machine learning in fluid dynamics—physics-informed neural networks (pinns) using sparse data: A review., Fluids 10 (9) (2025) 226.
[30] J. Guo, H. Zhu, Y. Yang, C. Guo, Advances in physics-informed neural networks for solving complex partial differential equations and their engineering applications: A systematic review, Engineering Applications of Artificial Intelligence 161 (2025) 112044.
[31] D. Shu, Z. Li, A. B. Farimani, A physics-informed diffusion model for high-fidelity flow field reconstruction, Journal of Computational Physics 478 (2023) 111972.
[32] H. Gao, X. Han, X. Fan, L. Sun, L.-P. Liu, L. Duan, J.-X. Wang, Bayesian conditional diffusion models for versatile spatiotemporal turbulence generation, Computer Methods in Applied Mechanics and Engineering 427 (2024) 117023.
[33] P. Du, M. H. Parikh, X. Fan, X.-Y. Liu, J.-X. Wang, Conditional neural field latent diffusion model for generating spatiotemporal turbulence, Nature Communications 15 (1) (2024) 10416.
[34] Y. Lipman, R. T. Chen, H. Ben-Hamu, M. Nickel, M. Le, Flow matching for generative modeling, arXiv preprint arXiv:2210.02747 (2022).
[35] M. H. Parikh, X. Fan, J.-X. Wang, Conditional flow matching for generative modelling of near-wall turbulence with quantified uncertainty, Journal of Fluid Mechanics 1029 (2026) A32.
[36] X. Li, R. Li, T. Man, Y. Lu, Generative modeling of granular flow on inclined planes using conditional flow matching, Computers and Geotechnics 198 (2026) 108284.
[37] D. P. Kingma, M. Welling, Auto-encoding variational bayes, arXiv preprint arXiv:1312.6114 (2013).
[38] R. Rombach, A. Blattmann, D. Lorenz, P. Esser, B. Ommer, High-resolution image synthesis with latent diffusion models, in: 2022 IEEE/CVF conference on computer vision and pattern recognition (CVPR), ieee, 2022, pp. 10674–10685.
[39] S. Arridge, P. Maass, O. Öktem, C.-B. Schönlieb, Solving inverse problems using data-driven models, Acta numerica 28 (2019) 1–174.
[40] A. M. Stuart, Inverse problems: a bayesian perspective, Acta numerica 19 (2010) 451–559.
[41] Y. Forterre, O. Pouliquen, Flows of dense granular media, Annu. Rev. Fluid Mech. 40 (1) (2008) 1–24.
[42] W. Peebles, S. Xie, Scalable diffusion models with transformers, in: 2023 IEEE/CVF International Conference on Computer Vision (ICCV), IEEE, 2023, pp. 4172–4182.
[43] L. E. Silbert, D. Ertas, G. S. Grest, T. C. Halsey, D. Levine, S. J. Plimpton, Granular flow down an inclined plane: Bagnold scaling and rheology, Physical Review E 64 (5) (2001) 051302.
[44] F. Nicot, N. Hadda, M. Guessasma, J. Fortin, O. Millet, On the definition of the stress tensor in granular media, International Journal of Solids and Structures 50 (14-15) (2013) 2508–2517.
[45] Y. Chung, C. Wu, C. Kuo, S. Hsiau, A rapid granular chute avalanche impinging on a small fixed obstacle: Dem modeling, experimental validation and exploration of granular stress, Applied Mathematical Modelling 74 (2019) 540–568.
[46] Y. Chung, Granular stresses in granular flows subjected to different obstacles, International Journal of Mechanical Sciences 247 (2023) 108190.
[47] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization, arXiv preprint arXiv:1412.6980 (2014).
[48] R. Dupuis, J.-C. Jouhaud, P. Sagaut, Surrogate modeling of aerodynamic simulations for multiple operating conditions using machine learning, Aiaa Journal 56 (9) (2018) 3622–3635.
[49] B. Cagnoli, G. P. Romano, Granular pressure at the base of dry flows of angular rock fragments as a function of grain size and flow volume: A relationship from laboratory experiments, Journal of Geophysical Research: Solid Earth 117 (B10) (2012).
[50] Q. Chen, T. Man, H. E. Huppert, X. Zhang, H. Sun, Y. Cai, Collapse dynamics and deposition morphology of granular soils avalanching from inclined to horizontal planes, Physics of Fluids 38 (6) (2026).
[51] Y. Lu, W. Jin, J. Klinger, N. Saha, Y. Xia, S. Dai, Shear rate dependency on flowing granular biomass material, Powder Technology 442 (2024) 119834.
[52] O. Ronneberger, P. Fischer, T. Brox, U-net: Convolutional networks for biomedical image segmentation, in: International Conference on Medical image computing and computer-assisted intervention, Springer, 2015, pp. 234–241.
[53] Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, B. Poole, Score-based generative modeling through stochastic differential equations, arXiv preprint arXiv:2011.13456 (2020).
Appendix A. Coarse-graining and stress-field smoothing
The particle-scale quantities were mapped onto a structured Eulerian grid. For each cell, the velocity was calculated by averaging the velocities of particles whose centers were located within the cell. The granular temperature was evaluated from the particle velocity fluctuations relative to the cell-averaged velocity.
The raw cell-scale contact stress was calculated using Eq. (19). Because the number and configuration of particle contacts vary between adjacent cells, the raw stress fields contain local particle-scale fluctuations. The stress tensor was therefore spatially averaged over a neighborhood surrounding cell :
where is the smoothed stress component at cell , denotes the set of neighboring cells included in the averaging operation, and is the number of cells in that neighborhood. This operation reduces localized fluctuations caused by the discrete particle contacts while retaining the dominant spatial distribution of the stress field.
Appendix B. Dataset conditions
The dataset contained 88 DEM simulation cases generated using different inclination angles, particle numbers, and random initialization seeds. Each case contained 500 snapshots recorded at intervals of 0.002 s, corresponding to a total simulated duration of 1.0 s. The simulation conditions are summarized in Table B-1.
Table B-1. Summary of the DEM simulation conditions used to construct the dataset
| Inclination angle (°) | Particle number | Random seeds | Number of cases |
|---|---|---|---|
| 15, 20, 25 | 40,000 | 500, 1000, 2000 | 9 |
| 30, 35, 37.5, 40, 42.5, 45, 47.5, 50 | 40,000, 50,000, 60,000 | 500, 1000, 2000 | 72 |
| 55 | 40,000, 50,000 | 500, 1000, 2000 | 6 |
| 60 | 20,000 | 500 | 1 |
| Total | 88 | ||
Table B-2. Test cases in dataset
| Number | Angle (°) | Seeds | |
|---|---|---|---|
| 1, 2, 3 | 20 | 40,000 | 500, 1000, 2000 |
| 4 | 25 | 40,000 | 500 |
| 5 | 30 | 40,000 | 2000 |
| 6 | 35 | 40,000 | 500 |
| 7 | 37.5 | 40,000 | 1000 |
| 8, 9, 10 | 40 | 50,000 | 500, 1000, 2000 |
| 11 | 45 | 40,000 | 1000 |
| 12 | 47.5 | 60,000 | 500 |
| 13 | 50 | 60,000 | 500 |
| 14 | 55 | 50,000 | 500 |
| 15 | 60 | 20,000 | 500 |
Appendix C. Hyperparameter of network
Table C-1. Summary of network architecture and training hyperparameter.
| Module | Hyperparameter | Value |
|---|---|---|
| VAE | Latent dimension | 256 |
| KL weight | 1e-04 | |
| Batch size | 512 | |
| Initial learning rate | 1e-03 | |
| Temporal DiT (FM) | Hidden dimension | 768 |
| Transformer blocks | 8 | |
| Attention heads | 8 | |
| MLP expansion ratio | 4 | |
| Batch size | 128 | |
| Guidance sampling | Initial learning rate | |
| Integration steps | 100 | |
| 1, 1 |
Appendix D. Definitions of pressure, deviatoric stress, and shear rate
The pressure and deviatoric stress were calculated from the stress components as,
Here, represents the mean normal stress, and is the maximum deviatoric stress in the plane. Compressive normal stresses are taken as positive.
The shear rate was defined as the vertical gradient of the horizontal velocity,
where is the horizontal velocity and is the vertical coordinate. The shear rate has units of .
Appendix E. Reconstruction from partial basal stress observations
Figure E.9 provides supplementary results for reconstruction from partial basal stress observations. Panel (a) illustrates the observation configuration. Panel (b) compares the DEM reference, prediction, and error fields for the representative case at s. Panel (c) summarizes the temporal reconstruction errors across 15 cases under the same observation configuration.
(a)

(b)
Observation
(c)
Figure E.9. Conditional generation from partial basal stress observations. (a) Schematic view of partial stress observation: two basal stress component and are observed within a rectangular window (red dashed box) on the bottom. (b) Ground truth, GenAI prediction, and absolute error contour of the velocity magnitude , granular temperature T, and pressure p. (c) Temporal evolution of the mean absolute error (MAE) of individual velocity components, granular temperature, and stress components; solid lines denote mean over all test cases and shaded bands indicate the range across all test cases.
Appendix F. Hyperparameters of the comparison models
Table F-1. Hyperparameter configurations adopted for the comparison models
| Model | Main architecture | Batch size | Learning rate | Sampling steps |
|---|---|---|---|---|
| MLP | Hidden dim. 512, 4 blocks | 128 | 100 | |
| Temporal MLP | Hidden dim. 768, 4 blocks | 128 | 100 | |
| U-Net | Channels 64–128–256–512 | 32 | 100 | |
| Temporal DiT | Hidden dim. 768, 8 blocks, 8 headsU-Net, base channels 32, | 128 | 100 | |
| DDPM | multipliers 1–2–2–4, 2 residual blocksBase channels 32, multipliers 1–2–2–4, | 128 | 100 | |
| NCSN | 2 residual blocks, InstanceNorm++U-Net, channels 128–256–512–512, | 128 | 100 | |
| CFM | 2 residual blocks per level | 16 | 100 time points per frame(99 Euler updates) |
Appendix G. Conservation comparison with score-based generative models
The temporal evolution of the globally integrated mass and momentum was compared among PI-LCFM, DDPM, NCSN, and the DEM reference. As shown in Figure G.10, PI-LCFM followed the DEM reference more closely than the two score-based baselines over most of the sequence. NCSN exhibited the largest deviations and temporal fluctuations, whereas PI-LCFM produced the lowest aggregate conservation errors among the evaluated generative models.
Appendix H. Hierarchical decomposition of ensemble variance
For each test case, the ensemble contained independently trained FM models, observation-noise realizations, and inference initializations. Let denote the normalized reconstructed value of variable at a spatial–temporal location . The indices and identify the model, observation realization, and inference initialization, respectively. The case index is omitted for clarity. The VAE was fixed throughout the ensemble.

(b)

Ground truth
PI-LCFM
DDPM
NCSN
Figure G.10. Temporal evolution of conservation-residual RMSEs obtained from PI-LCFM, DDPM, NCSN, and the DEM reference. (a) Mass conservation and (b) Momentum conservation.
The decomposition follows the law of total variance, conditioning first on the model and then on the observation realization:
Here, expectations and variances are taken over the equally weighted empirical ensemble. The three terms quantify variation across inference initializations, observation realizations within each model, and model-specific ensemble means.
At each location and for each variable, define the successive ensemble means as
where v and u have been suppressed. The empirical variance components are
These components satisfy the exact empirical identity
The identity follows by expanding into three successive deviations,
All cross terms vanish after summation. The variance denominators use the numbers of ensemble members at each level, without Bessel corrections. This convention preserves the additive identity for the finite ensemble. The attribution depends on the conditioning order, with interaction effects included in the corresponding conditional components.
The case-level variance was obtained by averaging the variance fields over the evaluated spatial and temporal locations and variables:
Here, is the number of evaluated variables, and is the set of evaluated spatial–temporal locations for variable . The same evaluation locations were used for all ensemble members and variance components within each case. The same evaluation locations and normalization scales are used for all ensemble members and all variance components within a case. Consequently, . The percentage contribution of each component is calculated after aggregation:
For the five cases, the final table row reports the arithmetic mean of the case-specific percentages and the arithmetic mean of the total normalized variances. The decomposition quantifies ensemble variability under the specified hierarchy. Reconstruction errors associated with the fixed VAE are evaluated separately against the DEM reference.
Appendix I. Froude number computation
The bulk mobility of the flow was characterized by the Froude number,
(I.1) where is the depth-averaged flow speed of an -column weighted by the solid volume fraction, is the bed-normal flow depth, is the gravitational acceleration, and is the local bed inclination ( on the inclined plane and 0 on the horizontal plane). Only cells with were included, and columns containing at least two such cells were retained. The column values were averaged with the column mass as the weight over the four slices and over the active stage of the flow, defined as the frames in which the total kinetic energy of the DEM reference exceeds 5% of its peak value. The same procedure was applied to the reconstructed and DEM fields, and the relative error was used to assess whether a reconstruction recovers the bulk flow state.