49 static const scalar Cmu(0.09);
50 static const scalar
kappa(0.41);
53 int main(
int argc,
char *argv[])
57 "apply a simplified boundary-layer model to the velocity and\n"
58 "turbulence fields based on the 1/7th power-law."
65 "specify the boundary-layer thickness"
71 "boundary-layer thickness as Cbl * mean distance to wall"
84 <<
"Neither option 'ybl' or 'Cbl' have been provided to calculate "
85 <<
"the boundary-layer thickness.\n"
86 <<
"Please choose either 'ybl' OR 'Cbl'."
92 <<
"Both 'ybl' and 'Cbl' have been provided to calculate "
93 <<
"the boundary-layer thickness.\n"
94 <<
"Please choose either 'ybl' OR 'Cbl'."
100 #include "createFields.H"
108 Info<<
"Setting boundary layer velocity" <<
nl <<
endl;
109 scalar yblv = ybl.value();
112 if (
y[celli] <= yblv)
115 U[celli] *=
::pow(
y[celli]/yblv, (1.0/7.0));
118 mask.correctBoundaryConditions();
124 #include "createPhi.H"
134 if (isA<incompressible::RASModel>(
turbulence()))
160 k.correctBoundaryConditions();
189 if (omegaHeader.headerOk())
213 if (nuTildaHeader.headerOk())
226 Info<<
nl <<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s"
227 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
#define forAll(list, i)
Loop across all elements in list.
Generic GeometricField class.
virtual Ostream & write(const char)=0
Write character.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool optionFound(const word &opt) const
Return true if the named option is found.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static autoPtr< incompressibleMomentumTransportModel > New(const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
Return a reference to the selected turbulence model.
Convenience class to handle the input of constant rotational speed. Reads an omega entry with default...
A class for managing temporary objects.
Templated form of IOobject providing type information for file reading and header type checking.
static autoPtr< viscosityModel > New(const fvMesh &mesh, const word &group=word::null)
Return a reference to the selected viscosity model.
Abstract base class for all fluid physical properties.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
Calculate the face-flux of the given field.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionedScalar pow025(const dimensionedScalar &ds)
Foam::argList args(argc, argv)
Info<< "Reading field U\n"<< endl;volVectorField U(IOobject("U", runTime.name(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Creating face flux\n"<< endl;surfaceScalarField phi(IOobject("phi", runTime.name(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedScalar(mesh.Sf().dimensions() *U.dimensions(), 0));autoPtr< viscosityModel > viscosity(viscosityModel::New(mesh))
autoPtr< incompressible::momentumTransportModel > turbulence(incompressible::momentumTransportModel::New(U, phi, viscosity))