From 25ccf356fea2f930007939507ccda173c44d8b45 Mon Sep 17 00:00:00 2001 From: andy <andy> Date: Thu, 15 Aug 2013 17:32:54 +0100 Subject: [PATCH] BUG: applyBoundaryLayer - re-ordered operations --- .../applyBoundaryLayer/applyBoundaryLayer.C | 12 ++++++++---- .../preProcessing/applyBoundaryLayer/createFields.H | 11 +---------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index 756b92cd494..4c16ae0e541 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -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; diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H index 8b4e6565a9c..e7d72692fc1 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H +++ b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H @@ -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()); -- GitLab