Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
openfoam
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
352
Issues
352
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Development
openfoam
Commits
c49d9233
Commit
c49d9233
authored
Jun 23, 2020
by
Sergio Ferraris
Committed by
Mark Olesen
Jun 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG: Correcting htc definition to avoid negative values
parent
4248fdcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
...Mixed/externalCoupledTemperatureMixedFvPatchScalarField.C
+11
-2
No files found.
src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
View file @
c49d9233
...
...
@@ -280,9 +280,18 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
const
scalarField
Tfluid
(
tfluid
);
// Heat transfer coefficient [W/m2/K]
const
scalarField
htc
(
qDot
/
(
max
(
Twall
-
Tfluid
),
1e-3
));
// This htc needs to be always larger or equal to zero
//const scalarField htc(qDot/max(Twall - Tfluid, 1e-3));
scalarField
htc
(
qDot
.
size
(),
0
);
forAll
(
qDot
,
i
)
{
scalar
deltaT
=
mag
(
Twall
[
i
]
-
Tfluid
[
i
]);
if
(
deltaT
>
1e-3
)
{
htc
[
i
]
=
sign
(
qDot
[
i
])
*
qDot
[
i
]
/
deltaT
;
}
}
const
Field
<
scalar
>&
magSf
=
this
->
patch
().
magSf
();
...
...
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