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
1f42aad4
Commit
1f42aad4
authored
Oct 19, 2011
by
Sergio Ferraris
Browse files
BUG: Changing min(z0, 0.001) to max(zo, 0.001)
parent
f76cbf52
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
View file @
1f42aad4
...
...
@@ -86,7 +86,7 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
z_
(
dict
.
lookup
(
"z"
)),
z0_
(
readScalar
(
dict
.
lookup
(
"z0"
))),
kappa_
(
dict
.
lookupOrDefault
<
scalar
>
(
"kappa"
,
0
.
41
)),
zGround_
(
readScalar
(
dict
.
lookup
(
"zGround"
)
))
zGround_
(
"zGround"
,
dict
,
p
.
size
(
))
{
if
(
mag
(
z_
)
<
SMALL
)
{
...
...
src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H
View file @
1f42aad4
...
...
@@ -90,7 +90,7 @@ class atmBoundaryLayerInletEpsilonFvPatchScalarField
const
scalar
kappa_
;
//- Minimum corrdinate value in z direction
const
scalar
zGround_
;
const
scalar
Field
zGround_
;
public:
...
...
src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
View file @
1f42aad4
...
...
@@ -115,7 +115,7 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
n_
/=
mag
(
n_
);
z_
/=
mag
(
z_
);
Ustar_
=
kappa_
*
Uref_
/
(
log
((
Href_
+
z0_
)
/
m
in
(
z0_
,
0
.
001
)));
Ustar_
=
kappa_
*
Uref_
/
(
log
((
Href_
+
z0_
)
/
m
ax
(
z0_
,
0
.
001
)));
evaluate
();
}
...
...
@@ -150,9 +150,11 @@ void atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs()
forAll
(
coord
,
i
)
{
if
((
coord
[
i
]
-
zGround_
)
<
Href_
)
if
((
coord
[
i
]
-
zGround_
[
i
]
)
<
Href_
)
{
Un
[
i
]
=
(
Ustar_
/
kappa_
)
*
log
((
coord
[
i
]
-
zGround_
+
z0_
)
/
z0_
);
Un
[
i
]
=
(
Ustar_
/
kappa_
)
*
log
((
coord
[
i
]
-
zGround_
[
i
]
+
z0_
)
/
max
(
z0_
,
0
.
001
));
}
else
{
...
...
@@ -181,8 +183,7 @@ void atmBoundaryLayerInletVelocityFvPatchVectorField::write(Ostream& os) const
<<
Uref_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"Href"
)
<<
Href_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"zGround"
)
<<
zGround_
<<
token
::
END_STATEMENT
<<
nl
;
zGround_
.
writeEntry
(
"zGround"
,
os
)
;
writeEntry
(
"value"
,
os
);
}
...
...
src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H
View file @
1f42aad4
...
...
@@ -113,7 +113,7 @@ class atmBoundaryLayerInletVelocityFvPatchVectorField
const
scalar
Href_
;
//- Minimum corrdinate value in z direction
const
scalar
zGround_
;
const
scalar
Field
zGround_
;
public:
...
...
tutorials/incompressible/windSimpleFoam/turbineSiting/0/include/ABLConditions
View file @
1f42aad4
...
...
@@ -13,5 +13,5 @@ z0 0.1;
turbulentKE 1.3;
windDirection (1 0 0);
zDirection (0 0 1);
zGround 935.0;
zGround
uniform
935.0;
// ************************************************************************* //
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