Physical units are fundamental to scientific computing. However, many finite element frameworks lack built-in support for dimensional analysis. In this work, we present a systematic framework for integrating physical units into the Unified Form Language (UFL). We implement a symbolic Quantity class to track units within variational forms. The implementation exploits the abelian group structure of physical dimensions. We represent them as vectors in $\mathbb{Q}^n$ to simplify operations and improve performance. A graph-based visitor pattern traverses the expression tree to automate consistency checks and factorization. We demonstrate that this automated nondimensionalization functions as the simplest form of Full Operator Preconditioning. It acts as a physics-aware diagonal preconditioner that equilibrates linear systems prior to assembly. Numerical experiments with the Navier--Stokes equations show that this improves the condition number of the saddle-point matrix. Analysis of Neo-Hooke hyperelasticity highlights the detection of floating-point cancellation errors in small deformation regimes. Finally, the Poisson--Nernst--Planck system example illustrates the handling of coupled multiphysics problems with derived scaling parameters. Although the implementation targets the FEniCSx framework, the concepts are general and easily adaptable to other finite element libraries using UFL, such as Firedrake or DUNE.


翻译:物理单位是科学计算的基础。然而,许多有限元框架缺乏对量纲分析的内置支持。在本工作中,我们提出了一个将物理单位集成到统一形式语言(UFL)中的系统框架。我们实现了一个符号化的Quantity类来跟踪变分形式中的单位。该实现利用了物理量纲的阿贝尔群结构。我们将它们表示为$\mathbb{Q}^n$中的向量,以简化运算并提高性能。一个基于图的访问者模式遍历表达式树,以自动化一致性检查和因式分解。我们证明这种自动无量纲化可作为全算子预处理的最简形式。它充当一种物理感知的对角预处理器,在组装前平衡线性系统。针对Navier--Stokes方程的数值实验表明,这改善了鞍点矩阵的条件数。对Neo-Hooke超弹性的分析突出了在小变形区域中浮点抵消误差的检测。最后,Poisson--Nernst--Planck系统示例说明了如何处理具有派生缩放参数的耦合多物理场问题。尽管该实现针对FEniCSx框架,但其概念具有通用性,可轻松适配其他使用UFL的有限元库,例如Firedrake或DUNE。

0
下载
关闭预览

相关内容

专知会员服务
92+阅读 · 2021年4月12日
最新《自动微分》综述教程,71页ppt
专知会员服务
22+阅读 · 2020年11月22日
最新《自动微分手册》77页pdf
专知会员服务
105+阅读 · 2020年6月6日
自动结构变分推理,Automatic structured variational inference
专知会员服务
41+阅读 · 2020年2月10日
自动特征工程在推荐系统中的研究
DataFunTalk
10+阅读 · 2019年12月20日
概述自动机器学习(AutoML)
人工智能学家
19+阅读 · 2019年8月11日
入行量化,你必须知道的几点
深度学习与NLP
12+阅读 · 2019年3月5日
【收藏】支持向量机原理详解+案例+代码!【点击阅读原文下载】
机器学习算法与Python学习
10+阅读 · 2018年9月13日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
BES:让语言模型通过双向进化搜索自我改进
专知会员服务
0+阅读 · 5月30日
以色列-美国-伊朗战争中的无人机:关键要点
专知会员服务
3+阅读 · 5月30日
《Palantir任务保障性软件安全标准(MA-S2)》
专知会员服务
7+阅读 · 5月30日
基于声学的无人机检测技术综述
专知会员服务
5+阅读 · 5月30日
《当代混合战争分析框架:俄乌战争经验教训》
战略前沿人工智能的再思考(中文)
专知会员服务
7+阅读 · 5月29日
《量化地基防空系统间接效应的博弈论方法》
专知会员服务
5+阅读 · 5月29日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员