Rationalised thermal boundary condition class names and simplified user input

Renamed classes:

    turbulentTemperatureCoupledBaffleMixedFvPatchScalarField ->
        coupledTemperatureFvPatchScalarField

    externalWallHeatFluxTemperatureFvPatchScalarField ->
        externalTemperatureFvPatchScalarField

Radiation heat-flux support in turbulentTemperatureRadCoupledMixed transferred
to coupledTemperatureFvPatchScalarField and turbulentTemperatureRadCoupledMixed removed.

Renamed boundary condition type names in T field files:

    compressible::turbulentTemperatureCoupledBaffleMixed -> coupledTemperature

    compressible::turbulentTemperatureRadCoupledMixed -> coupledTemperature

    compressible::externalWallHeatFluxTemperature -> externalTemperature

Backward-compatibility is provided for all three of the above BC specifications
so existing cases will run as before but we recommend migrating to the new
simpler names.
This commit is contained in:
Henry Weller
2022-10-12 21:17:25 +01:00
parent a4ca75045c
commit 5c01fef155
22 changed files with 285 additions and 176 deletions

View File

@ -74,6 +74,17 @@ namespace Foam
(#baseType, baseType::typeName_(), #lookup, STR(LIB_NAME))
//- Add backward-compatibility duplicate of thisType, replacing oldType,
// to hash-table of functions with 'lookup' as the key
#define addBackwardCompatibleToRunTimeSelectionTable\
(baseType,thisType,argNames,oldType,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType::add##argNames##ConstructorToTable<thisType> \
add_##oldType##_##thisType##argNames##ConstructorTo##baseType##Table_ \
(lookup);
//- Add to hash-table of functions with typename as the key
#define addRemovableToRunTimeSelectionTable\
(baseType,thisType,argNames) \

View File

@ -1,12 +1,11 @@
thermophysicalTransportModel/thermophysicalTransportModel.C
BCs = derivedFvPatchFields
$(BCs)/externalTemperature/externalTemperatureFvPatchScalarField.C
$(BCs)/temperatureCoupledBase/temperatureCoupledBase.C
$(BCs)/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
$(BCs)/coupledTemperature/coupledTemperatureFvPatchScalarField.C
$(BCs)/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C
$(BCs)/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
$(BCs)/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
$(BCs)/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
$(BCs)/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
$(BCs)/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
$(BCs)/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -118,13 +118,13 @@ public:
// Member Functions
//- Access function to incompressible transport model
//- Access function to momentum transport model
const momentumTransportModel& momentumTransport() const
{
return momentumTransport_;
}
//- Access function to incompressible transport model
//- Access function to the fluid thermophysical properties
virtual const thermoModel& thermo() const
{
return thermo_;

View File

@ -23,23 +23,16 @@ License
\*---------------------------------------------------------------------------*/
#include "turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H"
#include "coupledTemperatureFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "mappedPatchBase.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace compressible
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Foam::coupledTemperatureFvPatchScalarField::
coupledTemperatureFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
@ -48,6 +41,8 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch()),
TnbrName_("undefined-Tnbr"),
qrNbrName_("undefined-qrNbr"),
qrName_("undefined-qr"),
thicknessLayers_(0),
kappaLayers_(0),
qs_(p.size()),
@ -59,8 +54,8 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
}
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Foam::coupledTemperatureFvPatchScalarField::
coupledTemperatureFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
@ -69,7 +64,9 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
:
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), dict),
TnbrName_(dict.lookup("Tnbr")),
TnbrName_(dict.lookupOrDefault<word>("Tnbr", "T")),
qrNbrName_(dict.lookupOrDefault<word>("qrNbr", "none")),
qrName_(dict.lookupOrDefault<word>("qr", "none")),
thicknessLayers_(0),
kappaLayers_(0),
qs_(p.size(), 0),
@ -140,45 +137,49 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
}
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Foam::coupledTemperatureFvPatchScalarField::
coupledTemperatureFvPatchScalarField
(
const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField& ptf,
const coupledTemperatureFvPatchScalarField& psf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mixedFvPatchScalarField(ptf, p, iF, mapper),
temperatureCoupledBase(patch(), ptf),
TnbrName_(ptf.TnbrName_),
thicknessLayers_(ptf.thicknessLayers_),
kappaLayers_(ptf.kappaLayers_),
qs_(mapper(ptf.qs_)),
contactRes_(ptf.contactRes_)
mixedFvPatchScalarField(psf, p, iF, mapper),
temperatureCoupledBase(patch(), psf),
TnbrName_(psf.TnbrName_),
qrNbrName_(psf.qrNbrName_),
qrName_(psf.qrName_),
thicknessLayers_(psf.thicknessLayers_),
kappaLayers_(psf.kappaLayers_),
qs_(mapper(psf.qs_)),
contactRes_(psf.contactRes_)
{}
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Foam::coupledTemperatureFvPatchScalarField::
coupledTemperatureFvPatchScalarField
(
const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField& ptf,
const coupledTemperatureFvPatchScalarField& psf,
const DimensionedField<scalar, volMesh>& iF
)
:
mixedFvPatchScalarField(ptf, iF),
temperatureCoupledBase(patch(), ptf),
TnbrName_(ptf.TnbrName_),
thicknessLayers_(ptf.thicknessLayers_),
kappaLayers_(ptf.kappaLayers_),
qs_(ptf.qs_),
contactRes_(ptf.contactRes_)
mixedFvPatchScalarField(psf, iF),
temperatureCoupledBase(patch(), psf),
TnbrName_(psf.TnbrName_),
qrNbrName_(psf.qrNbrName_),
qrName_(psf.qrName_),
thicknessLayers_(psf.thicknessLayers_),
kappaLayers_(psf.kappaLayers_),
qs_(psf.qs_),
contactRes_(psf.contactRes_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
void Foam::coupledTemperatureFvPatchScalarField::updateCoeffs()
{
if (updated())
{
@ -193,64 +194,85 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
// Get the coupling information from the mappedPatchBase
const mappedPatchBase& mpp =
refCast<const mappedPatchBase>(patch().patch());
const polyMesh& nbrMesh = mpp.nbrMesh();
const label nbrPatchi = mpp.nbrPolyPatch().index();
const fvPatch& nbrPatch =
refCast<const fvMesh>(nbrMesh).boundary()[nbrPatchi];
const label patchiNbr = mpp.nbrPolyPatch().index();
const fvPatch& patchNbr =
refCast<const fvMesh>(mpp.nbrMesh()).boundary()[patchiNbr];
// Calculate the temperature by harmonic averaging
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typedef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField thisType;
typedef coupledTemperatureFvPatchScalarField thisType;
const fvPatchScalarField& nbrTp =
nbrPatch.lookupPatchField<volScalarField, scalar>(TnbrName_);
const fvPatchScalarField& TpNbr =
patchNbr.lookupPatchField<volScalarField, scalar>(TnbrName_);
if (!isA<thisType>(nbrTp))
if (!isA<thisType>(TpNbr))
{
FatalErrorInFunction
<< "Patch field for " << internalField().name() << " on "
<< patch().name() << " is of type " << thisType::typeName
<< endl << "The neighbouring patch field " << TnbrName_ << " on "
<< nbrPatch.name() << " is required to be the same, but is "
<< "currently of type " << nbrTp.type() << exit(FatalError);
<< patchNbr.name() << " is required to be the same, but is "
<< "currently of type " << TpNbr.type() << exit(FatalError);
}
const scalarField myKDelta(kappa(*this)*patch().deltaCoeffs());
const thisType& coupledTemperatureNbr = refCast<const thisType>(TpNbr);
const thisType& nbrField = refCast<const thisType>(nbrTp);
const scalarField nbrIntFld
const scalarField TcNbr
(
contactRes_ == 0
? mpp.distribute(nbrField.patchInternalField())
: mpp.distribute(nbrField)
? mpp.distribute(coupledTemperatureNbr.patchInternalField())
: mpp.distribute(coupledTemperatureNbr)
);
const scalarField nbrKDelta
const scalarField KDelta(kappa(*this)*patch().deltaCoeffs());
const scalarField KDeltaNbr
(
contactRes_ == 0
? mpp.distribute(nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs())
: tmp<scalarField>(new scalarField(contactRes_, nbrField.size()))
? mpp.distribute(coupledTemperatureNbr.kappa(coupledTemperatureNbr)
*patchNbr.deltaCoeffs())
: tmp<scalarField>(new scalarField(size(), contactRes_))
);
const scalarField qr
(
qrName_ != "none"
? static_cast<const scalarField&>
(
patch().lookupPatchField<volScalarField, scalar>(qrName_)
)
: scalarField(size(), 0)
);
const scalarField qrNbr
(
qrNbrName_ != "none"
? mpp.distribute
(
patchNbr.lookupPatchField<volScalarField, scalar>(qrNbrName_)
)
: tmp<scalarField>(new scalarField(size(), 0))
);
// Both sides agree on
// - temperature : (myKDelta*fld + nbrKDelta*nbrFld)/(myKDelta+nbrKDelta)
// - temperature : (KDelta*fld + KDeltaNbr*nbrFld)/(KDelta + KDeltaNbr)
// - gradient : (temperature-fld)*delta
// We've got a degree of freedom in how to implement this in a mixed bc.
// (what gradient, what fixedValue and mixing coefficient)
// Two reasonable choices:
// 1. specify above temperature on one side (preferentially the high side)
// and above gradient on the other. So this will switch between pure
// fixedvalue and pure fixedgradient
// fixedValue and pure fixedGradient
// 2. specify gradient and temperature such that the equations are the
// same on both sides. This leads to the choice of
// - refGradient = qs_/kappa;
// - refValue = neighbour value
// - mixFraction = nbrKDelta / (nbrKDelta + myKDelta)
// - mixFraction = KDeltaNbr / (KDeltaNbr + KDelta)
this->refValue() = nbrIntFld;
this->refGrad() = qs_/kappa(*this);
this->valueFraction() = nbrKDelta/(nbrKDelta + myKDelta);
this->valueFraction() = KDeltaNbr/(KDeltaNbr + KDelta);
this->refValue() = TcNbr;
this->refGrad() = (qs_ + qr + qrNbr)/kappa(*this);
mixedFvPatchScalarField::updateCoeffs();
@ -261,8 +283,8 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
Info<< patch().boundaryMesh().mesh().name() << ':'
<< patch().name() << ':'
<< this->internalField().name() << " <- "
<< nbrMesh.name() << ':'
<< nbrPatch.name() << ':'
<< mpp.nbrMesh().name() << ':'
<< patchNbr.name() << ':'
<< this->internalField().name() << " :"
<< " heat transfer rate:" << Q
<< " walltemperature "
@ -277,13 +299,15 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
}
void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
void Foam::coupledTemperatureFvPatchScalarField::write
(
Ostream& os
) const
{
mixedFvPatchScalarField::write(os);
writeEntry(os, "Tnbr", TnbrName_);
writeEntry(os, "qrNbr", qrNbrName_);
writeEntry(os, "qr", qrName_);
writeEntry(os, "thicknessLayers", thicknessLayers_);
writeEntry(os, "kappaLayers", kappaLayers_);
@ -293,17 +317,70 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
makePatchTypeField
(
fvPatchScalarField,
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
coupledTemperatureFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
addBackwardCompatibleToRunTimeSelectionTable
(
fvPatchScalarField,
coupledTemperatureFvPatchScalarField,
patch,
turbulentTemperatureCoupledBaffleMixed,
"compressible::turbulentTemperatureCoupledBaffleMixed"
);
} // End namespace compressible
} // End namespace Foam
addBackwardCompatibleToRunTimeSelectionTable
(
fvPatchScalarField,
coupledTemperatureFvPatchScalarField,
patchMapper,
turbulentTemperatureCoupledBaffleMixed,
"compressible::turbulentTemperatureCoupledBaffleMixed"
);
addBackwardCompatibleToRunTimeSelectionTable
(
fvPatchScalarField,
coupledTemperatureFvPatchScalarField,
dictionary,
turbulentTemperatureCoupledBaffleMixed,
"compressible::turbulentTemperatureCoupledBaffleMixed"
);
addBackwardCompatibleToRunTimeSelectionTable
(
fvPatchScalarField,
coupledTemperatureFvPatchScalarField,
patch,
turbulentTemperatureRadCoupledMixed,
"compressible::turbulentTemperatureRadCoupledMixed"
);
addBackwardCompatibleToRunTimeSelectionTable
(
fvPatchScalarField,
coupledTemperatureFvPatchScalarField,
patchMapper,
turbulentTemperatureRadCoupledMixed,
"compressible::turbulentTemperatureRadCoupledMixed"
);
addBackwardCompatibleToRunTimeSelectionTable
(
fvPatchScalarField,
coupledTemperatureFvPatchScalarField,
dictionary,
turbulentTemperatureRadCoupledMixed,
"compressible::turbulentTemperatureRadCoupledMixed"
);
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,8 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::compressible::
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
Foam::coupledTemperatureFvPatchScalarField
Description
Mixed boundary condition for temperature, to be used for heat-transfer
@ -34,7 +33,7 @@ Description
on both sides:
- refGradient = qs_/kappa
- refValue = neighbour value
- mixFraction = nbrKDelta/(nbrKDelta + myKDelta())
- mixFraction = KDeltaNbr/(KDeltaNbr + KDelta())
where KDelta is heat-transfer coefficient K*deltaCoeffs
and qs is the optional source heat flux.
@ -50,13 +49,15 @@ Usage
kappaLayers | list of thermal conductivities per layer [W/m/K] | no |
qs | Optional source heat flux [W/m^2] | no | 0
Qs | Optional heat source [W] | no | 0
qrNbr | name of the radiative flux in the nbr region | no | none
qr | name of the radiative flux in this region | no | none
\endtable
Example of the boundary condition specification:
\verbatim
<patchName>
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
Tnbr T;
thicknessLayers (0.1 0.2 0.3 0.4);
kappaLayers (1 2 3 4);
@ -74,12 +75,12 @@ See also
Foam::temperatureCoupledBase
SourceFiles
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
coupledTemperatureFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
#define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
#ifndef coupledTemperatureFvPatchScalarField_H
#define coupledTemperatureFvPatchScalarField_H
#include "mixedFvPatchFields.H"
#include "temperatureCoupledBase.H"
@ -89,14 +90,12 @@ SourceFiles
namespace Foam
{
namespace compressible
{
/*---------------------------------------------------------------------------*\
Class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField Declaration
Class coupledTemperatureFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
class coupledTemperatureFvPatchScalarField
:
public mixedFvPatchScalarField,
public temperatureCoupledBase
@ -106,6 +105,12 @@ class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
//- Name of field on the neighbour region
const word TnbrName_;
//- Name of the radiative heat flux in the neighbor region
const word qrNbrName_;
//- Name of the radiative heat flux in local region
const word qrName_;
//- Thickness of layers
scalarList thicknessLayers_;
@ -122,20 +127,20 @@ class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
public:
//- Runtime type information
TypeName("compressible::turbulentTemperatureCoupledBaffleMixed");
TypeName("coupledTemperature");
// Constructors
//- Construct from patch and internal field
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
coupledTemperatureFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
coupledTemperatureFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -143,20 +148,20 @@ public:
);
//- Construct by mapping given
// turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
// coupledTemperatureFvPatchScalarField onto a
// new patch
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
coupledTemperatureFvPatchScalarField
(
const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField&,
const coupledTemperatureFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy setting internal field reference
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
coupledTemperatureFvPatchScalarField
(
const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField&,
const coupledTemperatureFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -168,7 +173,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
new coupledTemperatureFvPatchScalarField
(
*this,
iF
@ -189,7 +194,6 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace compressible
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "externalWallHeatFluxTemperatureFvPatchScalarField.H"
#include "externalTemperatureFvPatchScalarField.H"
#include "volFields.H"
#include "physicoChemicalConstants.H"
#include "addToRunTimeSelectionTable.H"
@ -33,8 +33,8 @@ using Foam::constant::physicoChemical::sigma;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
externalWallHeatFluxTemperatureFvPatchScalarField
Foam::externalTemperatureFvPatchScalarField::
externalTemperatureFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
@ -63,8 +63,8 @@ externalWallHeatFluxTemperatureFvPatchScalarField
}
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
externalWallHeatFluxTemperatureFvPatchScalarField
Foam::externalTemperatureFvPatchScalarField::
externalTemperatureFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
@ -136,10 +136,10 @@ externalWallHeatFluxTemperatureFvPatchScalarField
}
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
externalWallHeatFluxTemperatureFvPatchScalarField
Foam::externalTemperatureFvPatchScalarField::
externalTemperatureFvPatchScalarField
(
const externalWallHeatFluxTemperatureFvPatchScalarField& ptf,
const externalTemperatureFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
@ -169,10 +169,10 @@ externalWallHeatFluxTemperatureFvPatchScalarField
{}
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
externalWallHeatFluxTemperatureFvPatchScalarField
Foam::externalTemperatureFvPatchScalarField::
externalTemperatureFvPatchScalarField
(
const externalWallHeatFluxTemperatureFvPatchScalarField& tppsf,
const externalTemperatureFvPatchScalarField& tppsf,
const DimensionedField<scalar, volMesh>& iF
)
:
@ -197,7 +197,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::autoMap
void Foam::externalTemperatureFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
@ -221,7 +221,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::autoMap
}
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::rmap
void Foam::externalTemperatureFvPatchScalarField::rmap
(
const fvPatchScalarField& ptf,
const labelList& addr
@ -229,8 +229,8 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::rmap
{
mixedFvPatchScalarField::rmap(ptf, addr);
const externalWallHeatFluxTemperatureFvPatchScalarField& tiptf =
refCast<const externalWallHeatFluxTemperatureFvPatchScalarField>(ptf);
const externalTemperatureFvPatchScalarField& tiptf =
refCast<const externalTemperatureFvPatchScalarField>(ptf);
if (haveq_)
{
@ -249,15 +249,15 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::rmap
}
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::reset
void Foam::externalTemperatureFvPatchScalarField::reset
(
const fvPatchScalarField& ptf
)
{
mixedFvPatchScalarField::reset(ptf);
const externalWallHeatFluxTemperatureFvPatchScalarField& tiptf =
refCast<const externalWallHeatFluxTemperatureFvPatchScalarField>(ptf);
const externalTemperatureFvPatchScalarField& tiptf =
refCast<const externalTemperatureFvPatchScalarField>(ptf);
if (haveq_)
{
@ -276,7 +276,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::reset
}
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
void Foam::externalTemperatureFvPatchScalarField::updateCoeffs()
{
if (updated())
{
@ -401,7 +401,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
}
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::write
void Foam::externalTemperatureFvPatchScalarField::write
(
Ostream& os
) const
@ -464,8 +464,36 @@ namespace Foam
makePatchTypeField
(
fvPatchScalarField,
externalWallHeatFluxTemperatureFvPatchScalarField
externalTemperatureFvPatchScalarField
);
addBackwardCompatibleToRunTimeSelectionTable
(
fvPatchScalarField,
externalTemperatureFvPatchScalarField,
patch,
externalWallHeatFluxTemperature,
"externalWallHeatFluxTemperature"
);
addBackwardCompatibleToRunTimeSelectionTable
(
fvPatchScalarField,
externalTemperatureFvPatchScalarField,
patchMapper,
externalWallHeatFluxTemperature,
"externalWallHeatFluxTemperature"
);
addBackwardCompatibleToRunTimeSelectionTable
(
fvPatchScalarField,
externalTemperatureFvPatchScalarField,
dictionary,
externalWallHeatFluxTemperature,
"externalWallHeatFluxTemperature"
);
}
// ************************************************************************* //

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::externalWallHeatFluxTemperatureFvPatchScalarField
Foam::externalTemperatureFvPatchScalarField
Description
This boundary condition applies a heat flux condition to temperature
@ -71,7 +71,7 @@ Usage
\verbatim
<patchName>
{
type externalWallHeatFluxTemperature;
type externalTemperature;
Ta constant 300.0;
h uniform 10.0;
@ -87,12 +87,12 @@ See also
Foam::mixedFvPatchScalarField
SourceFiles
externalWallHeatFluxTemperatureFvPatchScalarField.C
externalTemperatureFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef externalWallHeatFluxTemperatureFvPatchScalarField_H
#define externalWallHeatFluxTemperatureFvPatchScalarField_H
#ifndef externalTemperatureFvPatchScalarField_H
#define externalTemperatureFvPatchScalarField_H
#include "mixedFvPatchFields.H"
#include "temperatureCoupledBase.H"
@ -104,10 +104,10 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class externalWallHeatFluxTemperatureFvPatchScalarField Declaration
Class externalTemperatureFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class externalWallHeatFluxTemperatureFvPatchScalarField
class externalTemperatureFvPatchScalarField
:
public mixedFvPatchScalarField,
public temperatureCoupledBase
@ -172,20 +172,20 @@ class externalWallHeatFluxTemperatureFvPatchScalarField
public:
//- Runtime type information
TypeName("externalWallHeatFluxTemperature");
TypeName("externalTemperature");
// Constructors
//- Construct from patch and internal field
externalWallHeatFluxTemperatureFvPatchScalarField
externalTemperatureFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
externalWallHeatFluxTemperatureFvPatchScalarField
externalTemperatureFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -193,26 +193,26 @@ public:
);
//- Construct by mapping given
// externalWallHeatFluxTemperatureFvPatchScalarField
// externalTemperatureFvPatchScalarField
// onto a new patch
externalWallHeatFluxTemperatureFvPatchScalarField
externalTemperatureFvPatchScalarField
(
const externalWallHeatFluxTemperatureFvPatchScalarField&,
const externalTemperatureFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Disallow copy without setting internal field reference
externalWallHeatFluxTemperatureFvPatchScalarField
externalTemperatureFvPatchScalarField
(
const externalWallHeatFluxTemperatureFvPatchScalarField&
const externalTemperatureFvPatchScalarField&
) = delete;
//- Copy constructor setting internal field reference
externalWallHeatFluxTemperatureFvPatchScalarField
externalTemperatureFvPatchScalarField
(
const externalWallHeatFluxTemperatureFvPatchScalarField&,
const externalTemperatureFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -224,7 +224,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new externalWallHeatFluxTemperatureFvPatchScalarField(*this, iF)
new externalTemperatureFvPatchScalarField(*this, iF)
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,8 +50,8 @@ Usage
{
type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T;
qrNbr qr; // or none. Name of qr field on neighbour region
qr qr; // or none. Name of qr field on local region
qrNbr qr; // Name of qr field on neighbour region
qr qr; // Name of qr field on local region
thicknessLayers (0.1 0.2 0.3 0.4);
kappaLayers (1 2 3 4);
value uniform 300;
@ -136,7 +136,7 @@ public:
);
//- Construct by mapping given
// turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
// coupledTemperatureFvPatchScalarField onto a
// new patch
turbulentTemperatureRadCoupledMixedFvPatchScalarField
(

View File

@ -29,9 +29,8 @@ boundaryField
"baffle3D_to_fluid_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
kappa kappa;
Tnbr T;
value $internalField;
}
}

View File

@ -29,9 +29,8 @@ boundaryField
"fluid_to_baffle3D_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
kappa kappa;
Tnbr T;
value $internalField;
}

View File

@ -39,9 +39,8 @@ boundaryField
wall
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
kappa kappa;
Tnbr T;
value $internalField;
}

View File

@ -21,9 +21,8 @@ boundaryField
{
wall
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
kappa kappa;
Tnbr T;
value $internalField;
}
}

View File

@ -36,9 +36,8 @@ boundaryField
wall
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
kappa kappa;
Tnbr T;
value uniform $Tinitial;
}

View File

@ -23,11 +23,11 @@ boundaryField
{
wall
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
value $internalField;
kappa kappa;
Tnbr T;
}
}
// ************************************************************************* //

View File

@ -35,10 +35,10 @@ boundaryField
}
fluid_to_metal
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
}
}
// ************************************************************************* //

View File

@ -28,10 +28,10 @@ boundaryField
}
heater_to_metal
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
}
}
// ************************************************************************* //

View File

@ -28,16 +28,15 @@ boundaryField
}
metal_to_fluid
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
}
metal_to_heater
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
}
}
// ************************************************************************* //

View File

@ -27,18 +27,18 @@ boundaryField
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
value $internalField;
inletValue $internalField;
}
gas_to_solid
{
type compressible::turbulentTemperatureRadCoupledMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
qrNbr none;
qr qr;
}
}

View File

@ -24,18 +24,17 @@ boundaryField
external
{
type externalWallHeatFluxTemperature;
type externalTemperature;
h uniform 1e3;
Ta $internalField;
value $internalField;
}
solid_to_gas
{
type compressible::turbulentTemperatureRadCoupledMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
qrNbr qr;
qr none;
}
}

View File

@ -39,10 +39,10 @@ boundaryField
}
shell_to_solid
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
}
}
// ************************************************************************* //

View File

@ -28,15 +28,13 @@ boundaryField
}
solid_to_shell
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
}
solid_to_tube
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
}
}

View File

@ -39,9 +39,8 @@ boundaryField
}
tube_to_solid
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
type coupledTemperature;
value $internalField;
Tnbr T;
}
}