arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.11713math.OC
收藏

AutoFreeFem:用于非线性多物理问题形状与拓扑优化的 FreeFEM++ 自动代码生成及 LaTeX 输出

AutoFreeFem: Automatic code generation with FreeFEM++ and LaTex output for shape and topology optimization of non-linear multi-physics problems

Grégoire Allaire, Michael H. Gfrerer

AI总结:

AutoFreeFem 是一个 Python 包,通过符号微分和 Lagrangian 方法自动生成 FreeFEM++ 代码及 LaTeX 表达式,用于非线性多物理形状优化,并验证了导数精度。

摘要:

出于教学目的,我们开发了 Python 包 AutoFreeFem,它能够生成用于 FreeFEM++ 中非线性多物理形状优化的所有要素,并输出用于 LaTeX 的表达式。作为输入,目标函数和问题的弱形式只需指定一次。这确保了仿真代码与其文档之间的一致性。特别是,AutoFreeFem 提供了状态方程的线性化、伴随问题、形状导数,以及用于形状优化的基于水平集的网格演化方法的基本实现。为了计算形状导数,我们利用数学 Lagrangian 方法来微分 PDE 约束的形状函数。微分是使用 Sympy 符号化完成的。在数值实验中,我们验证了所计算导数的准确性。最后,我们通过考虑非线性扩散问题、线性和非线性弹性问题、热弹性问题以及流固耦合问题的形状优化,展示了 AutoFreeFem 的能力。

英文摘要:

For an educational purpose we develop the Python package AutoFreeFem which generates all ingredients for shape optimization with non-linear multi-physics in FreeFEM++ and also outputs the expressions for use in LaTex. As an input, the objective function and the weak form of the problem have to be specified only once. This ensures consistency between the simulation code and its documentation. In particular, AutoFreeFem provides the linearization of the state equation, the adjoint problem, the shape derivative, as well as a basic implementation of the level-set based mesh evolution method for shape optimization. For the computation of shape derivatives we utilize the mathematical Lagrangian approach for differentiating PDE-constrained shape functions. Differentiation is done symbolically using Sympy. In numerical experiments we verify the accuracy of the computed derivatives. Finally, we showcase the capabilities of AutoFreeFem by considering shape optimization of a non-linear diffusion problem, linear and non-linear elasticity problems, a thermo-elasticity problem and a fluid-structure interaction problem.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑