diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H index fae07312a4..a818ee2e9e 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H @@ -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 ( diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H index c773650be2..c969d827d5 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H @@ -333,11 +333,11 @@ drag1 ); - surfaceScalarField rAU1f + volScalarField rAU1 ( IOobject ( - "rAU1f", + "rAU1", runTime.timeName(), mesh, IOobject::NO_READ, diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/Make/files b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/Make/files index d8b7d88442..2b36d0bc31 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/Make/files +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/Make/files @@ -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 diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C index 3c147d7d61..e250a89e79 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C @@ -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::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::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); } diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H index b4b825fe12..de5c24a182 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H @@ -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 g0 ( - const volScalarField& alpha1, + const volScalarField& alpha, const dimensionedScalar& alphaMax ) const; tmp g0prime ( - const volScalarField& alpha1, + const volScalarField& alpha, const dimensionedScalar& alphaMax ) const; }; diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.C deleted file mode 100644 index e1c642b4f9..0000000000 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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::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::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))); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.H deleted file mode 100644 index 60791274b7..0000000000 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.H +++ /dev/null @@ -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 . - -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 g0 - ( - const volScalarField& alpha1, - const dimensionedScalar& alphaMax - ) const; - - tmp g0prime - ( - const volScalarField& alpha1, - const dimensionedScalar& alphaMax - ) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace radialModels -} // End namespace kineticTheoryModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C index e116a4b35e..58ba2a6210 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C @@ -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::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::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); } diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H index 4977bfce5e..1e95f838ae 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H @@ -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 g0 ( - const volScalarField& alpha1, + const volScalarField& alpha, const dimensionedScalar& alphaMax ) const; tmp g0prime ( - const volScalarField& alpha1, + const volScalarField& alpha, const dimensionedScalar& alphaMax ) const; }; diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C index cfbdd4baa9..74e8dac729 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C @@ -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::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::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))); } diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H index 956cd568ef..8df30f1945 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H @@ -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 g0 ( - const volScalarField& alpha1, + const volScalarField& alpha, const dimensionedScalar& alphaMax ) const; tmp g0prime ( - const volScalarField& alpha1, + const volScalarField& alpha, const dimensionedScalar& alphaMax ) const; }; diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.H index a53b8f1a37..bad05a99df 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.H @@ -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 g0 ( - const volScalarField& alpha1, + const volScalarField& alpha, const dimensionedScalar& alphaMax ) const = 0; //- Derivative of the radial distribution function virtual tmp g0prime ( - const volScalarField& alpha1, + const volScalarField& alpha, const dimensionedScalar& alphaMax ) const = 0; }; diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H index bf8fd458aa..67717b0738 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H @@ -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