Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
OpenFOAM-plus
Commits
1405a310
Commit
1405a310
authored
Aug 04, 2016
by
Henry Weller
Browse files
TurbulenceModels::derivedFvPatchFields: standardized the cell index of the 'faceCell'
parent
cc8781f4
Changes
13
Hide whitespace changes
Inline
Side-by-side
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
View file @
1405a310
...
...
@@ -138,9 +138,9 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
scalarField
&
htc
=
*
this
;
forAll
(
htc
,
facei
)
{
label
faceC
elli
=
patch
().
faceCells
()[
facei
];
label
c
elli
=
patch
().
faceCells
()[
facei
];
scalar
Re
=
rhow
[
facei
]
*
mag
(
Uc
[
faceC
elli
]
-
Uw
[
facei
])
*
L_
/
muw
[
facei
];
scalar
Re
=
rhow
[
facei
]
*
mag
(
Uc
[
c
elli
]
-
Uw
[
facei
])
*
L_
/
muw
[
facei
];
if
(
Re
<
5.0E+05
)
{
...
...
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
View file @
1405a310
...
...
@@ -239,9 +239,9 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
// Populate boundary values
forAll
(
alphatw
,
facei
)
{
label
faceC
elli
=
patch
().
faceCells
()[
facei
];
label
c
elli
=
patch
().
faceCells
()[
facei
];
scalar
uTau
=
Cmu25
*
sqrt
(
k
[
faceC
elli
]);
scalar
uTau
=
Cmu25
*
sqrt
(
k
[
c
elli
]);
scalar
yPlus
=
uTau
*
y
[
facei
]
/
(
muw
[
facei
]
/
rhow
[
facei
]);
...
...
src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
View file @
1405a310
...
...
@@ -236,10 +236,10 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
scalarField
&
alphatw
=
*
this
;
forAll
(
alphatw
,
facei
)
{
label
faceC
elli
=
patch
().
faceCells
()[
facei
];
label
c
elli
=
patch
().
faceCells
()[
facei
];
// y+
scalar
yPlus
=
Cmu25
*
sqrt
(
k
[
faceC
elli
])
*
y
[
facei
]
/
nuw
[
facei
];
scalar
yPlus
=
Cmu25
*
sqrt
(
k
[
c
elli
])
*
y
[
facei
]
/
nuw
[
facei
];
// Molecular-to-turbulent Prandtl number ratio
scalar
Prat
=
Pr
/
Prt_
;
...
...
src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C
View file @
1405a310
...
...
@@ -327,10 +327,10 @@ void LRR<BasicTurbulenceModel>::correct()
{
forAll
(
curPatch
,
facei
)
{
label
faceC
elli
=
curPatch
.
faceCells
()[
facei
];
P
[
faceC
elli
]
*=
min
label
c
elli
=
curPatch
.
faceCells
()[
facei
];
P
[
c
elli
]
*=
min
(
G
[
faceC
elli
]
/
(
0
.
5
*
mag
(
tr
(
P
[
faceC
elli
]))
+
SMALL
),
G
[
c
elli
]
/
(
0
.
5
*
mag
(
tr
(
P
[
c
elli
]))
+
SMALL
),
1
.
0
);
}
...
...
src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C
View file @
1405a310
...
...
@@ -337,10 +337,10 @@ void SSG<BasicTurbulenceModel>::correct()
{
forAll
(
curPatch
,
facei
)
{
label
faceC
elli
=
curPatch
.
faceCells
()[
facei
];
P
[
faceC
elli
]
*=
min
label
c
elli
=
curPatch
.
faceCells
()[
facei
];
P
[
c
elli
]
*=
min
(
G
[
faceC
elli
]
/
(
0
.
5
*
mag
(
tr
(
P
[
faceC
elli
]))
+
SMALL
),
G
[
c
elli
]
/
(
0
.
5
*
mag
(
tr
(
P
[
c
elli
]))
+
SMALL
),
1
.
0
);
}
...
...
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C
View file @
1405a310
...
...
@@ -204,18 +204,18 @@ void fWallFunctionFvPatchScalarField::updateCoeffs()
// Set f wall values
forAll
(
f
,
facei
)
{
label
faceC
elli
=
patch
().
faceCells
()[
facei
];
label
c
elli
=
patch
().
faceCells
()[
facei
];
scalar
uTau
=
Cmu25
*
sqrt
(
k
[
faceC
elli
]);
scalar
uTau
=
Cmu25
*
sqrt
(
k
[
c
elli
]);
scalar
yPlus
=
uTau
*
y
[
facei
]
/
nuw
[
facei
];
if
(
yPlus
>
yPlusLam_
)
{
scalar
N
=
6
.
0
;
scalar
v2c
=
v2
[
faceC
elli
];
scalar
epsc
=
epsilon
[
faceC
elli
];
scalar
kc
=
k
[
faceC
elli
];
scalar
v2c
=
v2
[
c
elli
];
scalar
epsc
=
epsilon
[
c
elli
];
scalar
kc
=
k
[
c
elli
];
f
[
facei
]
=
N
*
v2c
*
epsc
/
(
sqr
(
kc
)
+
ROOTVSMALL
);
f
[
facei
]
/=
sqr
(
uTau
)
+
ROOTVSMALL
;
...
...
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C
View file @
1405a310
...
...
@@ -193,9 +193,9 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs()
// Set k wall values
forAll
(
kw
,
facei
)
{
label
faceC
elli
=
patch
().
faceCells
()[
facei
];
label
c
elli
=
patch
().
faceCells
()[
facei
];
scalar
uTau
=
Cmu25
*
sqrt
(
k
[
faceC
elli
]);
scalar
uTau
=
Cmu25
*
sqrt
(
k
[
c
elli
]);
scalar
yPlus
=
uTau
*
y
[
facei
]
/
nuw
[
facei
];
...
...
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
View file @
1405a310
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
5
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -33,15 +33,12 @@ License
namespace
Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defineTypeNameAndDebug
(
nutWallFunctionFvPatchScalarField
,
0
);
defineTypeNameAndDebug
(
nutWallFunctionFvPatchScalarField
,
0
);
}
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void
nutWallFunctionFvPatchScalarField
::
checkType
()
void
Foam
::
nutWallFunctionFvPatchScalarField
::
checkType
()
{
if
(
!
isA
<
wallFvPatch
>
(
patch
()))
{
...
...
@@ -55,7 +52,10 @@ void nutWallFunctionFvPatchScalarField::checkType()
}
void
nutWallFunctionFvPatchScalarField
::
writeLocalEntries
(
Ostream
&
os
)
const
void
Foam
::
nutWallFunctionFvPatchScalarField
::
writeLocalEntries
(
Ostream
&
os
)
const
{
os
.
writeKeyword
(
"Cmu"
)
<<
Cmu_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"kappa"
)
<<
kappa_
<<
token
::
END_STATEMENT
<<
nl
;
...
...
@@ -65,7 +65,7 @@ void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
Foam
::
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
...
...
@@ -81,7 +81,7 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
}
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
Foam
::
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
(
const
nutWallFunctionFvPatchScalarField
&
ptf
,
const
fvPatch
&
p
,
...
...
@@ -99,7 +99,7 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
}
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
Foam
::
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
...
...
@@ -116,7 +116,7 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
}
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
Foam
::
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
(
const
nutWallFunctionFvPatchScalarField
&
wfpsf
)
...
...
@@ -131,7 +131,7 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
}
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
Foam
::
nutWallFunctionFvPatchScalarField
::
nutWallFunctionFvPatchScalarField
(
const
nutWallFunctionFvPatchScalarField
&
wfpsf
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
...
...
@@ -149,7 +149,7 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
scalar
nutWallFunctionFvPatchScalarField
::
yPlusLam
Foam
::
scalar
Foam
::
nutWallFunctionFvPatchScalarField
::
yPlusLam
(
const
scalar
kappa
,
const
scalar
E
...
...
@@ -166,7 +166,13 @@ scalar nutWallFunctionFvPatchScalarField::yPlusLam
}
void
nutWallFunctionFvPatchScalarField
::
updateCoeffs
()
Foam
::
scalar
Foam
::
nutWallFunctionFvPatchScalarField
::
yPlusLam
()
const
{
return
yPlusLam_
;
}
void
Foam
::
nutWallFunctionFvPatchScalarField
::
updateCoeffs
()
{
if
(
updated
())
{
...
...
@@ -179,7 +185,7 @@ void nutWallFunctionFvPatchScalarField::updateCoeffs()
}
void
nutWallFunctionFvPatchScalarField
::
write
(
Ostream
&
os
)
const
void
Foam
::
nutWallFunctionFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchField
<
scalar
>::
write
(
os
);
writeLocalEntries
(
os
);
...
...
@@ -187,8 +193,4 @@ void nutWallFunctionFvPatchScalarField::write(Ostream& os) const
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H
View file @
1405a310
...
...
@@ -164,6 +164,9 @@ public:
//- Calculate the Y+ at the edge of the laminar sublayer
static
scalar
yPlusLam
(
const
scalar
kappa
,
const
scalar
E
);
//- Return the Y+ at the edge of the laminar sublayer
scalar
yPlusLam
()
const
;
//- Calculate and return the yPlus at the boundary
virtual
tmp
<
scalarField
>
yPlus
()
const
=
0
;
...
...
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C
View file @
1405a310
...
...
@@ -61,9 +61,9 @@ tmp<scalarField> nutkAtmRoughWallFunctionFvPatchScalarField::calcNut() const
forAll
(
nutw
,
facei
)
{
label
faceC
elli
=
patch
().
faceCells
()[
facei
];
label
c
elli
=
patch
().
faceCells
()[
facei
];
scalar
uStar
=
Cmu25
*
sqrt
(
k
[
faceC
elli
]);
scalar
uStar
=
Cmu25
*
sqrt
(
k
[
c
elli
]);
scalar
yPlus
=
uStar
*
y
[
facei
]
/
nuw
[
facei
];
scalar
Edash
=
(
y
[
facei
]
+
z0_
[
facei
])
/
z0_
[
facei
];
...
...
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C
View file @
1405a310
...
...
@@ -84,9 +84,9 @@ tmp<scalarField> nutkRoughWallFunctionFvPatchScalarField::calcNut() const
forAll
(
nutw
,
facei
)
{
label
faceC
elli
=
patch
().
faceCells
()[
facei
];
label
c
elli
=
patch
().
faceCells
()[
facei
];
scalar
uStar
=
Cmu25
*
sqrt
(
k
[
faceC
elli
]);
scalar
uStar
=
Cmu25
*
sqrt
(
k
[
c
elli
]);
scalar
yPlus
=
uStar
*
y
[
facei
]
/
nuw
[
facei
];
scalar
KsPlus
=
uStar
*
Ks_
[
facei
]
/
nuw
[
facei
];
...
...
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C
View file @
1405a310
...
...
@@ -63,9 +63,9 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const
forAll
(
nutw
,
facei
)
{
label
faceC
elli
=
patch
().
faceCells
()[
facei
];
label
c
elli
=
patch
().
faceCells
()[
facei
];
scalar
yPlus
=
Cmu25
*
y
[
facei
]
*
sqrt
(
k
[
faceC
elli
])
/
nuw
[
facei
];
scalar
yPlus
=
Cmu25
*
y
[
facei
]
*
sqrt
(
k
[
c
elli
])
/
nuw
[
facei
];
if
(
yPlus
>
yPlusLam_
)
{
...
...
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C
View file @
1405a310
...
...
@@ -196,9 +196,9 @@ void v2WallFunctionFvPatchScalarField::updateCoeffs()
// Set v2 wall values
forAll
(
v2
,
facei
)
{
label
faceC
elli
=
patch
().
faceCells
()[
facei
];
label
c
elli
=
patch
().
faceCells
()[
facei
];
scalar
uTau
=
Cmu25
*
sqrt
(
k
[
faceC
elli
]);
scalar
uTau
=
Cmu25
*
sqrt
(
k
[
c
elli
]);
scalar
yPlus
=
uTau
*
y
[
facei
]
/
nuw
[
facei
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment