# Discretization of viscosity terms for non-newtonian flow:

 Register Blogs Members List Search Today's Posts Mark Forums Read

July 15, 2015, 11:50
Discretization of viscosity terms for non-newtonian flow:
#1
New Member

Join Date: Feb 2015
Posts: 2
Rep Power: 0
I'm working on a non-Newtonian flow problem, and I was interested in the difference between the treatment of the viscosity terms in nonNewtonianIcoFoam and simpleFoam:

In simpleFoam

Code:
```tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const
{
return
(
- fvm::laplacian(nuEff(), U)
);
}```
In nonNewtonianIcoFoam

Code:
`- fvm::laplacian(fluid.nu(), U) - (fvc::grad(U) & fvc::grad(fluid.nu())`
While my tensor skills are rusty, I believe that when incompressible these should be identical in the the continuous limit, with nnIco assuming incompressibility to 'better' resolve the viscosity gradient. However a test case seems to indicate that when the scheme of nonNewtonianIcoFoam is used in simple foam, the results are more different than the small difference I expected.

The test case is a rectangular duct, flow L to R with parabolic inlet, upper boundary symmetry, bottom stationary wall, with the fluid suddenly becoming a bingham plastic (viscosity can increase by up to 3 orders of magnitude) to the right of the white line. The flow condition is Re=10, Bi=5.0. The two attached pictures are plots of the vertical component of velocity, showing that in the default case (divDev), there exists a region of upward flow that is not observed in the nnIco case. The downward blue flow region is expected as the flow transitions from parabolic flow to plug flow in the non-newtonian region.

I don't think it's a convergence/tolerance issues, as I've worked pretty carefully to eliminate those. The fvSchemes/fvSolution file is consistent between the two cases.

Both solutions seem plausible to me, but I learn towards the divDev solution being correct

What do you all think is the best approach here? I can't really tell from the physical intuition perspective, so what is the best numerical scheme from the mathematics/numerics perspective? A more general question might be that in the newtonian laminar incompressible case, why have the divDev component at all?

Thanks!
Attached Images
 divDev.jpg (10.9 KB, 27 views) nnIco.jpg (9.7 KB, 26 views)

 July 16, 2015, 07:57 #2 Senior Member   Join Date: Sep 2010 Posts: 226 Rep Power: 16 Hi ssherman, It is all here: http://www.cfd-online.com/Forums/ope...ivdevreff.html Regards, T.D.