mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: applyBoundaryLayer - re-ordered operations
This commit is contained in:
@ -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;
|
||||
|
||||
@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user