基于Python的直流电阻率法三维有限元数值模拟
Three-Dimensional Finite Element Numerical Simulation of Direct Current Resistivity Method Based on Python
DOI: 10.12677/ag.2024.1412150, PDF,    科研立项经费支持
作者: 石 靖, 陈汉波, 喻佳敏, 李耀昕:桂林理工大学地球科学学院,广西 桂林;庞满莹:江西省地质局物化探大队,江西 南昌;梁 卓, 崔杨洋:中国冶金地质总局第三地质勘查院,山西 太原
关键词: 直流电阻率法有限单元法数值模拟压缩存储PythonDC Resistivity Method FEM Numerical Simulation Compressed Storage Python
摘要: 利用Python平台强大的科学计算库,拟实现电导率分块均匀的直流电阻率法三维有限元数值模拟。基于Galerkin法给出稳定电流场三维双电源总场电位边值问题的控制方程,采用六面体单元剖分和三线性插值进行有限单元分析,将控制方程化为线性方程组,分别采用压缩稀疏列矩阵(CSC)与压缩稀疏行矩阵(CSR)存储总体系数矩阵,对比科学计算库SciPy及PyPardiso的求解速度与准确度,试算层状介质模型及单一、组合异常体模型,结果表明:H型层状介质的视电阻率测深解析解与有限元数值解最大相对误差低于3.00%,平均相对误差1.54%,本文算法有效;在Python平台求解地球物理正演中大型稀疏线性方程组时,PyPardiso与SciPy精度一致,当方程未知个数达37万时,PyPardiso比SciPy求解速度快约66倍;以CSC与CSR形式存储的大型稀疏线性系统,在同一求解器中求解效率相当。
Abstract: Utilizing the powerful scientific computing libraries on the Python platform, this study aims to implement a three-dimensional finite element numerical simulation for direct current (DC) resistivity with uniform conductivity blocks. By applying the Galerkin method, we derived control equations for the boundary value problem of a steady-state electric field with dual-source potential. Hexahedral meshing and trilinear interpolation were used for finite element analysis, converting the control equations into linear algebraic systems. The global coefficient matrix was stored in Compressed Sparse Column (CSC) and Compressed Sparse Row (CSR) formats to evaluate the speed and accuracy of solvers in SciPy and PyPardiso. Test cases included layered media models and single and combined anomaly models. Results show that, for H-type layered media, the maximum relative error between the apparent resistivity depth profiling analytical solution and the finite element numerical solution was below 3.00%, with an average relative error of 1.54%, validating the algorithm. When solving large-scale sparse linear systems in geophysical forward modeling on Python, PyPardiso and SciPy demonstrated consistent accuracy; for systems with up to 370,000 unknowns, PyPardiso achieved approximately 66 times faster performance than SciPy. For large sparse systems stored in either CSC or CSR formats, both achieved comparable efficiency with the same solver.
文章引用:石靖, 庞满莹, 梁卓, 崔杨洋, 陈汉波, 喻佳敏, 李耀昕. 基于Python的直流电阻率法三维有限元数值模拟[J]. 地球科学前沿, 2024, 14(12): 1604-1615. https://doi.org/10.12677/ag.2024.1412150

参考文献

[1] 阮百尧, 熊彬. 电导率连续变化的三维电阻率测深有限元模拟[J]. 地球物理学报, 2002, 45(1): 131-138.
[2] 阮百尧, 熊彬, 徐世浙. 三维地电断面电阻率测深有限元数值模拟[J]. 地球科学, 2001, 26(1): 73-77.
[3] 黄俊革. 三维电阻率/极化率有限元正演模拟与反演成像[D]: [博士学位论文]. 长沙: 中南大学, 2003.
[4] 汤井田, 公劲喆. 三维直流电阻率有限元-无限元耦合数值模拟[J]. 地球物理学报, 2010, 53(3): 717-728.
[5] 任政勇, 汤井田. 基于局部加密非结构化网格的三维电阻率法有限元数值模拟[J]. 地球物理学报, 2009, 52(10): 2627-2634.
[6] 杨志龙. 基于非结构自适应有限元的三维直流电阻率各向异性响应正演研究[D]: [硕士学位论文]. 长春: 吉林大学, 2018.
[7] 赵宁, 黄明卫, 申亚行, 等. 高阶自适应有限元三维直流电阻率正演方法及其在沁水盆地煤气层压裂监测中的应用[J]. 石油地球物理勘探, 2021, 56(1): 209-216.
[8] 刘斌, 李术才, 李树忱, 等. 基于预条件共轭梯度法的直流电阻率三维有限元正演研究[J]. 岩土工程学报, 2010, 32(12): 1846-1853.
[9] 张钱江, 戴世坤, 陈龙伟, 等. 多源条件下直流电阻率法有限元三维数值模拟中一种近似边界条件[J]. 地球物理学报, 2016, 59(9): 3448-3458.
[10] 欧东新, 王超, 闫凯暄, 等. 电导率线性变化直流电测深三维有限单元法正演模拟[J]. 桂林理工大学学报, 2019, 39(3): 606-614.
[11] 朱姣. 基于四面体网格谱元法三维电磁正演模拟研究[D]: [博士学位论文]. 长春: 吉林大学, 2022.
[12] Cockett, R., Kang, S., Heagy, L.J., Pidlisecky, A. and Oldenburg, D.W. (2015) Simpeg: An Open Source Framework for Simulation and Gradient Based Parameter Estimation in Geophysical Applications. Computers & Geosciences, 85, 142-154. [Google Scholar] [CrossRef
[13] Krischer, L., Megies, T., Barsch, R., Beyreuther, M., Lecocq, T., Caudron, C., et al. (2015) Obspy: A Bridge for Seismology into the Scientific Python Ecosystem. Computational Science & Discovery, 8, Article ID: 014003. [Google Scholar] [CrossRef
[14] Rücker, C., Günther, T. and Wagner, F.M. (2017) Pygimli: An Open-Source Library for Modelling and Inversion in Geophysics. Computers & Geosciences, 109, 106-123. [Google Scholar] [CrossRef
[15] 余洋. 垂直地电剖面法数值模拟及其分析[D]: [硕士学位论文]. 成都: 西南交通大学, 2006.
[16] 冯凯, 秦策. 大地电磁(MT)自适应有限元各向异性正演[J]. 吉林大学学报(地球科学版), 2020, 50(6): 1887-1896.
[17] 欧东新, 阮百尧. 电性轴对称分布电阻率测井的有限元法模拟[J]. 桂林工学院学报, 2002, 22(2): 123-128.
[18] 韩思旭, 李勇, 陈卫营, 等. 基于CUDA并行计算的大地电磁二维有限元数值模拟研究[J]. 地球物理学进展, 2016, 31(3): 1095-1102.
[19] 崔杨洋. 基于OpenMP大地电磁二维有限元正演模拟[D]: [硕士学位论文]. 桂林: 桂林理工大学, 2017.
[20] 强建科, 罗延钟. 三维地形直流电阻率有限元法模拟[J]. 地球物理学报, 2007, 50(5): 1606-1613.
[21] 王亮, 王鹤, 席振铢, 等. 基于预处理广义极小残量法的大地电磁正演计算[J]. 地球物理学进展, 2013, 28(1): 165-170.
[22] Virtanen, P., Gommers, R., Oliphant, T.E., Haberland, M., Reddy, T., Cournapeau, D., et al. (2020) Scipy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nature Methods, 17, 261-272. [Google Scholar] [CrossRef] [PubMed]
[23] Haas, A. (2024) Python Interface to the Intel MKL Pardiso Library to Solve Large Sparse Linear Systems of Equations.
https://github.com/haasad/PyPardiso
[24] 熊彬, 徐志锋, 蔡红柱. MATLAB地球物理科学计算实战[M]. 武汉: 中国地质大学出版社, 2020: 279-283.