thermalBaffle1DFvPatchScalarField: Changed name of source heat flux Qs -> qs for consistency
Qs is used for total heat source (W) and qs is used for heat flux (W/m^2) Backward compatibility is provided.
This commit is contained in:
@ -50,7 +50,7 @@ thermalBaffle1DFvPatchScalarField
|
||||
TName_("T"),
|
||||
baffleActivated_(true),
|
||||
thickness_(p.size()),
|
||||
Qs_(p.size()),
|
||||
qs_(p.size()),
|
||||
solidDict_(),
|
||||
solidPtr_(nullptr),
|
||||
qrPrevious_(p.size()),
|
||||
@ -73,7 +73,7 @@ thermalBaffle1DFvPatchScalarField
|
||||
TName_("T"),
|
||||
baffleActivated_(dict.lookupOrDefault<bool>("baffleActivated", true)),
|
||||
thickness_(),
|
||||
Qs_(p.size(), 0),
|
||||
qs_(p.size(), 0),
|
||||
solidDict_(dict),
|
||||
solidPtr_(),
|
||||
qrPrevious_(p.size(), 0.0),
|
||||
@ -87,9 +87,13 @@ thermalBaffle1DFvPatchScalarField
|
||||
thickness_ = scalarField("thickness", dict, p.size());
|
||||
}
|
||||
|
||||
if (dict.found("Qs"))
|
||||
if (dict.found("qs"))
|
||||
{
|
||||
Qs_ = scalarField("Qs", dict, p.size());
|
||||
qs_ = scalarField("qs", dict, p.size());
|
||||
}
|
||||
else if (dict.found("Qs"))
|
||||
{
|
||||
qs_ = scalarField("Qs", dict, p.size());
|
||||
}
|
||||
|
||||
if (dict.found("qrPrevious"))
|
||||
@ -129,7 +133,7 @@ thermalBaffle1DFvPatchScalarField
|
||||
TName_(ptf.TName_),
|
||||
baffleActivated_(ptf.baffleActivated_),
|
||||
thickness_(mapper(ptf.thickness_)),
|
||||
Qs_(mapper(ptf.Qs_)),
|
||||
qs_(mapper(ptf.qs_)),
|
||||
solidDict_(ptf.solidDict_),
|
||||
solidPtr_(ptf.solidPtr_),
|
||||
qrPrevious_(mapper(ptf.qrPrevious_)),
|
||||
@ -151,7 +155,7 @@ thermalBaffle1DFvPatchScalarField
|
||||
TName_(ptf.TName_),
|
||||
baffleActivated_(ptf.baffleActivated_),
|
||||
thickness_(ptf.thickness_),
|
||||
Qs_(ptf.Qs_),
|
||||
qs_(ptf.qs_),
|
||||
solidDict_(ptf.solidDict_),
|
||||
solidPtr_(ptf.solidPtr_),
|
||||
qrPrevious_(ptf.qrPrevious_),
|
||||
@ -242,11 +246,11 @@ baffleThickness() const
|
||||
|
||||
|
||||
template<class solidType>
|
||||
tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>::Qs() const
|
||||
tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>::qs() const
|
||||
{
|
||||
if (this->owner())
|
||||
{
|
||||
return Qs_;
|
||||
return qs_;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -261,10 +265,10 @@ tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>::Qs() const
|
||||
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
||||
);
|
||||
|
||||
tmp<scalarField> tQs(new scalarField(nbrField.Qs()));
|
||||
scalarField& Qs = tQs.ref();
|
||||
mapDist.distribute(Qs);
|
||||
return tQs;
|
||||
tmp<scalarField> tqs(new scalarField(nbrField.qs()));
|
||||
scalarField& qs = tqs.ref();
|
||||
mapDist.distribute(qs);
|
||||
return tqs;
|
||||
}
|
||||
}
|
||||
|
||||
@ -282,7 +286,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::autoMap
|
||||
if (this->owner())
|
||||
{
|
||||
m(thickness_, thickness_);
|
||||
m(Qs_, Qs_);
|
||||
m(qs_, qs_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -302,7 +306,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::rmap
|
||||
if (this->owner())
|
||||
{
|
||||
thickness_.rmap(tiptf.thickness_, addr);
|
||||
Qs_.rmap(tiptf.Qs_, addr);
|
||||
qs_.rmap(tiptf.qs_, addr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,7 +385,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
||||
|
||||
valueFraction() = alpha/(alpha + myKDelta);
|
||||
|
||||
refValue() = (KDeltaSolid*nbrTp + Qs()/2.0)/alpha;
|
||||
refValue() = (KDeltaSolid*nbrTp + qs()/2.0)/alpha;
|
||||
|
||||
if (debug)
|
||||
{
|
||||
@ -415,7 +419,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::write(Ostream& os) const
|
||||
if (this->owner())
|
||||
{
|
||||
writeEntry(os, "thickness", baffleThickness()());
|
||||
writeEntry(os, "Qs", Qs()());
|
||||
writeEntry(os, "qs", qs()());
|
||||
solid().write(os);
|
||||
}
|
||||
|
||||
|
||||
@ -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-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,8 +43,8 @@ Usage
|
||||
|
||||
samplePatch <slavePatchName>;
|
||||
|
||||
thickness uniform 0.005; // thickness [m]
|
||||
Qs uniform 100; // heat flux [W/m^2]
|
||||
thickness uniform 0.005; // Thickness [m]
|
||||
qs uniform 100; // Source heat flux [W/m^2]
|
||||
|
||||
qr none;
|
||||
qrRelaxation 1;
|
||||
@ -124,8 +124,8 @@ class thermalBaffle1DFvPatchScalarField
|
||||
//- Baffle thickness [m]
|
||||
mutable scalarField thickness_;
|
||||
|
||||
//- Superficial heat source [W/m^2]
|
||||
mutable scalarField Qs_;
|
||||
//- Source heat flux [W/m^2]
|
||||
mutable scalarField qs_;
|
||||
|
||||
//- Solid dictionary
|
||||
dictionary solidDict_;
|
||||
@ -148,8 +148,8 @@ class thermalBaffle1DFvPatchScalarField
|
||||
//- Return const solid thermo
|
||||
const solidType& solid() const;
|
||||
|
||||
//- Return Qs from master
|
||||
tmp<scalarField> Qs() const;
|
||||
//- Return source heat flux from master
|
||||
tmp<scalarField> qs() const;
|
||||
|
||||
//- Return thickness from master
|
||||
tmp<scalarField> baffleThickness() const;
|
||||
|
||||
Reference in New Issue
Block a user