BUG: applyBoundaryLayer - re-ordered operations

This commit is contained in:
andy
2013-08-15 17:32:54 +01:00
parent 6e85a4683e
commit 25ccf356fe
2 changed files with 9 additions and 14 deletions

View File

@ -98,12 +98,11 @@ int main(int argc, char *argv[])
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "Time = " << runTime.timeName() << nl << endl;
// Modify velocity by applying a 1/7th power law boundary-layer
// u/U0 = (y/ybl)^(1/7)
// assumes U0 is the same as the current cell velocity
Info<< "Setting boundary layer velocity" << nl << endl;
scalar yblv = ybl.value();
forAll(U, celli)
{
@ -117,9 +116,15 @@ int main(int argc, char *argv[])
U.write();
// Update/re-write phi
phi = fvc::interpolate(U) & mesh.Sf();
#include "createPhi.H"
phi.write();
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
if (isA<incompressible::RASModel>(turbulence()))
{
@ -153,7 +158,6 @@ int main(int argc, char *argv[])
// Turbulence epsilon
tmp<volScalarField> tepsilon = turbulence->epsilon();
volScalarField& epsilon = tepsilon();
scalar ce0 = ::pow(Cmu, 0.75)/kappa;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,15 +37,6 @@ License
mesh
);
#include "createPhi.H"
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
Info<< "Calculating wall distance field" << endl;
volScalarField y(wallDist(mesh).y());