GfsSourceViscosity
From Gerris
GfsSourceViscosity solves the diffusion equation for the velocity (a vector quantity obviously) while GfsSourceDiffusion solves the diffusion equation for a scalar quantity. In the case of a spatially uniform viscosity the two are strictly equivalent since — in the case of an incompressible fluid — the vector diffusion equation for the velocity can be split in independent scalar diffusion equations for each of the Cartesian components of the velocities.
To sum up, using GfsSourceViscosity is safe in all cases, regardless of whether the viscosity is uniform.
The syntax in parameter files is:
[ GfsSourceVelocity ] [ GfsDiffusion ]
Examples
- Rayleigh-Taylor instability
- Viscous flow past a sphere
- Poiseuille flow
- Creeping Couette flow of Generalised Newtonian fluids
- Momentum conservation for large density ratios
- Hydrostatic balance with solid boundaries and viscosity
- Hydrostatic balance with quadratic pressure profile
- Axisymmetric spherical droplet in equilibrium
- Air-Water capillary wave
SourceViscosity {} 0.00313
SourceViscosity 1./RE
SourceViscosity 1. { beta = 1 }
SourceViscosity {} {
double mu, ty, N, mumax = 1000.;
double m;
switch (MODEL) {
case 0: /* Newtonian */
mu = 1.; ty = 0.; N = 1.; break;
case 1: /* Power-law (shear-thinning) */
mu = 0.08; ty = 0.; N = 0.5; break;
case 2: /* Herschel-Bulkley */
mu = 0.0672; ty = 0.12; N = 0.5; break;
case 3: /* Bingham */
mu = 1.; ty = 10.; N = 1.; break;
}
if (D2 > 0.)
m = ty/(2.*D2) + mu*exp ((N - 1.)*log (D2));
else {
if (ty > 0. || N < 1.) m = mumax;
else m = N == 1. ? mu : 0.;
}
return MIN (m, mumax);
} {
# Crank-Nicholson does not converge for these cases, we need backward Euler
# (beta = 0.5 -> Crank-Nicholson, beta = 1 -> backward Euler)
beta = 1
}
SourceViscosity mu(T1)
SourceViscosity 1e-2
SourceViscosity 1e-2
SourceViscosity MU
SourceViscosity 0.0182571749236*MU(T1)

