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
Commits
fb5f66ee
Commit
fb5f66ee
authored
Jun 24, 2008
by
Andrew Heather
Browse files
reverted kappa and E back to dimensionedScalar, using new lookup functionality
parent
68346506
Changes
20
Hide whitespace changes
Inline
Side-by-side
src/turbulenceModels/RAS/compressible/RASModel/RASModel.C
View file @
fb5f66ee
...
...
@@ -89,14 +89,24 @@ RASModel::RASModel
kappa_
(
subDict
(
"wallFunctionCoeffs"
).
lookupOrAddDefault
<
scalar
>
dimensioned
<
scalar
>::
lookupOrAddToDict
(
"kappa"
,
subDict
(
"wallFunctionCoeffs"
),
0
.
4187
)
),
E_
(
subDict
(
"wallFunctionCoeffs"
).
lookupOrAddDefault
<
scalar
>
(
"E"
,
9
.
0
)),
yPlusLam_
(
yPlusLam
(
kappa_
,
E_
)),
E_
(
dimensioned
<
scalar
>::
lookupOrAddToDict
(
"E"
,
subDict
(
"wallFunctionCoeffs"
),
9
.
0
)
),
yPlusLam_
(
yPlusLam
(
kappa_
.
value
(),
E_
.
value
())),
k0_
(
"k0"
,
dimVelocity
*
dimVelocity
,
SMALL
),
epsilon0_
(
"epsilon"
,
k0_
.
dimensions
()
/
dimTime
,
SMALL
),
...
...
@@ -171,10 +181,10 @@ bool RASModel::read()
lookup
(
"turbulence"
)
>>
turbulence_
;
coeffDict_
=
subDict
(
type
()
+
"Coeffs"
);
subDict
(
"wallFunctionCoeffs"
)
.
readIfPresent
<
scalar
>
(
"kappa"
,
kappa_
);
subDict
(
"wallFunctionCoeffs"
)
.
readIfPresent
<
scalar
>
(
"E"
,
E_
);
kappa_
.
readIfPresent
(
subDict
(
"wallFunctionCoeffs"
));
E_
.
readIfPresent
(
subDict
(
"wallFunctionCoeffs"
));
yPlusLam_
=
yPlusLam
(
kappa_
,
E_
);
yPlusLam_
=
yPlusLam
(
kappa_
.
value
(),
E_
.
value
()
);
readIfPresent
(
"k0"
,
k0_
);
readIfPresent
(
"epsilon0"
,
epsilon0_
);
...
...
src/turbulenceModels/RAS/compressible/RASModel/RASModel.H
View file @
fb5f66ee
...
...
@@ -91,8 +91,8 @@ protected:
Switch
printCoeffs_
;
dictionary
coeffDict_
;
s
calar
kappa_
;
s
calar
E_
;
dimensionedS
calar
kappa_
;
dimensionedS
calar
E_
;
scalar
yPlusLam
(
const
scalar
kappa
,
const
scalar
E
);
scalar
yPlusLam_
;
...
...
@@ -226,13 +226,13 @@ public:
//- Return kappa for use in wall-functions
s
calar
kappa
()
const
dimensionedS
calar
kappa
()
const
{
return
kappa_
;
}
//- Return E for use in wall-functions
s
calar
E
()
const
dimensionedS
calar
E
()
const
{
return
E_
;
}
...
...
src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallFunctionsI.H
View file @
fb5f66ee
...
...
@@ -89,7 +89,7 @@ Description
omega_
[
faceCelli
]
+=
sqrt
(
k_
[
faceCelli
])
/
(
Cmu25
*
kappa_
*
y_
[
faceCelli
]);
/
(
Cmu25
*
kappa_
.
value
()
*
y_
[
faceCelli
]);
if
(
yPlus
>
yPlusLam_
)
{
...
...
@@ -97,7 +97,7 @@ Description
(
mutw
[
facei
]
+
muw
[
facei
])
*
magFaceGradU
[
facei
]
*
Cmu25
*
sqrt
(
k_
[
faceCelli
])
/
(
kappa_
*
y_
[
faceCelli
]);
/
(
kappa_
.
value
()
*
y_
[
faceCelli
]);
}
}
}
...
...
src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H
View file @
fb5f66ee
...
...
@@ -58,7 +58,7 @@ Description
{
mutw
[
facei
]
=
muw
[
facei
]
*
(
yPlus
*
kappa_
/
log
(
E_
*
yPlus
)
-
1
);
*
(
yPlus
*
kappa_
.
value
()
/
log
(
E_
.
value
()
*
yPlus
)
-
1
);
}
else
{
...
...
src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C
View file @
fb5f66ee
...
...
@@ -123,14 +123,14 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate
const
RASModel
&
rasModel
=
db
().
lookupObject
<
RASModel
>
(
"RASProperties"
);
const
scalar
kappa
=
rasModel
.
kappa
();
const
scalar
E
=
rasModel
.
E
();
const
scalar
kappa
=
rasModel
.
kappa
()
.
value
()
;
const
scalar
E
=
rasModel
.
E
()
.
value
()
;
const
scalar
yPlusLam
=
11
.
225
;
// The reciprical of the distance to the adjacent cell centre.
const
scalarField
&
ry
=
patch
().
deltaCoeffs
();
const
fvPatchVectorField
&
U
=
const
fvPatchVectorField
&
U
=
patch
().
lookupPatchField
<
volVectorField
,
vector
>
(
"U"
);
const
fvPatchScalarField
&
rho
=
...
...
@@ -139,7 +139,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate
// The flow velocity at the adjacent cell centre.
scalarField
magUp
=
mag
(
U
.
patchInternalField
()
-
U
);
const
scalarField
&
muw
=
const
scalarField
&
muw
=
patch
().
lookupPatchField
<
volScalarField
,
scalar
>
(
"mu"
);
scalarField
&
mutw
=
*
this
;
...
...
@@ -155,7 +155,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate
//if (KsPlusBasedOnYPlus_)
{
// If KsPlus is based on YPlus the extra term added to the law
// If KsPlus is based on YPlus the extra term added to the law
// of the wall will depend on yPlus.
forAll
(
mutw
,
facei
)
{
...
...
@@ -206,7 +206,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate
const
scalar
sint_2
=
sin
(
t_2
);
const
scalar
logt_1
=
log
(
t_1
);
G
=
logt_1
*
sint_2
;
yPlusGPrime
=
yPlusGPrime
=
(
c_1
*
sint_2
*
KsPlus
/
t_1
)
+
(
c_3
*
logt_1
*
cos
(
t_2
));
}
...
...
@@ -268,7 +268,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate
mag
(
ryPlusLam
*
(
yPlus
-
yPlusLast
))
>
0
.
0001
&&
++
iter
<
10
);
if
(
yPlus
>
yPlusLam
)
{
mutw
[
facei
]
=
muw
[
facei
]
*
(
yPlus
*
yPlus
/
Re
-
1
);
...
...
@@ -291,7 +291,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
<<
roughnessConstant_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"roughnessFudgeFactor"
)
<<
roughnessFudgeFactor_
<<
token
::
END_STATEMENT
<<
nl
;
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
src/turbulenceModels/RAS/compressible/wallFunctions/wallFunctionsI.H
View file @
fb5f66ee
...
...
@@ -90,7 +90,7 @@ Description
epsilon_
[
faceCelli
]
+=
Cmu75
*
pow
(
k_
[
faceCelli
],
1
.
5
)
/
(
kappa_
*
RASModel
::
y_
[
patchi
][
facei
]);
/
(
kappa_
.
value
()
*
RASModel
::
y_
[
patchi
][
facei
]);
if
(
yPlus
>
yPlusLam_
)
{
...
...
@@ -98,7 +98,7 @@ Description
(
mutw
[
facei
]
+
muw
[
facei
])
*
magFaceGradU
[
facei
]
*
Cmu25
*
sqrt
(
k_
[
faceCelli
])
/
(
kappa_
*
RASModel
::
y_
[
patchi
][
facei
]);
/
(
kappa_
.
value
()
*
RASModel
::
y_
[
patchi
][
facei
]);
}
}
}
...
...
src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H
View file @
fb5f66ee
...
...
@@ -58,7 +58,7 @@ Description
{
mutw
[
facei
]
=
muw
[
facei
]
*
(
yPlus
*
kappa_
/
log
(
E_
*
yPlus
)
-
1
);
*
(
yPlus
*
kappa_
.
value
()
/
log
(
E_
.
value
()
*
yPlus
)
-
1
);
}
else
{
...
...
src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H
View file @
fb5f66ee
...
...
@@ -43,7 +43,7 @@
epsilon_
[
faceCelli
]
+=
Cmu75
*
pow
(
k_
[
faceCelli
],
1
.
5
)
/
(
kappa_
*
y_
[
faceCelli
]
kappa_
.
value
()
*
y_
[
faceCelli
]
*
(
1
.
0
-
exp
(
-
Aepsilon_
.
value
()
*
yStar_
[
faceCelli
]))
)
*
exp
(
-
Amu_
.
value
()
*
sqr
(
yStar_
[
faceCelli
]));
...
...
src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H
View file @
fb5f66ee
...
...
@@ -43,7 +43,7 @@
epsilon_
[
faceCelli
]
+=
Cmu75
*
pow
(
k_
[
faceCelli
],
1
.
5
)
/
(
kappa_
*
y_
[
faceCelli
]
kappa_
.
value
()
*
y_
[
faceCelli
]
*
(
1
.
0
-
exp
(
-
Aepsilon
*
yStar_
[
faceCelli
]))
)
*
exp
(
-
Amu
*
sqr
(
yStar_
[
faceCelli
]));
...
...
src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C
View file @
fb5f66ee
...
...
@@ -85,14 +85,24 @@ RASModel::RASModel
kappa_
(
subDict
(
"wallFunctionCoeffs"
).
lookupOrAddDefault
<
scalar
>
dimensioned
<
scalar
>::
lookupOrAddToDict
(
"kappa"
,
subDict
(
"wallFunctionCoeffs"
),
0
.
4187
)
),
E_
(
subDict
(
"wallFunctionCoeffs"
).
lookupOrAddDefault
<
scalar
>
(
"E"
,
9
.
0
)),
yPlusLam_
(
yPlusLam
(
kappa_
,
E_
)),
E_
(
dimensioned
<
scalar
>::
lookupOrAddToDict
(
"E"
,
subDict
(
"wallFunctionCoeffs"
),
9
.
0
)
),
yPlusLam_
(
yPlusLam
(
kappa_
.
value
(),
E_
.
value
())),
k0_
(
"k0"
,
dimVelocity
*
dimVelocity
,
SMALL
),
epsilon0_
(
"epsilon"
,
k0_
.
dimensions
()
/
dimTime
,
SMALL
),
...
...
@@ -168,14 +178,14 @@ bool RASModel::read()
lookup
(
"turbulence"
)
>>
turbulence_
;
coeffDict_
=
subDict
(
type
()
+
"Coeffs"
);
subDict
(
"wallFunctionCoeffs"
)
.
readIfPresent
<
scalar
>
(
"kappa"
,
kappa_
);
subDict
(
"wallFunctionCoeffs"
)
.
readIfPresent
<
scalar
>
(
"E"
,
E_
);
kappa_
.
readIfPresent
(
subDict
(
"wallFunctionCoeffs"
));
E_
.
readIfPresent
(
subDict
(
"wallFunctionCoeffs"
));
yPlusLam_
=
yPlusLam
(
kappa_
,
E_
);
yPlusLam_
=
yPlusLam
(
kappa_
.
value
(),
E_
.
value
()
);
readIfPresent
(
"k0"
,
k0_
);
readIfPresent
(
"epsilon0"
,
epsilon0_
);
readIfPresent
(
"epsilonSmall"
,
epsilonSmall_
);
k0_
.
readIfPresent
(
*
this
);
epsilon0_
.
readIfPresent
(
*
this
);
epsilonSmall_
.
readIfPresent
(
*
this
);
return
true
;
}
...
...
src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H
View file @
fb5f66ee
...
...
@@ -88,8 +88,8 @@ protected:
Switch
printCoeffs_
;
dictionary
coeffDict_
;
s
calar
kappa_
;
s
calar
E_
;
dimensionedS
calar
kappa_
;
dimensionedS
calar
E_
;
scalar
yPlusLam
(
const
scalar
kappa
,
const
scalar
E
);
scalar
yPlusLam_
;
...
...
@@ -213,13 +213,13 @@ public:
//- Return kappa for use in wall-functions
s
calar
kappa
()
const
dimensionedS
calar
kappa
()
const
{
return
kappa_
;
}
//- Return E for use in wall-functions
s
calar
E
()
const
dimensionedS
calar
E
()
const
{
return
E_
;
}
...
...
src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallFunctionsI.H
View file @
fb5f66ee
...
...
@@ -87,7 +87,7 @@ Description
omega_
[
faceCelli
]
+=
sqrt
(
k_
[
faceCelli
])
/
(
Cmu25
*
kappa_
*
y_
[
faceCelli
]);
/
(
Cmu25
*
kappa_
.
value
()
*
y_
[
faceCelli
]);
if
(
yPlus
>
yPlusLam_
)
{
...
...
@@ -95,7 +95,7 @@ Description
(
nutw
[
facei
]
+
nuw
[
facei
])
*
magFaceGradU
[
facei
]
*
Cmu25
*
sqrt
(
k_
[
faceCelli
])
/
(
kappa_
*
y_
[
faceCelli
]);
/
(
kappa_
.
value
()
*
y_
[
faceCelli
]);
}
}
}
...
...
src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H
View file @
fb5f66ee
...
...
@@ -55,7 +55,7 @@ Description
{
nutw
[
facei
]
=
nuw
[
facei
]
*
(
yPlus
*
kappa_
/
log
(
E_
*
yPlus
)
-
1
);
*
(
yPlus
*
kappa_
.
value
()
/
log
(
E_
.
value
()
*
yPlus
)
-
1
);
}
else
{
...
...
src/turbulenceModels/RAS/incompressible/wallFunctions/nonLinearWallFunctionsI.H
View file @
fb5f66ee
...
...
@@ -89,7 +89,7 @@ Description
epsilon_
[
faceCelli
]
+=
Cmu75
*
pow
(
k_
[
faceCelli
],
1
.
5
)
/
(
kappa_
*
y_
[
patchi
][
facei
]);
/
(
kappa_
.
value
()
*
y_
[
patchi
][
facei
]);
if
(
yPlus
>
yPlusLam_
)
{
...
...
@@ -97,7 +97,7 @@ Description
(
nutw
[
facei
]
+
nuw
[
facei
])
*
magFaceGradU
[
facei
]
*
Cmu25
*
sqrt
(
k_
[
faceCelli
])
/
(
kappa_
*
y_
[
patchi
][
facei
])
/
(
kappa_
.
value
()
*
y_
[
patchi
][
facei
])
-
(
nonlinearStress_
[
faceCelli
]
&&
gradU_
[
faceCelli
]);
}
}
...
...
src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C
View file @
fb5f66ee
...
...
@@ -123,8 +123,8 @@ void nutStandardRoughWallFunctionFvPatchScalarField::evaluate
const
RASModel
&
rasModel
=
db
().
lookupObject
<
RASModel
>
(
"RASProperties"
);
const
scalar
kappa
=
rasModel
.
kappa
();
const
scalar
E
=
rasModel
.
E
();
const
scalar
kappa
=
rasModel
.
kappa
()
.
value
()
;
const
scalar
E
=
rasModel
.
E
()
.
value
()
;
const
scalar
yPlusLam
=
11
.
225
;
// The reciprical of the distance to the adjacent cell centre.
...
...
src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C
View file @
fb5f66ee
...
...
@@ -108,9 +108,9 @@ void nutStandardWallFunctionFvPatchScalarField::evaluate
const
RASModel
&
rasModel
=
db
().
lookupObject
<
RASModel
>
(
"RASProperties"
);
scalar
kappa
=
rasModel
.
kappa
();
scalar
E
=
rasModel
.
E
();
scalar
yPlusLam
=
rasModel
.
E
();
scalar
kappa
=
rasModel
.
kappa
()
.
value
()
;
scalar
E
=
rasModel
.
E
()
.
value
()
;
scalar
yPlusLam
=
rasModel
.
E
()
.
value
()
;
const
scalarField
&
ry
=
patch
().
deltaCoeffs
();
...
...
src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
View file @
fb5f66ee
...
...
@@ -100,8 +100,8 @@ void nutWallFunctionFvPatchScalarField::evaluate(const Pstream::commsTypes)
const
RASModel
&
rasModel
=
db
().
lookupObject
<
RASModel
>
(
"RASProperties"
);
scalar
kappa
=
rasModel
.
kappa
();
scalar
E
=
rasModel
.
E
();
scalar
kappa
=
rasModel
.
kappa
()
.
value
()
;
scalar
E
=
rasModel
.
E
()
.
value
()
;
const
scalarField
&
ry
=
patch
().
deltaCoeffs
();
...
...
src/turbulenceModels/RAS/incompressible/wallFunctions/wallFunctionsI.H
View file @
fb5f66ee
...
...
@@ -88,7 +88,7 @@ Description
epsilon_
[
faceCelli
]
+=
Cmu75
*
pow
(
k_
[
faceCelli
],
1
.
5
)
/
(
kappa_
*
RASModel
::
y_
[
patchi
][
facei
]);
/
(
kappa_
.
value
()
*
RASModel
::
y_
[
patchi
][
facei
]);
if
(
yPlus
>
yPlusLam_
)
{
...
...
@@ -96,7 +96,7 @@ Description
(
nutw
[
facei
]
+
nuw
[
facei
])
*
magFaceGradU
[
facei
]
*
Cmu25
*
sqrt
(
k_
[
faceCelli
])
/
(
kappa_
*
RASModel
::
y_
[
patchi
][
facei
]);
/
(
kappa_
.
value
()
*
RASModel
::
y_
[
patchi
][
facei
]);
}
}
}
...
...
src/turbulenceModels/RAS/incompressible/wallFunctions/wallNonlinearViscosityI.H
View file @
fb5f66ee
...
...
@@ -55,7 +55,7 @@ Description
if
(
yPlus
>
yPlusLam_
)
{
nutw
[
facei
]
=
nuw
[
facei
]
*
(
yPlus
*
kappa_
/
log
(
E_
*
yPlus
)
-
1
);
*
(
yPlus
*
kappa_
.
value
()
/
log
(
E_
.
value
()
*
yPlus
)
-
1
);
}
else
{
...
...
src/turbulenceModels/RAS/incompressible/wallFunctions/wallViscosityI.H
View file @
fb5f66ee
...
...
@@ -55,7 +55,7 @@ Description
{
nutw
[
facei
]
=
nuw
[
facei
]
*
(
yPlus
*
kappa_
/
log
(
E_
*
yPlus
)
-
1
);
*
(
yPlus
*
kappa_
.
value
()
/
log
(
E_
.
value
()
*
yPlus
)
-
1
);
}
else
{
...
...
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