CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Problem computing divergence field (https://www.cfd-online.com/Forums/openfoam-solving/99336-problem-computing-divergence-field.html)

gdeneyer April 1, 2012 07:06

Problem computing divergence field
 
2 Attachment(s)
Hello,

I'm actually trying to compute the divergence field for a laminar compressible flow on a cylinder and I got weird results around the cylinder. I have a zero divergence field inside the structured grid around cylinder and then some fluctuation in the non structured grid.

The code I used for this was just this at the end of my timeloop
volScalarField divField
(
IOobject
(
"divU",
mesh.time().timeName(),
mesh,
IOobject::NO_READ
IOobject::AUTO_WRITE
),
fvc::div(U)
);

Note: the flow is laminar with low Mach number 0.05 using rhoPimpleFoam, in attachment the divergence field with and without the mesh

alberto April 2, 2012 02:34

There are a good number of posts explaining that what should be computed is

fvc::div(phi)

and not fvc::div(U).

Best regards,


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