mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated constant heat transfer inter-region model
This commit is contained in:
@ -24,9 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "constantHeatTransfer.H"
|
||||
#include "fvm.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvcVolumeIntegrate.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -56,18 +54,18 @@ Foam::fv::constantHeatTransfer::constantHeatTransfer
|
||||
)
|
||||
:
|
||||
interRegionHeatTransferModel(name, modelType, dict, mesh),
|
||||
htCoeffs_(),
|
||||
area_()
|
||||
htcConst_(),
|
||||
AoV_()
|
||||
{
|
||||
if (master_)
|
||||
{
|
||||
htCoeffs_.reset
|
||||
htcConst_.reset
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"htCoeffs",
|
||||
"htcConst",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
@ -77,13 +75,13 @@ Foam::fv::constantHeatTransfer::constantHeatTransfer
|
||||
)
|
||||
);
|
||||
|
||||
area_.reset
|
||||
AoV_.reset
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"area",
|
||||
"AoV",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
@ -93,7 +91,18 @@ Foam::fv::constantHeatTransfer::constantHeatTransfer
|
||||
)
|
||||
);
|
||||
|
||||
htc_.internalField() = htCoeffs_()*area_()/mesh_.V();
|
||||
const DimensionedField<scalar, volMesh>& htcConsti =
|
||||
htcConst_().dimensionedInternalField();
|
||||
const DimensionedField<scalar, volMesh>& AoVi =
|
||||
AoV_().dimensionedInternalField();
|
||||
dimensionedScalar interVol
|
||||
(
|
||||
"V",
|
||||
dimVolume,
|
||||
secondaryToPrimaryInterpPtr_->V()
|
||||
);
|
||||
|
||||
htc_.dimensionedInternalField() = htcConsti*AoVi*interVol/mesh.V();
|
||||
htc_.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
@ -119,9 +128,9 @@ void Foam::fv::constantHeatTransfer::writeData(Ostream& os) const
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
interRegionHeatTransferModel::writeData(os);
|
||||
|
||||
os << indent << "constantHeatTransfer";
|
||||
os << indent << type() + "Coeffs" << nl;
|
||||
|
||||
dict_.write(os);
|
||||
coeffs_.write(os);
|
||||
|
||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
||||
}
|
||||
|
||||
@ -25,8 +25,8 @@ Class
|
||||
Foam::fv::constantHeatTransfer
|
||||
|
||||
Description
|
||||
Constant heat transfer model. htCoeffs [W/m2/K] and area [m2] must be
|
||||
provided.
|
||||
Constant heat transfer model. htcConst [W/m2/K] and area/volume [1/m]
|
||||
must be provided.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -55,17 +55,17 @@ private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Heat transfer coefficient
|
||||
autoPtr<volScalarField> htCoeffs_;
|
||||
//- Constant heat transfer coefficient [W/m2/K]
|
||||
autoPtr<volScalarField> htcConst_;
|
||||
|
||||
//- Area of heat exchange
|
||||
autoPtr<volScalarField> area_;
|
||||
//- Area per unit volume of heat exchanger [1/m]
|
||||
autoPtr<volScalarField> AoV_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("constantHeatTransfer");
|
||||
TypeName("constantHeatTransfer");
|
||||
|
||||
|
||||
// Constructors
|
||||
@ -96,7 +96,7 @@ public:
|
||||
virtual void writeData(Ostream&) const;
|
||||
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict) ;
|
||||
virtual bool read(const dictionary& dict);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user