Skip to content
GitLab
Menu
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
44f4e7c8
Commit
44f4e7c8
authored
Dec 19, 2012
by
andy
Browse files
ENH: Updated film Nusselt BC
parent
2199cbc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
View file @
44f4e7c8
...
...
@@ -115,8 +115,6 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
const
label
patchI
=
patch
().
index
();
const
scalar
t
=
db
().
time
().
timeOutputValue
();
// retrieve the film region from the database
const
regionModels
::
regionModel
&
region
=
...
...
@@ -133,7 +131,24 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
// calculate the vector tangential to the patch
const
vectorField
n
(
patch
().
nf
());
// note: normal pointing into the domain
const
vectorField
n
(
-
patch
().
nf
());
// TODO: currently re-evaluating the entire gTan field to return this patch
const
scalarField
gTan
(
film
.
gTan
()().
boundaryField
()[
patchI
]
&
n
);
if
(
max
(
mag
(
gTan
))
<
SMALL
)
{
WarningIn
(
"void Foam::inclinedFilmNusseltHeightFvPatchScalarField::"
"updateCoeffs()"
)
<<
"Tangential gravity component is zero. This boundary condition "
<<
"is designed to operate on patches inclined with respect to "
<<
"gravity"
<<
endl
;
}
const
volVectorField
&
nHat
=
film
.
nHat
();
...
...
@@ -149,6 +164,8 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
// calculate the wavy film height
const
scalar
t
=
db
().
time
().
timeOutputValue
();
const
scalar
GMean
=
GammaMean_
->
value
(
t
);
const
scalar
a
=
a_
->
value
(
t
);
const
scalar
omega
=
omega_
->
value
(
t
);
...
...
@@ -163,22 +180,6 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
const
scalarField
Re
(
max
(
G
,
scalar
(
0
.
0
))
/
mup
);
// TODO: currently re-evaluating the entire gTan field to return this patch
const
scalarField
gTan
(
film
.
gTan
()().
boundaryField
()[
patchI
]
&
n
);
if
(
max
(
mag
(
gTan
))
<
SMALL
)
{
WarningIn
(
"void Foam::inclinedFilmNusseltHeightFvPatchScalarField::"
"updateCoeffs()"
)
<<
"Tangential gravity component is zero. This boundary condition "
<<
"is designed to operate on patches inclined with respect to "
<<
"gravity"
<<
endl
;
}
operator
==
(
pow
(
3
.
0
*
sqr
(
mup
/
rhop
)
/
(
gTan
+
ROOTVSMALL
),
0
.
333
)
*
pow
(
Re
,
0
.
333
)
...
...
src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
View file @
44f4e7c8
...
...
@@ -115,8 +115,6 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
const
label
patchI
=
patch
().
index
();
const
scalar
t
=
db
().
time
().
timeOutputValue
();
// retrieve the film region from the database
const
regionModels
::
regionModel
&
region
=
...
...
@@ -132,8 +130,24 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
>
(
region
);
// calculate the vector tangential to the patch
// note: normal pointing into the domain
const
vectorField
n
(
-
patch
().
nf
());
// TODO: currently re-evaluating the entire gTan field to return this patch
const
scalarField
gTan
(
film
.
gTan
()().
boundaryField
()[
patchI
]
&
n
);
const
vectorField
n
(
patch
().
nf
());
if
(
max
(
mag
(
gTan
))
<
SMALL
)
{
WarningIn
(
"void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::"
"updateCoeffs()"
)
<<
"Tangential gravity component is zero. This boundary condition "
<<
"is designed to operate on patches inclined with respect to "
<<
"gravity"
<<
endl
;
}
const
volVectorField
&
nHat
=
film
.
nHat
();
...
...
@@ -149,6 +163,8 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
// calculate the wavy film height
const
scalar
t
=
db
().
time
().
timeOutputValue
();
const
scalar
GMean
=
GammaMean_
->
value
(
t
);
const
scalar
a
=
a_
->
value
(
t
);
const
scalar
omega
=
omega_
->
value
(
t
);
...
...
@@ -163,22 +179,6 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
const
scalarField
Re
(
max
(
G
,
scalar
(
0
.
0
))
/
mup
);
// TODO: currently re-evaluating the entire gTan field to return this patch
const
scalarField
gTan
(
film
.
gTan
()().
boundaryField
()[
patchI
]
&
n
);
if
(
max
(
mag
(
gTan
))
<
SMALL
)
{
WarningIn
(
"void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::"
"updateCoeffs()"
)
<<
"Tangential gravity component is zero. This boundary condition "
<<
"is designed to operate on patches inclined with respect to "
<<
"gravity"
<<
endl
;
}
operator
==
(
n
*
pow
(
gTan
*
mup
/
(
3
.
0
*
rhop
),
0
.
333
)
*
pow
(
Re
,
0
.
666
));
fixedValueFvPatchVectorField
::
updateCoeffs
();
...
...
Write
Preview
Supports
Markdown
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