compressibleTwoPhaseEuler: Updated kinetic theory from 2.1.x

This commit is contained in:
Henry
2012-06-22 11:49:30 +01:00
parent 283db304a4
commit 344aa46854
13 changed files with 54 additions and 234 deletions

View File

@ -68,11 +68,12 @@ surfaceScalarField alphaPhi2("alphaPhi2", phi2);
if (g0.value() > 0.0)
{
ppMagf = rAU1f*fvc::interpolate
(
(1.0/(rho1*(alpha1 + scalar(0.0001))))
*g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax)
);
ppMagf =
fvc::interpolate((1.0/rho1)*rAU1)
*fvc::interpolate
(
g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax)
);
alpha1Eqn -= fvm::laplacian
(

View File

@ -333,11 +333,11 @@
drag1
);
surfaceScalarField rAU1f
volScalarField rAU1
(
IOobject
(
"rAU1f",
"rAU1",
runTime.timeName(),
mesh,
IOobject::NO_READ,

View File

@ -16,7 +16,6 @@ conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C
radialModel/radialModel/radialModel.C
radialModel/radialModel/newRadialModel.C
radialModel/CarnahanStarling/CarnahanStarlingRadial.C
radialModel/Gidaspow/GidaspowRadial.C
radialModel/LunSavage/LunSavageRadial.C
radialModel/SinclairJackson/SinclairJacksonRadial.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -69,30 +69,29 @@ Foam::kineticTheoryModels::radialModels::CarnahanStarling::~CarnahanStarling()
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::radialModels::CarnahanStarling::g0
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const
{
return
1.0/(1.0 - alpha1)
+ 3.0*alpha1/(2.0*sqr(1.0 - alpha1))
+ sqr(alpha1)/(2.0*pow(1.0 - alpha1, 3));
1.0/(1.0 - alpha)
+ 3.0*alpha/(2.0*sqr(1.0 - alpha))
+ sqr(alpha)/(2.0*pow(1.0 - alpha, 3));
}
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::radialModels::CarnahanStarling::g0prime
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const
{
return
- alpha1/sqr(1.0 - alpha1)
+ (3.0*(1.0 - alpha1) + 6.0*sqr(alpha1))/(2.0*(1.0 - alpha1))
+ (2.0*alpha1*(1.0 - alpha1) + 3.0*pow(alpha1, 3))
/(2.0*pow(1.0 - alpha1, 4));
2.5/sqr(1.0 - alpha)
+ 4.0*alpha/pow(1.0 - alpha, 3.0)
+ 1.5*sqr(alpha)/pow(1.0 - alpha, 4.0);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -75,13 +75,13 @@ public:
tmp<volScalarField> g0
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const;
tmp<volScalarField> g0prime
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const;
};

View File

@ -1,93 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "GidaspowRadial.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace kineticTheoryModels
{
namespace radialModels
{
defineTypeNameAndDebug(Gidaspow, 0);
addToRunTimeSelectionTable
(
radialModel,
Gidaspow,
dictionary
);
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::kineticTheoryModels::radialModels::Gidaspow::Gidaspow
(
const dictionary& dict
)
:
radialModel(dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::kineticTheoryModels::radialModels::Gidaspow::~Gidaspow()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::radialModels::Gidaspow::g0
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMax
) const
{
return 0.6/(1.0 - pow(alpha1/alphaMax, 1.0/3.0));
}
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::radialModels::Gidaspow::g0prime
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMax
) const
{
return
(-1.0/5.0)*pow(alpha1/alphaMax, -2.0/3.0)
/(alphaMax*sqr(1.0 - pow(alpha1/alphaMax, 1.0/3.0)));
}
// ************************************************************************* //

View File

@ -1,99 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
Class
Foam::kineticTheoryModels::radialModels::Gidaspow
Description
SourceFiles
GidaspowRadial.C
\*---------------------------------------------------------------------------*/
#ifndef Gidaspow_H
#define Gidaspow_H
#include "radialModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace kineticTheoryModels
{
namespace radialModels
{
/*---------------------------------------------------------------------------*\
Class Gidaspow Declaration
\*---------------------------------------------------------------------------*/
class Gidaspow
:
public radialModel
{
public:
//- Runtime type information
TypeName("Gidaspow");
// Constructors
//- Construct from components
Gidaspow(const dictionary& dict);
//- Destructor
virtual ~Gidaspow();
// Member Functions
tmp<volScalarField> g0
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMax
) const;
tmp<volScalarField> g0prime
(
const volScalarField& alpha1,
const dimensionedScalar& alphaMax
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace radialModels
} // End namespace kineticTheoryModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -69,23 +69,23 @@ Foam::kineticTheoryModels::radialModels::LunSavage::~LunSavage()
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::radialModels::LunSavage::g0
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const
{
return pow(1.0 - alpha1/alphaMax, -2.5*alphaMax);
return pow(1.0 - alpha/alphaMax, -2.5*alphaMax);
}
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::radialModels::LunSavage::g0prime
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const
{
return 2.5*alphaMax*alpha1*pow(1.0 - alpha1, -1.0 - 2.5*alphaMax);
return 2.5*pow(1.0 - alpha/alphaMax, -1.0 - 2.5*alphaMax);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,13 +74,13 @@ public:
tmp<volScalarField> g0
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const;
tmp<volScalarField> g0prime
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -69,24 +69,24 @@ Foam::kineticTheoryModels::radialModels::SinclairJackson::~SinclairJackson()
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::radialModels::SinclairJackson::g0
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const
{
return 1.0/(1.0 - pow(alpha1/alphaMax, 1.0/3.0));
return 1.0/(1.0 - pow(alpha/alphaMax, 1.0/3.0));
}
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::radialModels::SinclairJackson::g0prime
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const
{
return
(-1.0/3.0)*pow(alpha1/alphaMax, -2.0/3.0)
/(alphaMax*sqr(1.0 - pow(alpha1/alphaMax, 1.0/3.0)));
(1.0/3.0)*pow(max(alpha, 1.0e-6)/alphaMax, -2.0/3.0)
/(alphaMax*sqr(1.0 - pow(alpha/alphaMax, 1.0/3.0)));
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,13 +74,13 @@ public:
tmp<volScalarField> g0
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const;
tmp<volScalarField> g0prime
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -107,14 +107,14 @@ public:
//- Radial distribution function
virtual tmp<volScalarField> g0
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const = 0;
//- Derivative of the radial distribution function
virtual tmp<volScalarField> g0prime
(
const volScalarField& alpha1,
const volScalarField& alpha,
const dimensionedScalar& alphaMax
) const = 0;
};

View File

@ -10,7 +10,7 @@
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
surfaceScalarField alpha2f(scalar(1) - alpha1f);
volScalarField rAU1(1.0/U1Eqn.A());
rAU1 = 1.0/U1Eqn.A();
volScalarField rAU2(1.0/U2Eqn.A());
surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rAU1));
@ -30,6 +30,19 @@
+ fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2
+ rAlphaAU1f*(g & mesh.Sf())
);
if (g0.value() > 0.0)
{
phiHbyA1 -= ppMagf*fvc::snGrad(alpha1)*mesh.magSf();
}
if (kineticTheory.on())
{
phiHbyA1 -=
fvc::interpolate((1.0/rho1)*rAU1)
*fvc::snGrad(kineticTheory.pa())*mesh.magSf();
}
mrfZones.relativeFlux(phiHbyA1);
surfaceScalarField phiHbyA2