CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Stress tensor in rhoCentralFoam (

srinath July 15, 2008 09:45

Hello The stress tensor in

The stress tensor in centralFoam, seems to be constructed rather mysteriously with the command

volTensorField tauMC("tauMC",mu*dev2(fvc::grad(U)().T()))

What does fvc::grad(U)().T()) do?
What does dev2 do?


grtabor July 15, 2008 10:02

fvc:: -- finite volume calculu
fvc:: -- finite volume calculus - explicit evaluation of a derivative

grad() -- gradient operator. Operating on U gives a 2nd rank tensor, so .T() will take the transpose of this.

The extra brackets after grad(U) are slightly complicated; operations in OpenFOAM often return `tmp' objects which have to be converted to ordinary objects before you can proceed.

dev2 -- works out the deviatoric part of the tensor.


All times are GMT -4. The time now is 10:39.