| ... | @@ -389,9 +389,9 @@ The mesh refinement algorithm relies on the oct-tree data structure of |
... | @@ -389,9 +389,9 @@ The mesh refinement algorithm relies on the oct-tree data structure of |
|
|
generic blocks (fixed size of 4 cells per direction) represented by the
|
|
generic blocks (fixed size of 4 cells per direction) represented by the
|
|
|
master mesh pointer `_G0` (of type `*GRD`). A generic block of
|
|
master mesh pointer `_G0` (of type `*GRD`). A generic block of
|
|
|
refinement level $l$ has cell spacings
|
|
refinement level $l$ has cell spacings
|
|
|
$(\d x^{(l)}, \d y^{(l)}, \d z^{(l)})=
|
|
$(\delta x^{(l)}, \delta y^{(l)}, \delta z^{(l)})=
|
|
|
(\d x^{(0)},\d y^{(0)},\d z^{(0)})/2^l$ where
|
|
(\delta x^{(0)},\delta y^{(0)},\delta z^{(0)})/2^l$ where
|
|
|
$(\d x^{(0)},\d y^{(0)},\d z^{(0)})$ is the cell spacing of the base
|
|
$(\delta x^{(0)},\delta y^{(0)},\delta z^{(0)})$ is the cell spacing of the base
|
|
|
level, i.e., resolution doubles each time when refined.
|
|
level, i.e., resolution doubles each time when refined.
|
|
|
|
|
|
|
|
Starting on the base level ($l=0$) mesh refinements are realized by
|
|
Starting on the base level ($l=0$) mesh refinements are realized by
|
| ... | @@ -405,24 +405,24 @@ individually selected by the user. The standard implementation covers |
... | @@ -405,24 +405,24 @@ individually selected by the user. The standard implementation covers |
|
|
the following criteria:
|
|
the following criteria:
|
|
|
|
|
|
|
|
- derivatives-based (most important in practice):
|
|
- derivatives-based (most important in practice):
|
|
|
$\left[\alpha\frac{|\d U|}{|U|+U_\mathrm{ref}}+(1-\alpha)
|
|
$$\left[\alpha\frac{|\delta U|}{|U|+U_\mathrm{ref}}+(1-\alpha)
|
|
|
\frac{|\d^2U|}{|\d U|+{\rm FILTER}\cdot(|U|+U_\mathrm{ref})}\right]
|
|
\frac{|\delta^2U|}{|\delta U|+{\rm FILTER}\cdot(|U|+U_\mathrm{ref})}\right]
|
|
|
\left(\frac{\d x^{(l)}}{\d x^{(0)}}\right)^{\xi}
|
|
\left(\frac{\delta x^{(l)}}{\delta x^{(0)}}\right)^{\xi}
|
|
|
\left\{\begin{array}{ll}
|
|
\left\{\begin{array}{ll}
|
|
|
>\mathcal{E}_{U} &\exists U \quad\hbox{refinement}\\
|
|
>\mathcal{E}_{U} &\exists U \quad\hbox{refinement}\\
|
|
|
<0.8\mathcal{E}_{U} & \forall U \quad\hbox{derefinement}\\
|
|
<0.8\mathcal{E}_{U} & \forall U \quad\hbox{derefinement}\\
|
|
|
\end{array}\right.$
|
|
\end{array}\right.$$
|
|
|
|
|
|
|
|
The criterion is applied to physical variables $U$
|
|
The criterion is applied to physical variables $U$
|
|
|
($=\{\varrho,\mathbf{m},e,\mathbf{B},C_\mathrm{c}\}$). Undivided
|
|
($=\{\varrho,\mathbf{m},e,\mathbf{B},C_\mathrm{c}\}$). Undivided
|
|
|
first ($\d U$) and second ($\d^2U$) differences are computed along
|
|
first ($\delta U$) and second ($\delta^2U$) differences are computed along
|
|
|
various spatial directions. The switch $\alpha\in [0,1]$ (code
|
|
various spatial directions. The switch $\alpha\in [0,1]$ (code
|
|
|
parameter: `_C.amr_d1`) selects between a purely gradient-based
|
|
parameter: `_C.amr_d1`) selects between a purely gradient-based
|
|
|
criterion ($\alpha =1$) and a purely second-derivatives-based
|
|
criterion ($\alpha =1$) and a purely second-derivatives-based
|
|
|
criterion ($\alpha =0$). $U_\mathrm{ref}$ are reference values to
|
|
criterion ($\alpha =0$). $U_\mathrm{ref}$ are reference values to
|
|
|
avoid division by zero for indefinite variables. The exponent
|
|
avoid division by zero for indefinite variables. The exponent
|
|
|
$\xi\in [0,2]$ (code parameter: `_C.amr_exp`) introduces a power law
|
|
$\xi\in [0,2]$ (code parameter: `_C.amr_exp`) introduces a power law
|
|
|
functional on the grid spacing ratio $\d x^{(l)}/\d x^{(0)}$ which
|
|
functional on the grid spacing ratio $\delta x^{(l)}/\delta x^{(0)}$ which
|
|
|
allows to tune the behavior with progressive mesh refinement. The
|
|
allows to tune the behavior with progressive mesh refinement. The
|
|
|
macro `FILTER` (preset to $10^{-2}$) is a filter to suppress
|
|
macro `FILTER` (preset to $10^{-2}$) is a filter to suppress
|
|
|
refinement at small-scale solution wiggles. The individual
|
|
refinement at small-scale solution wiggles. The individual
|
| ... | @@ -439,11 +439,11 @@ the following criteria: |
... | @@ -439,11 +439,11 @@ the following criteria: |
|
|
- Jeans-length-based (important in simulations involving selfgravity):
|
|
- Jeans-length-based (important in simulations involving selfgravity):
|
|
|
$$\left(\frac{\pi}{G}\frac{c_s^2}{\varrho}\right)^{1/2}
|
|
$$\left(\frac{\pi}{G}\frac{c_s^2}{\varrho}\right)^{1/2}
|
|
|
\cdot \mathcal{E}_\mathrm{Jeans}\left\{\begin{array}{ll}
|
|
\cdot \mathcal{E}_\mathrm{Jeans}\left\{\begin{array}{ll}
|
|
|
<\d s & \mbox{refinement}\\
|
|
<\delta s & \mbox{refinement}\\
|
|
|
>1.25\d s & \mbox{derefinement}\\
|
|
>1.25\delta s & \mbox{derefinement}\\
|
|
|
\end{array}\right.$$ where the first factor is the local Jeans
|
|
\end{array}\right.$$ where the first factor is the local Jeans
|
|
|
length with $c_s$ the sound speed and $G$ the gravitational
|
|
length with $c_s$ the sound speed and $G$ the gravitational
|
|
|
constant, and where $\d s=\min\{\d x,h_y\d y, h_z\d z\}$.
|
|
constant, and where $\delta s=\min\{\delta x,h_y\delta y, h_z\delta z\}$.
|
|
|
$\mathcal{E}_\mathrm{Jeans}$ is a user-specific threshold giving the
|
|
$\mathcal{E}_\mathrm{Jeans}$ is a user-specific threshold giving the
|
|
|
fraction of the local Jeans length to be resolved by at least 1 grid
|
|
fraction of the local Jeans length to be resolved by at least 1 grid
|
|
|
cell.
|
|
cell.
|
| ... | @@ -453,8 +453,8 @@ the following criteria: |
... | @@ -453,8 +453,8 @@ the following criteria: |
|
|
$$2\pi \left(\frac{\kappa T}{\max\left\{T\left(\frac{\partial L}{\partial T}\right)_{\varrho}
|
|
$$2\pi \left(\frac{\kappa T}{\max\left\{T\left(\frac{\partial L}{\partial T}\right)_{\varrho}
|
|
|
-\varrho \left(\frac{\partial L}{\partial \varrho}\right)_{T},EPS\right\}}
|
|
-\varrho \left(\frac{\partial L}{\partial \varrho}\right)_{T},EPS\right\}}
|
|
|
\right)^{1/2}\cdot \mathcal{E}_\mathrm{Field}\left\{\begin{array}{ll}
|
|
\right)^{1/2}\cdot \mathcal{E}_\mathrm{Field}\left\{\begin{array}{ll}
|
|
|
<\d s & \mbox{refinement}\\
|
|
<\delta s & \mbox{refinement}\\
|
|
|
>1.25\d s & \mbox{derefinement}\\
|
|
>1.25\delta s & \mbox{derefinement}\\
|
|
|
\end{array}\right.$$ where the first factor is the Field length with
|
|
\end{array}\right.$$ where the first factor is the Field length with
|
|
|
$L(\varrho, T)$ the density- and temperature-dependent heatloss
|
|
$L(\varrho, T)$ the density- and temperature-dependent heatloss
|
|
|
function and $\kappa$ the thermal conduction coefficient.
|
|
function and $\kappa$ the thermal conduction coefficient.
|
| ... | | ... | |