Additive manufacturing (AM) offers unparalleled design freedom but remains limited by complex, nonlinear process physics that hinder consistent quality and autonomous control. This work introduces a real-time multiphysics simulation framework that provides the foundational simulation layer required for a future digital twin of fused filament fabrication (FFF). Built on a GPU-accelerated, mesh-free solver named Merlin, the framework couples Smoothed Particle Hydrodynamics (SPH), Position-Based Dynamics (PBD), and explicit heat transfer within a unified particle-based architecture. This allows the model to reproduce key thermomechanical behaviours-fluid flow, solid deformation, and heat diffusion-while maintaining interactive rates suitable for closed-loop experimentation and reinforcement learning (RL). Validation against polylactic acid (PLA) extrusion experiments shows good agreement in bead geometry (5–25% error). A proof-of-concept RL controller trained using Proximal Policy Optimization (PPO) successfully modulated extrusion flow rates to improve deposition coverage. Together, these results demonstrate that a fast, GPU-native simulation engine can provide reliable synthetic data and support learning-in-the-loop workflows, establishing a practical foundation for fully integrated digital twin systems enabling autonomous and adaptive AM.
Topart et al. (Wed,) studied this question.