Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.3.x

This commit is contained in:
Henry 2014-03-18 23:20:39 +00:00
commit c3e65d3e41
27 changed files with 48 additions and 76 deletions

View file

@ -23,12 +23,11 @@ volScalarField dragCoeff(fluid.dragCoeff());
+ phase1.turbulence().divDevReff(U1) + phase1.turbulence().divDevReff(U1)
== ==
- fvm::Sp(dragCoeff/rho1, U1) - fvm::Sp(dragCoeff/rho1, U1)
- alpha1*alpha2/rho1 - (
*(
liftForce liftForce
+ wallLubricationForce + wallLubricationForce
+ turbulentDispersionForce + turbulentDispersionForce
) )/rho1
- virtualMassCoeff/rho1 - virtualMassCoeff/rho1
*( *(
fvm::ddt(U1) fvm::ddt(U1)
@ -50,12 +49,11 @@ volScalarField dragCoeff(fluid.dragCoeff());
+ phase2.turbulence().divDevReff(U2) + phase2.turbulence().divDevReff(U2)
== ==
- fvm::Sp(dragCoeff/rho2, U2) - fvm::Sp(dragCoeff/rho2, U2)
+ alpha1*alpha2/rho2 + (
*(
liftForce liftForce
+ wallLubricationForce + wallLubricationForce
+ turbulentDispersionForce + turbulentDispersionForce
) )/rho2
- virtualMassCoeff/rho2 - virtualMassCoeff/rho2
*( *(
fvm::ddt(U2) fvm::ddt(U2)

View file

@ -107,13 +107,11 @@ Foam::tmp<Foam::volScalarField> Foam::dragModel::K() const
return return
0.75 0.75
*CdRe() *CdRe()
*max(pair_.dispersed(), residualAlpha_)
*swarmCorrection_->Cs() *swarmCorrection_->Cs()
*pair_.continuous().rho() *pair_.continuous().rho()
*pair_.continuous().nu() *pair_.continuous().nu()
/( /sqr(pair_.dispersed().d());
max(pair_.continuous(), residualAlpha_)
*sqr(pair_.dispersed().d())
);
} }

View file

@ -134,13 +134,8 @@ public:
virtual tmp<volScalarField> CdRe() const = 0; virtual tmp<volScalarField> CdRe() const = 0;
//- The drag function K used in the momentum equation //- The drag function K used in the momentum equation
// ddt(alpha1*rho1*U1) + ... = ... alpha1*alpha2*K*(U1-U2) // ddt(alpha1*rho1*U1) + ... = ... K*(U1-U2)
// ddt(alpha2*rho2*U2) + ... = ... alpha1*alpha2*K*(U2-U1) // ddt(alpha2*rho2*U2) + ... = ... K*(U2-U1)
// ********************************** NB! *****************************
// for numerical reasons alpha1 and alpha2 has been extracted from the
// drag function K, so you MUST divide K by alpha1*alpha2 when
// implemnting the drag function
// ********************************** NB! *****************************
virtual tmp<volScalarField> K() const; virtual tmp<volScalarField> K() const;
//- Dummy write for regIOobject //- Dummy write for regIOobject

View file

@ -64,7 +64,12 @@ Foam::heatTransferModels::RanzMarshall::K() const
{ {
volScalarField Nu(scalar(2) + 0.6*pair_.Re()*cbrt(pair_.Pr())); volScalarField Nu(scalar(2) + 0.6*pair_.Re()*cbrt(pair_.Pr()));
return 6.0*pair_.continuous().kappa()*Nu/sqr(pair_.dispersed().d()); return
6.0
*max(pair_.dispersed(), residualAlpha_)
*pair_.continuous().kappa()
*Nu
/sqr(pair_.dispersed().d());
} }

View file

@ -47,7 +47,7 @@ namespace heatTransferModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class RanzMarshall Declaration Class RanzMarshall Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class RanzMarshall class RanzMarshall

View file

@ -45,7 +45,8 @@ Foam::heatTransferModel::heatTransferModel
const phasePair& pair const phasePair& pair
) )
: :
pair_(pair) pair_(pair),
residualAlpha_("residualAlpha", dimless, dict.lookup("residualAlpha"))
{} {}

View file

@ -46,7 +46,7 @@ namespace Foam
class phasePair; class phasePair;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class heatTransferModel Declaration Class heatTransferModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class heatTransferModel class heatTransferModel
@ -58,6 +58,9 @@ protected:
//- Phase pair //- Phase pair
const phasePair& pair_; const phasePair& pair_;
//- Residual phase fraction
const dimensionedScalar residualAlpha_;
public: public:
@ -112,13 +115,8 @@ public:
// Member Functions // Member Functions
//- The heat transfer function K used in the enthalpy equation //- The heat transfer function K used in the enthalpy equation
// ddt(alpha1*rho1*ha) + ... = ... alpha1*alpha2*K*(Ta - Tb) // ddt(alpha1*rho1*ha) + ... = ... K*(Ta - Tb)
// ddt(alpha2*rho2*hb) + ... = ... alpha1*alpha2*K*(Tb - Ta) // ddt(alpha2*rho2*hb) + ... = ... K*(Tb - Ta)
// ********************************** NB!*****************************
// for numerical reasons alpha1 and alpha2 has been extracted from the
// heat transfer function K, so you MUST divide K by alpha1*alpha2 when
// implementing the heat transfer function
// ********************************** NB!*****************************
virtual tmp<volScalarField> K() const = 0; virtual tmp<volScalarField> K() const = 0;
}; };

View file

@ -62,6 +62,7 @@ Foam::tmp<Foam::volVectorField> Foam::liftModel::F() const
{ {
return return
Cl() Cl()
*pair_.dispersed()
*pair_.continuous().rho() *pair_.continuous().rho()
*( *(
pair_.Ur() ^ fvc::curl(pair_.continuous().U()) pair_.Ur() ^ fvc::curl(pair_.continuous().U())

View file

@ -85,6 +85,7 @@ Foam::turbulentDispersionModels::Gosman::F() const
return return
- 0.75 - 0.75
*drag.CdRe() *drag.CdRe()
*pair_.dispersed()
*pair_.continuous().nu() *pair_.continuous().nu()
*pair_.continuous().turbulence().nut() *pair_.continuous().turbulence().nut()
/( /(

View file

@ -75,6 +75,7 @@ F() const
{ {
return return
- Ctd_ - Ctd_
*pair_.dispersed()
*pair_.continuous().rho() *pair_.continuous().rho()
*pair_.continuous().turbulence().k() *pair_.continuous().turbulence().k()
*fvc::grad(pair_.dispersed()); *fvc::grad(pair_.dispersed());

View file

@ -47,7 +47,7 @@ namespace turbulentDispersionModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class noTurbulentDispersion Declaration Class noTurbulentDispersion Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class noTurbulentDispersion class noTurbulentDispersion

View file

@ -48,7 +48,7 @@ namespace virtualMassModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class constantVirtualMassCoefficient Declaration Class constantVirtualMassCoefficient Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class constantVirtualMassCoefficient class constantVirtualMassCoefficient

View file

@ -47,7 +47,7 @@ namespace virtualMassModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class noVirtualMass Declaration Class noVirtualMass Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class noVirtualMass class noVirtualMass
@ -80,6 +80,7 @@ public:
//- Virtual mass coefficient //- Virtual mass coefficient
virtual tmp<volScalarField> Cvm() const; virtual tmp<volScalarField> Cvm() const;
//- The virtual mass function K used in the momentum equation
virtual tmp<volScalarField> K() const; virtual tmp<volScalarField> K() const;
}; };

View file

@ -72,7 +72,7 @@ Foam::virtualMassModel::~virtualMassModel()
Foam::tmp<Foam::volScalarField> Foam::virtualMassModel::K() const Foam::tmp<Foam::volScalarField> Foam::virtualMassModel::K() const
{ {
return Cvm()*pair_.continuous().rho(); return Cvm()*pair_.dispersed()*pair_.continuous().rho();
} }

View file

@ -47,7 +47,7 @@ namespace Foam
class phasePair; class phasePair;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class virtualMassModel Declaration Class virtualMassModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class virtualMassModel class virtualMassModel
@ -120,13 +120,8 @@ public:
virtual tmp<volScalarField> Cvm() const = 0; virtual tmp<volScalarField> Cvm() const = 0;
//- The virtual mass function K used in the momentum equation //- The virtual mass function K used in the momentum equation
// ddt(alpha1*rho1*U1) + ... = ... alpha1*alpha2*K*(DU1_Dt - DU2_Dt) // ddt(alpha1*rho1*U1) + ... = ... K*(DU1_Dt - DU2_Dt)
// ddt(alpha2*rho2*U2) + ... = ... alpha1*alpha2*K*(DU1_Dt - DU2_Dt) // ddt(alpha2*rho2*U2) + ... = ... K*(DU1_Dt - DU2_Dt)
// ********************************** NB! *****************************
// for numerical reasons alpha1 and alpha2 has been extracted from the
// virtual mass function K, so you MUST divide K by alpha1*alpha2 when
// implemnting the virtual mass function
// ********************************** NB! *****************************
virtual tmp<volScalarField> K() const; virtual tmp<volScalarField> K() const;
// Dummy write for regIOobject // Dummy write for regIOobject

View file

@ -79,6 +79,7 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Antal::F() const
dimensionedScalar("zero", dimless/dimLength, 0), dimensionedScalar("zero", dimless/dimLength, 0),
Cw1_/pair_.dispersed().d() + Cw2_/yWall_ Cw1_/pair_.dispersed().d() + Cw2_/yWall_
) )
*pair_.dispersed()
*pair_.continuous().rho() *pair_.continuous().rho()
*magSqr(Ur - (Ur & nWall)*nWall) *magSqr(Ur - (Ur & nWall)*nWall)
*nWall; *nWall;

View file

@ -47,7 +47,7 @@ namespace Foam
class phasePair; class phasePair;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class wallLubricationModel Declaration Class wallLubricationModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class wallLubricationModel class wallLubricationModel

View file

@ -163,8 +163,6 @@ Foam::BlendedInterfacialModel<modelType>::K() const
if (model_.valid() || model1In2_.valid() || model2In1_.valid()) if (model_.valid() || model1In2_.valid() || model2In1_.valid())
{ {
x() *= max(pair_.phase1()*pair_.phase2(), blending_.residualAlpha());
correctFixedFluxBCs(x()); correctFixedFluxBCs(x());
} }

View file

@ -40,8 +40,6 @@ Foam::blendingMethod::blendingMethod
( (
const dictionary& dict const dictionary& dict
) )
:
residualAlpha_("residualAlpha", dimless, dict.lookup("residualAlpha"))
{} {}
@ -51,12 +49,4 @@ Foam::blendingMethod::~blendingMethod()
{} {}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const Foam::dimensionedScalar& Foam::blendingMethod::residualAlpha() const
{
return residualAlpha_;
}
// ************************************************************************* // // ************************************************************************* //

View file

@ -49,14 +49,6 @@ namespace Foam
class blendingMethod class blendingMethod
{ {
protected:
// Protected data
//- Residual phase fraction
const dimensionedScalar residualAlpha_;
public: public:
//- Runtime type information //- Runtime type information
@ -101,9 +93,6 @@ public:
// Member Functions // Member Functions
//- Residual phase fraction
const dimensionedScalar& residualAlpha() const;
//- Factor for first phase //- Factor for first phase
virtual tmp<volScalarField> f1 virtual tmp<volScalarField> f1
( (

View file

@ -41,7 +41,6 @@ blending
default default
{ {
type linear; type linear;
residualAlpha 1e-6;
maxFullyDispersedAlpha.air 0.3; maxFullyDispersedAlpha.air 0.3;
maxPartlyDispersedAlpha.air 0.5; maxPartlyDispersedAlpha.air 0.5;
maxFullyDispersedAlpha.water 0.3; maxFullyDispersedAlpha.water 0.3;
@ -126,11 +125,13 @@ heatTransfer
(air in water) (air in water)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
(water in air) (water in air)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
); );

View file

@ -41,7 +41,6 @@ blending
default default
{ {
type linear; type linear;
residualAlpha 1e-6;
maxFullyDispersedAlpha.air 0.3; maxFullyDispersedAlpha.air 0.3;
maxPartlyDispersedAlpha.air 0.5; maxPartlyDispersedAlpha.air 0.5;
maxFullyDispersedAlpha.water 0.3; maxFullyDispersedAlpha.water 0.3;
@ -126,11 +125,13 @@ heatTransfer
(air in water) (air in water)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
(water in air) (water in air)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
); );

View file

@ -42,7 +42,6 @@ blending
default default
{ {
type none; type none;
residualAlpha 1e-3;
continuousPhase air; continuousPhase air;
} }
} }
@ -72,11 +71,6 @@ drag
virtualMass virtualMass
( (
(particles in air)
{
type constantCoefficient;
Cvm 0;
}
); );
heatTransfer heatTransfer
@ -84,6 +78,7 @@ heatTransfer
(particles in air) (particles in air)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-3;
} }
); );

View file

@ -41,7 +41,6 @@ blending
default default
{ {
type linear; type linear;
residualAlpha 1e-6;
maxFullyDispersedAlpha.air 0.3; maxFullyDispersedAlpha.air 0.3;
maxPartlyDispersedAlpha.air 0.5; maxPartlyDispersedAlpha.air 0.5;
maxFullyDispersedAlpha.water 0.3; maxFullyDispersedAlpha.water 0.3;
@ -126,11 +125,13 @@ heatTransfer
(air in water) (air in water)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
(water in air) (water in air)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
); );

View file

@ -62,7 +62,6 @@ blending
default default
{ {
type linear; type linear;
residualAlpha 1e-6;
maxFullyDispersedAlpha.air 0.3; maxFullyDispersedAlpha.air 0.3;
maxPartlyDispersedAlpha.air 0.5; maxPartlyDispersedAlpha.air 0.5;
maxFullyDispersedAlpha.water 0.3; maxFullyDispersedAlpha.water 0.3;
@ -147,11 +146,13 @@ heatTransfer
(air in water) (air in water)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
(water in air) (water in air)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
); );

View file

@ -42,7 +42,6 @@ blending
default default
{ {
type none; type none;
residualAlpha 1e-3;
continuousPhase air; continuousPhase air;
} }
} }
@ -84,6 +83,7 @@ heatTransfer
(particles in air) (particles in air)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-3;
} }
); );

View file

@ -41,7 +41,6 @@ blending
default default
{ {
type linear; type linear;
residualAlpha 1e-6;
maxFullyDispersedAlpha.air 0.3; maxFullyDispersedAlpha.air 0.3;
maxPartlyDispersedAlpha.air 0.5; maxPartlyDispersedAlpha.air 0.5;
maxFullyDispersedAlpha.water 0.3; maxFullyDispersedAlpha.water 0.3;
@ -126,11 +125,13 @@ heatTransfer
(air in water) (air in water)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
(water in air) (water in air)
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-6;
} }
); );