Commit 7fd16986 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Added turbulent viscosity BCs for Low-Re RAS turbulence models

- sets turbulence viscosity to zero for the patch
- providees access to the yPlus() function so that the yPlusRAS utility gives
  sensible values
parent d2b8b58b
......@@ -23,6 +23,7 @@ $(mutWallFunctions)/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C
$(mutWallFunctions)/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C
epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions
$(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "mutLowReWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace compressible
{
namespace RASModels
{
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField> mutLowReWallFunctionFvPatchScalarField::calcMut() const
{
return tmp<scalarField>(new scalarField(patch().size(), 0.0));
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
mutkWallFunctionFvPatchScalarField(p, iF)
{}
mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField
(
const mutLowReWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
{}
mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mutkWallFunctionFvPatchScalarField(p, iF, dict)
{}
mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField
(
const mutLowReWallFunctionFvPatchScalarField& mlrwfpsf
)
:
mutkWallFunctionFvPatchScalarField(mlrwfpsf)
{}
mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField
(
const mutLowReWallFunctionFvPatchScalarField& mlrwfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
mutkWallFunctionFvPatchScalarField(mlrwfpsf, iF)
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField
(
fvPatchScalarField,
mutLowReWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace RASModels
} // End namespace compressible
} // End namespace Foam
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::compressible::RASModels::mutLowReWallFunctionFvPatchScalarField
Description
Boundary condition for turbulent (kinematic) viscosity when for use with
low Reynolds number models.
Sets mut to zero, and provides an access to calculate y+.
SourceFiles
mutLowReWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef compressibleMutLowReWallFunctionFvPatchScalarField_H
#define compressibleMutLowReWallFunctionFvPatchScalarField_H
#include "mutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace compressible
{
namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class mutLowReWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class mutLowReWallFunctionFvPatchScalarField
:
public mutkWallFunctionFvPatchScalarField
{
protected:
// Private member functions
//- Calculate the turbulence viscosity
virtual tmp<scalarField> calcMut() const;
public:
//- Runtime type information
TypeName("mutLowReWallFunction");
// Constructors
//- Construct from patch and internal field
mutLowReWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
mutLowReWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
//- Construct by mapping given
// mutLowReWallFunctionFvPatchScalarField
// onto a new patch
mutLowReWallFunctionFvPatchScalarField
(
const mutLowReWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
mutLowReWallFunctionFvPatchScalarField
(
const mutLowReWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new mutLowReWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
mutLowReWallFunctionFvPatchScalarField
(
const mutLowReWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchScalarField>
(
new mutLowReWallFunctionFvPatchScalarField(*this, iF)
);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace RASModels
} // End namespace compressible
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -27,6 +27,7 @@ $(nutWallFunctions)/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarFiel
$(nutWallFunctions)/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C
$(nutWallFunctions)/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C
epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions
$(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "nutLowReWallFunctionFvPatchScalarField.H"
#include "RASModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace incompressible
{
namespace RASModels
{
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
tmp<scalarField> nutLowReWallFunctionFvPatchScalarField::calcNut() const
{
return tmp<scalarField>(new scalarField(patch().size(), 0.0));
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
nutkWallFunctionFvPatchScalarField(p, iF)
{}
nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField
(
const nutLowReWallFunctionFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
{}
nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
nutkWallFunctionFvPatchScalarField(p, iF, dict)
{}
nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField
(
const nutLowReWallFunctionFvPatchScalarField& nlrwfpsf
)
:
nutkWallFunctionFvPatchScalarField(nlrwfpsf)
{}
nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField
(
const nutLowReWallFunctionFvPatchScalarField& nlrwfpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
nutkWallFunctionFvPatchScalarField(nlrwfpsf, iF)
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, nutLowReWallFunctionFvPatchScalarField);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace RASModels
} // End namespace incompressible
} // End namespace Foam
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::incompressible::RASModels::nutLowReWallFunctionFvPatchScalarField
Description
Boundary condition for turbulent (kinematic) viscosity when for use with
low Reynolds number models.
Sets nut to zero, and provides an access function to calculate y+.
SourceFiles
nutLowReWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef nutLowReWallFunctionFvPatchScalarField_H
#define nutLowReWallFunctionFvPatchScalarField_H
#include "nutkWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace incompressible
{
namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class nutLowReWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class nutLowReWallFunctionFvPatchScalarField
:
public nutkWallFunctionFvPatchScalarField
{
protected:
// Protected member functions
//- Calculate the turbulence viscosity
virtual tmp<scalarField> calcNut() const;
public:
//- Runtime type information
TypeName("nutLowReWallFunction");
// Constructors
//- Construct from patch and internal field
nutLowReWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
nutLowReWallFunctionFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
//- Construct by mapping given
// nutLowReWallFunctionFvPatchScalarField
// onto a new patch
nutLowReWallFunctionFvPatchScalarField
(
const nutLowReWallFunctionFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
nutLowReWallFunctionFvPatchScalarField
(
const nutLowReWallFunctionFvPatchScalarField&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new nutLowReWallFunctionFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
nutLowReWallFunctionFvPatchScalarField
(
const nutLowReWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchScalarField>
(
new nutLowReWallFunctionFvPatchScalarField(*this, iF)
);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace RASModels
} // End namespace incompressible
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //