Relaxation of the nodal distribution

From Medusa: Coordinate Free Mehless Method implementation
Jump to: navigation, search
edit 

Related papers

J. Slak, G. Kosec; Refined meshless local strong form solution of Cauchy-Navier equation on an irregular domain, Engineering analysis with boundary elements, vol. 100, 2019

G. Kosec; A local numerical solution of a fluid-flow problem on an irregular domain, Advances in engineering software, vol. 120, 2018 [DOI: 10.1016/j.advengsoft.2016.05.010]


To construct stable and reliable shape functions the support domains need to be non-degenerated [1], i.e. the distances between support nodes have to be balanced. Naturally, this condition is fulfilled in regular nodal distributions, but when working with complex geometries, the nodes have to be positioned accordingly. There are different algorithms designed to optimally fill the domain with different shapes [2][3], see Positioning of computational nodes for our algorithms. Here, an intrinsic feature of the MLSM is used to take care of that problem. The goal is to minimize the overall support domain degeneration in order to attain stable numerical solution. In other words, a global optimization problem with the overall deformation of the local support domains acting as the cost function is tackled. We seek the global minimum by a local iterative approach. In each iteration, the computational nodes are translated according to the local derivative of the potential \begin{equation} \delta \b{p}\left( \b{p} \right)=-\sigma_{k}\sum\limits_{i=1}^{n}{\nabla }V\left( \b{p}-\b{p}_i \right) \end{equation} where $V, n, \delta \b{p}, \b{p}_{i}$ and $\sigma_{k}$ stand for the potential, number of support nodes, offset of the node, position of i-th support node and relaxation parameter, respectively. After offsets in all nodes are computed, the nodes are repositioned as $\b{p}\leftarrow \b{p}+\delta \b{p}\left( \b{p} \right)$. Presented iterative process procedure begins with positioning of boundary nodes, which is considered as the definition of the domain, and then followed by the positioning of internal nodes.

The BasicRelax engine supports two call types:

  • with supplied distribution function relax(domain, func), where it tries to satisfy the user supplied nodal density function func. This can be achieved only when there is the total number of domain nodes the same as integral of density function over the domain. If there is too much nodes a volatile relax might occur. If there is not enough nodes the relax might become lazy. The best use of this mode is in combination with GeneralFill and/or GeneralSurfaceFill.
  • without distribution, where nodes always move towards less populated area. The relax magnitude is simply determined from Annealing factor and distance to the closest node. A simple and stable approach, however, note that this relax always converges towards uniformly distributed nodes.

Example of filling and relaxing a 2D domain can be found in below code snippet and Figures. Note the difference between relax without supplied distribution (Figure 1) and with supplied distribution (Figure 2). These examples are extreme, relaxation is usually used to convert an almost desirable node distribution into a desirable node distribution. More examples can be found in main repository under tests.

 1 // Define domain shape.
 2 double r = 0.25;
 3 BallShape<Vec2d> bs({0.5, 0.5}, r);
 4 
 5 // Fill domain disretization with h.
 6 auto h = [](Vec2d p){
 7     return (0.005 + (p[0] - 0.5) * (p[0] - 0.5) / 2 + (p[1] - 0.5) * (p[1] - 0.5) / 2);
 8 };
 9 DomainDiscretization<Vec2d> domain = bs.discretizeBoundaryWithDensity(h);
10 GeneralFill<Vec2d> gf;
11 gf(domain, h);
12 
13 // Relax domain to uniform distribution.
14 BasicRelax relax;
15 relax.iterations(1000).initialHeat(1).finalHeat(0).boundaryProjectionThreshold(0.75)
16      .projectionType(BasicRelax::PROJECT_IN_DIRECTION).numNeighbours(5);
17 relax(domain);
Figure 1: Relaxation of a non-uniform node distribution to a uniform node distribution.
Figure 2: Relaxation of a uniform node distribution to a non-uniform node distribution.

References

  1. Lee CK, Liu X, Fan SC. Local muliquadric approximation for solving boundary value problems. Comput Mech. 2003;30:395-409.
  2. Löhner R, Oñate E. A general advancing front technique for filling space with arbitrary objects. Int J Numer Meth Eng. 2004;61:1977-91.
  3. Liu Y, Nie Y, Zhang W, Wang L. Node placement method by bubble simulation and its application. CMES-Comp Model Eng. 2010;55:89.