CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Heat transfer in a channel: solving for T; questions about Pe and solving (http://www.cfd-online.com/Forums/openfoam-programming-development/120644-heat-transfer-channel-solving-t-questions-about-pe-solving.html)

 buffi July 11, 2013 09:27

Heat transfer in a channel: solving for T; questions about Pe and solving

Hi,

I'm doing CFD for a wavy channel, using simpleFoam and the k-omega-SST model to solve the velocity field. I'd now like to solve for T, and did some intermediate processing (post-U, pre-T):

For my first attempt at solving T (scalarTransportFoam) I used

Code:

div(phi,T) Gauss upwind;
which worked well and converged quickly. However, when switching to Gauss linear, the solution diverged. A colleague suggested to check the Peclet number first, which I calculated with the following code snippet:

Code:

// characteristic length of each cell: cbrt(V)
volScalarField CLen
(
IOobject (
"CLen",
runTime.timeName(),
mesh,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(
"CLen",
dimLength,
0.
)
);
forAll (CLen, i)
{
CLen.internalField()[i] = Foam::cbrt(mesh.V()[i]);
}

// Pe number
volScalarField Pe
(
IOobject (
"Pe",
runTime.timeName(),
mesh,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(
"Pe",
dimless,
0.
)
);
Pe = CLen*mag(U)/(alpha + turbulence->nut()/Prt);

The results are somewhere between 6e-5 and 300. The books say that I'd need Pe < 2 for more accurate schemes.

My main question now is: what can I do to get a usable temperature field? While Pe > 2 does not necessarily mean that the solution will be wrong, I could increase alpha and nu (in order to maintain Pr = 7), but that would mean that I have to increase U or the domain size as well to adjust Re. Wouldn't that just lead to the same problem, but on a different scale?

Another possibility is of course that my code for Pe is just plain wrong. Maybe someone could comment on this; OF's Pe tool just calculates Pe at the boundary, using a different equation.

I can not refine the mesh by a factor of 150, as I already have about 2 million cells.

Regards

 ARTem July 22, 2013 06:01

Hello, buffi.

Try to use "limitedLinear 1" for convective fluxes. It will use linear and switch to upwind in areas with big variable value gradients.

 All times are GMT -4. The time now is 23:53.