Changes
Page history
version 4.2
authored
Oct 28, 2025
by
Udo Ziegler
Show whitespace changes
Inline
Side-by-side
3-NIRVANA-user-guide/3.1-Code-basics.md
View page @
345b3575
...
@@ -184,8 +184,8 @@ struct type `GRD`, i.e. `*GRD`. The `GRD` struct type is declared in the
...
@@ -184,8 +184,8 @@ struct type `GRD`, i.e. `*GRD`. The `GRD` struct type is declared in the
header file
`nirvana.h`
and contains all grid information (attributes,
header file
`nirvana.h`
and contains all grid information (attributes,
coordinates, variables arrays, etc.). Dereferencing
`gm`
to
`gm[l]`
,
coordinates, variables arrays, etc.). Dereferencing
`gm`
to
`gm[l]`
,
gives the first superblock in a linked list collecting all superblocks
gives the first superblock in a linked list collecting all superblocks
belonging to mesh refinement level
`l`
.
`gm[l]`
, like any superblock, is
belonging to mesh refinement level
$l$
.
`gm[l]`
, like any superblock, is
of
`GRD`
type, i.e., a pointer to struct
`GRD`
. The base level,
`l`
=0$,
of
`GRD`
type, i.e., a pointer to struct
`GRD`
. The base level,
$l
=0$,
spanning the computational domain starts with pointer
`gm[0]`
. In
spanning the computational domain starts with pointer
`gm[0]`
. In
uniform grid simulations that is the only list existing. The superblocks
uniform grid simulations that is the only list existing. The superblocks
of a refinement level $l$ are obtained by running through the
of a refinement level $l$ are obtained by running through the
...
@@ -324,11 +324,11 @@ Elements V of struct `GRD`:
...
@@ -324,11 +324,11 @@ Elements V of struct `GRD`:
| V (grid metrics) | description |
| V (grid metrics) | description |
|:---------------------------|:----------------------------------------------------------------------------------------------------|
|:---------------------------|:----------------------------------------------------------------------------------------------------|
|
`dv[iy][ix]`
| volume
*δ*
*V*
( =
*δ*
*V*
<sub>
*x*
</sub>
⋅
*δ*
*V*
<sub>
*y*
</sub>
⋅
*δ*
*z*
) of a numerical cell |
|
`dv[iy][ix]`
| volume
*δ*
*V*
( =
*δ*
*V*
<sub>
*x*
</sub>
⋅
*δ*
*V*
<sub>
*y*
</sub>
⋅
*δ*
*z*
) of a numerical cell |
|
`dvx[ix]`
|
*x*
-dependent part,
*δ*
*V*
<sub>
*x*
</sub>
, of cell volume |
|
`dvx[ix]`
|
*x*
-dependent part,
*δ*
*V*
<sub>
*x*
</sub>
, of cell volume |
|
`dvy[iy]`
|
*y*
-dependent part,
*δ*
*V*
<sub>
*y*
</sub>
, of cell volume |
|
`dvy[iy]`
|
*y*
-dependent part,
*δ*
*V*
<sub>
*y*
</sub>
, of cell volume |
|
`dvyf[iy]`
|
*y*
-dependent part,
*δ*
*V*
<sub>
*y*
</sub>
, of cell volume at face-centroid coordinates |
|
`dvyf[iy]`
|
*y*
-dependent part,
*δ*
*V*
<sub>
*y*
</sub>
, of cell volume at face-centroid coordinates |
|
`dax[ix]`
|
vector storing
|
|
`dax[ix]`
|
*x*
-dependent part of
*xy*
/
*xz*
-cell face surface
|
|
`hy[ix]`
| metric scale factor
*h*
<sub>
*y*
</sub>
(
*x*
) at cell-nodal coordinates |
|
`hy[ix]`
| metric scale factor
*h*
<sub>
*y*
</sub>
(
*x*
) at cell-nodal coordinates |
|
`hyh[ix]`
| metric scale factor
*h*
<sub>
*y*
</sub>
(
*x*
) at cell-center coordinates |
|
`hyh[ix]`
| metric scale factor
*h*
<sub>
*y*
</sub>
(
*x*
) at cell-center coordinates |
|
`hyc[ix]`
| metric scale factor
*h*
<sub>
*y*
</sub>
(
*x*
) at cell-centroid coordinates |
|
`hyc[ix]`
| metric scale factor
*h*
<sub>
*y*
</sub>
(
*x*
) at cell-centroid coordinates |
...
@@ -364,9 +364,9 @@ where (`g->x[ix]`,`g->y[iy]`,`g->z[iz]`) are the nodal coordinates of
...
@@ -364,9 +364,9 @@ where (`g->x[ix]`,`g->y[iy]`,`g->z[iz]`) are the nodal coordinates of
the lower cell corner. Cell-centroid coordinates locate the volume
the lower cell corner. Cell-centroid coordinates locate the volume
center of a cell and face-centroid coordinates locate the face centers
center of a cell and face-centroid coordinates locate the face centers
of a cell. Their definition for cylindrical- and spherical geometry is
of a cell. Their definition for cylindrical- and spherical geometry is
given in the table below where $
\D
_\m
ix$ ($\D
_
\m
iy$) denotes the
given in the table below where $
\D
elta_{
\t
t
ix
}
$ ($
\D
elta_{
\t
t
iy
}
$) denotes the
difference operator, $
\D
_\m
ix U=U_
{{
\t
t ix}+1}-U_{
\t
t ix}$ and analog
difference operator, $
\D
elta_{
\t
t
ix
}
U=U_{{
\t
t ix}+1}-U_{
\t
t ix}$ and analog
for $
\D
_
\m
iy$. Half-index subscripts mean evaluation at the geometric
for $
\D
elta_{
\t
t
iy
}
$. Half-index subscripts mean evaluation at the geometric
center, i.e., at cell-centered coordinates. At certain cell locations
center, i.e., at cell-centered coordinates. At certain cell locations
centroid coordinates and centered coordinates coincide which, in
centroid coordinates and centered coordinates coincide which, in
general, is true in Cartesian geometry.
general, is true in Cartesian geometry.
...
...
...
...