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
94897015
Commit
94897015
authored
Dec 29, 2014
by
Henry
Browse files
externalWallHeatFluxTemperature: Combined logic into a single switch
parent
9c09fd4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
View file @
94897015
...
...
@@ -33,26 +33,27 @@ License
namespace
Foam
{
template
<>
const
char
*
NamedEnum
<
externalWallHeatFluxTemperatureFvPatchScalarField
::
operationMode
,
3
>::
names
[]
=
{
"fixed_heat_flux"
,
"fixed_heat_transfer_coefficient"
,
"unknown"
};
template
<>
const
char
*
NamedEnum
<
externalWallHeatFluxTemperatureFvPatchScalarField
::
operationMode
,
3
>::
names
[]
=
{
"fixed_heat_flux"
,
"fixed_heat_transfer_coefficient"
,
"unknown"
};
}
// End namespace Foam
const
NamedEnum
const
Foam
::
NamedEnum
<
externalWallHeatFluxTemperatureFvPatchScalarField
::
operationMode
,
3
>
externalWallHeatFluxTemperatureFvPatchScalarField
::
operationModeNames
;
Foam
::
externalWallHeatFluxTemperatureFvPatchScalarField
::
operationMode
,
3
>
Foam
::
externalWallHeatFluxTemperatureFvPatchScalarField
::
operationModeNames
;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
...
...
@@ -260,6 +261,10 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
{
case
fixedHeatFlux
:
{
refGrad
()
=
(
q_
+
Qr
)
/
kappa
(
Tp
);
refValue
()
=
0
.
0
;
valueFraction
()
=
0
.
0
;
break
;
}
case
fixedHeatTransferCoeff
:
...
...
@@ -277,6 +282,13 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
}
}
hp
=
1
.
0
/
(
1
.
0
/
h_
+
totalSolidRes
);
Qr
/=
Tp
;
refGrad
()
=
0
.
0
;
refValue
()
=
hp
*
Ta_
/
(
hp
-
Qr
);
valueFraction
()
=
(
hp
-
Qr
)
/
((
hp
-
Qr
)
+
kappa
(
Tp
)
*
patch
().
deltaCoeffs
());
break
;
}
default:
...
...
@@ -290,21 +302,6 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
}
}
if
(
mode_
==
fixedHeatFlux
)
{
refGrad
()
=
(
q_
+
Qr
)
/
kappa
(
Tp
);
refValue
()
=
0
.
0
;
valueFraction
()
=
0
.
0
;
}
else
if
(
mode_
==
fixedHeatTransferCoeff
)
{
Qr
/=
Tp
;
refGrad
()
=
0
.
0
;
refValue
()
=
hp
*
Ta_
/
(
hp
-
Qr
);
valueFraction
()
=
(
hp
-
Qr
)
/
((
hp
-
Qr
)
+
kappa
(
Tp
)
*
patch
().
deltaCoeffs
());
}
mixedFvPatchScalarField
::
updateCoeffs
();
if
(
debug
)
...
...
src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H
View file @
94897015
...
...
@@ -120,6 +120,7 @@ public:
fixedHeatTransferCoeff
,
unknown
};
static
const
NamedEnum
<
operationMode
,
3
>
operationModeNames
;
...
...
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