Difference between revisions of "Positioning of computational nodes"

From Medusa: Coordinate Free Mehless Method implementation
Jump to: navigation, search
(Problem description)
(Half-links)
Line 49: Line 49:
 
# find the $l_s$ (an integer from 1 to 7) closest nodes $\b{x}_i$
 
# find the $l_s$ (an integer from 1 to 7) closest nodes $\b{x}_i$
 
# select new nodes in the middle of the segments $\b{x}_i - \b{x}_0$ only allowing points that are separated by the minimal distance $d_m$
 
# select new nodes in the middle of the segments $\b{x}_i - \b{x}_0$ only allowing points that are separated by the minimal distance $d_m$
 +
 +
''(note also that in the 1D case the half-link and closest radius approach become the same)''

Revision as of 14:23, 21 December 2016

Refinement

Here we consider possible meshless refinement algorithms (sometimes also called adaptive cloud refinement). The refinement mechanisms we have so far studied include:

  • refinement based on closest node distance
  • refinement based on averaged (inter-)node distance
  • refinement based on half-links

At the moment we only want to compare the quality of the refined grids and have not tied the refinement algorithm with a error indicator. Thus we only study the node insertion process by refining the whole grid.

The refinement routine takes a range of nodes (e.g. a subregion of the domain) and the refinement parameters and generates new nodes around the old ones. Special care must be taken with refinement of the boundary nodes. Points have to be selected on the actual boundary either analytically considering the geometry or with a numerical root finder such as bisection. In case of internal nodes that have boundary nodes in their local supports, the boundary nodes should also be refined, and only later the internal node. This is to prevent nodes appearing close to the boundary (and not actually on the boundary). A problem we have so far not considered is refinement of nodes at the edges of boundary subregions.

Problem description

To compare the node refinement mechanisms we study the process of reaction-diffusion in an infinite cylindrical catalyst pellet (infinite in the $z$-dimension). Since the pellet is infinite in one dimension this problem simplifies to a 2D problem (in the $xy$-plane). For a catalyst pellet of radius $R$ centered at $(x,y) = (0,0)$ and the reactant undergoing a first order reaction we must solve the equation \begin{equation} \b{\nabla}^2 C - {M_T}^2 C = 0, \end{equation} where $C$ is the concentration of the reactant, $M_T = R\sqrt{k/D}$ is known as Thiele's modulus and $k$ and $D$ represent the reaction rate constant and diffusivity of the reacting species. The boundary conditions for this problem is \[C(R) = C_s.\] The analytical solution can be found easily using cylindrical coordinates and is given by \begin{equation} \frac{C(r)}{C_S} = \frac{I_0(r M_T)}{I_0(R M_T)}, \end{equation} wehre $I_0(r)$ is the modified Bessel function of first kind (this function is available in the library Boost as well as scripting languages such as Python or MATLAB). The conversion from cartesian to cylindrical coordinates is given by \[r = \sqrt{x^2+y^2}\].

Closest node

For a given node $(x_0,y_0)$:

  1. find the closest $(x_1,y_1)$
  2. calculate the half distance between the two nodes \[d = |\b{x}_1 - \b{x}_0|/2\]
  3. randomly select up to 6 new nodes on the circle with center $\b{x}_0$ and radius $d$ and simultaneously make sure their is a minimal inter-nodal distance $d$ between the new nodes

Average radius

Input parameters: $f$ and $l_s$

For a given node $\b{x}_0$:

  1. find the $l_s$ (an integer from 1 to 7) closest nodes
  2. calculate the average distance $\bar{d}$ to the $l_s$ closest nodes
  3. randomly select up to 6 new nodes on the circle with center $\b{x}_0$ and radius $f\cdot\bar{d}$ where $f$ is the radius fraction that lies between 0.2 (leads to clustering) and 0.8. Only allow nodes that are separated by the distance $f \cdot \bar{d}$.

(note that in case $l_s = 1$ and $f = 0.5$ the average radius mechanism becomes equal to the closest node refinement approach described above)

Half-links

Input parameters: $l_s$, $d_m$

For a given node $\b{x}_0$:

  1. find the $l_s$ (an integer from 1 to 7) closest nodes $\b{x}_i$
  2. select new nodes in the middle of the segments $\b{x}_i - \b{x}_0$ only allowing points that are separated by the minimal distance $d_m$

(note also that in the 1D case the half-link and closest radius approach become the same)