Full text
The high-order finite volume method for solid mechanics in OpenFOAM Ivan Batistić Philip Cardiff 30th June to 4th July 2025 20th OpenFOAM Workshop Austrian Institute of Technology Vienna, Austria School of Mechanical and Materials Engineering University College Dublin Faculty of Mechanical Engineering and Naval Architecture University of Zagreb
2 About high-order methods
3 Are high-order methods expensive?This one is among the most widely held belief about high-order methods How to compare methods of different orders? Only fair way to compare efficiency is to look at the computational cost to achieve the same level of accuracy High-order methods are not necessarily expensive
4 Are high-order methods expensive? Why we should use high-order method? To reduce error by a factor of 4 (only in space) A first-order method needs to increase the degrees of freedom by a factor of 64 A second-order method needs to increase the degrees of freedom by a factor of 8 A third-order method needs to increase the degrees of freedom by a factor of 4 Why should we stop at second-order accuracy?
5 Are high-order methods expensive? Why we should use high-order method? 0 20 40 60 80 1 2 3 4 Error level for RANS simulations Low order methods Log(Cost) Log(Error) High-order method Is second-order accuracy really a “sweet spot” for all applications? Error level for acoustic wave propagation
6 Are high-order methods expensive? Why we should use high-order method? Reduced data motion Less number of cells = less data to store and transfer Data motion is expensive! High-order in combination with matrix-free methods is promising direction for exascale architectures High-order approach eliminate or greatly reduce locking effects! Some other benefits
7 Are high-order methods expensive? Why we should use high-order method? They are more complicated compared to low-order methods Implementation (in CFD) is often less robust compared to the lower order method Implementation posses high memory requirement Lower-order methods can achieve the required accuracy at reasonable cost for a wide range of problems Why high-order methods are not used?
8 Are high-order methods expensive? Why we should use high-order method? To implement high-order method for solid mechanics in OpenFOAM (solids4foam) Not done before To compare the efficiency of highorder method with that of the standard second-order one Not available To address solid mechanics problems where the use of high-order method is beneficial Not available Why high-order methods are not used? Goal of this work
9 The high-order finite volume method for solid mechanics in a nutshell
16 How to calculate traction at face quadrature points? Write traction vector at quadrature points in terms of displacement Write derivatives of displacement using interpolation coefficients Rewrite traction vector using interpolation coefficients
17 How to calculate traction at face quadrature points? Write traction vector at quadrature points in terms of displacement Write derivatives of displacement using interpolation coefficients Rewrite traction vector using interpolation coefficients Neighboring cell-centre displacement [A]u=b Interpolation coefficients
18 How to calculate traction at face quadrature points? Write traction vector at quadrature points in terms of displacement Write derivatives of displacement using interpolation coefficients Rewrite traction vector using interpolation coefficients Neighboring cell-centre displacement Interpolation coefficients
19 How to calculate traction at face quadrature points? Write traction vector at quadrature points in terms of displacement Write derivatives of displacement using interpolation coefficients Rewrite traction vector using interpolation coefficients Neighboring cell-centre displacement [A]u=b
20 How to calculate interpolation coefficient? Weighted least squares 1 ) Write truncated Taylor series of variable at quadrature point : 2 ) Minimize weighted sum of squares: By minimizing weighted sum of squares it is possible to calculate unknown interpolation coefficients u ˜ x u(˜ x)+ ∂u ∂x(˜ x)(x−˜x)+ ∂u ∂y(˜ x)(y−˜y)+ ∂2u ∂x2(˜ x)(x−˜x)2+∂2u ∂x∂y(˜ x)(x−˜x)(y−˜y)… ℛ=1 2∑Nn w(xn−˜ x)[˜u(xn)−un]2 cx,n Cell-centre displacement Cell-centre displacement from Taylor series Radially symmetric exponential weight function
21 When to calculate interpolation coefficient? Before assembling matrix. For static mesh it is computed only once Storing interpolation coefficients (high memory requirement) Example: hexahedral cell (6 faces) 36 quadrature points (for third order method) Each quadrature point needs to store list of interpolation vectors List size is equal to the cell stencil size (20-50 )
22 Second-order discretisation stencil High-order discretisation stencil Linear (second order)
23 Second-order discretisation stencil High-order discretisation stencil Linear (second order) Quadratic (third order)
24 Second-order discretisation stencil High-order discretisation stencil Linear (second order) Quadratic (third order) Cubic (fourth order) …
25 Second-order discretisation stencil Segregated stencil (semi-implicit) High-order discretisation stencil Coupled stencil (implicit)
32 ∮Γ n⋅[μ∇u+μ∇uT+λtr(∇u)I]dΓ+∫Ω b dΩ= 0 elasticSolidFoam
33 Example: Method of manufactured solutions 1x1 m square domain with zero boundary displacement and imposed variable body force Body force is calculated from expected analytical solution Example is taken from: Aycock, Kenneth I., Nuno Rebelo, and Brent A. Craven. "Method of manufactured solutions code verification of elastostatic solid mechanics problems in a commercial finite element solver." Computers & Structures, 2020.
34 Second-order discretisation Example: Kirchhoff plate 1x1 m square plate supported on all edges Loaded with constant pressure 22s 3.3s 4.5s
35 Second-order discretisation Implementation in OpenFOAM (solids4foam) Interface to solvers PETSc, Eigen Handling arbitrary stencils Face and cell decomposition Calculation and storage of interpolation coefficients at quadrature points Implicit & explicit operators e.g. hofvm::laplacian,! hofvm::laplacianTrace,! hofvc::grad, …
36 Second-order discretisation Example: cantilever beam 22s 50x2 m cantilever beam Loaded with force on the right end and fixed onto the left edge Displacement at x=25 m 2,1 2,3 2,5 2,7 Mesh size 505 1057 1809 2761 3913 fourth-order third-order second-order solids4Foam (PETSc-SNES)
37 Final thoughts
38 Final thoughts Challenges Parallelisation Code structure and data handling, large stencil is not a OpenFOAM philosophy Stencil shape algorithm Current & future steps Jacobian-free Newton-Krylov method Mixed high-order solid solvers Other, more economical, high-order implementation Other grid arrangements
References 1) Z.J. Wang, High-order methods for the Euler and Navier-Stokes equations on unstructured grids, Progress in Aerospace Sciences, Volume 43, Issues 1-3, 2007 2) Pablo Castrillo, Alfredo Canelas, Eugenio Schillaci, Joaquim Rigola, Asensio Oliva, High-order finite volume method for linear elasticity on unstructured meshes, Computers & Structures, Volume 268, 2022 3) Pablo Castrillo, Eugenio Schillaci, Joaquim Rigola, High-order cell-centered finite volume method for solid dynamics on unstructured meshes, Computers & Structures, Volume 295, 2024 4) Wang, Z.J. and Fidkowski, Krzysztof and Abgrall, Rémi and Bassi, Francesco and Caraeni, Doru and Cary, Andrew and Deconinck, Herman and Hartmann, Ralf and Hillewaert, Koen and Huynh, H.T. and Kroll, Norbert and May, Georg and Persson, Per-Olof and van Leer, Bram and Visbal, Miguel, High-order CFD methods: current status and perspective, International Journal for Numerical Methods in Fluids, Volume 72, 2013 5) P. Cardiff, I. Batistić Ž. Tuković: solids4foam: A toolbox for performing solid mechanics and fluid-solid interaction simulations in OpenFOAM. Journal of Open Source Software. 2025 6) Kolev, Tzanio, et al. Efficient exascale discretizations: High-order finite element methods,'The International Journal of High Performance Computing Applications'35.6, 2021 39
Acknowledgments This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant Agreement No. 101088740). Support is also gratefully acknowledged from I-Form, funded by Research Ireland (formerly SFI) Grant Numbers 16/RC/3872 and 21/RC/ 10295 P2, co-funded under European Regional Development Fund and by I-Form industry partners, and from NexSys, funded by SFI Grant Number 21/SPP/3756. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them". 40
The high-order finite volume method for solid mechanics in OpenFOAM Ivan Batistić Philip Cardiff 30th June to 4th July 2025 20th OpenFOAM Workshop Austrian Institute of Technology Vienna, Austria School of Mechanical and Materials Engineering University College Dublin Faculty of Mechanical Engineering and Naval Architecture University of Zagreb