ddfenicsx: a (Model-Free) Data-Driven Computational Mechanics implementation in FEniCSx (and Beyond)

  • Rocha, Felipe (Université Paris Est Créteil)

Please login to view abstract download link

Field equations are central to describing phenomena in all branches of physics, including electromagnetism, solid and fluid mechanics. Typically expressed as partial differential equations (PDEs) derived from conservation laws, they are independent of the material. However, ensuring well-posedness requires closure through constitutive models, which are not unique and may introduce modeling bias. The (model-free) Data-Driven Computational Mechanics (DDCM) framework provides an alternative to classical constitutive laws or machine-learning surrogates by directly incorporating raw discrete data (e.g., stress–strain or flux–gradient pairs) into the solution process. This approach replaces the purely PDE-based formulation with a mixed-integer minimisation problem. A common computational strategy uses alternate minimization: one PDE-like subproblem enforces equilibrium and kinematic constraints, while another discrete optimisation subproblem identifies the solution best matching the available data via nearest-neighbor search. In this presentation, we introduce ddfenicsx, a library embedding DDCM into the FEniCSx ecosystem with minimal disruption to the user workflow. The framework mirrors key FEniCSx abstractions while introducing data-driven components. Key recent improvements include: i) Translation from legacy Fenics (v2019.1.0) to FEniCSx (0.10), leveraging features like easier quadrature point retrieval and better PETSc solver access. ii) Non-intrusive mode: users can interface their FEM implementation with the DDCM solver, restricting FEniCSx usage to purely DDCM internal tasks. iii) Unified compilation of several dispersed DDCM implementation ''tricks'': tree-based Nearest Neighbor Search, Locally Convex Reconstruction, Accelerated Projection-to-Equilibrium, dynamically generated databases, and more. Applications including nonlinear elasticity, conservative mixed formulations for Darcy flow, coupled computational homogenization, and contact mechanics (check abstract at MS426) demonstrate the versatility and general applicability of ddfenicsx.