Yagi rename

This commit is contained in:
s126103
2020-02-28 10:32:29 +01:00
parent 6075578f1b
commit fe3fbe58d9
8 changed files with 509 additions and 66 deletions

View File

@ -33,8 +33,8 @@ $(energyModels)/energyModel/energyModel.C
$(energyModels)/energyModel/newEnergyModel.C
$(energyModels)/heatTransferGunn/heatTransferGunn.C
$(energyModels)/heatTransferGunnImplicit/heatTransferGunnImplicit.C
$(energyModels)/YagiWallHT/YagiWallHT.C
$(energyModels)/YagiWallHTImplicit/YagiWallHTImplicit.C
$(energyModels)/wallHeatTransferYagi/wallHeatTransferYagi.C
$(energyModels)/wallHeatTransferYagiImplicit/wallHeatTransferYagiImplicit.C
$(energyModels)/reactionHeat/reactionHeat.C
$(thermCondModels)/thermCondModel/thermCondModel.C

View File

@ -19,7 +19,7 @@ Copyright (C) 2015- Thomas Lichtenegger, JKU Linz, Austria
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "YagiWallHT.H"
#include "wallHeatTransferYagi.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -28,14 +28,14 @@ namespace Foam
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(YagiWallHT, 0);
defineTypeNameAndDebug(wallHeatTransferYagi, 0);
addToRunTimeSelectionTable(energyModel, YagiWallHT, dictionary);
addToRunTimeSelectionTable(energyModel, wallHeatTransferYagi, dictionary);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
YagiWallHT::YagiWallHT
wallHeatTransferYagi::wallHeatTransferYagi
(
const dictionary& dict,
cfdemCloudEnergy& sm
@ -141,13 +141,13 @@ namespace Foam
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
YagiWallHT::~YagiWallHT()
wallHeatTransferYagi::~wallHeatTransferYagi()
{
particleCloud_.dataExchangeM().destroy(partRe_,1);
}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
void YagiWallHT::allocateMyArrays() const
void wallHeatTransferYagi::allocateMyArrays() const
{
// get memory for 2d arrays
double initVal=0.0;
@ -160,7 +160,7 @@ namespace Foam
// * * * * * * * * * * * * * * * * Member Fct * * * * * * * * * * * * * * * //
void YagiWallHT::calcEnergyContribution()
void wallHeatTransferYagi::calcEnergyContribution()
{
allocateMyArrays();
@ -244,12 +244,12 @@ namespace Foam
// calculate Urel
scalar magG = mag(U_[faceCelli]-Us_[faceCelli])*voidfraction_[faceCelli]*rho_[faceCelli];
// calculate H
scalar H;
// calculate h
scalar h;
if (voidfraction_[faceCelli]<=voidfractionMax_)
H = 0.2087 * (pow(ReField_[faceCelli]+SMALL,-0.20)) * CpField_[faceCelli] * magG / (pow(PrField_[faceCelli],2/3) + SMALL);
h = 0.2087 * (pow(ReField_[faceCelli]+SMALL,-0.20)) * CpField_[faceCelli] * magG / (pow(PrField_[faceCelli],2/3) + SMALL);
else
H = 0;
h = 0;
// get delta T (wall-fluid)
scalar Twall = wallTemp_.boundaryField()[patchi][facei];
@ -260,31 +260,29 @@ namespace Foam
scalar area = curPatch.magSf()[facei];
// calculate heat flux
heatFlux(faceCelli, H, area, Twall, Tfluid);
heatFluxCoeff(faceCelli, H, area);
heatFlux(faceCelli, h, area, Twall, Tfluid);
heatFluxCoeff(faceCelli, h, area);
if(verbose_ && facei >=0 && facei <2)
{
Info << "####################" << endl;
Info << "cellID: " << faceCelli << endl;
Info << "G : " << magG << endl;
Info << "Re: " << ReField_[faceCelli] << endl;
Info << "Pr: " << PrField_[faceCelli] << endl;
Info << "Cp: " << CpField_[faceCelli] << endl;
Info << "kf: " << kfField_[faceCelli] << endl;
Info << "H : " << H << endl;
Info << "Twall: " << Twall << endl;
Info << "Tfluid: " << Tfluid << endl;
Info << "dT: " << deltaT << endl;
Info << "q: " << H*deltaT << endl;
Info << "area: " << area << endl;
Info << "Q:" << H*deltaT*area << endl;
Info << "cellID [-] : " << faceCelli << endl;
Info << "G [kg/(m2s)] : " << magG << endl;
Info << "Re [-] : " << ReField_[faceCelli] << endl;
Info << "Pr [-] : " << PrField_[faceCelli] << endl;
Info << "Cp [J/(kgK)] : " << CpField_[faceCelli] << endl;
Info << "kf [J/(msK)] : " << kfField_[faceCelli] << endl;
Info << "h [J/(m2Ks)] : " << h << endl;
Info << "Twall [K] : " << Twall << endl;
Info << "Tfluid [K] : " << Tfluid << endl;
Info << "area [m2] : " << area << endl;
Info << "Q [J/s] : " << H*deltaT*area << endl;
}
}
}
else
{
FatalError << "YagiWallHT requires zeroGradient BC for temperature field" << endl;
FatalError << "wallHeatTransferYagi requires zeroGradient BC for temperature field" << endl;
}
}
}
@ -307,17 +305,17 @@ namespace Foam
}
void YagiWallHT::addEnergyContribution(volScalarField& Qsource) const
void wallHeatTransferYagi::addEnergyContribution(volScalarField& Qsource) const
{
Qsource += QWallFluid_;
}
void YagiWallHT::heatFlux(label faceCelli, scalar H, scalar area, scalar Twall, scalar Tfluid)
void wallHeatTransferYagi::heatFlux(label faceCelli, scalar h, scalar area, scalar Twall, scalar Tfluid)
{
QWallFluid_[faceCelli] += H * area * (Twall - Tfluid);
QWallFluid_[faceCelli] += h * area * (Twall - Tfluid);
}
void YagiWallHT::heatFluxCoeff(label faceCelli, scalar H, scalar area)
void wallHeatTransferYagi::heatFluxCoeff(label faceCelli, scalar h, scalar area)
{
//no heat transfer coefficient in explicit model
}

View File

@ -19,7 +19,7 @@ License
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "YagiWallHTImplicit.H"
#include "wallHeatTransferYagiImplicit.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -28,20 +28,20 @@ namespace Foam
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(YagiWallHTImplicit, 0);
defineTypeNameAndDebug(wallHeatTransferYagiImplicit, 0);
addToRunTimeSelectionTable(energyModel, YagiWallHTImplicit, dictionary);
addToRunTimeSelectionTable(energyModel, wallHeatTransferYagiImplicit, dictionary);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
YagiWallHTImplicit::YagiWallHTImplicit
wallHeatTransferYagiImplicit::wallHeatTransferYagiImplicit
(
const dictionary& dict,
cfdemCloudEnergy& sm
)
:
YagiWallHT(dict,sm),
wallHeatTransferYagi(dict,sm),
QWallFluidCoeffName_(propsDict_.lookupOrDefault<word>("QWallFluidCoeffName","QWallFluidCoeff")),
QWallFluidCoeff_
( IOobject
@ -66,27 +66,27 @@ YagiWallHTImplicit::YagiWallHTImplicit
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
YagiWallHTImplicit::~YagiWallHTImplicit()
wallHeatTransferYagiImplicit::~wallHeatTransferYagiImplicit()
{
particleCloud_.dataExchangeM().destroy(partHeatFluxCoeff_,1);
}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
void YagiWallHTImplicit::allocateMyArrays() const
void wallHeatTransferYagiImplicit::allocateMyArrays() const
{
// YagiWallHT::allocateMyArrays();
// wallHeatTransferYagi::allocateMyArrays();
double initVal=0.0;
particleCloud_.dataExchangeM().allocateArray(partHeatFluxCoeff_,initVal,1);
}
// * * * * * * * * * * * * * * * * Member Fct * * * * * * * * * * * * * * * //
void YagiWallHTImplicit::calcEnergyContribution()
void wallHeatTransferYagiImplicit::calcEnergyContribution()
{
allocateMyArrays();
QWallFluidCoeff_.primitiveFieldRef() = 0.0;
YagiWallHT::calcEnergyContribution();
wallHeatTransferYagi::calcEnergyContribution();
QWallFluidCoeff_.primitiveFieldRef() /= QWallFluidCoeff_.mesh().V();
@ -94,19 +94,19 @@ void YagiWallHTImplicit::calcEnergyContribution()
}
void YagiWallHTImplicit::addEnergyCoefficient(volScalarField& Qsource) const
void wallHeatTransferYagiImplicit::addEnergyCoefficient(volScalarField& Qsource) const
{
Qsource += QWallFluidCoeff_;
}
void YagiWallHTImplicit::heatFlux(label faceCelli, scalar H, scalar area, scalar Twall, scalar Tfluid)
void wallHeatTransferYagiImplicit::heatFlux(label faceCelli, scalar h, scalar area, scalar Twall, scalar Tfluid)
{
QWallFluid_[faceCelli] += H * area * Twall;
QWallFluid_[faceCelli] += h * area * Twall;
}
void YagiWallHTImplicit::heatFluxCoeff(label faceCelli, scalar H, scalar area)
void wallHeatTransferYagiImplicit::heatFluxCoeff(label faceCelli, scalar h, scalar area)
{
QWallFluidCoeff_[faceCelli] -= H * area;
QWallFluidCoeff_[faceCelli] -= h * area;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,329 @@
/*---------------------------------------------------------------------------*\
License
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with this code. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2015- Thomas Lichtenegger, JKU Linz, Austria
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "wallHeatTransferYagi.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(wallHeatTransferYagi, 0);
addToRunTimeSelectionTable(energyModel, wallHeatTransferYagi, dictionary);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
wallHeatTransferYagi::wallHeatTransferYagi
(
const dictionary& dict,
cfdemCloudEnergy& sm
)
:
energyModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
interpolation_(propsDict_.lookupOrDefault<bool>("interpolation",false)),
verbose_(propsDict_.lookupOrDefault<bool>("verbose",false)),
QWallFluidName_(propsDict_.lookupOrDefault<word>("QWallFluidName","QWallFluid")),
QWallFluid_
( IOobject
(
QWallFluidName_,
sm.mesh().time().timeName(),
sm.mesh(),
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
sm.mesh(),
dimensionedScalar("zero", dimensionSet(1,-1,-3,0,0,0,0), 0.0)
),
wallTempName_(propsDict_.lookup("wallTempName")),
wallTemp_
( IOobject
(
wallTempName_,
sm.mesh().time().timeName(),
sm.mesh(),
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
sm.mesh(),
dimensionedScalar("zero", dimensionSet(0,0,0,1,0,0,0), 0.0)
),
ReField_
( IOobject
(
"ReField",
sm.mesh().time().timeName(),
sm.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
sm.mesh(),
dimensionedScalar("zero", dimensionSet(0,0,0,0,0,0,0), 0.0)
),
PrField_
( IOobject
(
"PrField",
sm.mesh().time().timeName(),
sm.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
sm.mesh(),
dimensionedScalar("zero", dimensionSet(0,0,0,0,0,0,0), 0.0)
),
tempFieldName_(propsDict_.lookupOrDefault<word>("tempFieldName","T")),
tempField_(sm.mesh().lookupObject<volScalarField> (tempFieldName_)),
voidfractionFieldName_(propsDict_.lookupOrDefault<word>("voidfractionFieldName","voidfraction")),
voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
voidfractionMax_(readScalar(propsDict_.lookup("voidfractionMax"))),
maxSource_(1e30),
velFieldName_(propsDict_.lookupOrDefault<word>("velFieldName","U")),
U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
UsFieldName_(propsDict_.lookup("granVelFieldName")),
Us_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)),
densityFieldName_(propsDict_.lookupOrDefault<word>("densityFieldName","rho")),
rho_(sm.mesh().lookupObject<volScalarField> (densityFieldName_)),
partRe_(NULL),
multiphase_(propsDict_.lookupOrDefault<bool>("multiphase",false)),
kfFieldName_(propsDict_.lookupOrDefault<word>("kfFieldName",voidfractionFieldName_)), // use voidfractionField as dummy to prevent lookup error when not using multiphase
kfField_(sm.mesh().lookupObject<volScalarField> (kfFieldName_)),
CpFieldName_(propsDict_.lookupOrDefault<word>("CpFieldName",voidfractionFieldName_)), // use voidfractionField as dummy to prevent lookup error when not using multiphase
CpField_(sm.mesh().lookupObject<volScalarField> (CpFieldName_))
{
allocateMyArrays();
if (propsDict_.found("maxSource"))
{
maxSource_=readScalar(propsDict_.lookup ("maxSource"));
Info << "limiting wall source field to: " << maxSource_ << endl;
}
if (verbose_)
{
ReField_.writeOpt() = IOobject::AUTO_WRITE;
PrField_.writeOpt() = IOobject::AUTO_WRITE;
ReField_.write();
PrField_.write();
}
// currently it is detected if field was auto generated or defined
// improvement would be changing the type here automatically
forAll(wallTemp_.boundaryField(),patchI)
if(wallTemp_.boundaryField()[patchI].type()=="calculated")
FatalError <<"Scalar field:"<< wallTemp_.name() << " must be defined.\n" << abort(FatalError);
wallTemp_.writeOpt() = IOobject::AUTO_WRITE;
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
wallHeatTransferYagi::~wallHeatTransferYagi()
{
particleCloud_.dataExchangeM().destroy(partRe_,1);
}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
void wallHeatTransferYagi::allocateMyArrays() const
{
// get memory for 2d arrays
double initVal=0.0;
if(verbose_)
{
particleCloud_.dataExchangeM().allocateArray(partRe_,initVal,1);
}
}
// * * * * * * * * * * * * * * * * Member Fct * * * * * * * * * * * * * * * //
void wallHeatTransferYagi::calcEnergyContribution()
{
allocateMyArrays();
// reset Scalar field
QWallFluid_.primitiveFieldRef() = 0.0;
#ifdef compre
const volScalarField mufField = particleCloud_.turbulence().mu();
#else
const volScalarField mufField = particleCloud_.turbulence().nu()*rho_;
#endif
interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_);
interpolationCellPoint<vector> UInterpolator_(U_);
interpolationCellPoint<scalar> TInterpolator_(tempField_);
// calculate Rep
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
{
label cellI = particleCloud_.cellIDs()[index][0];
if(cellI >= 0)
{
scalar voidfraction;
vector Ufluid;
if(interpolation_)
{
vector position = particleCloud_.position(index);
voidfraction = voidfractionInterpolator_.interpolate(position,cellI);
Ufluid = UInterpolator_.interpolate(position,cellI);
}
else
{
voidfraction = voidfraction_[cellI];
Ufluid = U_[cellI];
}
if (voidfraction < 0.01)
voidfraction = 0.01;
vector Us = particleCloud_.velocity(index);
scalar magUr = mag(Ufluid - Us);
scalar ds = 2.*particleCloud_.radius(index);
scalar muf = mufField[cellI];
scalar Rep = ds * magUr * voidfraction * rho_[cellI]/ muf;
partRe_[index][0] = Rep;
}
}
// calculate Rep field
particleCloud_.averagingM().resetWeightFields();
particleCloud_.averagingM().setScalarAverage
(
ReField_,
partRe_,
particleCloud_.particleWeights(),
particleCloud_.averagingM().UsWeightField(),
NULL
);
// calculate Pr field
PrField_ = CpField_ * mufField / kfField_;
const fvPatchList& patches = U_.mesh().boundary();
// calculate flux
forAll(patches, patchi)
{
const fvPatch& curPatch = patches[patchi];
if (wallTemp_.boundaryField().types()[patchi] == "fixedValue")
{
if(tempField_.boundaryField().types()[patchi] == "zeroGradient")
{
forAll(curPatch, facei)
{
label faceCelli = curPatch.faceCells()[facei];
// calculate Urel
scalar magG = mag(U_[faceCelli]-Us_[faceCelli])*voidfraction_[faceCelli]*rho_[faceCelli];
// calculate H
scalar H;
if (voidfraction_[faceCelli]<=voidfractionMax_)
H = 0.2087 * (pow(ReField_[faceCelli]+SMALL,-0.20)) * CpField_[faceCelli] * magG / (pow(PrField_[faceCelli],2/3) + SMALL);
else
H = 0;
// get delta T (wall-fluid)
scalar Twall = wallTemp_.boundaryField()[patchi][facei];
scalar Tfluid = tempField_[faceCelli];
scalar deltaT = Twall - Tfluid;
// get area
scalar area = curPatch.magSf()[facei];
// calculate heat flux
heatFlux(faceCelli, H, area, Twall, Tfluid);
heatFluxCoeff(faceCelli, H, area);
if(verbose_ && facei >=0 && facei <2)
{
Info << "####################" << endl;
Info << "cellID: " << faceCelli << endl;
Info << "G : " << magG << endl;
Info << "Re: " << ReField_[faceCelli] << endl;
Info << "Pr: " << PrField_[faceCelli] << endl;
Info << "Cp: " << CpField_[faceCelli] << endl;
Info << "kf: " << kfField_[faceCelli] << endl;
Info << "H : " << H << endl;
Info << "Twall: " << Twall << endl;
Info << "Tfluid: " << Tfluid << endl;
Info << "dT: " << deltaT << endl;
Info << "q: " << H*deltaT << endl;
Info << "area: " << area << endl;
Info << "Q:" << H*deltaT*area << endl;
}
}
}
else
{
FatalError << "wallHeatTransferYagi requires zeroGradient BC for temperature field" << endl;
}
}
}
QWallFluid_.primitiveFieldRef() /= QWallFluid_.mesh().V();
// limit source term
forAll(QWallFluid_,cellI)
{
scalar EuFieldInCell = QWallFluid_[cellI];
if(mag(EuFieldInCell) > maxSource_ )
{
Pout << "limiting source term" << endl ;
QWallFluid_[cellI] = sign(EuFieldInCell) * maxSource_;
}
}
QWallFluid_.correctBoundaryConditions();
}
void wallHeatTransferYagi::addEnergyContribution(volScalarField& Qsource) const
{
Qsource += QWallFluid_;
}
void wallHeatTransferYagi::heatFlux(label faceCelli, scalar H, scalar area, scalar Twall, scalar Tfluid)
{
QWallFluid_[faceCelli] += H * area * (Twall - Tfluid);
}
void wallHeatTransferYagi::heatFluxCoeff(label faceCelli, scalar H, scalar area)
{
//no heat transfer coefficient in explicit model
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -22,8 +22,8 @@ License
\*---------------------------------------------------------------------------*/
#ifndef YagiWallHT_H
#define YagiWallHT_H
#ifndef wallHeatTransferYagi_H
#define wallHeatTransferYagi_H
#include "fvCFD.H"
#include "cfdemCloudEnergy.H"
@ -34,10 +34,10 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class YagiWallHT Declaration
Class wallHeatTransferYagi Declaration
\*---------------------------------------------------------------------------*/
class YagiWallHT
class wallHeatTransferYagi
:
public energyModel
{
@ -106,12 +106,12 @@ protected:
public:
//- Runtime type information
TypeName("YagiWallHT");
TypeName("wallHeatTransferYagi");
// Constructors
//- Construct from components
YagiWallHT
wallHeatTransferYagi
(
const dictionary& dict,
cfdemCloudEnergy& sm
@ -120,7 +120,7 @@ public:
// Destructor
virtual ~YagiWallHT();
virtual ~wallHeatTransferYagi();
// Member Functions

View File

@ -0,0 +1,116 @@
/*---------------------------------------------------------------------------*\
License
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with this code. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2015- Thomas Lichtenegger, JKU Linz, Austria
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "wallHeatTransferYagiImplicit.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(wallHeatTransferYagiImplicit, 0);
addToRunTimeSelectionTable(energyModel, wallHeatTransferYagiImplicit, dictionary);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
wallHeatTransferYagiImplicit::wallHeatTransferYagiImplicit
(
const dictionary& dict,
cfdemCloudEnergy& sm
)
:
wallHeatTransferYagi(dict,sm),
QWallFluidCoeffName_(propsDict_.lookupOrDefault<word>("QWallFluidCoeffName","QWallFluidCoeff")),
QWallFluidCoeff_
( IOobject
(
QWallFluidCoeffName_,
sm.mesh().time().timeName(),
sm.mesh(),
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
sm.mesh(),
dimensionedScalar("zero", dimensionSet(1,-1,-3,-1,0,0,0), 0.0)
),
partHeatFluxCoeff_(NULL)
{
allocateMyArrays();
// no limiting necessary for implicit heat transfer
maxSource_ = 1e30;
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
wallHeatTransferYagiImplicit::~wallHeatTransferYagiImplicit()
{
particleCloud_.dataExchangeM().destroy(partHeatFluxCoeff_,1);
}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
void wallHeatTransferYagiImplicit::allocateMyArrays() const
{
// wallHeatTransferYagi::allocateMyArrays();
double initVal=0.0;
particleCloud_.dataExchangeM().allocateArray(partHeatFluxCoeff_,initVal,1);
}
// * * * * * * * * * * * * * * * * Member Fct * * * * * * * * * * * * * * * //
void wallHeatTransferYagiImplicit::calcEnergyContribution()
{
allocateMyArrays();
QWallFluidCoeff_.primitiveFieldRef() = 0.0;
wallHeatTransferYagi::calcEnergyContribution();
QWallFluidCoeff_.primitiveFieldRef() /= QWallFluidCoeff_.mesh().V();
// QWallFluidCoeff_.correctBoundaryConditions();
}
void wallHeatTransferYagiImplicit::addEnergyCoefficient(volScalarField& Qsource) const
{
Qsource += QWallFluidCoeff_;
}
void wallHeatTransferYagiImplicit::heatFlux(label faceCelli, scalar H, scalar area, scalar Twall, scalar Tfluid)
{
QWallFluid_[faceCelli] += H * area * Twall;
}
void wallHeatTransferYagiImplicit::heatFluxCoeff(label faceCelli, scalar H, scalar area)
{
QWallFluidCoeff_[faceCelli] -= H * area;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -22,24 +22,24 @@ License
\*---------------------------------------------------------------------------*/
#ifndef YagiWallHTImplicit_H
#define YagiWallHTImplicit_H
#ifndef wallHeatTransferYagiImplicit_H
#define wallHeatTransferYagiImplicit_H
#include "fvCFD.H"
#include "cfdemCloudEnergy.H"
#include "YagiWallHT.H"
#include "wallHeatTransferYagi.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class YagiWallHTImplicit Declaration
Class wallHeatTransferYagiImplicit Declaration
\*---------------------------------------------------------------------------*/
class YagiWallHTImplicit
class wallHeatTransferYagiImplicit
:
public YagiWallHT
public wallHeatTransferYagi
{
private:
@ -58,12 +58,12 @@ private:
public:
//- Runtime type information
TypeName("YagiWallHTImplicit");
TypeName("wallHeatTransferYagiImplicit");
// Constructors
//- Construct from components
YagiWallHTImplicit
wallHeatTransferYagiImplicit
(
const dictionary& dict,
cfdemCloudEnergy& sm
@ -72,7 +72,7 @@ public:
// Destructor
virtual ~YagiWallHTImplicit();
virtual ~wallHeatTransferYagiImplicit();
// Member Functions

View File

@ -32,8 +32,8 @@ $(energyModels)/energyModel/energyModel.C
$(energyModels)/energyModel/newEnergyModel.C
$(energyModels)/heatTransferGunn/heatTransferGunn.C
$(energyModels)/heatTransferGunnImplicit/heatTransferGunnImplicit.C
$(energyModels)/YagiWallHT/YagiWallHT.C
$(energyModels)/YagiWallHTImplicit/YagiWallHTImplicit.C
$(energyModels)/wallHeatTransferYagi/wallHeatTransferYagi.C
$(energyModels)/wallHeatTransferYagiImplicit/wallHeatTransferYagiImplicit.C
$(energyModels)/reactionHeat/reactionHeat.C
$(thermCondModels)/thermCondModel/thermCondModel.C