On the boundary conditions of magnetic field in OpenFOAM and a magnetic field solver for multi-region applications

On the boundary conditions of magnetic field in OpenFOAM and a magnetic field solver for multi-region applications
复制标题

DOI:
10.1016/j.cpc.2021.107883
复制
发表时间:
2021-03
期刊:
Comput. Phys. Commun.
影响因子:
--
通讯作者:
W. Yang
W. Yang
中科院分区:
其他
文献类型:
--
作者:
W. Yang

文献摘要

相似文献

本文首先采用直角坐标网格系统对二维矩形区域上不同类型磁介质的磁场控制方程进行离散。讨论了为保证物理真实性和整体平衡,离散方程系数应遵循的基本原则。为了满足“控制体面一致性”原则,推导了相邻控制体界面渗透率的计算公式。结果表明,在控制体积面通量一致性假设下,界面渗透率等于胞心渗透率的反线性插值。为了有效地利用基于有限体积法的OpenFOAM工具箱计算磁场,首次推导了不同类型介质界面上边界条件的表达式。基于OpenFOAM库定义了一个名为magPhiMixedFvPatchField的C++类,用于描述新导出的边界条件。新的开源求解器标记为magneticMultiRegionFoam,用于多区域静态磁场的模拟,基于OpenFOAM框架中的FVM,首次开发和验证。通过与Comsol软件和解析方法计算结果的比较,验证了该方法的准确性。对于磁悬浮力的计算,magneticMultiRegionFoam软件的计算结果与实验结果的一致性优于Comsol软件。程序概要程序标题:magneticMultiRegionFoamCPC Library程序文件链接:https://doi.org/10.17632/858w9rpf58.1Licensing条款:GNU General Public License v3编程语言:C++外部例程/库:OpenFOAM(http:www.openfoam.org)问题性质:用多区域求解磁场解决方法:有限体积法(FVM),自定义类,描述不同类型磁介质之间的边界条件。附加注释,包括限制和不寻常的功能:当前版本的求解器只能应用于静态磁场。
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 labeled 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 those 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 summaryProgram Title: magneticMultiRegionFoamCPC Library link to program files:https://doi.org/10.17632/858w9rpf58.1Licensing provisions: GNU General Public License v3Programming language: C++External routines/libraries: OpenFOAM (http://www.openfoam.org)Nature of problem: Solving the magnetic field with multi-regionsSolution 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.