当前位置: X-MOL 学术Comput. Phys. Commun. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
On the boundary conditions of magnetic field in OpenFOAM and a magnetic field solver for multi-region applications
Computer Physics Communications ( IF 7.2 ) Pub Date : 2021-02-20 , DOI: 10.1016/j.cpc.2021.107883
W.M. Yang

This work begins with the discretization of the governing equations of magnetic field for different type of magnetic media over a two-dimensional rectangular domain using a Cartesian grid system. The basic rules that the coefficients of the discretization equation should obey, to ensure physical realism and overall balance, are discussed. In order to satisfy the rule, “consistency at control-volume faces,” the formulation of the permeability at the interface between two adjacent control volumes is derived. It reveals that the interface permeability is equal to the anti-linear interpolation of that on the cell centroids under the assumption of flux consistency at control-volume faces. For the purpose of effectively calculating magnetic fields using the FVM based OpenFOAM toolbox, the representations of boundary conditions on the interfaces between different type of media are for the first time derived. A C++ class named magPhiMixedFvPatchField describing the newly derived boundary conditions is defined based on OpenFOAM libraries. The new open-source solver labelled as magneticMultiRegionFoam, for the simulation of static magnetic field with multi-regions, based on FVM in the OpenFOAM framework is for the first time developed and validated. Comparison of the results of the predicted magnetic field for a cylindrical magnet in air with that obtained from Comsol software and the analytical method verifies the fidelity of the solver implementation. For the case of calculating the magnetic levitation forces exerted on a magnet immersed in ferrofluid, the results obtained from magneticMultiRegionFoam show better consistency with the experimental ones than Comsol software.

Program summary

Program Title: magneticMultiRegionFoam

CPC Library link to program files: https://doi.org/10.17632/858w9rpf58.1

Licensing provisions: GNU General Public License v3

Programming language: C++

External routines/libraries: OpenFOAM (http://www.openfoam.org)

Nature of problem: Solving the magnetic field with multi-regions

Solution method: Finite Volume Method (FVM) with a self-defined class describing the boundary conditions between different type of magnetic media.

Additional comments including restrictions and unusual features: The current version of the solver can only be applied at static magnetic field.



中文翻译:

关于OpenFOAM中磁场的边界条件和用于多区域应用的磁场求解器

这项工作从使用笛卡尔网格系统在二维矩形域上离散化不同类型磁介质的磁场控制方程开始。讨论了离散方程系数应遵循的基本规则,以确保物理逼真度和总体平衡。为了满足“控制体积面的一致性”规则,导出了两个相邻控制体积之间的界面处的渗透率的公式。结果表明,在控制面的通量一致性假设下,界面渗透率等于细胞质心的反渗透率。为了使用基于FVM的OpenFOAM工具箱有效地计算磁场,首次推导了不同类型介质之间界面上边界条件的表示。基于OpenFOAM库定义了一个名为magPhiMixedFvPatchField的C ++类,它描述了新导出的边界条件。首次开发并验证了一种新的开源求解器,它被标记为magneticMultiRegionFoam,用于基于OpenFOAM框架中的FVM模拟多区域的静磁场。将空气中的圆柱形磁体的预测磁场的结果与从Comsol软件获得的磁场和分析方法进行比较,可以验证求解器实现的保真度。对于计算浸在铁磁流体中的磁体上的磁悬浮力的情况,

计划摘要

节目名称:magneticMultiRegionFoam

CPC库链接到程序文件: https : //doi.org/10.17632/858w9rpf58.1

许可条款:GNU通用公共许可证v3

程式语言:C ++

外部例程/库:OpenFOAM(http://www.openfoam.org)

问题的本质:解决多区域磁场

解决方法:有限体积法(FVM)具有自定义类,用于描述不同类型的磁性介质之间的边界条件。

包括限制和异常功能在内的其他注释:当前版本的求解器只能在静态磁场中应用。

更新日期:2021-02-21
down
wechat
bug