5.4.8 Tensor Viscosity Control

In many test problems it is not necessary to activate the 2D/3D tensor viscosity. But when strong slow shock fronts are aligned with the grid the Roe solver runs into problems and at least some additional 2D or 3D viscosity is necessary. And 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 is useful, too.

`real c_vissmagorinsky`

:

A turbulent viscosity of Smagorinsky type can be activated e.g. with`real c_vissmagorinsky f=E15.8 b=4 &`

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

1.2`0.5`

are sufficient to stabilize the code. Larger values (`1.2`

in the example above) 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 tensor viscosity step entirely.`real c_visartificial`

:

A standard artificial viscosity can be activated e.g. with`real c_visartificial f=E15.8 b=4 &`

n='Artificial viscosity tensor parameter' u=1

1.2`0.5`

are sufficient to stabilize the code. Larger values (`1.2`

in the example above) are only necessary for some nasty under-resolved supergiant models.`real c_visexpansion`

:

An additional viscosity can be activated e.g. with`real c_visexpansion f=E15.8 b=4 &`

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

:

Another viscosity can be activated e.g. with`real c_vislinear f=E15.8 b=4 &`

n='Linear viscosity tensor parameter' u=1

1.2`c_vislinear`

=`0.0`

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

:

The Prandtl number for turbulent mixing can be specified e.g. with`real c_visprturb f=E15.8 b=4 &`

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

:

The factor in the stress tensor in front of of the diagonal terms can be set with`real c_vistensordiag f=E15.8 b=4 &`

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

:

The factor in the stress tensor in front of of the off-diagonal terms can be set with e.g.`real c_vistensoroff f=E15.8 b=4 &`

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

:

The factor in the stress tensor in front of of the divergence terms (also on the diagonal) can be set with e.g.`real c_vistensordiv f=E15.8 b=4 &`

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

:

The number of cells per box (or ``chunk'') treated by the tensor viscosity scheme at one call (and by one thread) can be set e.g. for an Intel Macintosh with`integer n_viscellsperchunk f=I9 b=4 &`

n='Number of cells per viscosity chunk' &

c0='0 => old chopping' &

c1='12000: reasonable value'

32000`integer n_hydcellsperchunk`

, see Sect. 5.4.7) 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. 2D models). An example is given for the Hitachi SR8000 in Sect. 3.7.8.

In addition to the standard tensor viscosity described above, there
is a more experimental "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 current version should only be used for equidistant grids
(same spacing in all directions, as for the supergiant models)
by experienced users.
If activated, the "point-to-point" viscosity is typically used in addition to the standard one.

`real c_visp2pcoeff`

:

The strenght of the viscosity can be controlled with e.g.`real c_visp2pcoeff f=E15.8 b=4 &`

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

0.20`real c_visartificial`

, see 5.4.8. A value of`0.0`

switches it off.`real c_visp2pincl1`

:

The interaction with the edge neighbor cells with indices ( ) can be specified with e.g.`real c_visp2pincl1 f=E15.8 b=4 &`

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`

.`real c_visp2pincl2`

:

The interaction with the corner neighbor cells with indices ( ) can be specified with e.g.`real c_visp2pincl2 f=E15.8 b=4 &`

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.