Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
eaf1e626
Commit
eaf1e626
authored
Mar 21, 2017
by
Henry Weller
Browse files
applyBoundaryLayer: Provide non-const access to nut, k and epsilon
parent
489ff68e
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C
View file @
eaf1e626
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
7
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
// Calculate nut - reference nut is calculated by the turbulence model
// on its construction
tmp
<
volScalarField
>
tnut
=
turbulence
->
nut
();
volScalarField
&
nut
=
tnut
.
ref
(
);
volScalarField
&
nut
=
const_cast
<
volScalarField
&>
(
tnut
()
);
volScalarField
S
(
mag
(
dev
(
symm
(
fvc
::
grad
(
U
)))));
nut
=
(
1
-
mask
)
*
nut
+
mask
*
sqr
(
kappa
*
min
(
y
,
ybl
))
*::
sqrt
(
2
)
*
S
;
...
...
@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
// Turbulence k
tmp
<
volScalarField
>
tk
=
turbulence
->
k
();
volScalarField
&
k
=
tk
.
ref
(
);
volScalarField
&
k
=
const_cast
<
volScalarField
&>
(
tk
()
);
scalar
ck0
=
pow025
(
Cmu
)
*
kappa
;
k
=
(
1
-
mask
)
*
k
+
mask
*
sqr
(
nut
/
(
ck0
*
min
(
y
,
ybl
)));
...
...
@@ -165,7 +165,7 @@ int main(int argc, char *argv[])
// Turbulence epsilon
tmp
<
volScalarField
>
tepsilon
=
turbulence
->
epsilon
();
volScalarField
&
epsilon
=
tepsilon
.
ref
();
volScalarField
&
epsilon
=
const_cast
<
volScalarField
&>
(
tepsilon
(
)
);
scalar
ce0
=
::
pow
(
Cmu
,
0
.
75
)
/
kappa
;
epsilon
=
(
1
-
mask
)
*
epsilon
+
mask
*
ce0
*
k
*
sqrt
(
k
)
/
min
(
y
,
ybl
);
...
...
src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.H
View file @
eaf1e626
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-201
6
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-201
7
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -102,13 +102,6 @@ public:
//- Re-read model coefficients if they have changed
virtual
bool
read
()
=
0
;
//- Return non-const access to the turbulence viscosity
// to allow modification by means other than derivation
volScalarField
&
evNut
()
{
return
nut_
;
}
//- Return the turbulence viscosity
virtual
tmp
<
volScalarField
>
nut
()
const
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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