------------- Communication ------------- When two blocks of different levels connect, a proper communication strategy must be developed. In the adopted formulation, we performed the communication such that it assures that the macroscopics (:math:`\rho, u_{\alpha\beta}, \sigma_{\alpha\beta}`) are continuous thorough the simulation domain. The coupling between fine and coarse grid is illustrated below: .. figure:: /_static/img/theory/multiblock/mb-division-full.svg :width: 50% :align: center It's important to notice that the top nodes of the fine blocks doesn't coincide with the coarse level (only when the fine level ends). So to facilitate interpolation, this node is not used in the communication, serving as a ghost node, only to keep the recursiveness of the refinement. .. note:: In order for not having invalid macroscopics, the values of these ghost nodes are copied from the neighbour nodes that coincide with the coarse level. The communication of the coupling scheme is shown below: .. figure:: /_static/img/theory/multiblock/mb-straight.svg :align: center :width: 30% Straight The coarse-to-fine transference of information occurs in the blue nodes, whilst the fine-to-coarse in the orange. For concave and convex node, the communication is as follows: .. list-table:: * - .. figure:: /_static/img/theory/multiblock/mb-concave.svg :align: center :width: 80% Concave - .. figure:: /_static/img/theory/multiblock/mb-convex.svg :align: center :width: 80% Convex It's possible to notice that the ghost nodes of fine level does not participate in the communication. --------------------- Top domain refinement --------------------- One consequence of the ghost node in the fine block is an edge case for boundary conditions on top of the domain. .. figure:: /_static/img/theory/multiblock/mb-multiple-lvls-top.svg :width: 60% :align: center Example of two levels refinement on top of the domain. When refining one or more levels in the top, it's possible to notice that the top nodes of a level doesn't coincide with the top one of the coarse leve. So if a boundary condition is applied in the top node of the coarse level, in the fine level it must be applied in the same position. ---------------------- Fine to Coarse overlap ---------------------- From the communication images, it's possible to notice that there is an offset between the coarse to fine (C2F) and fine to coarse (F2C) communication borders. These are the *F2C overlap nodes*, and are measured using the coarse level node distance as reference. For simulations of great turbulence, increasing this overlap from 1 to 2 or 3 gives the simulation more stability, as stated by :footcite:t:`Lagrava2012-4808`. In the macroscopics field it's possible to see a smoother transition between levels and the decrease of checkerboard phenomenas (specially in pressure). .. figure:: /_static/img/theory/multiblock/mb-f2c-2.svg :width: 30% :align: center Example of F2C overlap equals to 2. Blue is C2F and yellow is F2C. --------------------------- Macroscopics reconstruction --------------------------- The populations of the fine grid for the nodes that coincide with the blue coarse nodes are initially unknown, and are reconstructed from the macroscopic values of the coarse grid in each time step of the fine grid simulation. For the fine nodes that are between the blue nodes not coinciding with the coarse grid, the macroscopic values of the fine grid are estimated through interpolation of the coarse grid macroscopics (:math:`\rho, u_{\alpha\beta}, \sigma_{\alpha\beta}`). The adopted scheme can be found in :footcite:t:`Lagrava2012-4808`. Using these values, the populations are reconstructed. The fine grid solution must update the coarse grid boundary. Through the overlapping of grids, the macroscopics at orange coarse grid nodes are updated using the values from fine grid simulation. The estimative of the macroscopics between coarse grid nodes uses a cubic four-point interpolation performed on the coarse-to-fine grid interface plane through the following expression: .. math:: g\left(x\right) = \frac{9}{16}\left[g\left(x+h\right)+g\left(x-h\right)\right]-\frac{1}{16}\left[g\left(x+3h\right)+g\left(x-3h\right)\right] :label: mb_four-point-interpolation where :math:`g(x)` is the macroscopic considered. An illustration is presented below: .. figure:: /_static/img/theory/multiblock/four-point.svg :width: 50% :align: center For a node that's located near the fine grid-block border a cubic three-point interpolation is adopted with the following equation: .. math:: g\left(x\right) = \frac{3}{8}g\left(x-h\right) + \frac{3}{4}g\left(x+h\right) - \frac{1}{8}g\left(x+3h\right) :label: mb_three-point-interpolation A temporal interpolation of the populations at the boundaries is also performed since time-scale of fine grid is also different from coarse. We adopt a three-point Lagrangian scheme for that matter: .. math:: f_{i}\left(t\right) = \sum_{k=-1}^{1} f_{i}\left(t_{k}\right)\left(\prod_{j=-1;k\neq j}^{1}\frac{t-t_{j}}{t_{k}-t_{j}}\right) :label: mb_temporal-lagrangian-interpolation or: .. math:: f_{i}\left(t\right) = 0.5\frac{1}{2}\left(\frac{1}{2}-1\right)f_{i}\left(t_{-1}\right) - \left(\frac{1}{2}-1\right)\left(\frac{1}{2}+1\right)f_{i}\left(t_{0}\right) + 0.5\frac{1}{2}\left(\frac{1}{2}+1\right)f_{i}\left(t_{1}\right) :label: mb_temporal-lagrangian-interpolation_2 .. When two blocks of different levels connect, a proper communication strategy must be developed. An ideal .. communication strategy minimizes the amount of transferred data and operations, while assuring continuity .. and the creation of spurious-less populations on the exchange nodes. The figure below shows a schematic of .. the node's arrangement at an interface. On an interface, one coarser block connects with four finer blocks .. (but only one is shown in the figure). All of the coarse interface nodes (:math:`f_c`) are collocated with .. fine nodes (:math:`f_f`). Hence, these nodes are able to exchange data. However, the populations crossing .. interfaces need to be rescaled. This operation requires using a proper second-order momentum .. .. from Eqs :math:numref:`scaled_strain_ctf` or :math:numref:`scaled_strain_ftc` (:math:`m_{f \rightarrow c}` or :math:`m_{c \rightarrow f}`) into .. Eq :math:numref:`freg_postcoll`. .. .. figure:: /_static/img/theory/LBM/interface.png .. :scale: 70 % .. :align: center .. The data exchange takes place on planes. The figure below shows a composition of 1 coarse block (yellow) .. interfacing with 4 fine blocks (purple). The square symbols are collocated nodes in which data is .. exchanged between levels. The circle symbols are fine nodes that need information from interpolation. .. Quadratic interpolation in each direction (horizontal and vertical) fills in those nodes. The interpolation .. might take place directly on the populations, or on the macroscopics (:math:`\rho`, :math:`u_{\alpha}` and .. :math:`m_{\alpha\beta}`), and then converted to populations according to Eq :math:numref:`freg_postcoll`. The .. latter option is more stable. In order to make sure the blocks are self-sufficient for interpolation, .. we use :math:`d \geq 4`. .. .. figure:: /_static/img/theory/LBM/interpolation.png .. :scale: 70 % .. :align: center