| ... | ... | @@ -916,7 +916,7 @@ Here is an example of looping over the active region of a superblock: |
|
|
|
The tracer array index, `ic`, runs from 0 to `_C.tracer`-1 whereas the
|
|
|
|
species array index, `is`, runs from 0 to `_C.species`-1. Tracer
|
|
|
|
variables are assumed dimensionless and it are usually defined in the
|
|
|
|
range $[0,1]$. The mesh of the superblock is indexed by
|
|
|
|
range [0,1]. The mesh of the superblock is indexed by
|
|
|
|
(`ix`,`iy`,`iz`).
|
|
|
|
|
|
|
|
**Important:** The species number densities must be consistently defined
|
| ... | ... | @@ -1110,7 +1110,7 @@ The macro `SPQR(a,b,c)` defined in header file `nirvana.h` shortcuts the |
|
|
|
algebraic expression $a^2+b^2+c^2$.
|
|
|
|
|
|
|
|
**Example 2** (taken from `/nirvana/testproblems/MHD/problem17`; cf.
|
|
|
|
[@Z05])
|
|
|
|
[Z05](#references))
|
|
|
|
|
|
|
|
IC for the shock-cloud interaction problem simulated in a 3D Cartesian
|
|
|
|
box given by $(x,y,z)\in [-1/2,1/2]^3$:
|
| ... | ... | @@ -1118,7 +1118,7 @@ $$(\varrho,p,v_x,v_y,v_z,B_x,B_y,B_z)=\left\{\begin{array}{ll} |
|
|
|
(3.86859,167.345,0,0,0,0,2.1826182,-2.1826182) & x<0.1\\
|
|
|
|
(1,1,-11.2536,0,0,0,0.56418958,0.56418958) & x\ge 0.1
|
|
|
|
\end{array}\right.$$ At ${\mathbf x}=(0.3,0,0)$ a spherical clump with
|
|
|
|
radius $0.15$ and density of $10$ is embedded and co-moving with its
|
|
|
|
radius 0.15 and density of 10 is embedded and co-moving with its
|
|
|
|
surrounding flow under the assumption of pressure equilibrium. The
|
|
|
|
adiabatic index $\gamma =5/3$ and magnetic permeability $\mu=1$. The
|
|
|
|
grid is initially refined with 3 refinement levels, `_C.level`=3, in the
|
| ... | ... | @@ -1254,8 +1254,8 @@ boundary. |
|
|
|
|
|
|
|
#### User-defined BC
|
|
|
|
|
|
|
|
When U specified BC at the corresponding domain boundary are assumed
|
|
|
|
user-defined. In that case the code calls user-programmable functions in
|
|
|
|
With letter U boundary conditions at the corresponding domain boundary
|
|
|
|
is assumed user-specified. In that case the code calls user-programmable functions in
|
|
|
|
the following modules:
|
|
|
|
|
|
|
|
| module | function | BC for |
|
| ... | ... | @@ -1282,7 +1282,7 @@ formalism is enabled (cf. [Specification of main simulation |
|
|
|
parameters](#specification-of-main-simulation-parameters)).
|
|
|
|
|
|
|
|
Boundary values have to be assigned in ghost cells running from to
|
|
|
|
`g->ixs`-1 ( to `g->iys`-1, to `g->izs`-1) in $x$($y$,$z$)-direction at
|
|
|
|
`g->ixs`-1 ( to `g->iys`-1, to `g->izs`-1) in x(y,z)-direction at
|
|
|
|
the lower domain boundary. At upper domain boundaries the index range
|
|
|
|
depends on the type of variable as listed in the following table:
|
|
|
|
|
| ... | ... | @@ -1305,7 +1305,7 @@ is adopted to transform MHD BC types into BC types for $\Phi$: |
|
|
|
| M,A,R | | von-Neumann |
|
|
|
|
| I,O,D | | Dirichlet |
|
|
|
|
| F | | not supported |
|
|
|
|
| U | | user-defined *Φ* (function `phiUser()` |
|
|
|
|
| U | | user-defined *Φ* (function `phiUser()`)|
|
|
|
|
|
|
|
|
In case of von-Neumann conditions (M,A,R) the gradient of potential
|
|
|
|
vanishes normal to the corresponding domain boundary, i.e.,
|
| ... | ... | |