Optimization time integrators have proven to be effective at solving complex multi-physics problems, such as deformation of solids with non-linear material models, contact with friction, strain limiting, etc. For challenging problems with high accuracy requirements, Newton-type optimizers are often used. This necessitates first- and second-order derivatives of the global non-linear objective function. Manually differentiating, implementing and optimizing the resulting code is extremely time-consuming, error-prone, and precludes quick changes to the model. We present SymX, a framework based on symbolic expressions that computes the first and second derivatives by symbolic differentiation, generates efficient vectorized source code, compiles it on-the-fly, and performs the global assembly of element contributions in parallel. The user only has to provide the symbolic expression of an energy function for a single element in the discretization and our system will determine the assembled derivatives for the whole model. SymX is designed to be an integral part of a simulation system and can easily be integrated into existing ones. We demonstrate the versatility of our framework in various complex simulations showing different non-linear materials, higher-order finite elements, rigid body systems, adaptive cloth, frictional contact, and coupling multiple interacting physical systems. Moreover, we compare our method with alternative approaches and show that SymX is significantly faster than a current state-or-the-art framework (up to two orders of magnitude for a higher-order FEM simulation).
翻译:优化时间积分器已被证明能有效解决复杂的多物理问题,例如具有非线性材料模型的固体变形、带摩擦的接触、应变限制等。对于高精度要求的挑战性问题,通常采用牛顿型优化器,这需要全局非线性目标函数的一阶和二阶导数。手动求导、实现并优化生成的代码极为耗时且易出错,同时阻碍了模型的快速修改。我们提出SymX,一种基于符号表达式的框架,通过符号微分计算一阶和二阶导数,生成高效的向量化源代码,即时编译,并并行完成单元贡献的全局组装。用户只需提供离散化中单个单元的能量函数符号表达式,系统将自动确定整个模型的组装导数。SymX被设计为仿真系统的核心组件,可轻松集成至现有系统中。我们通过多种复杂仿真展示了该框架的通用性,包括不同非线性材料、高阶有限元、刚体系统、自适应布料、摩擦接触以及多物理耦合系统。此外,我们将本方法与替代方案进行对比,结果表明SymX显著快于当前最先进的框架(在高阶有限元仿真中速度提升高达两个数量级)。