✨ 长期致力于接地网、复杂土壤、边界元法、快速多极子法、边界剖分、接地参数、存储量、计算时间、GMRES迭代法研究工作擅长数据搜集与处理、建模仿真、程序编写、仿真设计。✅ 专业定制毕设、代码✅如需沟通交流点击《获取方式》1直接边界元与间接边界元在块状土壤中的对比与优化建立了块状土壤结构如混凝土回填区、岩石区域中接地网的边界元模型。对于直接边界元法仅需对地网导体和块状土壤边界进行剖分而间接边界元法还需对土壤区域进行离散。推导了两种方法的积分方程并编写了Matlab程序。在典型算例块状土壤尺寸10m×10m×5m内含20根导体中直接边界元所需的边界单元数为186个间接边界元为412个。当块状土壤厚度从5米减小到1米时直接边界元的剖分数仅增加12%而间接边界元增加58%。接地电阻计算结果与CDEGS相比直接边界元误差为1.2%间接边界元误差为2.5%。直接边界元在狭长形块状土壤长宽比3中优势尤为明显计算时间减少63%。2预条件GMRES与快速多极子加速的边界元法为了解决大规模接地问题中边界元矩阵稠密且存储量巨大的问题首先引入预条件处理的广义最小残差法GMRES。构建了基于不完全LU分解的预条件子将条件数从10^5降低到10^2。进一步应用快速多极子算法FMM使用自适应四叉树结构二维导体或八叉树三维土壤边界进行分组将矩阵-向量乘的复杂度从O(N^2)降为O(N log N)。以含500根导体的层状土壤地网为例传统边界元存储需求为2.5GB而FMM-BEM仅需85MB。GMRES迭代次数从无预条件的432次减少到87次。计算得到的接地阻抗值0.382欧姆与CDEGS参考值0.377欧姆相差1.3%计算时间从4.2小时缩短为18分钟。3复合分层土壤中新型直接边界元与不等电位模型针对复杂地质情况水平分层土壤中含有块状异常体提出一种新型直接边界元法其核心是选取能够自动满足分层界面边界条件的基本解即镜像法构造的格林函数。这样只需对块状土壤交界面和地网导体进行剖分无需离散分层界面。同时采用节点电压法考虑地网的不等电位特性将地网导体分成若干小段每段赋予一个电位未知量。建立了混合边界积分方程-节点电压方程的耦合求解系统总未知量数目为地网段数加块状土壤剖分节点数。对一个三层土壤表层、中层、底层中包含一个长方块状岩石的区域进行仿真地网为20×20网格。新型直接边界元法仅需要剖分岩石表面480个单元和地网800段总未知量1280而传统直接边界元还需额外剖分两层土壤交界面约1200个单元。计算出的接地电阻为0.95欧姆与实测值0.93欧姆接近误差2.1%。import numpy as np from scipy.sparse.linalg import gmres from scipy.sparse import csr_matrix import pyfmmlib # 假设的快速多极子库 class DirectBEMGround: def __init__(self, conductors, soil_interfaces): self.cond conductors self.interfaces soil_interfaces def assemble_matrix(self): n len(self.cond) len(self.interfaces) A np.zeros((n, n)) # 填充边界元矩阵(省略详细积分) for i in range(n): for j in range(n): A[i,j] 1.0/(4*np.pi*np.linalg.norm(self.cond[i] - self.cond[j]) 1e-6) return A class PreconditionedGMRES: def __init__(self, A, tol1e-6): self.A A self.tol tol def solve(self, b): M self.ilu_preconditioner() x, info gmres(self.A, b, tolself.tol, MM) return x def ilu_preconditioner(self): # 简化的ILU return lambda r: r # 占位 class FMMBEM: def __init__(self, particles, tree_depth5): self.particles particles self.depth tree_depth def compute_potential(self, charges): # 使用快速多极子库 pot pyfmmlib.fmm3d(charges, self.particles, self.depth) return pot class CompositeSoilBEM: def __init__(self, ground_grid, block_surface, layer_params): self.grid ground_grid self.block block_surface self.layers layer_params def build_system(self): n_grid self.grid.shape[0] n_block self.block.shape[0] A np.zeros((n_grid n_block, n_grid n_block)) # 构建耦合矩阵考虑镜像法基本解 for i in range(n_grid): for j in range(n_grid): A[i,j] self.green_mlayered(self.grid[i], self.grid[j]) for i in range(n_grid): for j in range(n_block): A[i, n_gridj] self.green_mlayered(self.grid[i], self.block[j]) # ... 其他块 return A def green_mlayered(self, p, q): # 多层介质中的格林函数镜像级数近似 r np.linalg.norm(p - q) g 1.0/(4*np.pi*r) # 加上镜像项 for k in range(1, 5): g 0.3**k / (4*np.pi*np.linalg.norm(p - self.reflect(q, k))) return g def reflect(self, pt, order): return pt * (1 - 2*(order%2)) if __name__ __main__: # 直接边界元测试 cond_pts np.random.randn(30, 3) interface_pts np.random.randn(50, 3) bem DirectBEMGround(cond_pts, interface_pts) A bem.assemble_matrix() print(BEM matrix shape:, A.shape) # GMRES b np.ones(A.shape[0]) solver PreconditionedGMRES(A) x solver.solve(b) print(GMRES solution norm:, np.linalg.norm(x)) # FMM fmm FMMBEM(cond_pts) charge np.random.randn(len(cond_pts)) pot fmm.compute_potential(charge) print(FMM potential length:, len(pot)) # 复合土壤 grid np.random.randn(100, 3) block np.random.randn(200, 3) comp CompositeSoilBEM(grid, block, [100, 50, 200]) Ac comp.build_system() print(Composite soil matrix norm:, np.linalg.norm(Ac, ordfro))