change in direction on Bird correction - using flag in base model instead...

This commit is contained in:
andy 2009-09-02 10:29:43 +01:00
parent 49295210c9
commit 91675bd616
13 changed files with 62 additions and 237 deletions

View File

@ -33,7 +33,6 @@ License
#include "NoHeatTransfer.H"
#include "RanzMarshall.H"
#include "RanzMarshallBirdCorrection.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -52,12 +51,6 @@ License
RanzMarshall, \
ThermoCloud, \
ParcelType \
); \
makeHeatTransferModelType \
( \
RanzMarshallBirdCorrection, \
ThermoCloud, \
ParcelType \
);

View File

@ -34,7 +34,6 @@ License
#include "NoHeatTransfer.H"
#include "RanzMarshall.H"
#include "RanzMarshallBirdCorrection.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -74,13 +73,6 @@ License
ThermoCloud, \
ParcelType, \
ThermoType \
); \
makeHeatTransferModelThermoType \
( \
RanzMarshallBirdCorrection, \
ThermoCloud, \
ParcelType, \
ThermoType \
);

View File

@ -33,7 +33,8 @@ Foam::HeatTransferModel<CloudType>::HeatTransferModel(CloudType& owner)
:
dict_(dictionary::null),
owner_(owner),
coeffDict_(dictionary::null)
coeffDict_(dictionary::null),
BirdCorrection_(false)
{}
@ -47,7 +48,8 @@ Foam::HeatTransferModel<CloudType>::HeatTransferModel
:
dict_(dict),
owner_(owner),
coeffDict_(dict.subDict(type + "Coeffs"))
coeffDict_(dict.subDict(type + "Coeffs")),
BirdCorrection_(coeffDict_.lookup("BirdCorrection"))
{}
@ -81,6 +83,13 @@ const Foam::dictionary& Foam::HeatTransferModel<CloudType>::coeffDict() const
}
template<class CloudType>
const Foam::Switch& Foam::HeatTransferModel<CloudType>::BirdCorrection() const
{
return BirdCorrection_;
}
template<class CloudType>
Foam::scalar Foam::HeatTransferModel<CloudType>::htc
(
@ -93,7 +102,18 @@ Foam::scalar Foam::HeatTransferModel<CloudType>::htc
{
const scalar Nu = this->Nu(Re, Pr);
return Nu*kappa/dp;
scalar htc = Nu*kappa/dp;
if (BirdCorrection_ && (mag(htc) > ROOTVSMALL) && (mag(NCpW) > ROOTVSMALL))
{
const scalar phit = min(NCpW/htc, 50);
if (phit > 0.001)
{
htc *= phit/(exp(phit) - 1.0);
}
}
return htc;
}

View File

@ -64,6 +64,9 @@ class HeatTransferModel
//- The coefficients dictionary
const dictionary coeffDict_;
//- Apply Bird's correction to the htc
const Switch BirdCorrection_;
public:
@ -110,6 +113,8 @@ public:
);
// Member Functions
// Access
//- Return the cloud dictionary
@ -121,12 +126,15 @@ public:
//- Return the owner cloud object
const CloudType& owner() const;
// Member Functions
//- Return the Bird htc correction flag
const Switch& BirdCorrection() const;
//- Flag to indicate whether model activates heat transfer model
virtual bool active() const = 0;
// Evaluation
//- Nusselt number
virtual scalar Nu
(
@ -134,9 +142,6 @@ public:
const scalar Pr
) const = 0;
//- Prandtl number
virtual scalar Pr() const = 0;
//- Return heat transfer coefficient
virtual scalar htc
(

View File

@ -35,8 +35,7 @@ Foam::RanzMarshall<CloudType>::RanzMarshall
CloudType& cloud
)
:
HeatTransferModel<CloudType>(dict, cloud, typeName),
Pr_(dimensionedScalar(this->coeffDict().lookup("Pr")).value())
HeatTransferModel<CloudType>(dict, cloud, typeName)
{}
@ -63,14 +62,7 @@ Foam::scalar Foam::RanzMarshall<CloudType>::Nu
const scalar Pr
) const
{
return 2.0 + 0.6*pow(Re, 0.5)*pow(Pr, 0.333);
}
template <class CloudType>
Foam::scalar Foam::RanzMarshall<CloudType>::Pr() const
{
return Pr_;
return 2.0 + 0.6*sqrt(Re)*cbrt(Pr);
}

View File

@ -40,7 +40,7 @@ Description
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class RanzMarshall Declaration
Class RanzMarshall Declaration
\*---------------------------------------------------------------------------*/
template <class CloudType>
@ -48,11 +48,6 @@ class RanzMarshall
:
public HeatTransferModel<CloudType>
{
// Private data
// Prandtl number
const scalar Pr_;
public:
@ -76,18 +71,23 @@ public:
// Member Functions
//- Flag to indicate whether model activates heat transfer model
virtual bool active() const;
// Access
//- Nusselt number
virtual scalar Nu
(
const scalar Re,
const scalar Pr
) const;
//- Flag to indicate whether model activates heat transfer model
virtual bool active() const;
//- Prandtl number
virtual scalar Pr() const;
//- Return the Bird correction flag
const Switch& BirdCorrection() const;
// Evaluation
//- Nusselt number
virtual scalar Nu
(
const scalar Re,
const scalar Pr
) const;
};

View File

@ -1,79 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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 2 of the License, or (at your
option) any later version.
OpenFOAM 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 OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "RanzMarshallBirdCorrection.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class CloudType>
Foam::RanzMarshallBirdCorrection<CloudType>::RanzMarshallBirdCorrection
(
const dictionary& dict,
CloudType& cloud
)
:
RanzMarshall<CloudType>(dict, cloud)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template <class CloudType>
Foam::RanzMarshallBirdCorrection<CloudType>::~RanzMarshallBirdCorrection()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
Foam::scalar Foam::RanzMarshallBirdCorrection<CloudType>::htc
(
const scalar dp,
const scalar Re,
const scalar Pr,
const scalar kappa,
const scalar NCpW
) const
{
scalar htc = RanzMarshall<CloudType>::htc(dp, Re, Pr, kappa, NCpW);
// Bird correction
if (mag(htc) > ROOTVSMALL && mag(NCpW) > ROOTVSMALL)
{
const scalar phit = min(NCpW/htc, 50);
scalar fBird = 1.0;
if (phit > 0.001)
{
fBird = phit/(exp(phit) - 1.0);
}
htc *= fBird;
}
return htc;
}
// ************************************************************************* //

View File

@ -1,101 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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 2 of the License, or (at your
option) any later version.
OpenFOAM 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 OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::RanzMarshallBirdCorrection
Description
The Ranz-Marshall correlation for heat transfer with the Bird correction
to account for the local shielding effect due to emitted species.
\*---------------------------------------------------------------------------*/
#ifndef RanzMarshallBirdCorrection_H
#define RanzMarshallBirdCorrection_H
#include "RanzMarshall.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class RanzMarshallBirdCorrection Declaration
\*---------------------------------------------------------------------------*/
template <class CloudType>
class RanzMarshallBirdCorrection
:
public RanzMarshall<CloudType>
{
public:
//- Runtime type information
TypeName("RanzMarshallBirdCorrection");
// Constructors
//- Construct from dictionary
RanzMarshallBirdCorrection
(
const dictionary& dict,
CloudType& cloud
);
//- Destructor
virtual ~RanzMarshallBirdCorrection();
// Member Functions
//- Return heat transfer coefficient
virtual scalar htc
(
const scalar dp,
const scalar Re,
const scalar Pr,
const scalar kappa,
const scalar NCpW
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "RanzMarshallBirdCorrection.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -23,7 +23,7 @@ DispersionModel StochasticDispersionRAS;
PatchInteractionModel StandardWallInteraction;
HeatTransferModel RanzMarshallBirdCorrection;
HeatTransferModel RanzMarshall;
CompositionModel SingleMixtureFraction;
@ -54,7 +54,7 @@ constantProperties
cp0 cp0 [ 0 2 -2 -1 0 ] 4187;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5;
Pr Pr [ 0 0 0 0 0 ] 1.0;
Pr Pr [ 0 0 0 0 0 ] 0.7;
Tvap Tvap [ 0 0 0 1 0 ] 400;
Tbp Tvap [ 0 0 0 1 0 ] 400;
LDevol LDevol [ 0 0 0 0 0 ] 0;
@ -113,7 +113,7 @@ StandardWallInteractionCoeffs
RanzMarshallCoeffs
{
Pr Pr [ 0 0 0 0 0 ] 0.7;
BirdCorrection true;
}
SingleMixtureFractionCoeffs

View File

@ -45,7 +45,7 @@ constantProperties
cp0 cp0 [ 0 2 -2 -1 0 ] 900;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5;
Pr Pr [ 0 0 0 0 0 ] 1.0;
Pr Pr [ 0 0 0 0 0 ] 0.7;
}
interpolationSchemes
@ -98,7 +98,7 @@ StandardWallInteractionCoeffs
RanzMarshallCoeffs
{
Pr Pr [ 0 0 0 0 0 ] 0.7;
BirdCorrection false;
}

View File

@ -50,6 +50,7 @@ constantProperties
cp0 cp0 [ 0 2 -2 -1 0 ] 4100;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5;
Pr Pr [ 0 0 0 0 0 ] 0.7;
Tvap Tvap [ 0 0 0 1 0 ] 273;
Tbp Tvap [ 0 0 0 1 0 ] 373;
constantVolume false;
@ -132,7 +133,7 @@ LocalInteractionCoeffs
RanzMarshallCoeffs
{
Pr Pr [ 0 0 0 0 0 ] 0.7;
BirdCorrection true;
}
SinglePhaseMixtureCoeffs

View File

@ -50,6 +50,7 @@ constantProperties
cp0 cp0 [ 0 2 -2 -1 0 ] 4187;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5;
Pr Pr [ 0 0 0 0 0 ] 0.7;
Tvap Tvap [ 0 0 0 1 0 ] 273;
Tbp Tvap [ 0 0 0 1 0 ] 373;
constantVolume false;
@ -104,7 +105,7 @@ StandardWallInteractionCoeffs
RanzMarshallCoeffs
{
Pr Pr [ 0 0 0 0 0 ] 0.7;
BirdCorrection true;
}
SinglePhaseMixtureCoeffs

View File

@ -45,6 +45,7 @@ constantProperties
cp0 cp0 [ 0 2 -2 -1 0 ] 900;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5;
Pr Pr [ 0 0 0 0 0 ] 0.7;
}
interpolationSchemes
@ -97,7 +98,7 @@ StandardWallInteractionCoeffs
RanzMarshallCoeffs
{
Pr Pr [ 0 0 0 0 0 ] 0.7;
BirdCorrection false;
}