CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Wall correction for the temperature gradient (http://www.cfd-online.com/Forums/openfoam/85819-wall-correction-temperature-gradient.html)

Hagen March 7, 2011 21:04

Wall correction for the temperature gradient
 
Dear all,

I would like to implement a correction for the temperature gradient near the wall in a 2D channel flow. The energy equation is usually formulated as

Code:

fvScalarMatrix TEqn
      (
          fvm::div(phi, T)
          - fvm::Sp(fvc::div(phi), T)
          - fvm::laplacian(kappaEff, T)
      );

In order to correct the temperature gradient in the laplacian term it seems to be necessary to rewrite it as laplacian(kappaEff, T) = div(kappaEff * grad(T)) and then manipulate grad(T) at the wall. I found the following formulation to replace the laplacian.

Code:

surfaceTensorField kappaEffs = fvc::interpolate(kappaEff);
      surfaceVectorField Sn = mesh.Sf()/mesh.magSf();
      surfaceVectorField SfkappaEff = mesh.Sf() & kappaEffs;
      GeometricField<scalar, fvsPatchField, surfaceMesh> SfkappaEffSn = SfkappaEff & Sn;

      volScalarField Dif1
            (
                IOobject
                (
                    "Dif1",
                    runTime.timeName(),
                    mesh,
                    IOobject::NO_READ,
                    IOobject::AUTO_WRITE
                ),
                fvc::div(SfkappaEffSn * fvc::snGrad(T))
            );

      volScalarField Dif2
            (
                IOobject
                (
                    "Dif2",
                    runTime.timeName(),
                    mesh,
                    IOobject::NO_READ,
                    IOobject::AUTO_WRITE
                ),
                fvc::laplacian(kappaEff, T)
            );

Dif 1 and Dif2 are almost identical and grad(T) could be manipulated at the wall. The problem is, that I can not use this formulation for the energy equation because it is in explicit form and an implicit divergence does not exist. Convergence schemes do not seem to work here because they do not accept surfaceFields.

I would be thankful for any suggestion how to express the laplacian in terms of the gradient or any other possibility to correct the temperature gradient at the wall.

Thank you.


All times are GMT -4. The time now is 01:02.