Optimization time integrators are effective at solving complex multi-physics problems including deformable solids with non-linear material models, contact with friction, strain limiting, etc. For challenging problems, Newton-type optimizers are often used, which necessitates first- and second-order derivatives of the global non-linear objective function. Manually differentiating, implementing, testing, optimizing, and maintaining the resulting code is extremely time-consuming, error-prone, and precludes quick changes to the model, even when using tools that assist with parts of such pipeline. We present SymX, an open source framework that computes the required derivatives of the different energy contributions by symbolic differentiation, generates optimized code, compiles it on-the-fly, and performs the global assembly. The user only has to provide the symbolic expression of each energy for a single representative element in its corresponding discretization and our system will determine the assembled derivatives for the whole simulation. We demonstrate the versatility of SymX in complex simulations featuring different non-linear materials, high-order finite elements, rigid body systems, adaptive discretizations, frictional contact, and coupling of multiple interacting physical systems. SymX's derivatives offer performance on par with SymPy, an established off-the-shelf symbolic engine, and produces simulations at least one order of magnitude faster than TinyAD, an alternative state-of-the-art integral solution.
翻译:优化时间积分器在求解复杂多物理场问题(包括具有非线性材料模型的可变形固体、带摩擦的接触、应变限制等)方面表现出色。对于具有挑战性的问题,通常使用牛顿型优化器,这需要全局非线性目标函数的一阶和二阶导数。手动对生成的代码进行微分、实现、测试、优化和维护极其耗时、容易出错,并且阻碍了对模型的快速修改,即使在使用辅助部分流程的工具时也是如此。我们提出了SymX,一个开源框架,它通过符号微分计算不同能量贡献所需的导数,生成优化代码,即时编译,并执行全局组装。用户只需为离散化中单个代表性单元提供每个能量的符号表达式,我们的系统即可确定整个模拟的组装导数。我们展示了SymX在复杂模拟中的多功能性,包括不同的非线性材料、高阶有限元、刚体系统、自适应离散化、摩擦接触以及多个相互作用物理系统的耦合。SymX的导数性能与成熟的现成符号引擎SymPy相当,并且产生的模拟速度至少比另一种先进的积分解决方案TinyAD快一个数量级。