Skip to content
Snippets Groups Projects
Commit 22442e2a authored by andy's avatar andy
Browse files

ENH: Updated constant heat transfer inter-region model

parent e5e195a9
Branches
Tags
No related merge requests found
......@@ -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);
};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment