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 "NoHeatTransfer.H"
#include "RanzMarshall.H" #include "RanzMarshall.H"
#include "RanzMarshallBirdCorrection.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -52,12 +51,6 @@ License
RanzMarshall, \ RanzMarshall, \
ThermoCloud, \ ThermoCloud, \
ParcelType \ ParcelType \
); \
makeHeatTransferModelType \
( \
RanzMarshallBirdCorrection, \
ThermoCloud, \
ParcelType \
); );

View File

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

View File

@ -33,7 +33,8 @@ Foam::HeatTransferModel<CloudType>::HeatTransferModel(CloudType& owner)
: :
dict_(dictionary::null), dict_(dictionary::null),
owner_(owner), owner_(owner),
coeffDict_(dictionary::null) coeffDict_(dictionary::null),
BirdCorrection_(false)
{} {}
@ -47,7 +48,8 @@ Foam::HeatTransferModel<CloudType>::HeatTransferModel
: :
dict_(dict), dict_(dict),
owner_(owner), 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> template<class CloudType>
Foam::scalar Foam::HeatTransferModel<CloudType>::htc Foam::scalar Foam::HeatTransferModel<CloudType>::htc
( (
@ -93,7 +102,18 @@ Foam::scalar Foam::HeatTransferModel<CloudType>::htc
{ {
const scalar Nu = this->Nu(Re, Pr); 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 //- The coefficients dictionary
const dictionary coeffDict_; const dictionary coeffDict_;
//- Apply Bird's correction to the htc
const Switch BirdCorrection_;
public: public:
@ -110,6 +113,8 @@ public:
); );
// Member Functions
// Access // Access
//- Return the cloud dictionary //- Return the cloud dictionary
@ -121,12 +126,15 @@ public:
//- Return the owner cloud object //- Return the owner cloud object
const CloudType& owner() const; const CloudType& owner() const;
//- Return the Bird htc correction flag
// Member Functions const Switch& BirdCorrection() const;
//- Flag to indicate whether model activates heat transfer model //- Flag to indicate whether model activates heat transfer model
virtual bool active() const = 0; virtual bool active() const = 0;
// Evaluation
//- Nusselt number //- Nusselt number
virtual scalar Nu virtual scalar Nu
( (
@ -134,9 +142,6 @@ public:
const scalar Pr const scalar Pr
) const = 0; ) const = 0;
//- Prandtl number
virtual scalar Pr() const = 0;
//- Return heat transfer coefficient //- Return heat transfer coefficient
virtual scalar htc virtual scalar htc
( (

View File

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

View File

@ -40,7 +40,7 @@ Description
namespace Foam namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class RanzMarshall Declaration Class RanzMarshall Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class CloudType> template <class CloudType>
@ -48,11 +48,6 @@ class RanzMarshall
: :
public HeatTransferModel<CloudType> public HeatTransferModel<CloudType>
{ {
// Private data
// Prandtl number
const scalar Pr_;
public: public:
@ -76,18 +71,23 @@ public:
// Member Functions // Member Functions
//- Flag to indicate whether model activates heat transfer model // Access
virtual bool active() const;
//- Nusselt number //- Flag to indicate whether model activates heat transfer model
virtual scalar Nu virtual bool active() const;
(
const scalar Re,
const scalar Pr
) const;
//- Prandtl number //- Return the Bird correction flag
virtual scalar Pr() const; 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; PatchInteractionModel StandardWallInteraction;
HeatTransferModel RanzMarshallBirdCorrection; HeatTransferModel RanzMarshall;
CompositionModel SingleMixtureFraction; CompositionModel SingleMixtureFraction;
@ -54,7 +54,7 @@ constantProperties
cp0 cp0 [ 0 2 -2 -1 0 ] 4187; cp0 cp0 [ 0 2 -2 -1 0 ] 4187;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1; epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5; 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; Tvap Tvap [ 0 0 0 1 0 ] 400;
Tbp Tvap [ 0 0 0 1 0 ] 400; Tbp Tvap [ 0 0 0 1 0 ] 400;
LDevol LDevol [ 0 0 0 0 0 ] 0; LDevol LDevol [ 0 0 0 0 0 ] 0;
@ -113,7 +113,7 @@ StandardWallInteractionCoeffs
RanzMarshallCoeffs RanzMarshallCoeffs
{ {
Pr Pr [ 0 0 0 0 0 ] 0.7; BirdCorrection true;
} }
SingleMixtureFractionCoeffs SingleMixtureFractionCoeffs

View File

@ -45,7 +45,7 @@ constantProperties
cp0 cp0 [ 0 2 -2 -1 0 ] 900; cp0 cp0 [ 0 2 -2 -1 0 ] 900;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1; epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5; 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 interpolationSchemes
@ -98,7 +98,7 @@ StandardWallInteractionCoeffs
RanzMarshallCoeffs 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; cp0 cp0 [ 0 2 -2 -1 0 ] 4100;
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1; epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
f0 f0 [ 0 0 0 0 0 ] 0.5; 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; Tvap Tvap [ 0 0 0 1 0 ] 273;
Tbp Tvap [ 0 0 0 1 0 ] 373; Tbp Tvap [ 0 0 0 1 0 ] 373;
constantVolume false; constantVolume false;
@ -132,7 +133,7 @@ LocalInteractionCoeffs
RanzMarshallCoeffs RanzMarshallCoeffs
{ {
Pr Pr [ 0 0 0 0 0 ] 0.7; BirdCorrection true;
} }
SinglePhaseMixtureCoeffs SinglePhaseMixtureCoeffs

View File

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

View File

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