wallDist: now a MeshObject cached and updated automatically with a run-time selected algorithm

When using models which require the wallDist e.g. kOmegaSST it will
request the method to be used from the wallDist sub-dictionary in
fvSchemes e.g.

wallDist
{
    method meshWave;
}

specifies the mesh-wave method as hard-coded in previous OpenFOAM versions.
This commit is contained in:
Henry
2015-01-08 10:40:23 +00:00
parent 2028973e19
commit bb2c2efd49
76 changed files with 778 additions and 294 deletions

View File

@ -45,29 +45,7 @@ Foam::wallDependentModel::~wallDependentModel()
const Foam::volScalarField& Foam::wallDependentModel::yWall() const
{
if (!mesh_.foundObject<volScalarField>("yWall"))
{
volScalarField* yPtr
(
new volScalarField
(
IOobject
(
"yWall",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
true
),
wallDist(mesh_).y()
)
);
yPtr->checkIn();
}
return mesh_.lookupObject<volScalarField>("yWall");
return wallDist::New(mesh_).y();
}
@ -77,28 +55,6 @@ const Foam::volVectorField& Foam::wallDependentModel::nWall() const
{
wallDistReflection w(mesh_);
if (!mesh_.foundObject<volScalarField>("yWall"))
{
volScalarField* yPtr
(
new volScalarField
(
IOobject
(
"yWall",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
true
),
w.y()
)
);
yPtr->checkIn();
}
volVectorField* nPtr
(
new volVectorField

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,46 +26,36 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "argList.H"
#include "Time.H"
#include "fvMesh.H"
#include "wallDist.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
Info<< "Mesh read in = "
<< runTime.cpuTimeIncrement()
<< " s\n" << endl << endl;
Info<< "Time now = " << runTime.timeName() << endl;
// Wall distance
wallDist y(mesh, true);
if (y.nUnset() != 0)
{
WarningIn(args.executable())
<< "There are " << y.nUnset()
<< " remaining unset cells and/or boundary values" << endl;
}
const volScalarField& y = wallDist::New(mesh).y();
y.write();
runTime++;
Info<< "Time now = " << runTime.timeName() << endl;
// Move points
boundBox meshBb(mesh.points());
@ -83,14 +73,11 @@ int main(int argc, char *argv[])
}
mesh.movePoints(newPoints);
mesh.write();
y.correct();
y.write();
Info<< "End\n" << endl;
return 0;

View File

@ -34,7 +34,6 @@ Description
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "LESModel.H"
#include "nearWallDist.H"
#include "wallDist.H"
#include "wallFvPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -53,17 +52,6 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << endl;
fvMesh::readUpdateState state = mesh.readUpdate();
// Wall distance
if (timeI == 0 || state != fvMesh::UNCHANGED)
{
Info<< "Calculating wall distance\n" << endl;
wallDist y(mesh);
Info<< "Writing wall distance to field "
<< y.name() << nl << endl;
y.write();
}
volScalarField yPlus
(
IOobject

View File

@ -43,8 +43,6 @@ Description
#include "compressible/RAS/RASModel/RASModel.H"
#include "mutWallFunction/mutWallFunctionFvPatchScalarField.H"
#include "wallDist.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void calcIncompressibleYPlus
@ -204,15 +202,6 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << endl;
fvMesh::readUpdateState state = mesh.readUpdate();
// Wall distance
if (timeI == 0 || state != fvMesh::UNCHANGED)
{
Info<< "Calculating wall distance\n" << endl;
wallDist y(mesh);
Info<< "Writing wall distance to field " << y.name() << nl << endl;
y.write();
}
volScalarField yPlus
(
IOobject

View File

@ -38,7 +38,7 @@ volVectorField U
);
Info<< "Calculating wall distance field" << endl;
volScalarField y(wallDist(mesh).y());
const volScalarField& y(wallDist::New(mesh).y());
// Set the mean boundary-layer thickness
dimensionedScalar ybl("ybl", dimLength, 0);

View File

@ -610,6 +610,7 @@ DebugSwitches
meshCutAndRemove 0;
meshCutter 0;
meshModifier 0;
meshObject 0;
meshRefinement 0;
meshSearch 0;
meshToMesh 0;

View File

@ -43,7 +43,7 @@ void Foam::PrandtlDelta::calcDelta()
delta_ = min
(
static_cast<const volScalarField&>(geometricDelta_()),
(kappa_/Cdelta_)*wallDist(mesh_).y()
(kappa_/Cdelta_)*wallDist::New(mesh_).y()
);
}

View File

@ -261,7 +261,7 @@ kOmegaSST<BasicTurbulenceModel>::kOmegaSST
)
),
y_(this->mesh_),
y_(wallDist::New(this->mesh_).y()),
k_
(

View File

@ -148,11 +148,12 @@ protected:
Switch F3_;
// Fields
//- Wall distance
// Note: different to wall distance in parent RASModel
wallDist y_;
// Fields
// which is for near-wall cells only
const volScalarField& y_;
volScalarField k_;
volScalarField omega_;

View File

@ -42,8 +42,8 @@ $(wallDist)/wallPointYPlus/wallPointYPlus.C
$(wallDist)/nearWallDist/nearWallDistNoSearch.C
$(wallDist)/nearWallDist/nearWallDist.C
$(wallDist)/wallDist/wallDist.C
$(wallDist)/meshWaveWallDist/patchDist.C
$(wallDist)/meshWaveWallDist/meshWaveWallDist.C
$(wallDist)/patchDistMethods/patchDistMethod/patchDistMethod.C
$(wallDist)/patchDistMethods/meshWave/meshWavePatchDistMethod.C
$(wallDist)/wallDistReflection/reflectionVectors.C
$(wallDist)/wallDistReflection/wallDistReflection.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,8 +49,19 @@ namespace Foam
void Foam::fvMesh::clearGeomNotOldVol()
{
meshObject::clear<fvMesh, GeometricMeshObject>(*this);
meshObject::clear<lduMesh, GeometricMeshObject>(*this);
meshObject::clearUpto
<
fvMesh,
GeometricMeshObject,
MoveableMeshObject
>(*this);
meshObject::clearUpto
<
lduMesh,
GeometricMeshObject,
MoveableMeshObject
>(*this);
slicedVolScalarField::DimensionedInternalField* VPtr =
static_cast<slicedVolScalarField::DimensionedInternalField*>(VPtr_);

View File

@ -23,22 +23,47 @@ License
\*---------------------------------------------------------------------------*/
#include "patchDist.H"
#include "patchWave.H"
#include "meshWavePatchDistMethod.H"
#include "fvMesh.H"
#include "volFields.H"
#include "patchWave.H"
#include "emptyFvPatchFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace patchDistMethods
{
defineTypeNameAndDebug(meshWave, 0);
addToRunTimeSelectionTable(patchDistMethod, meshWave, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::patchDist::patchDist
Foam::patchDistMethods::meshWave::meshWave
(
const dictionary& dict,
const fvMesh& mesh,
const labelHashSet& patchIDs
)
:
patchDistMethod(mesh, patchIDs),
correctWalls_(dict.lookupOrDefault<Switch>("correctWalls", true)),
nUnset_(0)
{}
Foam::patchDistMethods::meshWave::meshWave
(
const fvMesh& mesh,
const labelHashSet& patchIDs,
const bool correctWalls
)
:
mesh_(mesh),
patchIDs_(patchIDs),
patchDistMethod(mesh, patchIDs),
correctWalls_(correctWalls),
nUnset_(0)
{}
@ -46,28 +71,8 @@ Foam::patchDist::patchDist
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::patchDist::y() const
bool Foam::patchDistMethods::meshWave::correct(volScalarField& y)
{
tmp<volScalarField> ty
(
new volScalarField
(
IOobject
(
"y",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar("y", dimLength, GREAT)
)
);
volScalarField& y = ty();
// Calculate distance starting from patch faces
patchWave wave(mesh_, patchIDs_, correctWalls_);
@ -88,7 +93,7 @@ Foam::tmp<Foam::volScalarField> Foam::patchDist::y() const
// Transfer number of unset values
nUnset_ = wave.nUnset();
return ty;
return nUnset_ > 0;
}

View File

@ -39,36 +39,32 @@ Description
takes the pointFaces() of the wall point to look for the nearest point.
SourceFiles
patchDist.C
meshWavePatchDistMethod.C
\*---------------------------------------------------------------------------*/
#ifndef patchDist_H
#define patchDist_H
#ifndef meshWavePatchDistMethod_H
#define meshWavePatchDistMethod_H
#include "volFields.H"
#include "patchDistMethod.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class fvMesh;
namespace patchDistMethods
{
/*---------------------------------------------------------------------------*\
Class patchDist Declaration
Class meshWave Declaration
\*---------------------------------------------------------------------------*/
class patchDist
class meshWave
:
public patchDistMethod
{
// Private Member Data
//- Reference to the mesh
const fvMesh& mesh_;
//- Set of patch IDs
const labelHashSet patchIDs_;
//- Do accurate distance calculation for near-wall cells.
const bool correctWalls_;
@ -79,20 +75,33 @@ class patchDist
// Private Member Functions
//- Disallow default bitwise copy construct
patchDist(const patchDist&);
meshWave(const meshWave&);
//- Disallow default bitwise assignment
void operator=(const patchDist&);
void operator=(const meshWave&);
public:
//- Runtime type information
TypeName("meshWave");
// Constructors
//- Construct from mesh and flag whether or not to correct wall.
// Calculate for all cells.
meshWave
(
const dictionary& dict,
const fvMesh& mesh,
const labelHashSet& patchIDs
);
//- Construct from mesh and flag whether or not to correct wall.
// Calculate for all cells. correctWalls : correct wall (face&point)
// cells for correct distance, searching neighbours.
patchDist
meshWave
(
const fvMesh& mesh,
const labelHashSet& patchIDs,
@ -102,19 +111,19 @@ public:
// Member Functions
//- Calculate and return the distance to nearest patch
// for all cells and boundary
tmp<volScalarField> y() const;
label nUnset() const
{
return nUnset_;
}
//- Correct the given distance-to-patch field
virtual bool correct(volScalarField& y);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace patchDistMethods
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,86 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "patchDistMethod.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(patchDistMethod, 0);
defineRunTimeSelectionTable(patchDistMethod, dictionary);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::patchDistMethod::patchDistMethod
(
const fvMesh& mesh,
const labelHashSet& patchIDs
)
:
mesh_(mesh),
patchIDs_(patchIDs)
{}
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::patchDistMethod> Foam::patchDistMethod::New
(
const dictionary& dict,
const fvMesh& mesh,
const labelHashSet& patchIDs
)
{
word patchDistMethodType(dict.lookup("method"));
Info<< "Selecting patchDistMethod " << patchDistMethodType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(patchDistMethodType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn("patchDistMethod::New")
<< "Unknown patchDistMethodType type "
<< patchDistMethodType << endl << endl
<< "Valid patchDistMethod types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return cstrIter()(dict, mesh, patchIDs);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::patchDistMethod::~patchDistMethod()
{}
// ************************************************************************* //

View File

@ -0,0 +1,152 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::patchDistMethod
Description
Specialisation of patchDist for wall distance calculation
SourceFiles
patchDistMethod.C
\*---------------------------------------------------------------------------*/
#ifndef patchDistMethod_H
#define patchDistMethod_H
#include "dictionary.H"
#include "HashSet.H"
#include "volFieldsFwd.H"
#include "mapPolyMesh.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class fvMesh;
/*---------------------------------------------------------------------------*\
Class patchDistMethod Declaration
\*---------------------------------------------------------------------------*/
class patchDistMethod
{
protected:
// Protected Member Data
//- Reference to the mesh
const fvMesh& mesh_;
//- Set of patch IDs
const labelHashSet patchIDs_;
private:
// Private Member Functions
//- Disallow default bitwise copy construct
patchDistMethod(const patchDistMethod&);
//- Disallow default bitwise assignment
void operator=(const patchDistMethod&);
public:
//- Runtime type information
TypeName("patchDistMethod");
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
patchDistMethod,
dictionary,
(
const dictionary& dict,
const fvMesh& mesh,
const labelHashSet& patchIDs
),
(dict, mesh, patchIDs)
);
// Constructors
//- Construct from mesh and patch ID set
patchDistMethod
(
const fvMesh& mesh,
const labelHashSet& patchIDs
);
// Selectors
static autoPtr<patchDistMethod> New
(
const dictionary& dict,
const fvMesh& mesh,
const labelHashSet& patchIDs
);
//- Destructor
virtual ~patchDistMethod();
// Member Functions
//- Update cached geometry when the mesh moves
virtual bool movePoints()
{
return true;
}
//- Update cached topology and geometry when the mesh changes
virtual void updateMesh(const mapPolyMesh&)
{}
//- Correct the given distance-to-patch field
virtual bool correct(volScalarField& y) = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,25 +24,43 @@ License
\*---------------------------------------------------------------------------*/
#include "wallDist.H"
#include "meshWaveWallDist.H"
#include "wallPolyPatch.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(wallDist, 0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallDist::wallDist(const fvMesh& mesh)
:
volScalarField
MeshObject<fvMesh, Foam::UpdateableMeshObject, wallDist>(mesh),
pdm_
(
patchDistMethod::New
(
static_cast<const fvSchemes&>(mesh).subDict("wallDist"),
mesh,
mesh.boundaryMesh().findPatchIDs<wallPolyPatch>()
)
),
y_
(
IOobject
(
"y",
"yWall",
mesh.time().timeName(),
mesh
),
mesh,
dimensionedScalar("y", dimLength, GREAT)
dimensionedScalar("yWall", dimLength, GREAT)
)
{
correct();
movePoints();
}
@ -54,9 +72,23 @@ Foam::wallDist::~wallDist()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::wallDist::correct()
bool Foam::wallDist::movePoints()
{
volScalarField::operator=(meshWaveWallDist(mesh()).y());
if (pdm_->movePoints())
{
return pdm_->correct(y_);
}
else
{
return false;
}
}
void Foam::wallDist::updateMesh(const mapPolyMesh& mpm)
{
pdm_->updateMesh(mpm);
pdm_->correct(y_);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,7 +25,8 @@ Class
Foam::wallDist
Description
Specialisation of patchDist for wall distance calculation
Interface to run-time selectable methods to calculate the distance-to-wall
field.
SourceFiles
wallDist.C
@ -35,6 +36,9 @@ SourceFiles
#ifndef wallDist_H
#define wallDist_H
#include "MeshObject.H"
#include "patchDistMethod.H"
#include "fvMesh.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -48,8 +52,17 @@ namespace Foam
class wallDist
:
public volScalarField
public MeshObject<fvMesh, UpdateableMeshObject, wallDist>
{
// Private data
//- Run-time selected method to generate the distance-to-wall field
autoPtr<patchDistMethod> pdm_;
//- Distance-to-wall field
volScalarField y_;
// Private Member Functions
//- Disallow default bitwise copy construct
@ -61,6 +74,10 @@ class wallDist
public:
// Declare name of the class and its debug switch
ClassName("wallDist");
// Constructors
//- Construct from mesh
@ -75,11 +92,14 @@ public:
const volScalarField& y() const
{
return *this;
return y_;
}
//- Correct for mesh changes
virtual void correct();
//- Update the y-field when the mesh moves
virtual bool movePoints();
//- Update the y-field when the mesh changes
virtual void updateMesh(const mapPolyMesh&);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,8 +32,14 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(twoDPointCorrector, 0);
}
const Foam::scalar Foam::twoDPointCorrector::edgeOrthogonalityTol = 1.0 - 1e-4;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::twoDPointCorrector::calcAddressing() const

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -111,6 +111,10 @@ class twoDPointCorrector
public:
// Declare name of the class and its debug switch
ClassName("twoDPointCorrector");
// Constructors
//- Construct from components

View File

@ -28,7 +28,7 @@ License
#include "fvcGrad.H"
#include "unitConversion.H"
#include "fvPatchField.H"
#include "patchDist.H"
#include "meshWavePatchDistMethod.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,9 +66,25 @@ void contactAngleForce::initialise()
Info<< " " << pbm[patchI].name() << endl;
}
patchDist dist(owner_.regionMesh(), patchIDs);
// Temporary implementation until run-time selection covers this case
patchDistMethods::meshWave dist(owner_.regionMesh(), patchIDs);
volScalarField y
(
IOobject
(
"y",
owner_.regionMesh().time().timeName(),
owner_.regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
owner_.regionMesh(),
dimensionedScalar("y", dimLength, GREAT)
);
dist.correct(y);
mask_ = pos(dist.y() - dimensionedScalar("dLim", dimLength, dLim));
mask_ = pos(y - dimensionedScalar("dLim", dimLength, dLim));
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ void PrandtlDelta::calcDelta()
delta_ = min
(
static_cast<const volScalarField&>(geometricDelta_()),
(kappa_/Cdelta_)*wallDist(mesh_).y()
(kappa_/Cdelta_)*wallDist::New(mesh_).y()
);
}

View File

@ -111,7 +111,11 @@ tmp<volScalarField> SpalartAllmaras::fv3() const
}
tmp<volScalarField> SpalartAllmaras::fw(const volScalarField& Stilda) const
tmp<volScalarField> SpalartAllmaras::fw
(
const volScalarField& Stilda,
const volScalarField& dTilda
) const
{
volScalarField r
(
@ -124,7 +128,7 @@ tmp<volScalarField> SpalartAllmaras::fw(const volScalarField& Stilda) const
Stilda,
dimensionedScalar("SMALL", Stilda.dimensions(), SMALL)
)
*sqr(kappa_*dTilda_)
*sqr(kappa_*dTilda)
),
scalar(10.0)
)
@ -137,6 +141,14 @@ tmp<volScalarField> SpalartAllmaras::fw(const volScalarField& Stilda) const
}
tmp<volScalarField> SpalartAllmaras::dTilda() const
{
tmp<volScalarField> tdTilda(CDES_*delta());
min(tdTilda().dimensionedInternalField(), tdTilda(), y_);
return tdTilda;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
SpalartAllmaras::SpalartAllmaras
@ -255,6 +267,8 @@ SpalartAllmaras::SpalartAllmaras
ashfordCorrection_(coeffDict_.lookupOrDefault("ashfordCorrection", true)),
y_(wallDist::New(mesh_).y()),
nuTilda_
(
IOobject
@ -268,7 +282,6 @@ SpalartAllmaras::SpalartAllmaras
mesh_
),
dTilda_(min(CDES_*delta(), wallDist(mesh_).y())),
muSgs_
(
IOobject
@ -340,14 +353,10 @@ void SpalartAllmaras::correct(const tmp<volTensorField>& tgradU)
const volTensorField& gradU = tgradU();
LESModel::correct(gradU);
if (mesh_.changing())
{
dTilda_ = min(CDES_*delta(), wallDist(mesh_).y());
}
const volScalarField dTilda(this->dTilda());
volScalarField Stilda
(
fv3()*::sqrt(2.0)*mag(skew(gradU)) + fv2()*nuTilda_/sqr(kappa_*dTilda_)
fv3()*::sqrt(2.0)*mag(skew(gradU)) + fv2()*nuTilda_/sqr(kappa_*dTilda)
);
tmp<fvScalarMatrix> nuTildaEqn
@ -363,7 +372,7 @@ void SpalartAllmaras::correct(const tmp<volTensorField>& tgradU)
- rho()*Cb2_/sigmaNut_*magSqr(fvc::grad(nuTilda_))
==
rho()*Cb1_*Stilda*nuTilda_
- fvm::Sp(rho()*Cw1_*fw(Stilda)*nuTilda_/sqr(dTilda_), nuTilda_)
- fvm::Sp(rho()*Cw1_*fw(Stilda, dTilda)*nuTilda_/sqr(dTilda), nuTilda_)
);
nuTildaEqn().relax();
@ -407,8 +416,6 @@ bool SpalartAllmaras::read()
tmp<volScalarField> SpalartAllmaras::LESRegion() const
{
volScalarField wd(wallDist(mesh_).y());
tmp<volScalarField> tLESRegion
(
new volScalarField
@ -421,9 +428,7 @@ tmp<volScalarField> SpalartAllmaras::LESRegion() const
IOobject::NO_READ,
IOobject::NO_WRITE
),
neg(min(CDES_*delta(), wd) - wd)
// mesh_,
// dimensionedScalar("zero", dimless, 0.0)
neg(dTilda() - y_)
)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,6 +49,7 @@ SourceFiles
#include "DESModel.H"
#include "volFields.H"
#include "wallDist.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -92,8 +93,12 @@ class SpalartAllmaras
// Fields
//- Wall distance
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
volScalarField nuTilda_;
volScalarField dTilda_;
volScalarField muSgs_;
volScalarField alphaSgs_;
@ -106,7 +111,15 @@ class SpalartAllmaras
tmp<volScalarField> fv1() const;
tmp<volScalarField> fv2() const;
tmp<volScalarField> fv3() const;
tmp<volScalarField> fw(const volScalarField& Stilda) const;
tmp<volScalarField> fw
(
const volScalarField& Stilda,
const volScalarField& dTilda
) const;
//- Length scale
tmp<volScalarField> dTilda() const;
// Disallow default bitwise copy construct and assignment
SpalartAllmaras(const SpalartAllmaras&);
@ -148,7 +161,7 @@ public:
//- Return SGS kinetic energy
virtual tmp<volScalarField> k() const
{
return sqr(muSgs()/rho()/ck_/dTilda_);
return sqr(muSgs()/rho()/ck_/dTilda());
}
//- Return sub-grid disipation rate

View File

@ -184,7 +184,7 @@ LaunderGibsonRSTM::LaunderGibsonRSTM
)
),
y_(mesh_),
yr_(mesh_),
R_
(
@ -375,7 +375,7 @@ void LaunderGibsonRSTM::correct()
if (mesh_.changing())
{
y_.correct();
yr_.correct();
}
volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_)));
@ -443,10 +443,10 @@ void LaunderGibsonRSTM::correct()
// wall reflection terms
+ symm
(
I*((y_.n() & reflect) & y_.n())
- 1.5*(y_.n()*(reflect & y_.n())
+ (y_.n() & reflect)*y_.n())
)*pow(Cmu_, 0.75)*rho_*pow(k_, 1.5)/(kappa_*y_*epsilon_)
I*((yr_.n() & reflect) & yr_.n())
- 1.5*(yr_.n()*(reflect & yr_.n())
+ (yr_.n() & reflect)*yr_.n())
)*pow(Cmu_, 0.75)*rho_*pow(k_, 1.5)/(kappa_*yr_*epsilon_)
);
REqn().relax();

View File

@ -109,7 +109,7 @@ protected:
// Fields
wallDistReflection y_;
wallDistReflection yr_;
volSymmTensorField R_;
volScalarField k_;

View File

@ -126,7 +126,7 @@ tmp<volScalarField> SpalartAllmaras::fw(const volScalarField& Stilda) const
Stilda,
dimensionedScalar("SMALL", Stilda.dimensions(), SMALL)
)
*sqr(kappa_*d_)
*sqr(kappa_*y_)
),
scalar(10.0)
)
@ -276,7 +276,7 @@ SpalartAllmaras::SpalartAllmaras
autoCreateAlphat("alphat", mesh_)
),
d_(mesh_)
y_(wallDist::New(mesh_).y())
{
alphat_ = mut_/Prt_;
alphat_.correctBoundaryConditions();
@ -435,18 +435,13 @@ void SpalartAllmaras::correct()
RASModel::correct();
if (mesh_.changing())
{
d_.correct();
}
const volScalarField chi(this->chi());
const volScalarField fv1(this->fv1(chi));
const volScalarField Stilda
(
fv3(chi, fv1)*::sqrt(2.0)*mag(skew(fvc::grad(U_)))
+ fv2(chi, fv1)*nuTilda_/sqr(kappa_*d_)
+ fv2(chi, fv1)*nuTilda_/sqr(kappa_*y_)
);
tmp<fvScalarMatrix> nuTildaEqn
@ -457,7 +452,7 @@ void SpalartAllmaras::correct()
- Cb2_/sigmaNut_*rho_*magSqr(fvc::grad(nuTilda_))
==
Cb1_*rho_*Stilda*nuTilda_
- fvm::Sp(Cw1_*fw(Stilda)*nuTilda_*rho_/sqr(d_), nuTilda_)
- fvm::Sp(Cw1_*fw(Stilda)*nuTilda_*rho_/sqr(y_), nuTilda_)
);
nuTildaEqn().relax();

View File

@ -122,9 +122,10 @@ protected:
volScalarField mut_;
volScalarField alphat_;
//- Wall distance
wallDist d_;
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
// Protected Member Functions

View File

@ -251,7 +251,7 @@ kOmegaSST::kOmegaSST
)
),
y_(mesh_),
y_(wallDist::New(mesh_).y()),
k_
(
@ -424,11 +424,6 @@ void kOmegaSST::correct()
volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_)));
if (mesh_.changing())
{
y_.correct();
}
if (mesh_.moving())
{
divU += fvc::div(mesh_.phi());

View File

@ -149,11 +149,12 @@ protected:
Switch F3_;
// Fields
//- Wall distance
// Note: different to wall distance in parent RASModel
wallDist y_;
// Fields
// which is for near-wall cells only
const volScalarField& y_;
volScalarField k_;
volScalarField omega_;

View File

@ -168,7 +168,9 @@ tmp<volScalarField> SpalartAllmaras::fw
tmp<volScalarField> SpalartAllmaras::dTilda(const volScalarField&) const
{
return min(CDES_*delta(), y_);
tmp<volScalarField> tdTilda(CDES_*delta());
min(tdTilda().dimensionedInternalField(), tdTilda(), y_);
return tdTilda;
}
@ -279,7 +281,7 @@ SpalartAllmaras::SpalartAllmaras
ashfordCorrection_(coeffDict_.lookupOrDefault("ashfordCorrection", true)),
y_(mesh_),
y_(wallDist::New(mesh_).y()),
nuTilda_
(
@ -322,12 +324,6 @@ void SpalartAllmaras::correct(const tmp<volTensorField>& gradU)
{
LESModel::correct(gradU);
if (mesh_.changing())
{
y_.correct();
y_.boundaryField() = max(y_.boundaryField(), VSMALL);
}
const volScalarField S(this->S(gradU));
const volScalarField dTilda(this->dTilda(S));
const volScalarField STilda(this->STilda(S, dTilda));
@ -451,8 +447,6 @@ tmp<volScalarField> SpalartAllmaras::LESRegion() const
IOobject::NO_WRITE
),
neg(dTilda(S(fvc::grad(U_))) - y_)
// mesh_,
// dimensionedScalar("zero", dimless, 0.0)
)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -105,7 +105,11 @@ protected:
// Fields
wallDist y_;
//- Wall distance
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
volScalarField nuTilda_;
volScalarField nuSgs_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -116,7 +116,7 @@ void Foam::IDDESDelta::calcDelta()
(
max
(
cw_*wallDist(mesh()).y(),
cw_*wallDist::New(mesh()).y(),
cw_*hmax
),
tfaceToFacenMax

View File

@ -264,7 +264,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
),
omegaMin_("omegaMin", dimless/dimTime, SMALL),
y_(mesh_),
Cmu_
(
dimensioned<scalar>::lookupOrAddToDict
@ -284,6 +284,8 @@ kOmegaSSTSAS::kOmegaSSTSAS
)
),
y_(wallDist::New(mesh_).y()),
k_
(
IOobject
@ -340,11 +342,6 @@ void kOmegaSSTSAS::correct(const tmp<volTensorField>& gradU)
{
LESModel::correct(gradU);
if (mesh_.changing())
{
y_.correct();
}
volScalarField S2(2.0*magSqr(symm(gradU())));
gradU.clear();

View File

@ -117,13 +117,17 @@ protected:
dimensionedScalar omegaMin_;
wallDist y_;
dimensionedScalar Cmu_;
dimensionedScalar kappa_;
// Fields
//- Wall distance
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
volScalarField k_;
volScalarField omega_;
volScalarField nuSgs_;

View File

@ -118,7 +118,7 @@ LamBremhorstKE::LamBremhorstKE
mesh_
),
y_(mesh_),
y_(wallDist::New(mesh_).y()),
Rt_(sqr(k_)/(nu()*bound(epsilon_, epsilonMin_))),
@ -247,11 +247,6 @@ void LamBremhorstKE::correct()
return;
}
if (mesh_.changing())
{
y_.correct();
}
volScalarField G(GName(), nut_*2*magSqr(symm(fvc::grad(U_))));

View File

@ -72,7 +72,11 @@ protected:
volScalarField k_;
volScalarField epsilon_;
wallDist y_;
//- Wall distance
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
volScalarField Rt_;
volScalarField fMu_;

View File

@ -218,7 +218,7 @@ LienCubicKELowRe::LienCubicKELowRe
mesh_
),
y_(mesh_),
y_(wallDist::New(mesh_).y()),
eta_
(
@ -420,11 +420,6 @@ void LienCubicKELowRe::correct()
return;
}
if (mesh_.changing())
{
y_.correct();
}
tmp<volTensorField> tgradU = fvc::grad(U_);
const volTensorField& gradU = tgradU();

View File

@ -104,7 +104,10 @@ protected:
volScalarField k_;
volScalarField epsilon_;
wallDist y_;
//- Wall distance
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
volScalarField eta_;
volScalarField ksi_;

View File

@ -164,7 +164,7 @@ LienLeschzinerLowRe::LienLeschzinerLowRe
mesh_
),
y_(mesh_),
y_(wallDist::New(mesh_).y()),
yStar_(sqrt(k_)*y_/nu() + SMALL),
@ -296,11 +296,6 @@ void LienLeschzinerLowRe::correct()
return;
}
if (mesh_.changing())
{
y_.correct();
}
scalar Cmu75 = pow(Cmu_.value(), 0.75);
const volTensorField gradU(fvc::grad(U_));

View File

@ -83,7 +83,10 @@ protected:
volScalarField k_;
volScalarField epsilon_;
wallDist y_;
//- Wall distance
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
volScalarField yStar_;

View File

@ -124,7 +124,7 @@ tmp<volScalarField> SpalartAllmaras::fw(const volScalarField& Stilda) const
Stilda,
dimensionedScalar("SMALL", Stilda.dimensions(), SMALL)
)
*sqr(kappa_*d_)
*sqr(kappa_*y_)
),
scalar(10.0)
)
@ -253,7 +253,7 @@ SpalartAllmaras::SpalartAllmaras
mesh_
),
d_(mesh_)
y_(wallDist::New(mesh_).y())
{
printCoeffs();
@ -429,18 +429,13 @@ void SpalartAllmaras::correct()
return;
}
if (mesh_.changing())
{
d_.correct();
}
const volScalarField chi(this->chi());
const volScalarField fv1(this->fv1(chi));
const volScalarField Stilda
(
fv3(chi, fv1)*::sqrt(2.0)*mag(skew(fvc::grad(U_)))
+ fv2(chi, fv1)*nuTilda_/sqr(kappa_*d_)
+ fv2(chi, fv1)*nuTilda_/sqr(kappa_*y_)
);
tmp<fvScalarMatrix> nuTildaEqn
@ -451,7 +446,7 @@ void SpalartAllmaras::correct()
- Cb2_/sigmaNut_*magSqr(fvc::grad(nuTilda_))
==
Cb1_*Stilda*nuTilda_
- fvm::Sp(Cw1_*fw(Stilda)*nuTilda_/sqr(d_), nuTilda_)
- fvm::Sp(Cw1_*fw(Stilda)*nuTilda_/sqr(y_), nuTilda_)
);
nuTildaEqn().relax();

View File

@ -119,7 +119,10 @@ protected:
volScalarField nuTilda_;
volScalarField nut_;
wallDist d_;
//- Wall distance
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
// Protected Member Functions

View File

@ -242,7 +242,7 @@ kOmegaSST::kOmegaSST
)
),
y_(mesh_),
y_(wallDist::New(mesh_).y()),
k_
(
@ -404,11 +404,6 @@ void kOmegaSST::correct()
return;
}
if (mesh_.changing())
{
y_.correct();
}
const volScalarField S2(2*magSqr(symm(fvc::grad(U_))));
volScalarField G(GName(), nut_*S2);

View File

@ -143,12 +143,13 @@ protected:
Switch F3_;
//- Wall distance field
// Note: different to wall distance in parent RASModel
wallDist y_;
// Fields
//- Wall distance
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
volScalarField k_;
volScalarField omega_;
volScalarField nut_;

View File

@ -504,7 +504,7 @@ kkLOmega::kkLOmega
),
autoCreateNut("nut", mesh_)
),
y_(mesh_)
y_(wallDist::New(mesh_).y())
{
bound(kt_, kMin_);
bound(kl_, kMin_);
@ -637,12 +637,6 @@ void kkLOmega::correct()
return;
}
if (mesh_.changing())
{
y_.correct();
y_.boundaryField() = max(y_.boundaryField(), VSMALL);
}
const volScalarField kT(kt_ + kl_);
@ -773,7 +767,9 @@ void kkLOmega::correct()
, omega_
)
- fvm::Sp(Cw2_*omega_, omega_)
+ Cw3_*fOmega(lambdaEff, lambdaT)*alphaTEff*sqr(fw)*sqrt(kt_)/pow3(y_)
+ (
Cw3_*fOmega(lambdaEff, lambdaT)*alphaTEff*sqr(fw)*sqrt(kt_)
)().dimensionedInternalField()/pow3(y_.dimensionedInternalField())
);

View File

@ -181,7 +181,11 @@ protected:
volScalarField omega_;
volScalarField kl_;
volScalarField nut_;
wallDist y_;
//- Wall distance
// Note: different to wall distance in parent RASModel
// which is for near-wall cells only
const volScalarField& y_;
public:

View File

@ -63,5 +63,10 @@ fluxRequired
p ;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -58,5 +58,10 @@ fluxRequired
p_rgh;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -58,5 +58,10 @@ fluxRequired
p_rgh;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -60,5 +60,10 @@ fluxRequired
p ;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -57,5 +57,10 @@ snGradSchemes
default corrected;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -57,4 +57,10 @@ fluxRequired
p;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -56,4 +56,10 @@ fluxRequired
p;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -62,5 +62,10 @@ fluxRequired
p ;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -64,4 +64,10 @@ fluxRequired
p;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -58,5 +58,10 @@ fluxRequired
p ;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -54,5 +54,10 @@ fluxRequired
p ;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -55,4 +55,10 @@ fluxRequired
p;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -61,5 +61,10 @@ fluxRequired
p;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -60,5 +60,10 @@ fluxRequired
p;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -61,5 +61,10 @@ fluxRequired
p;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -59,5 +59,10 @@ fluxRequired
alpha.water;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -57,5 +57,10 @@ fluxRequired
rho ;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -59,5 +59,10 @@ fluxRequired
alpha.water;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.00015;
boundaryField
{
atmosphere
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
walls
{
type kqRWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,39 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 5e-07;
boundaryField
{
atmosphere
{
type zeroGradient;
}
walls
{
type nutkRoughWallFunction;
Ks uniform 100e-6;
Cs uniform 0.5;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,40 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 -1 0 0 0 0];
internalField uniform 2;
boundaryField
{
atmosphere
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
walls
{
type omegaWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel laminar;
RASModel kOmegaSST;
turbulence on;

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar;
simulationType laminar; //RASModel;
// ************************************************************************* //

View File

@ -30,6 +30,8 @@ divSchemes
div(rhoPhi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div(phi,k) Gauss upwind;
div(phi,omega) Gauss upwind;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
@ -55,5 +57,10 @@ fluxRequired
pcorr;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -60,7 +60,7 @@ solvers
nSweeps 1;
}
"(k|B|nuTilda)"
"(k|omega|B|nuTilda).*"
{
solver smoothSolver;
smoother symGaussSeidel;

View File

@ -60,5 +60,10 @@ fluxRequired
alpha.water;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //