- 7.1.11.1 integer n_visiter
- 7.1.11.2 real c_vissmagorinsky
- 7.1.11.3 real c_visartificial
- 7.1.11.4 real c_visexpansion
- 7.1.11.5 real c_vislinear
- 7.1.11.6 real c_visprturb
- 7.1.11.7 real c_vistensordiag
- 7.1.11.8 real c_vistensoroff
- 7.1.11.9 real c_vistensordiv
- 7.1.11.10 real c_visp2pcoeff
- 7.1.11.11 real c_visp2phypsmagorinsky
- 7.1.11.12 real c_visp2phypartificial
- 7.1.11.13 real c_visp2phypexpansion
- 7.1.11.14 real c_visp2pdivrhov
- 7.1.11.15 real c_visp2pincl1
- 7.1.11.16 real c_visp2pincl2
- 7.1.11.17 integer n_viscellsperchunk

7.1.11 Tensor-viscosity control

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.

7.1.11.1 integer n_visiter

`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
c0='<0: Number of hydro substeps per viscosity substep' &

c1=' 0: One tensor-viscosity substep per global time step (old, default)' &

c2='>0: Not implemented, yet'

-1

`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.

7.1.11.2 real c_vissmagorinsky

n='Turbulent eddy viscosity parameter (Smagorinsky type)' u=1

0.5

`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.

7.1.11.3 real c_visartificial

n='Artificial viscosity tensor parameter' u=1

0.5

`0.5`

are sufficient to stabilize the code.
Larger values are only necessary for some
nasty under-resolved supergiant models.

7.1.11.4 real c_visexpansion

n='Expansion viscosity tensor parameter' u=1

1.2

`c_visexpansion`

= `0.0`

).
However, it might be useful in cases were strong localized expansions cause problems.

7.1.11.5 real c_vislinear

n='Linear viscosity tensor parameter' u=1

1.2

`c_vislinear`

= `0.0`

).
It might be useful to damp small-amplitude almost linear waves.

n='Turbulent Prandtl number' u=1

8.0

`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).

n='Diagonal factor for viscous stress tensor' u=1 &

c0='typically 1.0

1.0

`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.

n='Off-diagonal factor for viscous stress tensor' u=1 &

c0='typically 0.5

0.5

`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.

n='Divergence factor for viscous stress tensor' u=1 &

c0='typically -1./3.

0.0

`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.

7.1.11.10 real c_visp2pcoeff

n='Point to point viscosity coefficient' u=1

0.20

`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.

7.1.11.11 real c_visp2phypsmagorinsky

n='Smagorinsky parameter for point-to-point viscosity' u=1

0.3

`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.

n='Artificial point-to-point tensor-viscosity parameter' u=1

0.0

`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.

n='Parameter for point-to-point expansion tensor viscosity' u=1

0.0

`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.

n='Point-to-point mass-flux-divergence viscosity coefficient' u=1

0.0

`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.

n='Point to point viscosity inclined cell factor 1' u=1

1.0

`1.0`

(interaction is considered) and
`0.0`

(no interaction with these cells).
The usual value is `1.0`

.

n='Point to point viscosity inclined cell factor 2' u=1

0.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.

7.1.11.17 integer n_viscellsperchunk

n='Number of cells per viscosity chunk' &

c0='0 => old chopping' &

c1='50000: reasonable value'

100000

`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.