Munjiza提出的有限元-离散元耦合分析方法(FEDM)是分析岩石破裂过程的一种十分有效的方法。然而,为了克服网格依赖性,需要将岩体剖分成非常细小的三角形单元,且三角形单元之间不共用节点,导致问题的变量数目巨大,计算非常耗时。为了提高计算效率,基于OpenMP(open multi-processing)多核并行技术实现了有限元-离散元法的并行化,克服了并行化过程中存在的数据竞争,实现了并行程序的负载平衡。提出了一套将串行程序并行化的策略,即首先确定串行程序的热点区域,然后尽可能地将热点区域并行化,尽量使用私有变量来规避数据竞争;若各线程间仍存在数据竞争,可采用动态链表数据结构,先将数据存于动态链表中,最后在并行区域外,将存于各个动态链表中的数据进行合并,这样可以规避数据竞争,同时避免了使用临界区或锁,从而提高了程序的并行化效果。开发了并行版本FDEM程序,将所提出的方法用于大规模工程问题的求解,最后通过陡崖塌落的算例说明该方法的有效性。
The coupling method of finite-discrete element method(FDEM) by Munjiza is an effective procedure for simulating rock failure. In order to overcome the mesh dependency, it is necessary to partition the rock mass into very small triangular elements;and the elements do not share the nodes, creating a vast number of variables, therefore, the calculation is very time consuming. The method overcomes competition among the existing data in the parallelization and balances loads in a parallel program. A set of strategies for parallelizing serial programs are proposed, determining the hot zones of the serial program, then parallelizing the hot zones as far as possible and using as many private variable as possible to circumvent competition. If there are still data competition among the treads, dynamic lists can be used to store these competitive data. Finally, the data stored in the various dynamic lists are merged outside the parallel zones. Data competition is accordingly avoided with no use of critical section or lock;and the effect of the program parallelization is hence increased. By the proposed method, the parallel version of the FDEM program is developed, which can be used to solve large-scale problem. A numerical example about cliffs collapse shows the effectiveness of the proposed method.