mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: heatTransferCoeff: add optional Nusselt number functionality
DOC: heatTransferCoeff models: complete remaining header docs
STYLE: heatTransferCoeff models: use auto specifier when appropriate
Optionally, the Nusselt number (i.e. the ratio of convective to conductive
heat transfer at a boundary in a fluid) can be output:
```math
Nu = \frac{h L}{\kappa}
```
where
```
Nu | Nusselt number
h | Convective heat transfer coefficient of the flow
L | Characteristic length that defines the scale of the physical system
\kappa | Thermal conductivity of the fluid
```
This commit is contained in:
@ -45,10 +45,12 @@ namespace functionObjects
|
|||||||
|
|
||||||
bool Foam::functionObjects::heatTransferCoeff::calc()
|
bool Foam::functionObjects::heatTransferCoeff::calc()
|
||||||
{
|
{
|
||||||
volScalarField& htc = mesh_.lookupObjectRef<volScalarField>(resultName_);
|
auto& htc = mesh_.lookupObjectRef<volScalarField>(resultName_);
|
||||||
|
|
||||||
htcModelPtr_->calc(htc, htcModelPtr_->q());
|
htcModelPtr_->calc(htc, htcModelPtr_->q());
|
||||||
|
|
||||||
|
htc *= L_/kappa_;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,13 +65,15 @@ Foam::functionObjects::heatTransferCoeff::heatTransferCoeff
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fieldExpression(name, runTime, dict),
|
fieldExpression(name, runTime, dict),
|
||||||
|
L_(1),
|
||||||
|
kappa_(1),
|
||||||
htcModelPtr_(nullptr)
|
htcModelPtr_(nullptr)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
|
|
||||||
setResultName(typeName, name + ":htc:" + htcModelPtr_->type());
|
setResultName(typeName, name + ":htc:" + htcModelPtr_->type());
|
||||||
|
|
||||||
volScalarField* heatTransferCoeffPtr =
|
auto* heatTransferCoeffPtr =
|
||||||
new volScalarField
|
new volScalarField
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -92,8 +96,14 @@ Foam::functionObjects::heatTransferCoeff::heatTransferCoeff
|
|||||||
|
|
||||||
bool Foam::functionObjects::heatTransferCoeff::read(const dictionary& dict)
|
bool Foam::functionObjects::heatTransferCoeff::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
if (fieldExpression::read(dict))
|
if (!fieldExpression::read(dict))
|
||||||
{
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
L_ = dict.getCheckOrDefault<scalar>("L", 1, scalarMinMax::ge(0));
|
||||||
|
kappa_ =
|
||||||
|
dict.getCheckOrDefault<scalar>("kappa", 1, scalarMinMax::ge(SMALL));
|
||||||
htcModelPtr_ = heatTransferCoeffModel::New(dict, mesh_, fieldName_);
|
htcModelPtr_ = heatTransferCoeffModel::New(dict, mesh_, fieldName_);
|
||||||
|
|
||||||
htcModelPtr_->read(dict);
|
htcModelPtr_->read(dict);
|
||||||
@ -101,8 +111,5 @@ bool Foam::functionObjects::heatTransferCoeff::read(const dictionary& dict)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -30,11 +30,23 @@ Group
|
|||||||
grpFieldFunctionObjects
|
grpFieldFunctionObjects
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Computes the heat transfer coefficient as a \c volScalarField
|
Computes the heat transfer coefficient [W/(m2 K)]
|
||||||
for a set of patches.
|
as a \c volScalarField for a given set of patches.
|
||||||
|
|
||||||
The field is stored on the mesh database so that it can be retrieved and
|
Optionally, the Nusselt number (i.e. the ratio of convective
|
||||||
used for other applications.
|
to conductive heat transfer at a boundary in a fluid) can be output:
|
||||||
|
|
||||||
|
\f[
|
||||||
|
Nu = \frac{h L}{\kappa}
|
||||||
|
\f]
|
||||||
|
|
||||||
|
where
|
||||||
|
\vartable
|
||||||
|
Nu | Nusselt number
|
||||||
|
h | Convective heat transfer coefficient of the flow
|
||||||
|
L | Characteristic length that defines the scale of the physical system
|
||||||
|
\kappa | Thermal conductivity of the fluid
|
||||||
|
\endvartable
|
||||||
|
|
||||||
Operands:
|
Operands:
|
||||||
\table
|
\table
|
||||||
@ -53,79 +65,44 @@ Usage
|
|||||||
type heatTransferCoeff;
|
type heatTransferCoeff;
|
||||||
libs (fieldFunctionObjects);
|
libs (fieldFunctionObjects);
|
||||||
|
|
||||||
field T;
|
// Mandatory (inherited) entries (runtime modifiable)
|
||||||
patches ("walls.*");
|
field <field>;
|
||||||
|
patches (<patch1> <patch2> ... <patchN>);
|
||||||
|
htcModel <htcModel>;
|
||||||
|
|
||||||
htcModel ReynoldsAnalogy;
|
// Optional entries (runtime modifable)
|
||||||
UInf (20 0 0);
|
qr <qrName>;
|
||||||
Cp CpInf;
|
L 1.0;
|
||||||
CpInf 1000;
|
kappa 1.0;
|
||||||
rho rhoInf;
|
|
||||||
rhoInf 1.2;
|
// Conditional mandatory and optional
|
||||||
|
// entries based on selected <htcModel> (runtime modifiable)
|
||||||
|
...
|
||||||
|
|
||||||
|
// Optional (inherited) entries
|
||||||
|
...
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Example usage for mode \c ReynoldsAnalogy for incompressible case:
|
where the entries mean:
|
||||||
\verbatim
|
\table
|
||||||
heatTransferCoeff1
|
Property | Description | Type | Reqd | Dflt
|
||||||
{
|
type | Type name: heatTransferCoeff | word | yes | -
|
||||||
// Mandatory entries (unmodifiable)
|
libs | Library name: fieldFunctionObjects | word | yes | -
|
||||||
type heatTransferCoeff;
|
field | Name of the operand field | word | yes | -
|
||||||
libs (fieldFunctionObjects);
|
patches | Names of operand patches | wordRes | yes | -
|
||||||
|
htcModel | Heat transfer coefficient model <!--
|
||||||
|
--> - see below | word | yes | -
|
||||||
|
qr | Name of radiative heat flux | word | no | qr
|
||||||
|
L | Characteristic length that defines <!--
|
||||||
|
--> the scale of the physical system | scalar | no | 1
|
||||||
|
kappa | Thermal conductivity of fluid | scalar | no | 1
|
||||||
|
\endtable
|
||||||
|
|
||||||
field T;
|
The inherited entries are elaborated in:
|
||||||
patches ("walls.*");
|
- \link functionObject.H \endlink
|
||||||
|
- \link fieldExpression.H \endlink
|
||||||
htcModel ReynoldsAnalogy;
|
- \link heatTransferCoeffModel.H \endlink
|
||||||
UInf (20 0 0);
|
|
||||||
Cp CpInf;
|
|
||||||
CpInf 1000;
|
|
||||||
rho rhoInf;
|
|
||||||
rhoInf 1.2;
|
|
||||||
}
|
|
||||||
\endverbatim
|
|
||||||
|
|
||||||
Example usage for mode \c ReynoldsAnalogy for compressible case:
|
|
||||||
\verbatim
|
|
||||||
htc
|
|
||||||
{
|
|
||||||
type heatTransferCoeff;
|
|
||||||
libs (fieldFunctionObjects);
|
|
||||||
|
|
||||||
field T;
|
|
||||||
patches ("walls.*");
|
|
||||||
|
|
||||||
htcModel ReynoldsAnalogy;
|
|
||||||
UInf (20 0 0);
|
|
||||||
}
|
|
||||||
\endverbatim
|
|
||||||
|
|
||||||
Example usage for mode \c localReferenceTemperature for compressible case:
|
|
||||||
\verbatim
|
|
||||||
htc
|
|
||||||
{
|
|
||||||
type heatTransferCoeff;
|
|
||||||
libs (fieldFunctionObjects);
|
|
||||||
|
|
||||||
field T;
|
|
||||||
patches ("walls.*");
|
|
||||||
htcModel localReferenceTemperature;
|
|
||||||
}
|
|
||||||
\endverbatim
|
|
||||||
|
|
||||||
Example usage for mode \c fixedReferenceTemperature for compressible case:
|
|
||||||
\verbatim
|
|
||||||
htc
|
|
||||||
{
|
|
||||||
type heatTransferCoeff;
|
|
||||||
libs (fieldFunctionObjects);
|
|
||||||
|
|
||||||
field T;
|
|
||||||
patches ("walls.*");
|
|
||||||
htcModel fixedReferenceTemperature;
|
|
||||||
TRef 300;
|
|
||||||
}
|
|
||||||
\endverbatim
|
|
||||||
|
|
||||||
Options for the \c htcModel entry:
|
Options for the \c htcModel entry:
|
||||||
\verbatim
|
\verbatim
|
||||||
@ -134,10 +111,6 @@ Usage
|
|||||||
fixedReferenceTemperature | Specified reference temperature
|
fixedReferenceTemperature | Specified reference temperature
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
The inherited entries are elaborated in:
|
|
||||||
- \link functionObject.H \endlink
|
|
||||||
- \link fieldExpression.H \endlink
|
|
||||||
|
|
||||||
Usage by the \c postProcess utility is not available.
|
Usage by the \c postProcess utility is not available.
|
||||||
|
|
||||||
See also
|
See also
|
||||||
@ -145,6 +118,7 @@ See also
|
|||||||
- Foam::functionObjects::fieldExpression
|
- Foam::functionObjects::fieldExpression
|
||||||
- Foam::heatTransferCoeffModels::fixedReferenceTemperature
|
- Foam::heatTransferCoeffModels::fixedReferenceTemperature
|
||||||
- Foam::heatTransferCoeffModels::localReferenceTemperature
|
- Foam::heatTransferCoeffModels::localReferenceTemperature
|
||||||
|
- Foam::heatTransferCoeffModels::ReynoldsAnalogy
|
||||||
- ExtendedCodeGuide::functionObjects::field::heatTransferCoeff
|
- ExtendedCodeGuide::functionObjects::field::heatTransferCoeff
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
@ -178,6 +152,12 @@ class heatTransferCoeff
|
|||||||
{
|
{
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
|
//- Characteristic length that defines the scale of the physical system
|
||||||
|
scalar L_;
|
||||||
|
|
||||||
|
//- Thermal conductivity of the fluid
|
||||||
|
scalar kappa_;
|
||||||
|
|
||||||
//- Heat transfer coefficient model
|
//- Heat transfer coefficient model
|
||||||
autoPtr<heatTransferCoeffModel> htcModelPtr_;
|
autoPtr<heatTransferCoeffModel> htcModelPtr_;
|
||||||
|
|
||||||
@ -197,6 +177,9 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
//- No default construct
|
||||||
|
heatTransferCoeff() = delete;
|
||||||
|
|
||||||
//- Construct for given objectRegistry and dictionary.
|
//- Construct for given objectRegistry and dictionary.
|
||||||
// Allow the possibility to load fields from files
|
// Allow the possibility to load fields from files
|
||||||
heatTransferCoeff
|
heatTransferCoeff
|
||||||
|
|||||||
@ -60,8 +60,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::rho(const label patchi) const
|
|||||||
}
|
}
|
||||||
else if (mesh_.foundObject<volScalarField>(rhoName_, false))
|
else if (mesh_.foundObject<volScalarField>(rhoName_, false))
|
||||||
{
|
{
|
||||||
const volScalarField& rho =
|
const auto& rho = mesh_.lookupObject<volScalarField>(rhoName_);
|
||||||
mesh_.lookupObject<volScalarField>(rhoName_);
|
|
||||||
return rho.boundaryField()[patchi];
|
return rho.boundaryField()[patchi];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +82,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cp(const label patchi) const
|
|||||||
}
|
}
|
||||||
else if (mesh_.foundObject<fluidThermo>(fluidThermo::dictName))
|
else if (mesh_.foundObject<fluidThermo>(fluidThermo::dictName))
|
||||||
{
|
{
|
||||||
const fluidThermo& thermo =
|
const auto& thermo =
|
||||||
mesh_.lookupObject<fluidThermo>(fluidThermo::dictName);
|
mesh_.lookupObject<fluidThermo>(fluidThermo::dictName);
|
||||||
|
|
||||||
const scalarField& pp = thermo.p().boundaryField()[patchi];
|
const scalarField& pp = thermo.p().boundaryField()[patchi];
|
||||||
@ -108,7 +107,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::devReff() const
|
|||||||
|
|
||||||
if (mesh_.foundObject<cmpTurbModel>(cmpTurbModel::propertiesName))
|
if (mesh_.foundObject<cmpTurbModel>(cmpTurbModel::propertiesName))
|
||||||
{
|
{
|
||||||
const cmpTurbModel& turb =
|
const auto& turb =
|
||||||
mesh_.lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName);
|
mesh_.lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName);
|
||||||
|
|
||||||
return turb.devRhoReff()/turb.rho();
|
return turb.devRhoReff()/turb.rho();
|
||||||
@ -122,30 +121,30 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::devReff() const
|
|||||||
}
|
}
|
||||||
else if (mesh_.foundObject<fluidThermo>(fluidThermo::dictName))
|
else if (mesh_.foundObject<fluidThermo>(fluidThermo::dictName))
|
||||||
{
|
{
|
||||||
const fluidThermo& thermo =
|
const auto& thermo =
|
||||||
mesh_.lookupObject<fluidThermo>(fluidThermo::dictName);
|
mesh_.lookupObject<fluidThermo>(fluidThermo::dictName);
|
||||||
|
|
||||||
const volVectorField& U = mesh_.lookupObject<volVectorField>(UName_);
|
const auto& U = mesh_.lookupObject<volVectorField>(UName_);
|
||||||
|
|
||||||
return -thermo.nu()*dev(twoSymm(fvc::grad(U)));
|
return -thermo.nu()*dev(twoSymm(fvc::grad(U)));
|
||||||
}
|
}
|
||||||
else if (mesh_.foundObject<transportModel>("transportProperties"))
|
else if (mesh_.foundObject<transportModel>("transportProperties"))
|
||||||
{
|
{
|
||||||
const transportModel& laminarT =
|
const auto& laminarT =
|
||||||
mesh_.lookupObject<transportModel>("transportProperties");
|
mesh_.lookupObject<transportModel>("transportProperties");
|
||||||
|
|
||||||
const volVectorField& U = mesh_.lookupObject<volVectorField>(UName_);
|
const auto& U = mesh_.lookupObject<volVectorField>(UName_);
|
||||||
|
|
||||||
return -laminarT.nu()*dev(twoSymm(fvc::grad(U)));
|
return -laminarT.nu()*dev(twoSymm(fvc::grad(U)));
|
||||||
}
|
}
|
||||||
else if (mesh_.foundObject<dictionary>("transportProperties"))
|
else if (mesh_.foundObject<dictionary>("transportProperties"))
|
||||||
{
|
{
|
||||||
const dictionary& transportProperties =
|
const auto& transportProperties =
|
||||||
mesh_.lookupObject<dictionary>("transportProperties");
|
mesh_.lookupObject<dictionary>("transportProperties");
|
||||||
|
|
||||||
dimensionedScalar nu("nu", dimViscosity, transportProperties);
|
const dimensionedScalar nu("nu", dimViscosity, transportProperties);
|
||||||
|
|
||||||
const volVectorField& U = mesh_.lookupObject<volVectorField>(UName_);
|
const auto& U = mesh_.lookupObject<volVectorField>(UName_);
|
||||||
|
|
||||||
return -nu*dev(twoSymm(fvc::grad(U)));
|
return -nu*dev(twoSymm(fvc::grad(U)));
|
||||||
}
|
}
|
||||||
@ -161,7 +160,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::devReff() const
|
|||||||
Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar>>
|
Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar>>
|
||||||
Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cf() const
|
Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cf() const
|
||||||
{
|
{
|
||||||
const volVectorField& U = mesh_.lookupObject<volVectorField>(UName_);
|
const auto& U = mesh_.lookupObject<volVectorField>(UName_);
|
||||||
const volVectorField::Boundary& Ubf = U.boundaryField();
|
const volVectorField::Boundary& Ubf = U.boundaryField();
|
||||||
|
|
||||||
auto tCf = tmp<FieldField<Field, scalar>>::New(Ubf.size());
|
auto tCf = tmp<FieldField<Field, scalar>>::New(Ubf.size());
|
||||||
@ -205,9 +204,9 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::ReynoldsAnalogy
|
|||||||
UName_("U"),
|
UName_("U"),
|
||||||
URef_(Zero),
|
URef_(Zero),
|
||||||
rhoName_("rho"),
|
rhoName_("rho"),
|
||||||
rhoRef_(0.0),
|
rhoRef_(0),
|
||||||
CpName_("Cp"),
|
CpName_("Cp"),
|
||||||
CpRef_(0.0)
|
CpRef_(0)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,10 +27,11 @@ Class
|
|||||||
Foam::heatTransferCoeffModels::ReynoldsAnalogy
|
Foam::heatTransferCoeffModels::ReynoldsAnalogy
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Heat transfer coefficient calculation based on Reynolds Analogy
|
Heat transfer coefficient calculation based on Reynolds Analogy,
|
||||||
|
which is used to relate turbulent momentum and heat transfer.
|
||||||
|
|
||||||
The heat transfer coefficient is derived from the skin friction
|
The heat transfer coefficient is derived
|
||||||
coefficient:
|
from the skin friction coefficient:
|
||||||
|
|
||||||
\f[
|
\f[
|
||||||
C_f = \frac{\tau_w}{0.5 \rho_\infty |U|^2}
|
C_f = \frac{\tau_w}{0.5 \rho_\infty |U|^2}
|
||||||
@ -39,42 +40,66 @@ Description
|
|||||||
as:
|
as:
|
||||||
|
|
||||||
\f[
|
\f[
|
||||||
h = 0.5 \rho_\infty C_{p,\infty} |U_{\infty}| C_f
|
h = 0.5 \rho_\infty c_{p,\infty} |U_{\infty}| C_f
|
||||||
\f]
|
\f]
|
||||||
|
|
||||||
|
where
|
||||||
|
\vartable
|
||||||
|
h | Convective heat transfer coefficient of the flow
|
||||||
|
\rho_\infty | Reference fluid density
|
||||||
|
c_{p,\infty} | Reference specific heat capacity at constant pressure
|
||||||
|
U_{\infty} | Reference velocity
|
||||||
|
C_f | Skin friction coefficient
|
||||||
|
\tau_w | Wall shear stress
|
||||||
|
\endvartable
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
Example of function object specification:
|
Minimal example by using \c system/controlDict.functions:
|
||||||
\verbatim
|
\verbatim
|
||||||
type heatTransferCoeff;
|
heatTransferCoeff1
|
||||||
libs (fieldFunctionObjects);
|
{
|
||||||
|
// Mandatory and other optional entries
|
||||||
...
|
...
|
||||||
htcModel ReynoldsAnalogy;
|
htcModel ReynoldsAnalogy;
|
||||||
UInf (20 0 0);
|
|
||||||
Cp CpInf;
|
// Conditional mandatory entries (runtime modifiable)
|
||||||
|
UInf (10 0 0);
|
||||||
|
|
||||||
|
// Conditional optional entries (runtime modifiable)
|
||||||
|
Cp <CpName>;
|
||||||
|
rho <rhoName>;
|
||||||
|
|
||||||
|
// mandatory if Cp == CpInf
|
||||||
CpInf 1005;
|
CpInf 1005;
|
||||||
...
|
|
||||||
|
// mandatory if rho == rhoInf
|
||||||
|
rhoInf 1;
|
||||||
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the entries comprise:
|
where the entries mean:
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Type | Reqd | Dflt
|
||||||
type | type name: heatTransferCoeff | yes |
|
type | Model name: ReynoldsAnalogy | word | yes | -
|
||||||
htcModel | selected htc model | yes |
|
UInf | Reference velocity | scalar | yes | -
|
||||||
UInf | reference velocity | yes |
|
Cp | Name of reference specific heat capacity | word | no | Cp
|
||||||
Cp | specific heat capacity field name | no |
|
CpInf | Reference specific heat capacity value | scalar | cndtnl | -
|
||||||
rho | density field name | no |
|
rho | Name of reference fluid density | word | no | rho
|
||||||
|
rhoInf | Reference fluid density value | scalar | cndtnl | -
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Note:
|
Note
|
||||||
- to use a reference \c Cp, set \c Cp to \c CpInf
|
- to use a reference \c Cp, set \c Cp to \c CpInf
|
||||||
- to use a reference \c rho, set \c rho to \c rhoInf
|
- to use a reference \c rho, set \c rho to \c rhoInf
|
||||||
|
|
||||||
|
See also
|
||||||
|
- Foam::heatTransferCoeffModel
|
||||||
|
- Foam::heatTransferCoeffModels::fixedReferenceTemperature
|
||||||
|
- Foam::heatTransferCoeffModels::localReferenceTemperature
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
ReynoldsAnalogy.C
|
ReynoldsAnalogy.C
|
||||||
|
|
||||||
SeeAlso
|
|
||||||
Foam::heatTransferCoeffModel
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef heatTransferCoeffModels_ReynoldsAnalogy_H
|
#ifndef heatTransferCoeffModels_ReynoldsAnalogy_H
|
||||||
@ -138,13 +163,6 @@ protected:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- No copy construct
|
|
||||||
ReynoldsAnalogy(const ReynoldsAnalogy&) = delete;
|
|
||||||
|
|
||||||
//- No copy assignment
|
|
||||||
void operator=(const ReynoldsAnalogy&) = delete;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
@ -161,6 +179,12 @@ public:
|
|||||||
const word& TName
|
const word& TName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- No copy construct
|
||||||
|
ReynoldsAnalogy(const ReynoldsAnalogy&) = delete;
|
||||||
|
|
||||||
|
//- No copy assignment
|
||||||
|
void operator=(const ReynoldsAnalogy&) = delete;
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~ReynoldsAnalogy() = default;
|
virtual ~ReynoldsAnalogy() = default;
|
||||||
|
|||||||
@ -85,8 +85,7 @@ void Foam::heatTransferCoeffModels::fixedReferenceTemperature::htc
|
|||||||
const FieldField<Field, scalar>& q
|
const FieldField<Field, scalar>& q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//const FieldField<Field, scalar> qBf(q());
|
const auto& T = mesh_.lookupObject<volScalarField>(TName_);
|
||||||
const volScalarField& T = mesh_.lookupObject<volScalarField>(TName_);
|
|
||||||
const volScalarField::Boundary& Tbf = T.boundaryField();
|
const volScalarField::Boundary& Tbf = T.boundaryField();
|
||||||
const scalar eps = ROOTVSMALL;
|
const scalar eps = ROOTVSMALL;
|
||||||
|
|
||||||
|
|||||||
@ -27,8 +27,8 @@ Class
|
|||||||
Foam::heatTransferCoeffModels::fixedReferenceTemperature
|
Foam::heatTransferCoeffModels::fixedReferenceTemperature
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Heat transfer coefficient calculation that employs a fixed reference
|
Heat transfer coefficient calculation
|
||||||
temperature
|
that employs a fixed reference temperature.
|
||||||
|
|
||||||
The heat transfer coefficient is specified by:
|
The heat transfer coefficient is specified by:
|
||||||
|
|
||||||
@ -36,31 +36,43 @@ Description
|
|||||||
h = \frac{q}{T_{ref} - T_w}
|
h = \frac{q}{T_{ref} - T_w}
|
||||||
\f]
|
\f]
|
||||||
|
|
||||||
|
where
|
||||||
|
\vartable
|
||||||
|
h | Convective heat transfer coefficient of the flow [W/(m2 K)]
|
||||||
|
q | Heat flux [W/m2]
|
||||||
|
T_{ref} | Reference temperature of surrounding fluid [K]
|
||||||
|
T_w | Patch temperature [K]
|
||||||
|
\endvartable
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
Example of function object specification:
|
Minimal example by using \c system/controlDict.functions:
|
||||||
\verbatim
|
\verbatim
|
||||||
type heatTransferCoeff;
|
heatTransferCoeff1
|
||||||
libs (fieldFunctionObjects);
|
{
|
||||||
|
// Mandatory and other optional entries
|
||||||
...
|
...
|
||||||
htcModel fixedReferenceTemperature;
|
htcModel fixedReferenceTemperature;
|
||||||
TRef 300;
|
|
||||||
...
|
// Conditional mandatory entries (runtime modifiable)
|
||||||
|
Tref 0;
|
||||||
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the entries comprise:
|
where the entries mean:
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Type | Reqd | Dflt
|
||||||
type | type name: heatTransferCoeff | yes |
|
type | Model name: fixedReferenceTemperature | word | yes | -
|
||||||
htcModel | selected htc model | yes |
|
Tref | Reference temperature of surrounding fluid | scalar | yes | -
|
||||||
TRef | reference temperature | yes |
|
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
|
See also
|
||||||
|
- Foam::heatTransferCoeffModel
|
||||||
|
- Foam::heatTransferCoeffModels::localReferenceTemperature
|
||||||
|
- Foam::heatTransferCoeffModels::ReynoldsAnalogy
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fixedReferenceTemperature.C
|
fixedReferenceTemperature.C
|
||||||
|
|
||||||
SeeAlso
|
|
||||||
Foam::heatTransferCoeffModel
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef heatTransferCoeffModels_fixedReferenceTemperature_H
|
#ifndef heatTransferCoeffModels_fixedReferenceTemperature_H
|
||||||
@ -100,12 +112,6 @@ protected:
|
|||||||
const FieldField<Field, scalar>& q
|
const FieldField<Field, scalar>& q
|
||||||
);
|
);
|
||||||
|
|
||||||
//- No copy construct
|
|
||||||
fixedReferenceTemperature(const fixedReferenceTemperature&) = delete;
|
|
||||||
|
|
||||||
//- No copy assignment
|
|
||||||
void operator=(const fixedReferenceTemperature&) = delete;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -123,6 +129,12 @@ public:
|
|||||||
const word& TName
|
const word& TName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- No copy construct
|
||||||
|
fixedReferenceTemperature(const fixedReferenceTemperature&) = delete;
|
||||||
|
|
||||||
|
//- No copy assignment
|
||||||
|
void operator=(const fixedReferenceTemperature&) = delete;
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~fixedReferenceTemperature() = default;
|
virtual ~fixedReferenceTemperature() = default;
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace Foam
|
|||||||
Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar>>
|
Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar>>
|
||||||
Foam::heatTransferCoeffModel::q() const
|
Foam::heatTransferCoeffModel::q() const
|
||||||
{
|
{
|
||||||
const volScalarField& T = mesh_.lookupObject<volScalarField>(TName_);
|
const auto& T = mesh_.lookupObject<volScalarField>(TName_);
|
||||||
const volScalarField::Boundary& Tbf = T.boundaryField();
|
const volScalarField::Boundary& Tbf = T.boundaryField();
|
||||||
|
|
||||||
auto tq = tmp<FieldField<Field, scalar>>::New(Tbf.size());
|
auto tq = tmp<FieldField<Field, scalar>>::New(Tbf.size());
|
||||||
@ -60,7 +60,7 @@ Foam::heatTransferCoeffModel::q() const
|
|||||||
|
|
||||||
if (mesh_.foundObject<cmpTurbModel>(cmpTurbModel::propertiesName))
|
if (mesh_.foundObject<cmpTurbModel>(cmpTurbModel::propertiesName))
|
||||||
{
|
{
|
||||||
const cmpTurbModel& turb =
|
const auto& turb =
|
||||||
mesh_.lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName);
|
mesh_.lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName);
|
||||||
|
|
||||||
const volScalarField& he = turb.transport().he();
|
const volScalarField& he = turb.transport().he();
|
||||||
@ -76,7 +76,7 @@ Foam::heatTransferCoeffModel::q() const
|
|||||||
}
|
}
|
||||||
else if (mesh_.foundObject<fluidThermo>(fluidThermo::dictName))
|
else if (mesh_.foundObject<fluidThermo>(fluidThermo::dictName))
|
||||||
{
|
{
|
||||||
const fluidThermo& thermo =
|
const auto& thermo =
|
||||||
mesh_.lookupObject<fluidThermo>(fluidThermo::dictName);
|
mesh_.lookupObject<fluidThermo>(fluidThermo::dictName);
|
||||||
|
|
||||||
const volScalarField& he = thermo.he();
|
const volScalarField& he = thermo.he();
|
||||||
@ -99,7 +99,7 @@ Foam::heatTransferCoeffModel::q() const
|
|||||||
|
|
||||||
// Add radiative heat flux contribution if present
|
// Add radiative heat flux contribution if present
|
||||||
|
|
||||||
const volScalarField* qrPtr = mesh_.cfindObject<volScalarField>(qrName_);
|
const auto* qrPtr = mesh_.cfindObject<volScalarField>(qrName_);
|
||||||
|
|
||||||
if (qrPtr)
|
if (qrPtr)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,9 +35,32 @@ Class
|
|||||||
Description
|
Description
|
||||||
An abstract base class for heat transfer coeffcient models.
|
An abstract base class for heat transfer coeffcient models.
|
||||||
|
|
||||||
|
Usage
|
||||||
|
Minimal example by using \c system/controlDict.functions:
|
||||||
|
\verbatim
|
||||||
|
heatTransferCoeff1
|
||||||
|
{
|
||||||
|
// Mandatory and other optional entries
|
||||||
|
...
|
||||||
|
|
||||||
|
// Mandatory (inherited) entries (runtime modifiable)
|
||||||
|
patches (<patch1> <patch2> ... <patchN>);
|
||||||
|
|
||||||
|
// Optional (inherited) entries (runtime modifiable)
|
||||||
|
qr <qrName>;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
where the entries mean:
|
||||||
|
\table
|
||||||
|
Property | Description | Type | Reqd | Dflt
|
||||||
|
patches | Names of operand patches | wordRes | yes | -
|
||||||
|
qr | Name of radiative heat flux | word | no | qr
|
||||||
|
\endtable
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
heatTransferCoeffModel.C
|
- heatTransferCoeffModel.C
|
||||||
heatTransferCoeffModelNew.C
|
- heatTransferCoeffModelNew.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -65,7 +88,7 @@ class heatTransferCoeffModel
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Public Data
|
// Protected Data
|
||||||
|
|
||||||
//- Mesh reference
|
//- Mesh reference
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
@ -76,12 +99,10 @@ protected:
|
|||||||
//- Temperature name
|
//- Temperature name
|
||||||
const word TName_;
|
const word TName_;
|
||||||
|
|
||||||
//- Name of radiative heat flux (default = qr)
|
//- Name of radiative heat flux
|
||||||
word qrName_;
|
word qrName_;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Set the heat transfer coefficient
|
//- Set the heat transfer coefficient
|
||||||
@ -91,12 +112,6 @@ protected:
|
|||||||
const FieldField<Field, scalar>& q
|
const FieldField<Field, scalar>& q
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
//- No copy construct
|
|
||||||
heatTransferCoeffModel(const heatTransferCoeffModel&) = delete;
|
|
||||||
|
|
||||||
//- No copy assignment
|
|
||||||
void operator=(const heatTransferCoeffModel&) = delete;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -141,6 +156,12 @@ public:
|
|||||||
const word& TName
|
const word& TName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- No copy construct
|
||||||
|
heatTransferCoeffModel(const heatTransferCoeffModel&) = delete;
|
||||||
|
|
||||||
|
//- No copy assignment
|
||||||
|
void operator=(const heatTransferCoeffModel&) = delete;
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~heatTransferCoeffModel() = default;
|
virtual ~heatTransferCoeffModel() = default;
|
||||||
@ -172,7 +193,6 @@ public:
|
|||||||
return qrName_;
|
return qrName_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Read from dictionary
|
//- Read from dictionary
|
||||||
virtual bool read(const dictionary& dict);
|
virtual bool read(const dictionary& dict);
|
||||||
|
|
||||||
|
|||||||
@ -78,8 +78,7 @@ void Foam::heatTransferCoeffModels::localReferenceTemperature::htc
|
|||||||
const FieldField<Field, scalar>& q
|
const FieldField<Field, scalar>& q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
///const FieldField<Field, scalar> qBf(q());
|
const auto& T = mesh_.lookupObject<volScalarField>(TName_);
|
||||||
const volScalarField& T = mesh_.lookupObject<volScalarField>(TName_);
|
|
||||||
const volScalarField::Boundary& Tbf = T.boundaryField();
|
const volScalarField::Boundary& Tbf = T.boundaryField();
|
||||||
const scalar eps = ROOTVSMALL;
|
const scalar eps = ROOTVSMALL;
|
||||||
|
|
||||||
|
|||||||
@ -27,8 +27,8 @@ Class
|
|||||||
Foam::heatTransferCoeffModels::localReferenceTemperature
|
Foam::heatTransferCoeffModels::localReferenceTemperature
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Heat transfer coefficient calculation that employs the patch internal
|
Heat transfer coefficient calculation that employs
|
||||||
field as the reference temperature
|
the patch internal field as the reference temperature.
|
||||||
|
|
||||||
The heat transfer coefficient is specified by:
|
The heat transfer coefficient is specified by:
|
||||||
|
|
||||||
@ -36,29 +36,39 @@ Description
|
|||||||
h = \frac{q}{T_c - T_w}
|
h = \frac{q}{T_c - T_w}
|
||||||
\f]
|
\f]
|
||||||
|
|
||||||
|
where
|
||||||
|
\vartable
|
||||||
|
h | Convective heat transfer coefficient of the flow [W/(m2 K)]
|
||||||
|
q | Heat flux [W/m2]
|
||||||
|
T_{ref} | Reference temperature of patch internal field [K]
|
||||||
|
T_w | Patch temperature [K]
|
||||||
|
\endvartable
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
Example of function object specification:
|
Minimal example by using \c system/controlDict.functions:
|
||||||
\verbatim
|
\verbatim
|
||||||
type heatTransferCoeff;
|
heatTransferCoeff1
|
||||||
libs (fieldFunctionObjects);
|
{
|
||||||
|
// Mandatory and other optional entries
|
||||||
...
|
...
|
||||||
htcModel localReferenceTemperature;
|
htcModel localReferenceTemperature;
|
||||||
...
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the entries comprise:
|
where the entries mean:
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Type | Reqd | Dflt
|
||||||
type | type name: heatTransferCoeff | yes |
|
type | Model name: localReferenceTemperature | word | yes | -
|
||||||
htcModel | selected htc model | yes |
|
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
|
See also
|
||||||
|
- Foam::heatTransferCoeffModel
|
||||||
|
- Foam::heatTransferCoeffModels::fixedReferenceTemperature
|
||||||
|
- Foam::heatTransferCoeffModels::ReynoldsAnalogy
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
localReferenceTemperature.C
|
localReferenceTemperature.C
|
||||||
|
|
||||||
SeeAlso
|
|
||||||
Foam::heatTransferCoeffModel
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef heatTransferCoeffModels_localReferenceTemperature_H
|
#ifndef heatTransferCoeffModels_localReferenceTemperature_H
|
||||||
|
|||||||
Reference in New Issue
Block a user