evaluateNearWall.H
Go to the documentation of this file.
1 {
2  // Evaluate near-wall behaviour
3 
4  scalar nu = turbulence->nu()().boundaryField()[patchId][faceId];
5  scalar nut = turbulence->nut()().boundaryField()[patchId][faceId];
6  symmTensor R = turbulence->devSigma()().boundaryField()[patchId][faceId];
7  scalar epsilon = turbulence->epsilon()()[cellId];
8 // scalar omega = turbulence->omega()()[cellId];
9  scalar k = turbulence->k()()[cellId];
10  scalar magUp = mag(U[cellId] - U.boundaryField()[patchId][faceId]);
11 
12  scalar tauw = flowDirection & R & wallNormal;
13 
14  scalar uTau = ::sqrt(mag(tauw));
15 
16  scalar yPlus = uTau*y[cellId]/(nu + rootVSmall);
17 
18  scalar uPlus = magUp/(uTau + rootVSmall);
19 
20  scalar nutPlus = nut/nu;
21 
22  scalar kPlus = k/(sqr(uTau) + rootVSmall);
23 
24  scalar epsilonPlus = epsilon*nu/(pow4(uTau) + rootVSmall);
25 
26 // scalar omegaPlus = omega*nu/(sqr(uTau) + rootVSmall);
27 
28  scalar Rey = magUp*y[cellId]/nu;
29 
30  Info<< "Rey = " << Rey << ", uTau = " << uTau << ", nut+ = " << nutPlus
31  << ", y+ = " << yPlus << ", u+ = " << uPlus
32  << ", k+ = " << kPlus << ", epsilon+ = " << epsilonPlus
33  << endl;
34 }
label patchId(-1)
scalar uPlus
label faceId(-1)
scalar Rey
dimensionedSymmTensor sqr(const dimensionedVector &dv)
scalar epsilonPlus
vector flowDirection
Definition: createFields.H:41
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
scalar y
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
Definition: symmTensor.H:48
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::momentumTransportModel > turbulence(compressible::momentumTransportModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
scalar kPlus
U
Definition: pEqn.H:72
scalar yPlus
label cellId
dimensionedScalar pow4(const dimensionedScalar &ds)
messageStream Info
dimensioned< scalar > mag(const dimensioned< Type > &)
vector wallNormal(Zero)
scalar nutPlus