pecos / tps

Torch Plasma Simulator
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Is the viscosity multiplier functionality broken? #177

Closed trevilo closed 1 year ago

trevilo commented 2 years ago

In theory we have the capability to allow the user to increase the viscosity in some region in space to, for instance, help stabilize a simulation on a mesh that is too coarse or provide a sponge-like region near a boundary. This capability is enabled with an input file block as follows:

[viscosityMultiplierFunction]
isEnabled = True
norm = 'n1 n2 n3'
p0 = 'x0 y0 z0'
pInit = 'xi yi zi'
viscosityRatio = 50.

When such a block is present, a ParGridFunction containing the viscosity multiplier is created and stored in M2ulPhyS (see here) and passed to RHSoperator.

However, as far as I can see, this additional viscosity is only applied to the element interior contribution to the residual (see here for cpu or here for gpu). It is not applied to the viscous flux contributions through the face integrals.

Was this intentional? Regardless, it can lead to strange behavior, and we should at least have the capability to use the viscosity multiplier in the face terms as well.