In most test problems it is not necessary to activate the 2D/3D tensor viscosity anymore. Even when strong slow shock fronts are aligned with the grid the Roe solver does not run into problems anymore, even without any additional 2D or 3D viscosity. However, even if the Roe solver can handle sharp shocks by its own, the radiation transport algorithm might cause trouble because of the enormous opacity variations across a shock front. Here the tensor viscosity might become useful. In fact, there are two separate tensor-viscosity routines by now:
The classical one is controlled by c_visSmagorinsky
, c_visArfificial
, etc.
Its use was recommeded for the old version of the Roe solver.
Nowadays, it is only kept for compatability reasons.
The new ``point-to-point'' tensor viscosity
is controlled by c_visP2Pcoeff
, etc.see Sect.7.1.11.10 below).
It has better stability properties than the old version.
However, due to the improved stability of the Roe solver itself
the use of this new tensor viscosity formulation is actually less often
necessary than the old one.
n_hyditer
,
it controls a somewhat different behavior of the viscosity step.
While positive values of n_visiter
have no meaning, so far,
a negative value specifies the number of hydrodynamics substeps
per viscosity step
(or rather: how often the viscosity step is called during the
hydrodynamics iteration).
The parameter can be set e.g. with
0
: Do exactly one viscosity step per global time step,
independent of the number of hydrodynamics sub steps.
This is the classical behavior (and default).
-1
: Do one viscosity step per hydrodynamics sub step (and vice versa).
<0
: Do -n_visiter
hydrodynamics sub steps between viscosity sub steps.
>0
: Not implemented yet. Gives the same result as 0
.
n_hyditer
can lead to a significant speed up.
Choosing a small negative value for n_visiter
means
that the tensor-viscosity sub step is called sufficiently often.
Note, there is not parameter n_vismaxiter
.
So far, this parameter is only recognized by the HYD module.
0.5
are sufficient to stabilize the code.
Larger values are only necessary for some
nasty under-resolved supergiant models.
Setting
c_vissmagorinsky
= c_visartificial
= c_visexpansion
=
c_vislinear
= c_visp2pcoeff
= 0.0
skips the classical tensor-viscosity step entirely.
0.5
are sufficient to stabilize the code.
Larger values are only necessary for some
nasty under-resolved supergiant models.
c_visexpansion
= 0.0
).
However, it might be useful in cases were strong localized expansions cause problems.
c_vislinear
= 0.0
).
It might be useful to damp small-amplitude almost linear waves.
1.0
and 10.0
appear reasonable.
Note that larger values lead to smaller amounts of turbulent mixing!
A value of 0.0
switches off the turbulent mixing terms
(but not the entire tensor viscosity).
real c_vissmagorinsky
and real c_visartificial
.
But the parameter can be used to tentatively switch off the diagonal terms completely
or to change its importance compared to the other terms.
real c_vissmagorinsky
and real c_visartificial
.
But the parameter can be used to tentatively switch off the off-diagonal terms completely
or to change its importance compared to the other terms.
real c_vissmagorinsky
and real c_visartificial
.
But the parameter can be used to switch off the divergence terms completely
or to change its importance compared to the other terms.
These divergence terms can be used to reduce the effect of
the tensor viscosity in the case of isotropic compression.
But this reduction
(c_vistensordiv
= -0.333333
in 3D,
c_vistensordiv
= -0.5
in 2D)
is usually switched off.
In addition to the standard tensor viscosity described above, there
is a "point-to-point" viscosity.
It relies on a completely different discretization.
It should conserve angular momentum exactly and
guarantee positivity of dissipated energy (for sufficiently small time steps).
The "point-to-point" viscosity can be used in addition to the standard one - or
without.
real c_visartificial
, see 7.1.11.3.
But it acts on compression, expansion, and shear flows.
A value of 0.0
switches it off.
real c_vissmagorinsky
(see 7.1.11.2)
with the classical implementation of the viscosity tensor.
A value of 0.0
switches it off.
Values of 0.3
or 0.5
are reasonable.
Although the underlying formula (and theory) is more complex,
the effects are rather similar to that of real c_visp2pcoeff
.
If additional smoothing is required, either of these parameters (or both)
can be set to non-zero values.
real c_visartificial
(see 7.1.11.3)
with the classical implementation of the viscosity tensor.
A value of 0.0
switches it off.
Values of 0.3
to 1.0
are reasonable.
The viscosity controlled with this parameter is meant to act mostly
on shocks.
real c_visexpansion
(see 7.1.11.4)
with the classical implementation of the viscosity tensor.
A value of 0.0
switches it off.
The viscosity controlled with this parameter is meant to limit or smooth
strong expansion events where density, pressure, temperature, and/or entropy
can drop significantly.
This parameter is not frequently set to non-zero values.
0.0
switches it off.
Values of 0.5
or even 2.0
are reasonable.
The viscosity controlled with this parameter acts only
on compressible flow configurations, i.e., in near-incompressible
low-Mach-number flows it should have hardly any effect.
Still, it can be used in exacly such a case to dampen spurious
sound waves for example at the very top of the computational box.
1.0
(interaction is considered) and
0.0
(no interaction with these cells).
The usual value is 1.0
.
1.0
(interaction is considered) and
0.0
(no interaction with these cells).
The usual value is 0.0
to save some computation time.
integer n_hydcellsperchunk
, see Sect.7.1.8.9)
are adequate.
On the other hand they should not be too large to limit the usage of temporary
memory and to allow parallelization (the distribution of chunks to threads):
For simulations with activated OpenMP on a parallel machine the
chunk size has to be made small enough to allow at least as many chunks as processors available.
This is particularly important for models with a small number of grid points (e.g.D models).
An example is given for the Hitachi SR8000 in Sect.4.6.5.