Update 3.2 User interfaces authored by Udo Ziegler's avatar Udo Ziegler
......@@ -820,7 +820,7 @@ for the type of coordinate system.
freely selectable parameter but computed selfconsistently from
the ionisation structure.*
### Defining initial conditions
## Defining initial conditions
The user interface `configUser.c` serves to define IC for a problem.
Defining IC means assigning values to primary physical variables,
......@@ -842,8 +842,8 @@ considered primary.
The mesh is represented by the master mesh pointer `gm` which is the
only argument passed to function `configUser()`. The problem-relevant
variables have to be assigned for each superblock `g` in `gm`. Recall
the explanations about the \[mesh data
structure\](3.1-Code-basics\#mesh-data-structure).
the explanations about the [mesh data
structure](3.1-Code-basics\#mesh-data-structure).
There are two types of primary variables: cell-averaged variables and
face-averaged variables. Cell-averaged variables are
......@@ -911,7 +911,7 @@ like the mass density it can be assigned at the same place. The tracer
array index, `ic`, runs from 0 to `_C.tracer`-1 where the code parameter
`_C.tracer` gives the number of tracers *N*<sub>*c*</sub>. Tracer
variables are dimensionless and are usually defined in the range
\[0, 1\].
\[0,1\].
Similary, species number densities, *n*<sub>*s*</sub>, are cell-averaged
quantities. The species array index, `is`, runs from 0 to `_C.species`-1
......@@ -946,6 +946,7 @@ exact integration of the analytical expressions. The so discretized
field is per se cell-wise divergence-free. For a grid cell
(`ix`,`iy`,`iz`) on superblock `g` this means
![ic_b](uploads/411b3e817fec94afa0a2861772697e71/ic_b.png)
$$\\mathtt{g-&gt;bx\[iz\]\[iy\]\[ix\]}=\\frac{1}{\\delta\\,\\!\\mathcal{A}\_x}\\int
\\limits\_\\mathtt{g-&gt;y\[iy\]}^\\mathtt{g-&gt;y\[iy+1\]}
\\int\\limits\_\\mathtt{g-&gt;z\[iz\]}^\\mathtt{g-&gt;z\[iz+1\]} B\_x(\\mathtt{g-&gt;x\[ix\]},y,z)h\_yh\_zdydz$$
......@@ -962,19 +963,19 @@ The numerical expressions for the cell face contents are:
| cell face | expression |
|:---------------------|:-----------------------------------------|
| *δ* 𝒜<sub>*x*</sub> | `g->hyh[ix]*g->hyh[ix]*g->dvy[iy]*g->dz` |
| *δ* 𝒜<sub>*y*</sub> | `g->dax[ix]*g->hzyh[iy]*g->dz` |
| *δ* 𝒜<sub>*z*</sub> | `g->dax[ix]*g->dy` |
| *δ*𝒜<sub>*x*</sub> | `g->hyh[ix]*g->hyh[ix]*g->dvy[iy]*g->dz` |
| *δ*𝒜<sub>*y*</sub> | `g->dax[ix]*g->hzyh[iy]*g->dz` |
| *δ*𝒜<sub>*z*</sub> | `g->dax[ix]*g->dy` |
\(2\) use of the magnetic vector potential **A**, if known, with
**B** = ∇ × **A**. When discretized in integral form this gives for the
face-averaged magnetic field components
`g->bx[iz][iy][ix]` = \[*h*<sub>*y*</sub>*Δ*<sub>`i`*y*</sub>(*h*<sub>*z**y*</sub>*Â*<sub>*z*</sub>)−*h*<sub>*y*</sub>*Δ*<sub>`i`*z*</sub>*Â*<sub>*y*</sub>\]/*δ* 𝒜<sub>*x*</sub>
`g->bx[iz][iy][ix]` = \[*h*<sub>*y*</sub>*Δ*<sub>`i`*y*</sub>(*h*<sub>*z**y*</sub>*Â*<sub>*z*</sub>)−*h*<sub>*y*</sub>*Δ*<sub>`i`*z*</sub>*Â*<sub>*y*</sub>\]/*δ*𝒜<sub>*x*</sub>
`g->by[iz][iy][ix]` = \[*Δ*<sub>`i`*z*</sub>*Â*<sub>*x*</sub>*h*<sub>*z**y*</sub>*Δ*<sub>`i`*x*</sub>(*h*<sub>*y*</sub>*Â*<sub>*z*</sub>)\]/*δ* 𝒜<sub>*y*</sub>
`g->by[iz][iy][ix]` = \[*Δ*<sub>`i`*z*</sub>*Â*<sub>*x*</sub>*h*<sub>*z**y*</sub>*Δ*<sub>`i`*x*</sub>(*h*<sub>*y*</sub>*Â*<sub>*z*</sub>)\]/*δ*𝒜<sub>*y*</sub>
`g->bz[iz][iy][ix]` = \[*Δ*<sub>`i`*x*</sub>(*h*<sub>*y*</sub>*Â*<sub>*y*</sub>)−*Δ*<sub>`i`*y*</sub>*Â*<sub>*x*</sub>\]/*δ* 𝒜<sub>*z*</sub>
`g->bz[iz][iy][ix]` = \[*Δ*<sub>`i`*x*</sub>(*h*<sub>*y*</sub>*Â*<sub>*y*</sub>)−*Δ*<sub>`i`*y*</sub>*Â*<sub>*x*</sub>\]/*δ*𝒜<sub>*z*</sub>
where (*Â*<sub>*x*</sub>, *Â*<sub>*y*</sub>, *Â*<sub>*z*</sub>) denote
the path integrals
......
......