CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)

 cosimobianchini February 1, 2007 14:40

Hi all, I'm trying to impleme

Hi all,
I'm trying to implement an anisotropic turbulence model.
What I need to do is to correct turbulence->divRhoR() in such a way:

-- read Uv = velocity vector = (U,V,W) --

divRhoR = lam + L + Dev

laminarPart lam =
fvm::laplacian(mu(), Uv)

laplacianPart L =
mut* [(Uxx + gamma*Uyy + Uzz), (gamma*Vxx + Vyy + Vzz), (Wxx + Wyy +Wzz)]

deviatoricPart Dev =
1/3*mut*[ (Uxx + (3*gamma - 2)*Vxy + Wxz), ((3*gamma-2)*Uyx + Vyy + Wyz),
(Uzx + Vzy + Wzz)]

What I have done is:
B.replace(tensor::XY,(B.component(tensor::XY) * gamma));
B.replace(tensor::YX,(B.component(tensor::YX) * gamma));

Dev = fvc::div(B)

Right now I'm stuck with the implementation of the laplacian part because I would like to make it implicit but I don't know what (vector,tensor,..) to put in place of A

fvm::laplacian(A,U)

Now I get to the questions:

1) How is actually fvm::laplacian Operator working?
2) Is it doing something similar to div(A,grad(U)) ?
3) What kind of product does it use in multiplying A and U?
4) Is div(T)
a = (T11x + T12x + T13x, T21y + T22y + T23y, T31z + T32z + T33z) [as written in programmer's guide] or
b = (T11x + T12y + T13z, T21x + T22y + T23z, T31x + T32y + T33z) ?