5. Specificity of the grid data structure#

The specificity of a grid is that its nodes are aligned according to the directions of a local base of the grid. This type of mesh is used with algorithms based on methods with finite differences. As a result, the local base \(({X}_{\mathit{loc}},{Y}_{\mathit{loc}},{Z}_{\mathit{loc}})\), the node connection table, and the distance between two aligned grid nodes should be stored by adding this information to the sd_mesh.

Let nb_no be the number of mesh nodes that form the grid.

'. GRLI ': OJB V I LONG = 6*nb_no

In this object we store the connection table of the grid nodes.

Let V= “. GRLI “:

for i = 1: nb_no

V (6* (i-1) +1): node following node \(i\) in the direction of vector \({X}_{\mathit{loc}}\)

V (6* (i-1) +2): node preceding node \(i\) in the direction of vector \({X}_{\mathit{loc}}\)

V (6* (i-1) +3): node following node \(i\) in the direction of vector \({Y}_{\mathit{loc}}\)

V (6* (i-1) +4): node preceding node \(i\) in the direction of vector \({Y}_{\mathit{loc}}\)

V (6* (i-1) +5): node following node \(i\) in the direction of vector \({Z}_{\mathit{loc}}\)

V (6* (i-1) +6): node preceding node \(i\) in the direction of vector \({Z}_{\mathit{loc}}\)

If node \(i\) does not have a next or previous node in any of the three directions, the corresponding element in the \(V\) vector is set to zero. In this case, node \(i\) is on the free surface of the grid.

'. GRLR ': OJB V R LONG = 10+6*nb_no

In this object we store the length of the smallest edge of the grid, the local base \(({X}_{\mathit{loc}},{Y}_{\mathit{loc}},{Z}_{\mathit{loc}})\), and the distance between the connected nodes of the grid.

Be \(W\mathrm{=}\text{'}\mathrm{.}\mathit{GRLR}\text{'}\)

W (1): length of the smallest edge of the grid

W (2): component \(X\) of the first vector \({X}_{\mathit{loc}}\) of the local base of the grid

W (3): component \(Y\) of the first vector \({X}_{\mathit{loc}}\) of the local base of the grid

W (4): component \(Z\) of the first vector \({X}_{\mathit{loc}}\) of the local base of the grid

W (5): component \(X\) of the second vector \({Y}_{\mathit{loc}}\) of the local grid base

W (6): component \(Y\) of the second vector \({Y}_{\mathit{loc}}\) of the local grid base

W (7): component \(Z\) of the second vector \({Y}_{\mathit{loc}}\) of the local grid base

W (8): component \(X\) of the third vector \({Z}_{\mathit{lo}}\) of the local grid base

W (9): component \(Y\) of the third vector \({Z}_{\mathit{loc}}\) of the local grid base

W (10): component \(Z\) of the third vector \({Z}_{\mathit{loc}}\) of the local grid base

for i = 1: nb_no

W (10+6*(i-1) +1): absolute value of the distance between node \(i\) and node V (6* (i-1) +1) along the direction of the vector \({X}_{\mathit{loc}}\)

W (10+6*(i-1) +2): absolute value of the distance between node \(i\) and the previous node V (6* (i-1) +2) in the direction of the vector \({X}_{\mathit{loc}}\)

W (10+6*(i-1) +3): absolute value of the distance between node \(i\) and node V (6* (i-1) +3) following in the direction of the vector \({Y}_{\mathit{loc}}\)

W (10+6*(i-1) +4): absolute value of the distance between node \(i\) and the previous node V (6* (i-1) +4) in the direction of the vector \({Y}_{\mathit{loc}}\)

W (10+6*(i-1) +5): absolute value of the distance between node \(i\) and node V (6* (i-1) +5) following in the direction of the vector \({Z}_{\mathit{loc}}\)

W (10+6*(i-1) +6): absolute value of the distance between node \(i\) and the previous node V (6* (i-1) +6) in the direction of the vector \({Z}_{\mathit{loc}}\)

If node \(i\) does not have a next or previous node in any of the three directions, the corresponding element in the \(W\) vector is set to zero. In this case, node \(i\) is on the free surface of the grid.