Abstract
We present an open-source software RKPM2D for solving PDEs under the reproducing kernel particle method (RKPM)-based meshfree computational framework. Compared to conventional mesh-based methods, RKPM provides many attractive features, such as arbitrary order of continuity and discontinuity, relaxed tie between the quality of the discretization and the quality of approximation, simple h-adaptive refinement, and ability to embed physics-based enrichment functions, among others, which make RKPM promising for solving challenging engineering problems. The aim of the present software package is to support reproducible research and serve as an efficient test platform for further development of meshfree methods. The RKPM2D software consists of a set of data structures and subroutines for discretizing two-dimensional domains, nodal representative domain creation by Voronoi diagram partitioning, boundary condition specification, reproducing kernel shape function generation, domain integrations with stabilization, a complete meshfree solver, and visualization tools for post-processing. In this paper, a brief overview that covers the key theoretical aspects of RKPM is given, such as the reproducing kernel approximation, weak form using Nitsche’s method for boundary condition enforcement, various domain integration schemes (Gauss quadrature and stabilized nodal integration methods), as well as the fully discrete equations. In addition, the computer implementation aspects employed in RKPM2D are discussed in detail. Benchmark problems solved by RKPM2D are presented to demonstrate the convergence, efficiency, and robustness of the RKPM implementation.
Similar content being viewed by others
References
Chen J-S, Pan C, Wu C-T, Liu WK (1996) Reproducing kernel particle methods for large deformation analysis of non-linear structures. Comput Methods Appl Mech Eng 139(1–4):195–227
Chen J-S, Hillman M, Chi S-W (2017) Meshfree methods: progress made after 20 years. J Eng Mech 143(4):04017001
Liu WK, Jun S, Zhang YF (1995) Reproducing kernel particle methods. Int J Numer Methods Fluids 20(8–9):1081–1106
Liu WK, Hao S, Belytschko T, Li S, Chang CT (1999) Multiple scale meshfree methods for damage fracture and localization. Comput Mater Sci 16(1–4):197–205
Li S, Hao W, Liu WK (2000) Mesh-free simulations of shear banding in large deformation. Int J Solids Struct 37(48–50):7185–7206
Liu WK, Jun S, Sihling DT, Chen Y, Hao W (1997) Multiresolution reproducing kernel particle method for computational fluid dynamics. Int J Numer Methods Fluids 24(12):1391–1415
Liu WK, Chen Y (1995) Wavelet and multiple scale reproducing kernel methods. Int J Numer Methods Fluids 21(10):901–931
Liu WK, Chen Y, Uras RA, Chang CT (1996) Generalized multiple scale reproducing kernel particle methods. Comput Methods Appl Mech Eng 139(1–4):91–157
Ruter MO, Chen J-S (2017) An enhanced-strain error estimator for Galerkin meshfree methods based on stabilized conforming nodal integration. Comput Math Appl 74(9):2144–2171
You Y, Chen J-S, Lu H (2003) Filters, reproducing kernel, and adaptive meshfree method. Comput Mech 31(3–4):316–326
Chen J-S, Hillman M, Ruter M (2013) An arbitrary order variationally consistent integration for Galerkin meshfree methods. Int J Numer Methods Eng 95(5):387–418
Hillman M, Chen J-S (2016) An accelerated, convergent, and stable nodal integration in Galerkin meshfree methods for linear and nonlinear mechanics. Int J Numer Methods Eng 107(7):603–630
Chen J-S, Wang D (2006) A constrained reproducing kernel particle formulation for shear deformable shell in Cartesian coordinates. Int J Numer Methods Eng 68(2):151–172
Kim NH, Choi KK, Chen J-S, Botkin ME (2002) Meshfree analysis and design sensitivity analysis for shell structures. Int J Numer Methods Eng 53(9):2087–2116
Chen J-S, Pan C, Roque C, Wang H-P (1998) A Lagrangian reproducing kernel particle method for metal forming analysis. Comput Mech 22(3):289–307
Chen J-S, Wang H-P, Yoon S, You Y (2000) Some recent improvements in meshfree methods for incompressible finite elasticity boundary value problems with contact. Comput Mech 25(2–3):137–156
Wang H-P, Wu C-T, Chen J-S (2014) A reproducing kernel smooth contact formulation for metal forming simulations. Comput Mech 54(1):151–169
Chen J-S, Basava RR, Zhang Y, Csapo R, Malis V, Sinha U, Hodgson J, Sinha S (2016) Pixel-based meshfree modelling of skeletal muscles. Comput Methods Biomech Biomed Eng Imaging Vis 4(2):73–85
Wei H, Chen J-S, Hillman M (2016) A stabilized nodally integrated meshfree formulation for fully coupled hydro-mechanical analysis of fluid-saturated porous media. Comput Fluids 141:105–115
Wei H, Chen J-S, Beckwith F, Baek J (2019) A naturally stabilized semi-Lagrangian meshfree formulation for multiphase porous media with application to landslide modeling. J Eng Mech. https://doi.org/10.1061/(ASCE)EM.1943-7889.0001729
Chen J-S, Wu C-T, Belytschko T (2000) Regularization of material instabilities by meshfree approximations with intrinsic length scales. Int J Numer Methods Eng 47(7):1303–1322
Chen J-S, Zhang X, Belytschko T (2004) An implicit gradient model by a reproducing kernel strain regularization in strain localization problems. Comput Methods Appl Mech Eng 193(27–29):2827–2844
Wei H, Chen J-S (2018) A damage particle method for smeared modeling of brittle fracture. Int J Multiscale Comput Eng 16(4):303–324
Roth MJ, Chen J-S, Slawson TR, Danielson KT (2016) Stable and flux-conserved meshfree formulation to model shocks. Comput Mech 57(5):773–792
Roth MJ, Chen J-S, Danielson KT, Slawson TR (2016) Hydrodynamic meshfree method for high-rate solid dynamics using a Rankine–Hugoniot enhancement in a Riemann-SCNI framework. Int J Numer Methods Eng 108(12):1525–1549
Huang T-H, Chen J-S, Wei H, Roth MJ, Sherburn JA, Bishop JE, Tupek MR, Fang EH (2019) A MUSCL-SCNI approach for meshfree modeling of shock waves in fluids. Comput Part Mech. https://doi.org/10.1007/s40571-019-00248-x
Guan P-C, Chi S-W, Chen J-S, Slawson T, Roth MJ (2011) Semi-Lagrangian reproducing kernel particle method for fragment-impact problems. Int J Impact Eng 38(12):1033–1047
Sherburn JA, Roth MJ, Chen J, Hillman M (2015) Meshfree modeling of concrete slab perforation using a reproducing kernel particle impact and penetration formulation. Int J Impact Eng 86:96–110
Chi S-W, Lee C-H, Chen J-S, Guan P-C (2015) A level set enhanced natural kernel contact algorithm for impact and penetration modeling. Int J Numer Methods Eng 102(34):839–866
Chen J-S, Liu WK, Hillman M, Chi S-W, Lian Y, Bessa M (2017) Reproducing kernel particle method for solving partial differential equations. In: Stein E, De Borst R, Hughes TJR (eds) Encyclopedia of computational mechanics, 2nd edn. Wiley, Chichester, pp 1–44
Hardee E, Chang K-H, Yoon S, Kaneko M, Grindeanu I, Chen J-S (1999) A structural nonlinear analysis workspace (SNAW) based on meshless methods. Adv Eng Softw 30(30):153–175
Hsieh Y-M, Pan M-S (2014) ESFM: an essential software framework for meshfree methods. Adv Eng Softw 76:133–147
Barbieri E, Meo M (2012) A fast object-oriented Matlab implementation of the reproducing kernel particle method. Comput Mech 49(5):581–602
Cartwright C, Oliveira S, Stewart DE (2006) Parallel support set searches for meshfree methods. SIAM J Sci Comput 28(4):1318–1334
Parreira GF, Fonseca AR, Lisboa AC, Silva EJ, Mesquita RC (2006) Efficient algorithms and data structures for element-free Galerkin method. IEEE Trans Magn 42(4):659–662
Olliff J, Alford B, Simkins DC (2018) Efficient searching in meshfree methods. Comput Mech 62(6):1461–1483
Chen J-S, Hillman M, Huang T-H, Wei H (2019) RKPM2D: an open-source implementation of nodally integrated reproducing kernel particle method for solving partial differential equations. Mendeley Data. https://doi.org/10.17632/prfxg9cbrx
Nitsche J (1970–1971) Uber ein Variationsprinzip zur Losung von Dirichlet-Problemen bei Verwendung von Teilraumen, die keinen Randbedingungen unterworfen sind. Abh Math Sem Univ Hamburg 36: 9–15
Fernandez-Mendez S, Huerta A (2004) Imposing essential boundary conditions in mesh-free methods. Comput Methods Appl Mech Eng 193(12–14):1257–1275
Chen J-S, Wu C-T, Yoon S, You Y (2001) A stabilized conforming nodal integration for Galerkin mesh-free methods. Int J Numer Methods Eng 50(2):435–466
Chen J-S, Hu W, Puso M, Wu Y, Zhang X (2007) Strain smoothing for stabilization and regularization of Galerkin meshfree methods. In: Schweitzer MA (ed) Meshfree methods for partial differential equations III. Springer, Berlin, pp 57–75
MATLAB Release 2019a (2019) The MathWorks Inc., Natick
Li S, Liu WK (2007) Meshfree particle methods. Springer, Berlin
Chen J-S, Wang H-P (2000) New boundary condition treatments in meshfree computation of contact problems. Comput Methods Appl Mech Eng 187(3–4):441–468
Dolbow J, Belytschko T (1999) Numerical integration of the Galerkin weak form in meshfree methods. Comput Mech 23(3):219–230
Lu Y, Belytschko T, Gu L (1994) A new implementation of the element free Galerkin method. Comput Methods Appl Mech Eng 113(3–4):397–414
Puso MA, Zywicz E, Chen J (2007) A new stabilized nodal integration approach. In: Schweitzer MA (ed) Meshfree methods for partial differential equations III. Springer, Berlin, pp 207–217
Sievers J (2016) Constrain the vertices of a Voronoi decomposition to the domain of the input data. MathWorks, 31th October 2016. http://se.mathworks.com/matlabcentral/fileexchange/34428-voronoilimit. Accessed 1st Sept 2018
Bentley JL (1975) Multidimensional binary search trees used for associative searching. Commun ACM 18(9):509–517
Perkins E, Williams JR (2001) A fast contact detection algorithm insensitive to object sizes. Eng Comput 18(1/2):48–62
Friedman JH, Bentley JL, Finkel RA (1976) An algorithm for finding best matches in logarithmic time. ACM Trans Math Softw 3(SLAC-PUB-1549-REV. 2):209–226
Steger C (1996) On the calculation of arbitrary moments of polygons. Munchen University, Technical Report FGBV-96-05, Munchen, Germany
Gilbert JR, Moler C, Schreiber R (1992) Sparse matrices in MATLAB: design and implementation. SIAM J Matrix Anal Appl 13(1):333–356
Saad Y (2003) Iterative methods for sparse linear systems. SIAM, Minneapolis
Shestakov A, Kershaw D, Zimmerman G (1990) Test problems in radiative transfer calculations. Nucl Sci Eng 105(1):88–104
Acknowledgements
The support from Sandia National Laboratories under the Contract 1655264 to the University of California, San Diego, is greatly appreciated.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A
In RKPM2D, six kernel functions with different levels of continuity are implemented, as described in Table 1, and the corresponding mathematical expressions of these kernel functions are given as follows.
- 1.
The Heaviside kernel function:
$$ \varPhi_{a} \left( {\varvec{x} - \varvec{x}_{I} } \right) = \left\{ {\begin{array}{*{20}c} {\begin{array}{*{20}c} 1 \\ 0 \\ \end{array} } & {\begin{array}{*{20}c} {\text{for}} \\ {\text{for}} \\ \end{array} } & {\begin{array}{*{20}c} {0 \le z_{I} \le 1,} \\ {z_{I} > 1} \\ \end{array} } \\ \end{array} } \right. $$(68) - 2.
The linear B-spline (tent) kernel function:
$$ \varPhi_{a} \left( {\varvec{x} - \varvec{x}_{I} } \right) = \left\{ {\begin{array}{*{20}l} {\begin{array}{*{20}l} {1 - z_{I} } \\ 0 \\ \end{array} } & {\begin{array}{*{20}l} {\text{for}} \\ {\text{for}} \\ \end{array} } & {\begin{array}{*{20}l} {0 \le z_{I} \le 1,} \\ {z_{I} > 1} \\ \end{array} } \\ \end{array} } \right. $$(69) - 3.
The quadratic B-spline kernel function:
$$ \varPhi_{a} \left( {\varvec{x} - \varvec{x}_{I} } \right) = \left\{ {\begin{array}{*{20}l} {1 - 3z_{I}^{2} } \\ {3/2 - 3z_{I} + 3/2z_{I}^{2} } \\ 0 \\ \end{array} } \right.\begin{array}{*{20}l} {\text{for}} \\ {\text{for}} \\ {\text{for}} \\ \end{array} \begin{array}{*{20}l} {0 \le z_{I} \le 1/3,} \\ {1/3 \le z_{I} \le 1,} \\ {z_{I} > 1} \\ \end{array} $$(70) - 4.
The cubic B-spline kernel function:
$$ \varPhi_{a} \left( {\varvec{x} - \varvec{x}_{I} } \right) = \left\{ {\begin{array}{*{20}l} {2/3 - 4z_{I}^{2} + 4z_{I}^{3} } \\ {4/3 - 4z_{I} + 4z_{I}^{2} - 4/3z_{I}^{3} } \\ 0 \\ \end{array} } \right.\begin{array}{*{20}l} \quad{\text{for}} \\ \quad {\text{for}} \\ \quad{\text{for}} \\ \end{array} \begin{array}{*{20}l} \quad {0 \le z_{I} \le 1/2,} \\ \quad {1/2 \le z_{I} \le 1,} \\ \quad{z_{I} > 1} \\ \end{array} $$(71) - 5.
The quartic B-spline kernel function:
$$ \begin{aligned} & \varPhi_{a} \left( {\varvec{x} - \varvec{x}_{I} } \right) = \\ & \left\{ {\begin{array}{*{20}l} {1 - \frac{150}{23}z_{I}^{2} + \frac{375}{23}z_{I}^{4} } \hfill & { {\text{for}} 0 \le z_{I} \le \frac{1}{5},} \hfill \\ {\frac{22}{23} + \frac{20}{23}z_{I} - \frac{300}{23}z_{I}^{2} + \frac{500}{23}z_{I}^{3} - \frac{250}{23}z_{I}^{4} } \hfill & {{\text{for}} \frac{1}{5} \le z_{I} \le \frac{3}{5},} \hfill \\ {\frac{125}{46} - \frac{250}{23} z_{I} + \frac{375}{23}z_{I}^{2} - \frac{250}{23}z_{I}^{3} + \frac{125}{46}z_{I}^{4} } \hfill & {{\text{for}} \frac{3}{5} \le z_{I} \le 1,} \hfill \\ 0 \hfill & { {\text{for}} z_{I} > 1} \hfill \\ \end{array} } \right. \\ \end{aligned} $$(72) - 6.
The quintic B-spline kernel function:
$$ \begin{aligned} & \varPhi_{a} \left( {\varvec{x} - \varvec{x}_{I} } \right) = \\ & \left\{ {\begin{array}{*{20}l} {1 - \frac{90}{11}z_{I}^{2} + \frac{405}{11}z_{I}^{4} - \frac{405}{11}z_{I}^{5} } \hfill & {{\text{for}}\,\, 0 \le z_{I} \le \frac{1}{3},} \hfill \\ {\frac{17}{22} + \frac{75}{22} z_{I} - \frac{315}{11}z_{I}^{2} + \frac{674}{11}z_{I}^{3} - \frac{1215}{22}z_{I}^{4} + \frac{405}{22}z_{I}^{5} } \hfill & {{\text{for}}\,\, \frac{1}{3} \le z_{I} \le \frac{2}{3},} \hfill \\ {\frac{81}{22} - \frac{405}{22} z_{I} + \frac{405}{11}z_{I}^{2} - \frac{405}{11}z_{I}^{3} + \frac{405}{22}z_{I}^{4} - \frac{81}{22}z_{I}^{5} } \hfill & {{\text{for}}\,\, \frac{2}{3} \le z_{I} \le 1,} \hfill \\ 0 \hfill & {{\text{for}}\,\, z_{I} > 1} \hfill \\ \end{array} } \right. \\ \end{aligned} $$(73)
Appendix B
In this section, a diffusion problem is used as example to illustrate how to modify RKPM2D for the solution of different types of PDEs. A diffusion equation is considered as follows:
where \( u \) is a scalar field, \( D_{ij} \) is the diffusivity, \( b \) is the source term, and \( t \) and \( g \) are the prescribed boundary flux and boundary values of \( u \) on \( \partial \varOmega_{t} \) and \( \partial \varOmega_{g} \), respectively. By introducing the RK approximation in Eq. (11), (74) can be recast into the following matrix equations for isotropic scalar diffusivity:
where
in which the matrices and vectors in nodal integration are expressed as
where \( \varvec{D} \) is the diffusivity tensor, \( d \) is the diffusion coefficient, and \( \varvec{\eta} \) is a collection of components of the surface unit normal on the boundary, and \( S = 1 \) is set for the convenience of keeping a unified coding structure in RKPM2D. Let us consider a diffusion problem [Eq. (74)] with a manufactured solution:
in a circular domain \( \varOmega \subset {\mathbb{R}}^{2} \) shown in Fig. 9 from Sect. 3.2. The flux \( t = 0.1n_{1} + 0.2n_{2} \) is imposed on \( \partial \varOmega_{t} :\left( {x_{1} ,x_{2} } \right) \in \partial \varOmega , \quad x_{2} > 0.5 \) where \( n_{1} {\text{ and }}n_{2} \) are the normal vector components. \( g = u^{\text{exact}} \) is enforced on \( \partial \varOmega_{g} :\left( {x_{1} ,x_{2} } \right) \in \partial \varOmega ,\quad x_{2} \le 0.5 \), and the body source is \( b = 0. \)
The input file for this problem is generated in the function getInput. Compared to Listing 1, the following changes need to be made:
Remove Model.nu and Model.Condition, as Poisson ratio and plane-stress/strain condition are not required for diffusion problem.
Replace Model.E with Model.d (i.e., change the definition of Young’s modulus \( E \) to be the diffusion coefficient \( d \)).
Replace Model.ElasticTensor with Model.DiffusiveTensor (i.e., change the definition of elastic tensor \( \varvec{C} \) to be the diffusive tensor \( \varvec{D} \)).
Set Model.DiffusiveTensor=diag([Model.d,Model.d])to define the diffusive tensor \( \varvec{D} = \left[ {\begin{array}{*{20}l} d & 0 \\ 0 & d \\ \end{array} } \right] \).
Set Model.DOFu=1 to change the nodal degrees of freedom DOFu from 2 to 1.
Set u_exact=0.1+0.1*x1+0.2*x2 to define the exact solution \( u^{\text{exact}} \).
In addition, we also need to modify the subroutine getBoundaryConditions to generate the exact boundary flux \( t =\varvec{\eta}^{\text{T}} \varvec{D}{\varvec{\nabla}} u^{\text{exact}} \), source term \( b = {\varvec{\nabla}} \cdot \left( {\varvec{D}{\varvec{\nabla}} u^{\text{exact}} } \right) \), essential boundary conditions \( g = u^{\text{exact}} \), and switch matrix \( S = 1 \) based on a given expression of the exact solution \( u^{\text{exact}} \) in a symbolic form, as shown in Listing 13.
Listing 13 shows command lines of function to generate exact heat flux \( t \), heat source \( b \), imposed scalar field \( g \), and switch matrix \( S \) for diffusion problems.
Due to the change of dimensionality in the \( \varvec{B} \) and \( \varvec{\varPsi} \) matrices compared to the elasticity problem, modifications are made to MatrixAssmebly (Listing 10) as follows
Set d=Model.d to define the diffusivity coefficient.
Set D=Model.DiffusiveTensor to define the diffusivity from input files.
Replace E with d (i.e., replace the Young’s modulus E with diffusion coefficient d).
Replace C with D (i.e., replace elastic tensor C with diffusive tensor D).
Set B=sparse(2,nP*DOFu).
Set PSI=sparse(1,nP*DOFu).
Modify the allocation of the B and PSI from shape function SHP and derivative SHPDX1, SHPDX2 as:
PSI=SHP(idx_nQuad,:);
B(1,:)=SHPDX1(idx_nQuad,:);
B(2,:)=SHPDX2(idx_nQuad,:);
Set ETA=[n1; n2;]to define the surface normal \( \varvec{\eta} \).
With the above-mentioned modifications, RKPM2D is converted to a program for solving diffusion problems. By comparing the original code for elasticity problems with the modified code for diffusion problems, one can see that only minimal code modifications are required. This capability of easy code extension is a unique feature of RKPM2D [37].
Rights and permissions
About this article
Cite this article
Huang, TH., Wei, H., Chen, JS. et al. RKPM2D: an open-source implementation of nodally integrated reproducing kernel particle method for solving partial differential equations. Comp. Part. Mech. 7, 393–433 (2020). https://doi.org/10.1007/s40571-019-00272-x
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s40571-019-00272-x