mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
22
README
22
README
@ -1,8 +1,8 @@
|
||||
# -*- mode: org; -*-
|
||||
#
|
||||
#+TITLE: *OpenFOAM README for version 1.5*
|
||||
#+TITLE: OpenFOAM README for version 1.6
|
||||
#+AUTHOR: OpenCFD Ltd.
|
||||
#+DATE: 26 August 2008
|
||||
#+DATE: July 2009
|
||||
#+LINK: http://www.opencfd.co.uk
|
||||
#+OPTIONS: author:nil ^:{}
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
in the OpenFOAM release. e.g. in
|
||||
|
||||
+ $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/
|
||||
+ where <VERSION> corresponds to the version 1.4, 1.5, ...
|
||||
+ where <VERSION> corresponds to the version 1.5, 1.6, ...
|
||||
|
||||
1) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the
|
||||
etc/bashrc file by adding the following line to the end of your
|
||||
@ -135,7 +135,7 @@
|
||||
|
||||
* Getting Started
|
||||
Create a project directory within the $HOME/OpenFOAM directory named
|
||||
<USER>-<VERSION> (e.g. 'chris-1.5' for user chris and OpenFOAM version 1.5)
|
||||
<USER>-<VERSION> (e.g. 'chris-1.6' for user chris and OpenFOAM version 1.6)
|
||||
and create a directory named 'run' within it, e.g. by typing:
|
||||
|
||||
+ mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
|
||||
@ -156,12 +156,13 @@
|
||||
|
||||
* Compiling Paraview 3.3 and the PV3FoamReader module
|
||||
A version of Qt 4.3.x must be installed to compile ParaView. The compilation
|
||||
is a fairly simple process using the supplied buildParaView3.3-cvs script that
|
||||
has worked is our tests with other packages supplied in the ThirdParty
|
||||
directory, namely cmake-2.4.6 and gcc-4.3.1. Execute the following:
|
||||
+ cd $FOAM_INST_DIR/ThirdParty
|
||||
+ rm -rf ParaView3.3-cvs/platforms
|
||||
+ buildParaView3.3-cvs
|
||||
is a fairly simple process using the supplied buildParaView script that
|
||||
has worked in our tests with other packages supplied in the ThirdParty
|
||||
directory, namely cmake-2.6.4 and gcc-4.3.3. Execute the following:
|
||||
+ cd $WM_THIRD_PARTY_DIR
|
||||
+ rm -rf paraview-3.6/platforms
|
||||
+ buildParaView
|
||||
|
||||
|
||||
The PV3FoamReader module is an OpenFOAM utility that can be compiled in the
|
||||
usual manner as follows:
|
||||
@ -184,3 +185,4 @@
|
||||
is the default mode on a 64-bit machine. To use an installed 32-bit version,
|
||||
the user must set the environment variable WM_ARCH_OPTION to 32 before
|
||||
sourcing the etc/bashrc (or etc/cshrc) file.
|
||||
|
||||
|
||||
@ -145,6 +145,8 @@
|
||||
+ The *new* =readList(Istream&)= can read a bracket-delimited list or handle
|
||||
a single value as a list of size 1. This can be a useful convenience when
|
||||
processing command-line options.
|
||||
+ Export *new* environment variable =FOAM_CASENAME= that contains the
|
||||
name part of the =FOAM_CASE= environment variable
|
||||
|
||||
*** Misc. improvements
|
||||
+ Improved consistency and interoperability between =face= and =triFace= classes.
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wclean libso BCs
|
||||
wclean
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wclean libso phaseModel
|
||||
wclean libso interfacialModels
|
||||
wclean libso kineticTheoryModels
|
||||
wclean
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -29,6 +29,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "IOstreams.H"
|
||||
#include "IOobject.H"
|
||||
#include "IFstream.H"
|
||||
@ -41,6 +42,15 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList args(argc, argv);
|
||||
|
||||
Info<< nl
|
||||
<< "FOAM_CASE=" << getEnv("FOAM_CASE") << nl
|
||||
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
|
||||
<< endl;
|
||||
|
||||
|
||||
{
|
||||
dictionary dict1(IFstream("testDict")());
|
||||
Info<< "dict1: " << dict1 << nl
|
||||
|
||||
@ -14,6 +14,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
#inputMode merge
|
||||
#includeIfPresent "someUnknownFile"
|
||||
#includeIfPresent "$FOAM_CASE/someUnknownFile"
|
||||
#includeIfPresent "$FOAM_CASE/someUnknownFile-$FOAM_CASENAME"
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
@ -78,7 +81,6 @@ boundaryField
|
||||
// NB: the inputMode has a global scope
|
||||
#inputMode merge
|
||||
#include "testDict2"
|
||||
#includeIfPresent "SomeUnknownFile"
|
||||
|
||||
foo
|
||||
{
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wclean libso extrudeModel
|
||||
wclean
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -4,3 +4,5 @@ set -x
|
||||
|
||||
rm -rf PV3FoamReader/Make
|
||||
wclean libso vtkPV3Foam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -261,11 +261,15 @@ Foam::vtkPV3Foam::vtkPV3Foam
|
||||
// Set the case as an environment variable - some BCs might use this
|
||||
if (fullCasePath.name().find("processor", 0) == 0)
|
||||
{
|
||||
setEnv("FOAM_CASE", fullCasePath.path(), true);
|
||||
const fileName globalCase = fullCasePath.path();
|
||||
|
||||
setEnv("FOAM_CASE", globalCase, true);
|
||||
setEnv("FOAM_CASENAME", globalCase.name(), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
setEnv("FOAM_CASE", fullCasePath, true);
|
||||
setEnv("FOAM_CASENAME", fullCasePath.name(), true);
|
||||
}
|
||||
|
||||
// look for 'case{region}.OpenFOAM'
|
||||
@ -299,6 +303,7 @@ Foam::vtkPV3Foam::vtkPV3Foam
|
||||
{
|
||||
Info<< "fullCasePath=" << fullCasePath << nl
|
||||
<< "FOAM_CASE=" << getEnv("FOAM_CASE") << nl
|
||||
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
|
||||
<< "region=" << meshRegion_ << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -2,10 +2,17 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume
|
||||
-lincompressibleRASModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lsampling
|
||||
|
||||
@ -26,25 +26,156 @@ Application
|
||||
yPlusRAS
|
||||
|
||||
Description
|
||||
Calculates and reports yPlus for all wall patches, for the specified times.
|
||||
Calculates and reports yPlus for all wall patches, for the specified times
|
||||
when using RAS turbulence models.
|
||||
|
||||
Default behaviour assumes operating in incompressible mode. To apply to
|
||||
compressible RAS cases, use the -compressible option.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
|
||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "wallFvPatch.H"
|
||||
#include "incompressible/RAS/RASModel/RASModel.H"
|
||||
#include "nutWallFunction/nutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
#include "basicPsiThermo.H"
|
||||
#include "compressible/RAS/RASModel/RASModel.H"
|
||||
#include "mutWallFunction/mutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
#include "wallDist.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
void calcIncompressibleYPlus
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const Time& runTime,
|
||||
const volVectorField& U,
|
||||
volScalarField& yPlus
|
||||
)
|
||||
{
|
||||
typedef incompressible::RASModels::nutWallFunctionFvPatchScalarField
|
||||
wallFunctionPatchField;
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::RASModel> RASModel
|
||||
(
|
||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
const volScalarField::GeometricBoundaryField nutPatches =
|
||||
RASModel->nut()().boundaryField();
|
||||
|
||||
forAll(nutPatches, patchi)
|
||||
{
|
||||
if (isA<wallFunctionPatchField>(nutPatches[patchi]))
|
||||
{
|
||||
const wallFunctionPatchField& nutPw =
|
||||
dynamic_cast<const wallFunctionPatchField&>
|
||||
(nutPatches[patchi]);
|
||||
|
||||
yPlus.boundaryField()[patchi] = nutPw.yPlus();
|
||||
const scalarField& Yp = yPlus.boundaryField()[patchi];
|
||||
|
||||
Info<< "Patch " << patchi
|
||||
<< " named " << nutPw.patch().name()
|
||||
<< " y+ : min: " << min(Yp) << " max: " << max(Yp)
|
||||
<< " average: " << average(Yp) << nl << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void calcCompressibleYPlus
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const Time& runTime,
|
||||
const volVectorField& U,
|
||||
volScalarField& yPlus
|
||||
)
|
||||
{
|
||||
typedef compressible::RASModels::mutWallFunctionFvPatchScalarField
|
||||
wallFunctionPatchField;
|
||||
|
||||
IOobject rhoHeader
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
if (!rhoHeader.headerOk())
|
||||
{
|
||||
Info<< " no rho field" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
Info << "Reading field rho\n" << endl;
|
||||
volScalarField rho(rhoHeader, mesh);
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
autoPtr<basicPsiThermo> pThermo
|
||||
(
|
||||
basicPsiThermo::New(mesh)
|
||||
);
|
||||
basicPsiThermo& thermo = pThermo();
|
||||
|
||||
autoPtr<compressible::RASModel> RASModel
|
||||
(
|
||||
compressible::RASModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
const volScalarField::GeometricBoundaryField mutPatches =
|
||||
RASModel->mut()().boundaryField();
|
||||
|
||||
forAll(mutPatches, patchi)
|
||||
{
|
||||
if (isA<wallFunctionPatchField>(mutPatches[patchi]))
|
||||
{
|
||||
const wallFunctionPatchField& mutPw =
|
||||
dynamic_cast<const wallFunctionPatchField&>
|
||||
(mutPatches[patchi]);
|
||||
|
||||
yPlus.boundaryField()[patchi] = mutPw.yPlus();
|
||||
const scalarField& Yp = yPlus.boundaryField()[patchi];
|
||||
|
||||
Info<< "Patch " << patchi
|
||||
<< " named " << mutPw.patch().name()
|
||||
<< " y+ : min: " << min(Yp) << " max: " << max(Yp)
|
||||
<< " average: " << average(Yp) << nl << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
timeSelector::addOptions();
|
||||
|
||||
#include "addRegionOption.H"
|
||||
|
||||
argList::validOptions.insert("compressible","");
|
||||
|
||||
#include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
#include "createTime.H"
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
# include "createMesh.H"
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
bool compressible = args.optionFound("compressible");
|
||||
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
@ -76,49 +207,35 @@ int main(int argc, char *argv[])
|
||||
dimensionedScalar("yPlus", dimless, 0.0)
|
||||
);
|
||||
|
||||
Info << "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
IOobject UHeader
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
# include "createPhi.H"
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::RASModel> RASModel
|
||||
(
|
||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
const fvPatchList& patches = mesh.boundary();
|
||||
|
||||
forAll(patches, patchi)
|
||||
if (UHeader.headerOk())
|
||||
{
|
||||
const fvPatch& currPatch = patches[patchi];
|
||||
Info << "Reading field U\n" << endl;
|
||||
volVectorField U(UHeader, mesh);
|
||||
|
||||
if (typeid(currPatch) == typeid(wallFvPatch))
|
||||
if (compressible)
|
||||
{
|
||||
yPlus.boundaryField()[patchi] = RASModel->yPlus(patchi);
|
||||
const scalarField& Yp = yPlus.boundaryField()[patchi];
|
||||
|
||||
Info<< "Patch " << patchi
|
||||
<< " named " << currPatch.name()
|
||||
<< " y+ : min: " << min(Yp) << " max: " << max(Yp)
|
||||
<< " average: " << average(Yp) << nl << endl;
|
||||
calcCompressibleYPlus(mesh, runTime, U, yPlus);
|
||||
}
|
||||
else
|
||||
{
|
||||
calcIncompressibleYPlus(mesh, runTime, U, yPlus);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " no U field" << endl;
|
||||
}
|
||||
|
||||
Info<< "Writing yPlus to field "
|
||||
<< yPlus.name() << nl << endl;
|
||||
Info<< "Writing yPlus to field " << yPlus.name() << nl << endl;
|
||||
|
||||
yPlus.write();
|
||||
}
|
||||
@ -128,4 +245,5 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -33,9 +33,9 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Base settings
|
||||
FOAM_VERSION=1.5
|
||||
SUPPLIED_VERSION_GCC=4.3.1
|
||||
MIN_VERSION_GCC=4.2.0
|
||||
FOAM_VERSION=1.6
|
||||
SUPPLIED_VERSION_GCC=4.3.3
|
||||
MIN_VERSION_GCC=4.3.1
|
||||
|
||||
# General
|
||||
WIDTH=20
|
||||
@ -46,10 +46,8 @@ CRITICALERROR=0
|
||||
SSHRSHOK=0
|
||||
|
||||
# System variables
|
||||
USER_SHELL=`basename $SHELL`
|
||||
HOST_NAME=`uname -n`
|
||||
OS=`uname -s`
|
||||
OS_VERSION=`uname -r`
|
||||
USER_NAME=$LOGNAME
|
||||
if [ ! -n $USER_NAME ]; then
|
||||
USER_NAME=$USER
|
||||
@ -92,7 +90,7 @@ length () {
|
||||
|
||||
|
||||
stringLength () {
|
||||
echo $1 | wc -m | tr -d " "
|
||||
echo $1 | wc -m | tr -d " "
|
||||
}
|
||||
|
||||
|
||||
@ -125,7 +123,7 @@ reportEnv () {
|
||||
SunOS)
|
||||
if /usr/bin/test -e $EXP_ENV ; then
|
||||
EXISTS=" yes "
|
||||
if [ "$2" != "noPath" ]; then
|
||||
if [ "$2" != noPath ]; then
|
||||
ON_PATH=" no "
|
||||
OLD_IFS=$IFS
|
||||
IFS=':'
|
||||
@ -152,7 +150,7 @@ reportEnv () {
|
||||
*)
|
||||
if [ -e "$EXP_ENV" ] ; then
|
||||
EXISTS=" yes "
|
||||
if [ "$2" != "noPath" ]; then
|
||||
if [ "$2" != noPath ]; then
|
||||
ON_PATH=" no "
|
||||
OLD_IFS=$IFS
|
||||
IFS=':'
|
||||
@ -182,10 +180,10 @@ reportEnv () {
|
||||
fi
|
||||
|
||||
ERROR="false"
|
||||
if [ "$EXISTS" = "no" ] || [ "$ON_PATH" = "no" ]; then
|
||||
if [ "$EXISTS" = no ] || [ "$ON_PATH" = no ]; then
|
||||
ERROR="true"
|
||||
fi
|
||||
if [ "$3" = "yes" ] && [ "$ERROR" = "true" ]; then
|
||||
if [ "$3" = yes ] && [ "$ERROR" = true ]; then
|
||||
CRITICALERROR=`expr $CRITICALERROR + 1`
|
||||
echo "WARNING: CRITICAL ERROR"
|
||||
echo
|
||||
@ -312,9 +310,9 @@ pingTest () {
|
||||
case $OS in
|
||||
SunOS)
|
||||
PINGTEST=`/usr/sbin/ping $1 2>&1`
|
||||
if [ "`echo $PINGTEST | grep "alive"`" != "" ] ; then
|
||||
if [ "`echo $PINGTEST | grep alive`" != "" ] ; then
|
||||
RESULT="Successful"
|
||||
elif [ "`echo $PINGTEST | grep "unknown host"`" != "" ] ; then
|
||||
elif [ "`echo $PINGTEST | grep 'unknown host'`" != "" ] ; then
|
||||
RESULT="No_entry_for_\"$1\"_in_/etc/hosts"
|
||||
else
|
||||
RESULT="Networking_cannot_reach_$1"
|
||||
@ -322,9 +320,9 @@ pingTest () {
|
||||
;;
|
||||
*)
|
||||
PINGTEST=`/bin/ping -w 3 -c 1 $1 2>&1`
|
||||
if [ "`echo $PINGTEST | grep "1 received"`" != "" ] ; then
|
||||
if [ "`echo $PINGTEST | grep '1 received'`" != "" ] ; then
|
||||
RESULT="Successful"
|
||||
elif [ "`echo $PINGTEST | grep "unknown host"`" != "" ] ; then
|
||||
elif [ "`echo $PINGTEST | grep 'unknown host'`" != "" ] ; then
|
||||
RESULT="No_entry_for_\"$1\"_in_/etc/hosts"
|
||||
else
|
||||
RESULT="Networking_cannot_reach_$1"
|
||||
@ -334,7 +332,7 @@ pingTest () {
|
||||
|
||||
echo "`fixlen "Pinging_$1" 25` `fixlen "$RESULT" 45` `fixlen "$2" 5`"
|
||||
|
||||
if [ "$2" = "yes" ] && [ "$RESULT" != "Successful" ]; then
|
||||
if [ "$2" = yes ] && [ "$RESULT" != Successful ]; then
|
||||
CRITICALERROR=`expr $CRITICALERROR + 1`
|
||||
echo "WARNING: CRITICAL ERROR"
|
||||
echo
|
||||
@ -351,7 +349,7 @@ EOF
|
||||
|
||||
|
||||
checkTelnetPort () {
|
||||
if [ -x "/usr/bin/telnet" ] || [ -x "/bin/telnet" ] ; then
|
||||
if [ -x "/usr/bin/telnet" ] || [ -x "/bin/telnet" ] ; then
|
||||
RESULT=`telnetPortTest $1 $2 2>&1 | egrep "onnect.* [t|r]"`
|
||||
if [ "`echo $RESULT | grep 'Connected to'`" ] ; then
|
||||
RESULT='Successful'
|
||||
@ -361,7 +359,7 @@ checkTelnetPort () {
|
||||
RESULT="Not_active*"
|
||||
fi
|
||||
else
|
||||
RESULT='No_telnet_running:_cannot_check*'
|
||||
RESULT='No_telnet_installed:_cannot_check*'
|
||||
fi
|
||||
}
|
||||
|
||||
@ -369,7 +367,7 @@ checkTelnetPort () {
|
||||
checkRsh () {
|
||||
checkTelnetPort $HOST_NAME 222
|
||||
echo "`fixlen "Test_rsh:" 25` `fixlen "$RESULT" 45` "yes""
|
||||
if [ "$RESULT" != 'Successful' ]; then
|
||||
if [ "$RESULT" != Successful ]; then
|
||||
SSHRSHOK=`expr $SSHRSHOK + 1`
|
||||
fi
|
||||
}
|
||||
@ -378,14 +376,14 @@ checkRsh () {
|
||||
checkSsh () {
|
||||
checkTelnetPort $HOST_NAME 22
|
||||
echo "`fixlen "Test_ssh:" 25` `fixlen "$RESULT" 45` "yes""
|
||||
if [ "$RESULT" != 'Successful' ]; then
|
||||
if [ "$RESULT" != Successful ]; then
|
||||
SSHRSHOK=`expr $SSHRSHOK + 1`
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
checkOpenFOAMEnvironment() {
|
||||
if [ ! -d "$WM_PROJECT_INST_DIR" -o ! -d "$WM_THIRD_PARTY_DIR" ]; then
|
||||
[ -d "$WM_PROJECT_INST_DIR" ] && [ -d "$WM_THIRD_PARTY_DIR" ] || {
|
||||
echo ""
|
||||
echo "FATAL ERROR: OpenFOAM environment not configured."
|
||||
echo ""
|
||||
@ -394,22 +392,23 @@ checkOpenFOAMEnvironment() {
|
||||
echo " to source the OpenFOAM environment."
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
checkUserShell() {
|
||||
case $USER_SHELL in
|
||||
csh | tcsh)
|
||||
USER_CONFIG_TYPE="cshrc"
|
||||
echo "`fixlen "Shell:" $WIDTH` ${USER_SHELL}"
|
||||
case $SHELL in
|
||||
*/csh | */tcsh)
|
||||
# USER_CONFIG_TYPE="cshrc"
|
||||
echo "`fixlen "Shell:" $WIDTH` ${SHELL##*/}"
|
||||
;;
|
||||
bash | ksh)
|
||||
USER_CONFIG_TYPE="bashrc"
|
||||
echo "`fixlen "Shell:" $WIDTH` ${USER_SHELL}"
|
||||
*/bash | */ksh)
|
||||
# USER_CONFIG_TYPE="bashrc"
|
||||
echo "`fixlen "Shell:" $WIDTH` ${SHELL##*/}"
|
||||
;;
|
||||
*) USER_CONFIG_TYPE=""
|
||||
echo "`fixlen "Shell:" $WIDTH` ${USER_SHELL}"
|
||||
*)
|
||||
# USER_CONFIG_TYPE=""
|
||||
echo "`fixlen "Shell:" $WIDTH` ${SHELL##*/}"
|
||||
echo "FATAL ERROR: Cannot identify the shell you are running."
|
||||
echo " OpenFOAM ${FOAM_VERSION} is compatible with "
|
||||
echo " csh, tcsh, ksh and bash."
|
||||
@ -435,15 +434,18 @@ checkHostName() {
|
||||
|
||||
|
||||
checkOS () {
|
||||
if [ "$OS" = "Linux" ] || [ "$OS" = "LinuxAMD64" ] || [ "$OS" = "SunOS" ]; then
|
||||
echo "`fixlen "OS:" $WIDTH` ${OS} version ${OS_VERSION}"
|
||||
else
|
||||
case "$OS" in
|
||||
Linux | LinuxAMD64 | SunOS )
|
||||
echo "`fixlen "OS:" $WIDTH` ${OS} version $(uname -r)"
|
||||
;;
|
||||
*)
|
||||
echo "FATAL ERROR: Incompatible operating system \"$OS\"."
|
||||
echo " OpenFOAM ${FOAM_VERSION} is currently "
|
||||
echo " available for Linux and SunOS only."
|
||||
echo
|
||||
FATALERROR=`expr $FATALERROR + 1`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
@ -485,6 +487,7 @@ hline
|
||||
reportEnv '$WM_PROJECT_DIR' '$PATH' "yes"
|
||||
echo ""
|
||||
reportEnv '$FOAM_APPBIN' '$PATH' "yes"
|
||||
reportEnv '$FOAM_SITE_APPBIN' '$PATH' "no"
|
||||
reportEnv '$FOAM_USER_APPBIN' '$PATH' "no"
|
||||
reportEnv '$WM_DIR' '$PATH' "yes"
|
||||
hline
|
||||
@ -495,6 +498,7 @@ hline
|
||||
echo "$COL1 $COL2 $COL3 $COL4 $COL5"
|
||||
hline
|
||||
reportEnv '$FOAM_LIBBIN' '$LD_LIBRARY_PATH' "yes"
|
||||
reportEnv '$FOAM_SITE_LIBBIN' '$LD_LIBRARY_PATH' "no"
|
||||
reportEnv '$FOAM_USER_LIBBIN' '$LD_LIBRARY_PATH' "no"
|
||||
reportEnv '$MPI_ARCH_PATH' '$LD_LIBRARY_PATH' "yes"
|
||||
hline
|
||||
@ -509,7 +513,7 @@ echo "$COL1 $COL2 $COL3"
|
||||
hline
|
||||
reportExecutable gcc "${WM_COMPILER_DIR}/bin/gcc"
|
||||
reportExecutable gzip
|
||||
if [ "$OS" = "Linux" ] ; then
|
||||
if [ "$OS" = Linux ] ; then
|
||||
reportExecutable tar
|
||||
else
|
||||
reportExecutable gtar
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
# STATIC VARIABLES
|
||||
# ~~~~~~~~~~~~~~~~
|
||||
FOAM_VERSION=1.5
|
||||
FOAM_VERSION=1.6
|
||||
|
||||
HLINE="-----------------------------------------------------------------------"
|
||||
WIDTH=16
|
||||
|
||||
@ -45,15 +45,19 @@ setenv WM_LINK_LANGUAGE c++
|
||||
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||
|
||||
# base configuration
|
||||
setenv FOAM_SRC $WM_PROJECT_DIR/src
|
||||
setenv FOAM_LIB $WM_PROJECT_DIR/lib
|
||||
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||
setenv FOAM_APP $WM_PROJECT_DIR/applications
|
||||
setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
|
||||
setenv FOAM_LIB $WM_PROJECT_DIR/lib
|
||||
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||
setenv FOAM_SRC $WM_PROJECT_DIR/src
|
||||
|
||||
# shared site configuration - similar naming convention as ~OpenFOAM expansion
|
||||
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
||||
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
||||
|
||||
# user configuration
|
||||
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
|
||||
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
|
||||
# convenience
|
||||
setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials
|
||||
@ -65,8 +69,10 @@ setenv FOAM_RUN $WM_PROJECT_USER_DIR/run
|
||||
set path=($WM_DIR $WM_PROJECT_DIR/bin $path)
|
||||
|
||||
_foamAddPath $FOAM_APPBIN
|
||||
_foamAddPath $FOAM_SITE_APPBIN
|
||||
_foamAddPath $FOAM_USER_APPBIN
|
||||
_foamAddLib $FOAM_LIBBIN
|
||||
_foamAddLib $FOAM_SITE_LIBBIN
|
||||
_foamAddLib $FOAM_USER_LIBBIN
|
||||
|
||||
|
||||
|
||||
@ -61,15 +61,19 @@ export WM_LINK_LANGUAGE=c++
|
||||
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||
|
||||
# base configuration
|
||||
export FOAM_SRC=$WM_PROJECT_DIR/src
|
||||
export FOAM_LIB=$WM_PROJECT_DIR/lib
|
||||
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||
export FOAM_APP=$WM_PROJECT_DIR/applications
|
||||
export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
|
||||
export FOAM_LIB=$WM_PROJECT_DIR/lib
|
||||
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||
export FOAM_SRC=$WM_PROJECT_DIR/src
|
||||
|
||||
# shared site configuration - similar naming convention as ~OpenFOAM expansion
|
||||
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
||||
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
||||
|
||||
# user configuration
|
||||
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
|
||||
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
|
||||
# convenience
|
||||
export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
|
||||
@ -80,8 +84,8 @@ export FOAM_RUN=$WM_PROJECT_USER_DIR/run
|
||||
# add OpenFOAM scripts and wmake to the path
|
||||
export PATH=$WM_DIR:$WM_PROJECT_DIR/bin:$PATH
|
||||
|
||||
_foamAddPath $FOAM_APPBIN $FOAM_USER_APPBIN
|
||||
_foamAddLib $FOAM_LIBBIN $FOAM_USER_LIBBIN
|
||||
_foamAddPath $FOAM_APPBIN $FOAM_SITE_APPBIN $FOAM_USER_APPBIN
|
||||
_foamAddLib $FOAM_LIBBIN $FOAM_SITE_LIBBIN $FOAM_USER_LIBBIN
|
||||
|
||||
|
||||
# Compiler settings
|
||||
|
||||
@ -129,14 +129,18 @@ void Foam::argList::getRootCase()
|
||||
casePath = iter();
|
||||
casePath.removeRepeated('/');
|
||||
casePath.removeTrailing('/');
|
||||
|
||||
// handle degenerate form and '-case .' like no -case specified
|
||||
if (casePath.empty() || casePath == ".")
|
||||
{
|
||||
casePath = cwd();
|
||||
options_.erase("case");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// nothing specified, use the current dir
|
||||
casePath = cwd();
|
||||
|
||||
// we could add this back in as '-case'?
|
||||
// options_.set("case", casePath);
|
||||
}
|
||||
|
||||
rootPath_ = casePath.path();
|
||||
@ -522,8 +526,25 @@ Foam::argList::argList
|
||||
}
|
||||
jobInfo.write();
|
||||
|
||||
// Set the case as an environment variable
|
||||
setEnv("FOAM_CASE", rootPath_/globalCase_, true);
|
||||
|
||||
// Set the case and case-name as an environment variable
|
||||
if (rootPath_[0] == '/')
|
||||
{
|
||||
// absolute path
|
||||
setEnv("FOAM_CASE", rootPath_/globalCase_, true);
|
||||
}
|
||||
else if (rootPath_ == ".")
|
||||
{
|
||||
// relative to the current working directory
|
||||
setEnv("FOAM_CASE", cwd()/globalCase_, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// qualify relative path
|
||||
setEnv("FOAM_CASE", cwd()/rootPath_/globalCase_, true);
|
||||
}
|
||||
setEnv("FOAM_CASENAME", globalCase_, true);
|
||||
|
||||
|
||||
// Switch on signal trapping. We have to wait until after Pstream::init
|
||||
// since this sets up its own ones.
|
||||
|
||||
@ -54,6 +54,8 @@ Description
|
||||
|
||||
The environment variable @b FOAM_CASE is set to the path of the
|
||||
global case (same for serial and parallel jobs).
|
||||
The environment variable @b FOAM_CASENAME is set to the name of the
|
||||
global case.
|
||||
|
||||
Note
|
||||
- Adjustment of the valid (mandatory) arguments
|
||||
|
||||
@ -30,8 +30,8 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef createPhi_H
|
||||
#define createPhi_H
|
||||
#ifndef compressibleCreatePhi_H
|
||||
#define compressibleCreatePhi_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -74,13 +74,7 @@ mutRoughWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
rhoName_("rho"),
|
||||
muName_("mu"),
|
||||
kName_("k"),
|
||||
Cmu_(0.09),
|
||||
kappa_(0.41),
|
||||
E_(9.8),
|
||||
mutWallFunctionFvPatchScalarField(p, iF),
|
||||
Ks_(p.size(), 0.0),
|
||||
Cs_(p.size(), 0.0)
|
||||
{}
|
||||
@ -95,13 +89,7 @@ mutRoughWallFunctionFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
rhoName_(ptf.rhoName_),
|
||||
muName_(ptf.muName_),
|
||||
kName_(ptf.kName_),
|
||||
Cmu_(0.09),
|
||||
kappa_(0.41),
|
||||
E_(9.8),
|
||||
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
|
||||
Ks_(ptf.Ks_, mapper),
|
||||
Cs_(ptf.Cs_, mapper)
|
||||
{}
|
||||
@ -115,13 +103,7 @@ mutRoughWallFunctionFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
muName_(dict.lookupOrDefault<word>("mu", "mu")),
|
||||
kName_(dict.lookupOrDefault<word>("k", "k")),
|
||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
||||
mutWallFunctionFvPatchScalarField(p, iF, dict),
|
||||
Ks_("Ks", dict, p.size()),
|
||||
Cs_("Cs", dict, p.size())
|
||||
{}
|
||||
@ -133,13 +115,7 @@ mutRoughWallFunctionFvPatchScalarField
|
||||
const mutRoughWallFunctionFvPatchScalarField& rwfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(rwfpsf),
|
||||
rhoName_(rwfpsf.rhoName_),
|
||||
muName_(rwfpsf.muName_),
|
||||
kName_(rwfpsf.kName_),
|
||||
Cmu_(rwfpsf.Cmu_),
|
||||
kappa_(rwfpsf.kappa_),
|
||||
E_(rwfpsf.E_),
|
||||
mutWallFunctionFvPatchScalarField(rwfpsf),
|
||||
Ks_(rwfpsf.Ks_),
|
||||
Cs_(rwfpsf.Cs_)
|
||||
{}
|
||||
@ -152,13 +128,7 @@ mutRoughWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(rwfpsf, iF),
|
||||
rhoName_(rwfpsf.rhoName_),
|
||||
muName_(rwfpsf.muName_),
|
||||
kName_(rwfpsf.kName_),
|
||||
Cmu_(rwfpsf.Cmu_),
|
||||
kappa_(rwfpsf.kappa_),
|
||||
E_(rwfpsf.E_),
|
||||
mutWallFunctionFvPatchScalarField(rwfpsf, iF),
|
||||
Ks_(rwfpsf.Ks_),
|
||||
Cs_(rwfpsf.Cs_)
|
||||
{}
|
||||
@ -171,7 +141,7 @@ void mutRoughWallFunctionFvPatchScalarField::autoMap
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::autoMap(m);
|
||||
mutWallFunctionFvPatchScalarField::autoMap(m);
|
||||
Ks_.autoMap(m);
|
||||
Cs_.autoMap(m);
|
||||
}
|
||||
@ -183,7 +153,7 @@ void mutRoughWallFunctionFvPatchScalarField::rmap
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::rmap(ptf, addr);
|
||||
mutWallFunctionFvPatchScalarField::rmap(ptf, addr);
|
||||
|
||||
const mutRoughWallFunctionFvPatchScalarField& nrwfpsf =
|
||||
refCast<const mutRoughWallFunctionFvPatchScalarField>(ptf);
|
||||
@ -193,23 +163,22 @@ void mutRoughWallFunctionFvPatchScalarField::rmap
|
||||
}
|
||||
|
||||
|
||||
void mutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
tmp<scalarField> mutRoughWallFunctionFvPatchScalarField::calcMut() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = rasModel.y()[patch().index()];
|
||||
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
||||
const tmp<volScalarField> tk = rasModel.k();
|
||||
const volScalarField& k = tk();
|
||||
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
||||
|
||||
const scalar Cmu25 = pow(Cmu_, 0.25);
|
||||
|
||||
const scalarField& rhow =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
|
||||
const scalarField& k = db().lookupObject<volScalarField>(kName_);
|
||||
|
||||
const scalarField& muw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(muName_);
|
||||
|
||||
scalarField& mutw = *this;
|
||||
tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0));
|
||||
scalarField& mutw = tmutw();
|
||||
|
||||
forAll(mutw, faceI)
|
||||
{
|
||||
@ -243,23 +212,15 @@ void mutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
mutw[faceI] =
|
||||
muw[faceI]*(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
mutw[faceI] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
return tmutw;
|
||||
}
|
||||
|
||||
|
||||
void mutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
|
||||
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
||||
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
Cs_.writeEntry("Cs", os);
|
||||
Ks_.writeEntry("Ks", os);
|
||||
writeEntry("value", os);
|
||||
|
||||
@ -43,7 +43,7 @@ SourceFiles
|
||||
#ifndef mutRoughWallFunctionFvPatchScalarField_H
|
||||
#define mutRoughWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "mutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -60,27 +60,11 @@ namespace RASModels
|
||||
|
||||
class mutRoughWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
public mutWallFunctionFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
protected:
|
||||
|
||||
//- Name of density field
|
||||
word rhoName_;
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word muName_;
|
||||
|
||||
//- Name of turbulence kinetic energy field
|
||||
word kName_;
|
||||
|
||||
//- Cmu coefficient
|
||||
scalar Cmu_;
|
||||
|
||||
//- Von-karman constant
|
||||
scalar kappa_;
|
||||
|
||||
//- E coefficient
|
||||
scalar E_;
|
||||
// Protected data
|
||||
|
||||
//- Roughness height
|
||||
scalarField Ks_;
|
||||
@ -92,7 +76,10 @@ class mutRoughWallFunctionFvPatchScalarField
|
||||
// Private member functions
|
||||
|
||||
//- Compute the roughness function
|
||||
scalar fnRough(const scalar KsPlus, const scalar Cs) const;
|
||||
virtual scalar fnRough(const scalar KsPlus, const scalar Cs) const;
|
||||
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcMut() const;
|
||||
|
||||
|
||||
public:
|
||||
@ -181,16 +168,11 @@ public:
|
||||
const labelList&
|
||||
);
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "RASModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -47,12 +48,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
rhoName_("rho"),
|
||||
muName_("mu"),
|
||||
kappa_(0.41),
|
||||
E_(9.8),
|
||||
mutWallFunctionFvPatchScalarField(p, iF),
|
||||
roughnessHeight_(pTraits<scalar>::zero),
|
||||
roughnessConstant_(pTraits<scalar>::zero),
|
||||
roughnessFudgeFactor_(pTraits<scalar>::zero)
|
||||
@ -68,12 +64,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
rhoName_(ptf.rhoName_),
|
||||
muName_(ptf.muName_),
|
||||
kappa_(ptf.kappa_),
|
||||
E_(ptf.E_),
|
||||
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
|
||||
roughnessHeight_(ptf.roughnessHeight_),
|
||||
roughnessConstant_(ptf.roughnessConstant_),
|
||||
roughnessFudgeFactor_(ptf.roughnessFudgeFactor_)
|
||||
@ -88,12 +79,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
muName_(dict.lookupOrDefault<word>("mu", "mu")),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
||||
mutWallFunctionFvPatchScalarField(p, iF, dict),
|
||||
roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))),
|
||||
roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))),
|
||||
roughnessFudgeFactor_(readScalar(dict.lookup("roughnessFudgeFactor")))
|
||||
@ -106,12 +92,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(rwfpsf),
|
||||
UName_(rwfpsf.UName_),
|
||||
rhoName_(rwfpsf.rhoName_),
|
||||
muName_(rwfpsf.muName_),
|
||||
kappa_(rwfpsf.kappa_),
|
||||
E_(rwfpsf.E_),
|
||||
mutWallFunctionFvPatchScalarField(rwfpsf),
|
||||
roughnessHeight_(rwfpsf.roughnessHeight_),
|
||||
roughnessConstant_(rwfpsf.roughnessConstant_),
|
||||
roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_)
|
||||
@ -125,12 +106,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(rwfpsf, iF),
|
||||
UName_(rwfpsf.UName_),
|
||||
rhoName_(rwfpsf.rhoName_),
|
||||
muName_(rwfpsf.muName_),
|
||||
kappa_(rwfpsf.kappa_),
|
||||
E_(rwfpsf.E_),
|
||||
mutWallFunctionFvPatchScalarField(rwfpsf, iF),
|
||||
roughnessHeight_(rwfpsf.roughnessHeight_),
|
||||
roughnessConstant_(rwfpsf.roughnessConstant_),
|
||||
roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_)
|
||||
@ -139,28 +115,24 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
tmp<scalarField>
|
||||
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcMut() const
|
||||
{
|
||||
const scalar yPlusLam = 11.225;
|
||||
const label patchI = patch().index();
|
||||
|
||||
// The reciprical of the distance to the adjacent cell centre.
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
|
||||
const fvPatchVectorField& U =
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
||||
|
||||
const fvPatchScalarField& rho =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
scalarField magUp = mag(Uw.patchInternalField() - Uw);
|
||||
|
||||
// The flow velocity at the adjacent cell centre.
|
||||
scalarField magUp = mag(U.patchInternalField() - U);
|
||||
const fvPatchScalarField& rho = rasModel.rho().boundaryField()[patchI];
|
||||
|
||||
const scalarField& muw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(muName_);
|
||||
scalarField& mutw = *this;
|
||||
tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0));
|
||||
scalarField& mutw = tmutw();
|
||||
|
||||
if (roughnessHeight_ > 0.0)
|
||||
{
|
||||
@ -177,7 +149,7 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
forAll(mutw, facei)
|
||||
{
|
||||
const scalar magUpara = magUp[facei];
|
||||
const scalar Re = rho[facei]*magUpara/(muw[facei]*ry[facei]);
|
||||
const scalar Re = rho[facei]*magUpara*y[facei]/muw[facei];
|
||||
const scalar kappaRe = kappa_*Re;
|
||||
|
||||
scalar yPlus = yPlusLam;
|
||||
@ -185,7 +157,7 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
|
||||
int iter = 0;
|
||||
scalar yPlusLast = 0.0;
|
||||
scalar dKsPlusdYPlus = roughnessHeight_*ry[facei];
|
||||
scalar dKsPlusdYPlus = roughnessHeight_/y[facei];
|
||||
|
||||
// Enforce the roughnessHeight to be less than the distance to
|
||||
// the first cell centre.
|
||||
@ -194,18 +166,17 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
dKsPlusdYPlus = 1;
|
||||
}
|
||||
|
||||
// Fudge factor to get results to be similar to fluent
|
||||
// (at least difference between rough and smooth).
|
||||
// Additional tuning parameter (fudge factor) - nominally = 1
|
||||
dKsPlusdYPlus *= roughnessFudgeFactor_;
|
||||
|
||||
do
|
||||
{
|
||||
yPlusLast = yPlus;
|
||||
|
||||
// The non-dimensional roughness height.
|
||||
// The non-dimensional roughness height
|
||||
scalar KsPlus = yPlus*dKsPlusdYPlus;
|
||||
|
||||
// The extra term in the law-of-the-wall.
|
||||
// The extra term in the law-of-the-wall
|
||||
scalar G = 0.0;
|
||||
|
||||
scalar yPlusGPrime = 0.0;
|
||||
@ -238,7 +209,7 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ensure immediate end and mutw = 0.
|
||||
// Ensure immediate end and mutw = 0
|
||||
yPlus = 0;
|
||||
}
|
||||
|
||||
@ -253,20 +224,16 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
{
|
||||
mutw[facei] = muw[facei]*(yPlus*yPlus/Re - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
mutw[facei] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Smooth Walls.
|
||||
// Smooth Walls
|
||||
forAll(mutw, facei)
|
||||
{
|
||||
const scalar magUpara = magUp[facei];
|
||||
const scalar Re = rho[facei]*magUpara/(muw[facei]*ry[facei]);
|
||||
const scalar Re = rho[facei]*magUpara*y[facei]/muw[facei];
|
||||
const scalar kappaRe = kappa_*Re;
|
||||
|
||||
scalar yPlus = yPlusLam;
|
||||
@ -290,12 +257,23 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
{
|
||||
mutw[facei] = muw[facei]*(yPlus*yPlus/Re - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
mutw[facei] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tmutw;
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField>
|
||||
mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus()"
|
||||
"const"
|
||||
);
|
||||
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -305,11 +283,6 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
|
||||
) const
|
||||
{
|
||||
fixedValueFvPatchScalarField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("roughnessHeight")
|
||||
<< roughnessHeight_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("roughnessConstant")
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
#ifndef mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
|
||||
#define mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "mutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,25 +54,11 @@ Class mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField Declaration
|
||||
|
||||
class mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
public mutWallFunctionFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of velocity field
|
||||
word UName_;
|
||||
|
||||
//- Name of density field
|
||||
word rhoName_;
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word muName_;
|
||||
|
||||
//- Von Karman constant
|
||||
scalar kappa_;
|
||||
|
||||
//- E coefficient
|
||||
scalar E_;
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
// Roughness parameters
|
||||
|
||||
@ -86,6 +72,12 @@ class mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
scalar roughnessFudgeFactor_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcMut() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -206,15 +198,14 @@ public:
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Evaluate the patchField
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType=Pstream::blocking
|
||||
);
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -48,12 +48,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
rhoName_("rho"),
|
||||
muName_("mu"),
|
||||
kappa_(0.41),
|
||||
E_(9.8)
|
||||
mutWallFunctionFvPatchScalarField(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
@ -66,12 +61,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
rhoName_(ptf.rhoName_),
|
||||
muName_(ptf.muName_),
|
||||
kappa_(ptf.kappa_),
|
||||
E_(ptf.E_)
|
||||
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
@ -83,12 +73,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
muName_(dict.lookupOrDefault<word>("mu", "mu")),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8))
|
||||
mutWallFunctionFvPatchScalarField(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
@ -98,12 +83,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(sawfpsf),
|
||||
UName_(sawfpsf.UName_),
|
||||
rhoName_(sawfpsf.rhoName_),
|
||||
muName_(sawfpsf.muName_),
|
||||
kappa_(sawfpsf.kappa_),
|
||||
E_(sawfpsf.E_)
|
||||
mutWallFunctionFvPatchScalarField(sawfpsf)
|
||||
{}
|
||||
|
||||
|
||||
@ -114,46 +94,37 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(sawfpsf, iF),
|
||||
UName_(sawfpsf.UName_),
|
||||
rhoName_(sawfpsf.rhoName_),
|
||||
muName_(sawfpsf.muName_),
|
||||
kappa_(sawfpsf.kappa_),
|
||||
E_(sawfpsf.E_)
|
||||
mutWallFunctionFvPatchScalarField(sawfpsf, iF)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
tmp<scalarField>
|
||||
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||
|
||||
const fvPatchVectorField& U =
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
const scalarField magUp = mag(Uw.patchInternalField() - Uw);
|
||||
|
||||
scalarField magUp = mag(U.patchInternalField() - U);
|
||||
const fvPatchScalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
||||
|
||||
const scalarField& rhow =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
const fvPatchScalarField& muw = rasModel.mu().boundaryField()[patchI];
|
||||
|
||||
const scalarField& muw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(muName_);
|
||||
scalarField& mutw = *this;
|
||||
|
||||
scalarField magFaceGradU = mag(U.snGrad());
|
||||
tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0));
|
||||
scalarField& mutw = tmutw();
|
||||
|
||||
forAll(mutw, faceI)
|
||||
{
|
||||
scalar magUpara = magUp[faceI];
|
||||
|
||||
scalar kappaRe = kappa_*magUpara/((muw[faceI]/rhow[faceI])*ry[faceI]);
|
||||
scalar kappaRe = kappa_*magUpara*y[faceI]/(muw[faceI]/rhow[faceI]);
|
||||
|
||||
scalar yPlus = yPlusLam;
|
||||
scalar ryPlusLam = 1.0/yPlus;
|
||||
@ -166,17 +137,28 @@ void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::evaluate
|
||||
yPlusLast = yPlus;
|
||||
yPlus = (kappaRe + yPlus)/(1.0 + log(E_*yPlus));
|
||||
|
||||
} while (mag(ryPlusLam*(yPlus - yPlusLast)) > 0.01 && ++iter < 10 );
|
||||
} while (mag(ryPlusLam*(yPlus - yPlusLast)) > 0.01 && ++iter < 10);
|
||||
|
||||
if (yPlus > yPlusLam)
|
||||
{
|
||||
mutw[faceI] = muw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
mutw[faceI] = 0.0;
|
||||
mutw[faceI] = muw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
return tmutw;
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField>
|
||||
mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() "
|
||||
"const"
|
||||
);
|
||||
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -186,9 +168,6 @@ void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
writeEntry("value", os);
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
#ifndef mutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
|
||||
#define mutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "mutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,24 +54,14 @@ namespace RASModels
|
||||
|
||||
class mutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
public mutWallFunctionFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
protected:
|
||||
|
||||
//- Name of velocity field
|
||||
word UName_;
|
||||
// Protected member functions
|
||||
|
||||
//- Name of density field
|
||||
word rhoName_;
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word muName_;
|
||||
|
||||
//- Von Karman constant
|
||||
scalar kappa_;
|
||||
|
||||
//- E coefficient
|
||||
scalar E_;
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcMut() const;
|
||||
|
||||
|
||||
public:
|
||||
@ -154,14 +144,14 @@ public:
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Evaluate the patchField
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType=Pstream::blocking
|
||||
);
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "mutSpalartAllmarasWallFunctionFvPatchScalarField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "RASModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -38,6 +39,72 @@ namespace compressible
|
||||
namespace RASModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
tmp<scalarField> mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau
|
||||
(
|
||||
const scalarField& magGradU
|
||||
) const
|
||||
{
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalarField& y = rasModel.y()[patch().index()];
|
||||
|
||||
const fvPatchVectorField& Uw =
|
||||
rasModel.U().boundaryField()[patch().index()];
|
||||
|
||||
scalarField magUp = mag(Uw.patchInternalField() - Uw);
|
||||
|
||||
const fvPatchScalarField& rhow =
|
||||
rasModel.rho().boundaryField()[patch().index()];
|
||||
|
||||
const fvPatchScalarField& muw =
|
||||
rasModel.mu().boundaryField()[patch().index()];
|
||||
const scalarField& mutw = *this;
|
||||
|
||||
tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0));
|
||||
scalarField& uTau = tuTau();
|
||||
|
||||
forAll(mutw, faceI)
|
||||
{
|
||||
scalar magUpara = magUp[faceI];
|
||||
|
||||
scalar ut =
|
||||
sqrt((mutw[faceI] + muw[faceI])*magGradU[faceI]/rhow[faceI]);
|
||||
|
||||
if (ut > VSMALL)
|
||||
{
|
||||
int iter = 0;
|
||||
scalar err = GREAT;
|
||||
|
||||
do
|
||||
{
|
||||
scalar kUu = min(kappa_*magUpara/ut, 50);
|
||||
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
|
||||
|
||||
scalar f =
|
||||
- ut*y[faceI]/(muw[faceI]/rhow[faceI])
|
||||
+ magUpara/ut
|
||||
+ 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));
|
||||
|
||||
scalar df =
|
||||
y[faceI]/(muw[faceI]/rhow[faceI])
|
||||
+ magUpara/sqr(ut)
|
||||
+ 1/E_*kUu*fkUu/ut;
|
||||
|
||||
scalar uTauNew = ut + f/df;
|
||||
err = mag((ut - uTauNew)/ut);
|
||||
ut = uTauNew;
|
||||
|
||||
} while (ut > VSMALL && err > 0.01 && ++iter < 10);
|
||||
|
||||
uTau[faceI] = max(0.0, ut);
|
||||
}
|
||||
}
|
||||
|
||||
return tuTau;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
mutSpalartAllmarasWallFunctionFvPatchScalarField::
|
||||
@ -47,12 +114,7 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
rhoName_("rho"),
|
||||
muName_("mu"),
|
||||
kappa_(0.41),
|
||||
E_(9.8)
|
||||
mutWallFunctionFvPatchScalarField(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
@ -65,12 +127,7 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
rhoName_(ptf.rhoName_),
|
||||
muName_(ptf.muName_),
|
||||
kappa_(ptf.kappa_),
|
||||
E_(ptf.E_)
|
||||
mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
@ -82,12 +139,7 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
muName_(dict.lookupOrDefault<word>("mu", "mu")),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8))
|
||||
mutWallFunctionFvPatchScalarField(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
@ -97,12 +149,7 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const mutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(wfpsf),
|
||||
UName_(wfpsf.UName_),
|
||||
rhoName_(wfpsf.rhoName_),
|
||||
muName_(wfpsf.muName_),
|
||||
kappa_(wfpsf.kappa_),
|
||||
E_(wfpsf.E_)
|
||||
mutWallFunctionFvPatchScalarField(wfpsf)
|
||||
{}
|
||||
|
||||
|
||||
@ -113,83 +160,45 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(wfpsf, iF),
|
||||
UName_(wfpsf.UName_),
|
||||
rhoName_(wfpsf.rhoName_),
|
||||
muName_(wfpsf.muName_),
|
||||
kappa_(wfpsf.kappa_),
|
||||
E_(wfpsf.E_)
|
||||
mutWallFunctionFvPatchScalarField(wfpsf, iF)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void mutSpalartAllmarasWallFunctionFvPatchScalarField::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
tmp<scalarField>
|
||||
mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const
|
||||
{
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
const label patchI = patch().index();
|
||||
|
||||
const fvPatchVectorField& U =
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||
|
||||
scalarField magUp = mag(U.patchInternalField() - U);
|
||||
const scalarField magGradU = mag(Uw.snGrad());
|
||||
|
||||
const scalarField& rhow =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
||||
|
||||
const scalarField& muw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(muName_);
|
||||
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
||||
|
||||
scalarField& mutw = *this;
|
||||
return max(0.0, rhow*sqr(calcUTau(magGradU))/magGradU - muw);
|
||||
}
|
||||
|
||||
scalarField magFaceGradU = mag(U.snGrad());
|
||||
|
||||
forAll(mutw, faceI)
|
||||
{
|
||||
scalar magUpara = magUp[faceI];
|
||||
tmp<scalarField>
|
||||
mutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
|
||||
scalar utau =
|
||||
sqrt((mutw[faceI] + muw[faceI])*magFaceGradU[faceI]/rhow[faceI]);
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
|
||||
if (utau > VSMALL)
|
||||
{
|
||||
int iter = 0;
|
||||
scalar err = GREAT;
|
||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||
|
||||
do
|
||||
{
|
||||
scalar kUu = min(kappa_*magUpara/utau, 50);
|
||||
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
|
||||
const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
||||
|
||||
scalar f =
|
||||
- utau/(ry[faceI]*(muw[faceI]/rhow[faceI]))
|
||||
+ magUpara/utau
|
||||
+ 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));
|
||||
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
||||
|
||||
scalar df =
|
||||
1.0/(ry[faceI]*(muw[faceI]/rhow[faceI]))
|
||||
+ magUpara/sqr(utau)
|
||||
+ 1/E_*kUu*fkUu/utau;
|
||||
|
||||
scalar utauNew = utau + f/df;
|
||||
err = mag((utau - utauNew)/utau);
|
||||
utau = utauNew;
|
||||
|
||||
} while (utau > VSMALL && err > 0.01 && ++iter < 10);
|
||||
|
||||
mutw[faceI] = max
|
||||
(
|
||||
rhow[faceI]*sqr(max(utau, 0))/magFaceGradU[faceI] - muw[faceI],
|
||||
0.0
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
mutw[faceI] = 0;
|
||||
}
|
||||
}
|
||||
return y*calcUTau(mag(Uw.snGrad()))/(muw/rhow);
|
||||
}
|
||||
|
||||
|
||||
@ -199,9 +208,6 @@ void mutSpalartAllmarasWallFunctionFvPatchScalarField::write
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
writeEntry("value", os);
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
#ifndef mutSpalartAllmarasWallFunctionFvPatchScalarField_H
|
||||
#define mutSpalartAllmarasWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "mutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,24 +54,17 @@ namespace RASModels
|
||||
|
||||
class mutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
public mutWallFunctionFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
protected:
|
||||
|
||||
//- Name of velocity field
|
||||
word UName_;
|
||||
// Protected member functions
|
||||
|
||||
//- Name of density field
|
||||
word rhoName_;
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcMut() const;
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word muName_;
|
||||
|
||||
//- Von Karman constant
|
||||
scalar kappa_;
|
||||
|
||||
//- E coefficient
|
||||
scalar E_;
|
||||
//- Calculate the friction velocity
|
||||
virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
|
||||
|
||||
|
||||
public:
|
||||
@ -147,14 +140,14 @@ public:
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Evaluate the patchField
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType=Pstream::blocking
|
||||
);
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
#include "RASModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "wallFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -39,27 +40,38 @@ namespace compressible
|
||||
namespace RASModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void mutWallFunctionFvPatchScalarField::checkType()
|
||||
{
|
||||
if (!isA<wallFvPatch>(patch()))
|
||||
{
|
||||
FatalErrorIn("mutWallFunctionFvPatchScalarField::checkType()")
|
||||
<< "Invalid wall function specification" << nl
|
||||
<< " Patch type for patch " << patch().name()
|
||||
<< " must be wall" << nl
|
||||
<< " Current patch type is " << patch().type() << nl << endl
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
mutWallFunctionFvPatchScalarField::
|
||||
mutWallFunctionFvPatchScalarField
|
||||
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
rhoName_("rho"),
|
||||
muName_("mu"),
|
||||
kName_("k"),
|
||||
Cmu_(0.09),
|
||||
kappa_(0.41),
|
||||
E_(9.8)
|
||||
{}
|
||||
|
||||
|
||||
mutWallFunctionFvPatchScalarField::
|
||||
mutWallFunctionFvPatchScalarField
|
||||
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const mutWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
@ -68,17 +80,13 @@ mutWallFunctionFvPatchScalarField
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
rhoName_(ptf.rhoName_),
|
||||
muName_(ptf.muName_),
|
||||
kName_(ptf.kName_),
|
||||
Cmu_(ptf.Cmu_),
|
||||
kappa_(ptf.kappa_),
|
||||
E_(ptf.E_)
|
||||
{}
|
||||
|
||||
|
||||
mutWallFunctionFvPatchScalarField::
|
||||
mutWallFunctionFvPatchScalarField
|
||||
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
@ -86,42 +94,31 @@ mutWallFunctionFvPatchScalarField
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
muName_(dict.lookupOrDefault<word>("mu", "mu")),
|
||||
kName_(dict.lookupOrDefault<word>("k", "k")),
|
||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8))
|
||||
{}
|
||||
|
||||
|
||||
mutWallFunctionFvPatchScalarField::
|
||||
mutWallFunctionFvPatchScalarField
|
||||
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const mutWallFunctionFvPatchScalarField& wfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(wfpsf),
|
||||
rhoName_(wfpsf.rhoName_),
|
||||
muName_(wfpsf.muName_),
|
||||
kName_(wfpsf.kName_),
|
||||
Cmu_(wfpsf.Cmu_),
|
||||
kappa_(wfpsf.kappa_),
|
||||
E_(wfpsf.E_)
|
||||
{}
|
||||
|
||||
|
||||
mutWallFunctionFvPatchScalarField::
|
||||
mutWallFunctionFvPatchScalarField
|
||||
mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const mutWallFunctionFvPatchScalarField& wfpsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(wfpsf, iF),
|
||||
rhoName_(wfpsf.rhoName_),
|
||||
muName_(wfpsf.muName_),
|
||||
kName_(wfpsf.kName_),
|
||||
Cmu_(wfpsf.Cmu_),
|
||||
kappa_(wfpsf.kappa_),
|
||||
E_(wfpsf.E_)
|
||||
@ -132,21 +129,27 @@ mutWallFunctionFvPatchScalarField
|
||||
|
||||
void mutWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
operator==(calcMut());
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField> mutWallFunctionFvPatchScalarField::calcMut() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = rasModel.y()[patch().index()];
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
||||
const tmp<volScalarField> tk = rasModel.k();
|
||||
const volScalarField& k = tk();
|
||||
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
||||
|
||||
const scalar Cmu25 = pow(Cmu_, 0.25);
|
||||
|
||||
const scalarField& rhow =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
|
||||
const volScalarField& k = db().lookupObject<volScalarField>(kName_);
|
||||
|
||||
const scalarField& muw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(muName_);
|
||||
|
||||
scalarField& mutw = *this;
|
||||
tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0));
|
||||
scalarField& mutw = tmutw();
|
||||
|
||||
forAll(mutw, faceI)
|
||||
{
|
||||
@ -160,20 +163,32 @@ void mutWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
mutw[faceI] = muw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
mutw[faceI] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
return tmutw;
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField> mutWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
|
||||
const tmp<volScalarField> tk = rasModel.k();
|
||||
const volScalarField& k = tk();
|
||||
const scalarField kwc = k.boundaryField()[patchI].patchInternalField();
|
||||
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
||||
const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
||||
|
||||
return pow(Cmu_, 0.25)*y*sqrt(kwc)/(muw/rhow);
|
||||
}
|
||||
|
||||
|
||||
void mutWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
|
||||
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
||||
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
|
||||
@ -57,16 +57,9 @@ class mutWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
protected:
|
||||
|
||||
//- Name of density field
|
||||
word rhoName_;
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word muName_;
|
||||
|
||||
//- Name of turbulence kinetic energy field
|
||||
word kName_;
|
||||
// Protected data
|
||||
|
||||
//- Cmu coefficient
|
||||
scalar Cmu_;
|
||||
@ -78,6 +71,15 @@ class mutWallFunctionFvPatchScalarField
|
||||
scalar E_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Check the type of the patch
|
||||
virtual void checkType();
|
||||
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcMut() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -151,6 +153,9 @@ public:
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
@ -39,7 +39,6 @@ namespace incompressible
|
||||
namespace RASModels
|
||||
{
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
scalar nutRoughWallFunctionFvPatchScalarField::fnRough
|
||||
@ -67,26 +66,19 @@ scalar nutRoughWallFunctionFvPatchScalarField::fnRough
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
nutRoughWallFunctionFvPatchScalarField::
|
||||
nutRoughWallFunctionFvPatchScalarField
|
||||
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
kName_("k"),
|
||||
nuName_("nu"),
|
||||
Cmu_(0.09),
|
||||
kappa_(0.41),
|
||||
E_(9.8),
|
||||
nutWallFunctionFvPatchScalarField(p, iF),
|
||||
Ks_(p.size(), 0.0),
|
||||
Cs_(p.size(), 0.0)
|
||||
{}
|
||||
|
||||
|
||||
nutRoughWallFunctionFvPatchScalarField::
|
||||
nutRoughWallFunctionFvPatchScalarField
|
||||
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
|
||||
(
|
||||
const nutRoughWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
@ -94,66 +86,43 @@ nutRoughWallFunctionFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
kName_(ptf.kName_),
|
||||
nuName_(ptf.nuName_),
|
||||
Cmu_(0.09),
|
||||
kappa_(0.41),
|
||||
E_(9.8),
|
||||
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
|
||||
Ks_(ptf.Ks_, mapper),
|
||||
Cs_(ptf.Cs_, mapper)
|
||||
{}
|
||||
|
||||
|
||||
nutRoughWallFunctionFvPatchScalarField::
|
||||
nutRoughWallFunctionFvPatchScalarField
|
||||
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
kName_(dict.lookupOrDefault<word>("k", "k")),
|
||||
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
|
||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
||||
nutWallFunctionFvPatchScalarField(p, iF, dict),
|
||||
Ks_("Ks", dict, p.size()),
|
||||
Cs_("Cs", dict, p.size())
|
||||
{}
|
||||
|
||||
|
||||
nutRoughWallFunctionFvPatchScalarField::
|
||||
nutRoughWallFunctionFvPatchScalarField
|
||||
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
|
||||
(
|
||||
const nutRoughWallFunctionFvPatchScalarField& rwfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(rwfpsf),
|
||||
kName_(rwfpsf.kName_),
|
||||
nuName_(rwfpsf.nuName_),
|
||||
Cmu_(rwfpsf.Cmu_),
|
||||
kappa_(rwfpsf.kappa_),
|
||||
E_(rwfpsf.E_),
|
||||
nutWallFunctionFvPatchScalarField(rwfpsf),
|
||||
Ks_(rwfpsf.Ks_),
|
||||
Cs_(rwfpsf.Cs_)
|
||||
{}
|
||||
|
||||
|
||||
nutRoughWallFunctionFvPatchScalarField::
|
||||
nutRoughWallFunctionFvPatchScalarField
|
||||
nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField
|
||||
(
|
||||
const nutRoughWallFunctionFvPatchScalarField& rwfpsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(rwfpsf, iF),
|
||||
kName_(rwfpsf.kName_),
|
||||
nuName_(rwfpsf.nuName_),
|
||||
Cmu_(rwfpsf.Cmu_),
|
||||
kappa_(rwfpsf.kappa_),
|
||||
E_(rwfpsf.E_),
|
||||
nutWallFunctionFvPatchScalarField(rwfpsf, iF),
|
||||
Ks_(rwfpsf.Ks_),
|
||||
Cs_(rwfpsf.Cs_)
|
||||
{}
|
||||
@ -166,7 +135,7 @@ void nutRoughWallFunctionFvPatchScalarField::autoMap
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::autoMap(m);
|
||||
nutWallFunctionFvPatchScalarField::autoMap(m);
|
||||
Ks_.autoMap(m);
|
||||
Cs_.autoMap(m);
|
||||
}
|
||||
@ -178,30 +147,31 @@ void nutRoughWallFunctionFvPatchScalarField::rmap
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::rmap(ptf, addr);
|
||||
nutWallFunctionFvPatchScalarField::rmap(ptf, addr);
|
||||
|
||||
const nutRoughWallFunctionFvPatchScalarField& nrwfpsf =
|
||||
refCast<const nutRoughWallFunctionFvPatchScalarField>(ptf);
|
||||
|
||||
Cs_.rmap(nrwfpsf.Cs_, addr);
|
||||
Ks_.rmap(nrwfpsf.Ks_, addr);
|
||||
Cs_.rmap(nrwfpsf.Cs_, addr);
|
||||
}
|
||||
|
||||
|
||||
void nutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
tmp<scalarField> nutRoughWallFunctionFvPatchScalarField::calcNut() const
|
||||
{
|
||||
const RASModel& ras = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalar yPlusLam = ras.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = ras.y()[patch().index()];
|
||||
const label patchI = patch().index();
|
||||
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
const tmp<volScalarField> tk = rasModel.k();
|
||||
const volScalarField& k = tk();
|
||||
const scalarField& nuw = rasModel.nu().boundaryField()[patchI];
|
||||
|
||||
const scalar Cmu25 = pow(Cmu_, 0.25);
|
||||
|
||||
const scalarField& k = db().lookupObject<volScalarField>(kName_);
|
||||
|
||||
const scalarField& nuw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(nuName_);
|
||||
|
||||
scalarField& nutw = *this;
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
|
||||
scalarField& nutw = tnutw();
|
||||
|
||||
forAll(nutw, faceI)
|
||||
{
|
||||
@ -235,10 +205,6 @@ void nutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
), 0.5*limitingNutw
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
nutw[faceI] = 0.0;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
@ -249,14 +215,14 @@ void nutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
return tnutw;
|
||||
}
|
||||
|
||||
|
||||
void nutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
||||
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
|
||||
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
|
||||
@ -43,7 +43,7 @@ SourceFiles
|
||||
#ifndef nutRoughWallFunctionFvPatchScalarField_H
|
||||
#define nutRoughWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "nutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -60,24 +60,11 @@ namespace RASModels
|
||||
|
||||
class nutRoughWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
public nutWallFunctionFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
protected:
|
||||
|
||||
//- Name of turbulence kinetic energy field
|
||||
word kName_;
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word nuName_;
|
||||
|
||||
//- Cmu coefficient
|
||||
scalar Cmu_;
|
||||
|
||||
//- Von Karman constant
|
||||
scalar kappa_;
|
||||
|
||||
//- E coefficient
|
||||
scalar E_;
|
||||
// Protected data
|
||||
|
||||
//- Roughness height
|
||||
scalarField Ks_;
|
||||
@ -86,10 +73,13 @@ class nutRoughWallFunctionFvPatchScalarField
|
||||
scalarField Cs_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
// Protected member functions
|
||||
|
||||
//- Compute the roughness function
|
||||
scalar fnRough(const scalar KsPlus, const scalar Cs) const;
|
||||
virtual scalar fnRough(const scalar KsPlus, const scalar Cs) const;
|
||||
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
|
||||
public:
|
||||
@ -166,10 +156,7 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
virtual void autoMap
|
||||
(
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void autoMap(const fvPatchFieldMapper&);
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
virtual void rmap
|
||||
@ -178,16 +165,11 @@ public:
|
||||
const labelList&
|
||||
);
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H"
|
||||
#include "RASModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -47,11 +48,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
nuName_("nu"),
|
||||
kappa_(0.41),
|
||||
E_(9.8),
|
||||
nutWallFunctionFvPatchScalarField(p, iF),
|
||||
roughnessHeight_(pTraits<scalar>::zero),
|
||||
roughnessConstant_(pTraits<scalar>::zero),
|
||||
roughnessFudgeFactor_(pTraits<scalar>::zero)
|
||||
@ -67,11 +64,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
nuName_(ptf.nuName_),
|
||||
kappa_(ptf.kappa_),
|
||||
E_(ptf.E_),
|
||||
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
|
||||
roughnessHeight_(ptf.roughnessHeight_),
|
||||
roughnessConstant_(ptf.roughnessConstant_),
|
||||
roughnessFudgeFactor_(ptf.roughnessFudgeFactor_)
|
||||
@ -86,11 +79,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
||||
nutWallFunctionFvPatchScalarField(p, iF, dict),
|
||||
roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))),
|
||||
roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))),
|
||||
roughnessFudgeFactor_(readScalar(dict.lookup("roughnessFudgeFactor")))
|
||||
@ -103,11 +92,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(rwfpsf),
|
||||
UName_(rwfpsf.UName_),
|
||||
nuName_(rwfpsf.nuName_),
|
||||
kappa_(rwfpsf.kappa_),
|
||||
E_(rwfpsf.E_),
|
||||
nutWallFunctionFvPatchScalarField(rwfpsf),
|
||||
roughnessHeight_(rwfpsf.roughnessHeight_),
|
||||
roughnessConstant_(rwfpsf.roughnessConstant_),
|
||||
roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_)
|
||||
@ -121,11 +106,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(rwfpsf, iF),
|
||||
UName_(rwfpsf.UName_),
|
||||
nuName_(rwfpsf.nuName_),
|
||||
kappa_(rwfpsf.kappa_),
|
||||
E_(rwfpsf.E_),
|
||||
nutWallFunctionFvPatchScalarField(rwfpsf, iF),
|
||||
roughnessHeight_(rwfpsf.roughnessHeight_),
|
||||
roughnessConstant_(rwfpsf.roughnessConstant_),
|
||||
roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_)
|
||||
@ -134,31 +115,27 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
tmp<scalarField>
|
||||
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcNut() const
|
||||
{
|
||||
const scalar yPlusLam = 11.225;
|
||||
const label patchI = patch().index();
|
||||
|
||||
// The reciprical of the distance to the adjacent cell centre.
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
|
||||
const fvPatchVectorField& U =
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||
const scalarField& nuw = rasModel.nu().boundaryField()[patchI];
|
||||
|
||||
// The flow velocity at the adjacent cell centre.
|
||||
scalarField magUp = mag(U.patchInternalField() - U);
|
||||
// The flow velocity at the adjacent cell centre
|
||||
scalarField magUp = mag(Uw.patchInternalField() - Uw);
|
||||
|
||||
const scalarField& nuw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(nuName_);
|
||||
scalarField& nutw = *this;
|
||||
|
||||
scalarField magFaceGradU = mag(U.snGrad());
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
|
||||
scalarField& nutw = tnutw();
|
||||
|
||||
if (roughnessHeight_ > 0.0)
|
||||
{
|
||||
// Rough Walls.
|
||||
// Rough Walls
|
||||
const scalar c_1 = 1/(90 - 2.25) + roughnessConstant_;
|
||||
static const scalar c_2 = 2.25/(90 - 2.25);
|
||||
static const scalar c_3 = 2.0*atan(1.0)/log(90/2.25);
|
||||
@ -171,7 +148,7 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
forAll(nutw, facei)
|
||||
{
|
||||
const scalar magUpara = magUp[facei];
|
||||
const scalar Re = magUpara/(nuw[facei]*ry[facei]);
|
||||
const scalar Re = magUpara*y[facei]/nuw[facei];
|
||||
const scalar kappaRe = kappa_*Re;
|
||||
|
||||
scalar yPlus = yPlusLam;
|
||||
@ -179,17 +156,16 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
|
||||
int iter = 0;
|
||||
scalar yPlusLast = 0.0;
|
||||
scalar dKsPlusdYPlus = roughnessHeight_*ry[facei];
|
||||
scalar dKsPlusdYPlus = roughnessHeight_/y[facei];
|
||||
|
||||
// Enforce the roughnessHeight to be less than the distance to
|
||||
// the first cell centre.
|
||||
if(dKsPlusdYPlus > 1)
|
||||
// the first cell centre
|
||||
if (dKsPlusdYPlus > 1)
|
||||
{
|
||||
dKsPlusdYPlus = 1;
|
||||
}
|
||||
|
||||
// Fudge factor to get results to be similar to fluent
|
||||
// (at least difference between rough and smooth).
|
||||
// Additional tuning parameter (fudge factor) - nominally = 1
|
||||
dKsPlusdYPlus *= roughnessFudgeFactor_;
|
||||
|
||||
do
|
||||
@ -243,10 +219,6 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
{
|
||||
nutw[facei] = nuw[facei]*(yPlus*yPlus/Re - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
nutw[facei] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -256,7 +228,7 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
forAll(nutw, facei)
|
||||
{
|
||||
const scalar magUpara = magUp[facei];
|
||||
const scalar Re = magUpara/(nuw[facei]*ry[facei]);
|
||||
const scalar Re = magUpara*y[facei]/nuw[facei];
|
||||
const scalar kappaRe = kappa_*Re;
|
||||
|
||||
scalar yPlus = yPlusLam;
|
||||
@ -276,12 +248,23 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
{
|
||||
nutw[facei] = nuw[facei]*(yPlus*yPlus/Re - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
nutw[facei] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tnutw;
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField>
|
||||
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus()"
|
||||
"const"
|
||||
);
|
||||
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -291,8 +274,6 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
|
||||
) const
|
||||
{
|
||||
fixedValueFvPatchScalarField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("roughnessHeight")
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
#ifndef nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
|
||||
#define nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "nutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,22 +54,10 @@ Class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField Declaration
|
||||
|
||||
class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
public nutWallFunctionFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of velocity field
|
||||
word UName_;
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word nuName_;
|
||||
|
||||
//- Von Karman constant
|
||||
scalar kappa_;
|
||||
|
||||
//- E coefficient
|
||||
scalar E_;
|
||||
|
||||
// Roughness model parameters
|
||||
|
||||
//- Height
|
||||
@ -82,6 +70,12 @@ class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
|
||||
scalar roughnessFudgeFactor_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -201,17 +195,18 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Evaluate the patchField
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType=Pstream::blocking
|
||||
);
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -48,11 +48,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
nuName_("nu"),
|
||||
kappa_(0.41),
|
||||
E_(9.8)
|
||||
nutWallFunctionFvPatchScalarField(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
@ -65,11 +61,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
nuName_(ptf.nuName_),
|
||||
kappa_(ptf.kappa_),
|
||||
E_(ptf.E_)
|
||||
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
@ -81,11 +73,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8))
|
||||
nutWallFunctionFvPatchScalarField(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
@ -95,11 +83,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(sawfpsf),
|
||||
UName_(sawfpsf.UName_),
|
||||
nuName_(sawfpsf.nuName_),
|
||||
kappa_(sawfpsf.kappa_),
|
||||
E_(sawfpsf.E_)
|
||||
nutWallFunctionFvPatchScalarField(sawfpsf)
|
||||
{}
|
||||
|
||||
|
||||
@ -110,40 +94,33 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(sawfpsf, iF),
|
||||
UName_(sawfpsf.UName_),
|
||||
nuName_(sawfpsf.nuName_),
|
||||
kappa_(sawfpsf.kappa_),
|
||||
E_(sawfpsf.E_)
|
||||
nutWallFunctionFvPatchScalarField(sawfpsf, iF)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
tmp<scalarField>
|
||||
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcNut() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||
|
||||
const fvPatchVectorField& U =
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
const scalarField magUp = mag(Uw.patchInternalField() - Uw);
|
||||
|
||||
scalarField magUp = mag(U.patchInternalField() - U);
|
||||
const scalarField& nuw = rasModel.nu().boundaryField()[patchI];
|
||||
|
||||
const scalarField& nuw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(nuName_);
|
||||
scalarField& nutw = *this;
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
|
||||
scalarField& nutw = tnutw();
|
||||
|
||||
forAll(nutw, facei)
|
||||
{
|
||||
scalar magUpara = magUp[facei];
|
||||
|
||||
scalar kappaRe = kappa_*magUpara/(nuw[facei]*ry[facei]);
|
||||
scalar kappaRe = kappa_*magUp[facei]*y[facei]/nuw[facei];
|
||||
|
||||
scalar yPlus = yPlusLam;
|
||||
scalar ryPlusLam = 1.0/yPlus;
|
||||
@ -160,13 +137,24 @@ void nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::evaluate
|
||||
|
||||
if (yPlus > yPlusLam)
|
||||
{
|
||||
nutw[facei] = nuw[facei]*(yPlus*kappa_/log(E_*yPlus) - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
nutw[facei] = 0.0;
|
||||
nutw[facei] = nuw[facei]*(yPlus*kappa_/log(E_*yPlus) - 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
return tnutw;
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField>
|
||||
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() "
|
||||
"const"
|
||||
);
|
||||
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -176,8 +164,6 @@ void nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write
|
||||
) const
|
||||
{
|
||||
fixedValueFvPatchScalarField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
#ifndef nutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
|
||||
#define nutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "nutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,21 +54,14 @@ namespace RASModels
|
||||
|
||||
class nutSpalartAllmarasStandardWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
public nutWallFunctionFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
protected:
|
||||
|
||||
//- Name of velocity field
|
||||
word UName_;
|
||||
// Protected member functions
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word nuName_;
|
||||
|
||||
//- Von Karman constant
|
||||
scalar kappa_;
|
||||
|
||||
//- E coefficient
|
||||
scalar E_;
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
|
||||
public:
|
||||
@ -151,14 +144,14 @@ public:
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Evaluate the patchField
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType=Pstream::blocking
|
||||
);
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "nutSpalartAllmarasWallFunctionFvPatchScalarField.H"
|
||||
#include "RASModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -38,6 +39,66 @@ namespace incompressible
|
||||
namespace RASModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
tmp<scalarField> nutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau
|
||||
(
|
||||
const scalarField& magGradU
|
||||
) const
|
||||
{
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalarField& y = rasModel.y()[patch().index()];
|
||||
|
||||
const fvPatchVectorField& Uw =
|
||||
rasModel.U().boundaryField()[patch().index()];
|
||||
|
||||
scalarField magUp = mag(Uw.patchInternalField() - Uw);
|
||||
|
||||
const scalarField& nuw = rasModel.nu().boundaryField()[patch().index()];
|
||||
const scalarField& nutw = *this;
|
||||
|
||||
tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0));
|
||||
scalarField& uTau = tuTau();
|
||||
|
||||
forAll(uTau, facei)
|
||||
{
|
||||
scalar magUpara = magUp[facei];
|
||||
|
||||
scalar ut = sqrt((nutw[facei] + nuw[facei])*magGradU[facei]);
|
||||
|
||||
if (ut > VSMALL)
|
||||
{
|
||||
int iter = 0;
|
||||
scalar err = GREAT;
|
||||
|
||||
do
|
||||
{
|
||||
scalar kUu = min(kappa_*magUpara/ut, 50);
|
||||
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
|
||||
|
||||
scalar f =
|
||||
- ut*y[facei]/nuw[facei]
|
||||
+ magUpara/ut
|
||||
+ 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));
|
||||
|
||||
scalar df =
|
||||
y[facei]/nuw[facei]
|
||||
+ magUpara/sqr(ut)
|
||||
+ 1/E_*kUu*fkUu/ut;
|
||||
|
||||
scalar uTauNew = ut + f/df;
|
||||
err = mag((ut - uTauNew)/ut);
|
||||
ut = uTauNew;
|
||||
|
||||
} while (ut > VSMALL && err > 0.01 && ++iter < 10);
|
||||
uTau[facei] = max(0.0, ut);
|
||||
}
|
||||
}
|
||||
|
||||
return tuTau;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
nutSpalartAllmarasWallFunctionFvPatchScalarField::
|
||||
@ -47,11 +108,7 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
nuName_("nu"),
|
||||
kappa_(0.41),
|
||||
E_(9.8)
|
||||
nutWallFunctionFvPatchScalarField(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
@ -64,11 +121,7 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
nuName_(ptf.nuName_),
|
||||
kappa_(ptf.kappa_),
|
||||
E_(ptf.E_)
|
||||
nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
@ -80,11 +133,7 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8))
|
||||
nutWallFunctionFvPatchScalarField(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
@ -94,11 +143,7 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const nutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(wfpsf),
|
||||
UName_(wfpsf.UName_),
|
||||
nuName_(wfpsf.nuName_),
|
||||
kappa_(wfpsf.kappa_),
|
||||
E_(wfpsf.E_)
|
||||
nutWallFunctionFvPatchScalarField(wfpsf)
|
||||
{}
|
||||
|
||||
|
||||
@ -109,75 +154,41 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(wfpsf, iF),
|
||||
UName_(wfpsf.UName_),
|
||||
nuName_(wfpsf.nuName_),
|
||||
kappa_(wfpsf.kappa_),
|
||||
E_(wfpsf.E_)
|
||||
nutWallFunctionFvPatchScalarField(wfpsf, iF)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void nutSpalartAllmarasWallFunctionFvPatchScalarField::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
tmp<scalarField>
|
||||
nutSpalartAllmarasWallFunctionFvPatchScalarField::calcNut() const
|
||||
{
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
const label patchI = patch().index();
|
||||
|
||||
const fvPatchVectorField& U =
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||
|
||||
scalarField magUp = mag(U.patchInternalField() - U);
|
||||
const scalarField magGradU = mag(Uw.snGrad());
|
||||
|
||||
const scalarField& nuw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(nuName_);
|
||||
const scalarField& nuw = rasModel.nu().boundaryField()[patchI];
|
||||
|
||||
scalarField& nutw = *this;
|
||||
return max(0.0, sqr(calcUTau(magGradU))/magGradU - nuw);
|
||||
}
|
||||
|
||||
scalarField magFaceGradU = mag(U.snGrad());
|
||||
|
||||
forAll(nutw, facei)
|
||||
{
|
||||
scalar magUpara = magUp[facei];
|
||||
tmp<scalarField>
|
||||
nutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
|
||||
scalar utau = sqrt((nutw[facei] + nuw[facei])*magFaceGradU[facei]);
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
|
||||
if (utau > VSMALL)
|
||||
{
|
||||
int iter = 0;
|
||||
scalar err = GREAT;
|
||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||
|
||||
do
|
||||
{
|
||||
scalar kUu = min(kappa_*magUpara/utau, 50);
|
||||
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
|
||||
const scalarField& nuw = rasModel.nu().boundaryField()[patchI];
|
||||
|
||||
scalar f =
|
||||
- utau/(ry[facei]*nuw[facei])
|
||||
+ magUpara/utau
|
||||
+ 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));
|
||||
|
||||
scalar df =
|
||||
1.0/(ry[facei]*nuw[facei])
|
||||
+ magUpara/sqr(utau)
|
||||
+ 1/E_*kUu*fkUu/utau;
|
||||
|
||||
scalar utauNew = utau + f/df;
|
||||
err = mag((utau - utauNew)/utau);
|
||||
utau = utauNew;
|
||||
|
||||
} while (utau > VSMALL && err > 0.01 && ++iter < 10);
|
||||
|
||||
nutw[facei] =
|
||||
max(sqr(max(utau, 0))/magFaceGradU[facei] - nuw[facei], 0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
nutw[facei] = 0;
|
||||
}
|
||||
}
|
||||
return y*calcUTau(mag(Uw.snGrad()))/nuw;
|
||||
}
|
||||
|
||||
|
||||
@ -187,8 +198,6 @@ void nutSpalartAllmarasWallFunctionFvPatchScalarField::write
|
||||
) const
|
||||
{
|
||||
fixedValueFvPatchScalarField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
@ -196,7 +205,11 @@ void nutSpalartAllmarasWallFunctionFvPatchScalarField::write
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField(fvPatchScalarField, nutSpalartAllmarasWallFunctionFvPatchScalarField);
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
nutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
#ifndef nutSpalartAllmarasWallFunctionFvPatchScalarField_H
|
||||
#define nutSpalartAllmarasWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "nutWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,21 +54,17 @@ namespace RASModels
|
||||
|
||||
class nutSpalartAllmarasWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
public nutWallFunctionFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
protected:
|
||||
|
||||
//- Name of velocity field
|
||||
word UName_;
|
||||
// Protected member functions
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word nuName_;
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
//- Von Karman constant
|
||||
scalar kappa_;
|
||||
|
||||
//- E coefficient
|
||||
scalar E_;
|
||||
//- Calculate the friction velocity
|
||||
virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
|
||||
|
||||
|
||||
public:
|
||||
@ -144,14 +140,14 @@ public:
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Evaluate the patchField
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType=Pstream::blocking
|
||||
);
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
#include "RASModel.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "wallFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -39,26 +40,40 @@ namespace incompressible
|
||||
namespace RASModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void nutWallFunctionFvPatchScalarField::checkType()
|
||||
{
|
||||
if (!isA<wallFvPatch>(patch()))
|
||||
{
|
||||
FatalErrorIn("nutWallFunctionFvPatchScalarField::checkType()")
|
||||
<< "Invalid wall function specification" << nl
|
||||
<< " Patch type for patch " << patch().name()
|
||||
<< " must be wall" << nl
|
||||
<< " Current patch type is " << patch().type() << nl << endl
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
nutWallFunctionFvPatchScalarField::
|
||||
nutWallFunctionFvPatchScalarField
|
||||
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
kName_("k"),
|
||||
nuName_("nu"),
|
||||
Cmu_(0.09),
|
||||
kappa_(0.41),
|
||||
E_(9.8)
|
||||
{}
|
||||
{
|
||||
checkType();
|
||||
}
|
||||
|
||||
|
||||
nutWallFunctionFvPatchScalarField::
|
||||
nutWallFunctionFvPatchScalarField
|
||||
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const nutWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
@ -67,16 +82,15 @@ nutWallFunctionFvPatchScalarField
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
kName_(ptf.kName_),
|
||||
nuName_(ptf.nuName_),
|
||||
Cmu_(ptf.Cmu_),
|
||||
kappa_(ptf.kappa_),
|
||||
E_(ptf.E_)
|
||||
{}
|
||||
{
|
||||
checkType();
|
||||
}
|
||||
|
||||
|
||||
nutWallFunctionFvPatchScalarField::
|
||||
nutWallFunctionFvPatchScalarField
|
||||
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
@ -84,61 +98,69 @@ nutWallFunctionFvPatchScalarField
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
kName_(dict.lookupOrDefault<word>("k", "k")),
|
||||
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
|
||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8))
|
||||
{}
|
||||
{
|
||||
checkType();
|
||||
}
|
||||
|
||||
|
||||
nutWallFunctionFvPatchScalarField::
|
||||
nutWallFunctionFvPatchScalarField
|
||||
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const nutWallFunctionFvPatchScalarField& wfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(wfpsf),
|
||||
kName_(wfpsf.kName_),
|
||||
nuName_(wfpsf.nuName_),
|
||||
Cmu_(wfpsf.Cmu_),
|
||||
kappa_(wfpsf.kappa_),
|
||||
E_(wfpsf.E_)
|
||||
{}
|
||||
{
|
||||
checkType();
|
||||
}
|
||||
|
||||
|
||||
nutWallFunctionFvPatchScalarField::
|
||||
nutWallFunctionFvPatchScalarField
|
||||
nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
|
||||
(
|
||||
const nutWallFunctionFvPatchScalarField& wfpsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(wfpsf, iF),
|
||||
kName_(wfpsf.kName_),
|
||||
nuName_(wfpsf.nuName_),
|
||||
Cmu_(wfpsf.Cmu_),
|
||||
kappa_(wfpsf.kappa_),
|
||||
E_(wfpsf.E_)
|
||||
{}
|
||||
{
|
||||
checkType();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void nutWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
operator==(calcNut());
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField> nutWallFunctionFvPatchScalarField::calcNut() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
|
||||
const scalarField& y = rasModel.y()[patch().index()];
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
const tmp<volScalarField> tk = rasModel.k();
|
||||
const volScalarField& k = tk();
|
||||
const scalarField& nuw = rasModel.nu().boundaryField()[patchI];
|
||||
|
||||
const scalar Cmu25 = pow(Cmu_, 0.25);
|
||||
|
||||
const volScalarField& k = db().lookupObject<volScalarField>(kName_);
|
||||
|
||||
const scalarField& nuw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(nuName_);
|
||||
|
||||
scalarField& nutw = *this;
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
|
||||
scalarField& nutw = tnutw();
|
||||
|
||||
forAll(nutw, faceI)
|
||||
{
|
||||
@ -148,21 +170,33 @@ void nutWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
|
||||
if (yPlus > yPlusLam)
|
||||
{
|
||||
nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
nutw[faceI] = 0.0;
|
||||
nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
return tnutw;
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField> nutWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalarField& y = rasModel.y()[patchI];
|
||||
|
||||
const tmp<volScalarField> tk = rasModel.k();
|
||||
const volScalarField& k = tk();
|
||||
const scalarField kwc = k.boundaryField()[patchI].patchInternalField();
|
||||
const scalarField& nuw = rasModel.nu().boundaryField()[patchI];
|
||||
|
||||
return pow(Cmu_, 0.25)*y*sqrt(kwc)/nuw;
|
||||
}
|
||||
|
||||
|
||||
void nutWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
||||
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
|
||||
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||
|
||||
@ -57,13 +57,9 @@ class nutWallFunctionFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
{
|
||||
//Private data
|
||||
protected:
|
||||
|
||||
//- Name of turbulence kinetic energy field
|
||||
word kName_;
|
||||
|
||||
//- Name of laminar viscosity field
|
||||
word nuName_;
|
||||
// Protected data
|
||||
|
||||
//- Cmu coefficient
|
||||
scalar Cmu_;
|
||||
@ -75,6 +71,15 @@ class nutWallFunctionFvPatchScalarField
|
||||
scalar E_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Check the type of the patch
|
||||
virtual void checkType();
|
||||
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -148,6 +153,9 @@ public:
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
@ -155,7 +163,7 @@ public:
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user