From eb086ae45503be15714cf2b491df0edfcaa91c92 Mon Sep 17 00:00:00 2001 From: william Date: Mon, 7 Apr 2014 09:30:47 +0100 Subject: [PATCH 1/2] BUG: JohnsonJacksonParticleSlipFvPatchVectorField: using solid turbulent visocity rather than thermo viscosity --- .../JohnsonJacksonParticleSlipFvPatchVectorField.C | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C index c9549399..104201d4 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C @@ -199,7 +199,10 @@ void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::updateCoeffs() const scalarField nu ( - phased.nu()->boundaryField()[patch().index()] + patch().lookupPatchField + ( + IOobject::groupName("nut", phased.name()) + ) ); word ThetaName(IOobject::groupName("Theta", phased.name())); From 968f865db5764cdfb6b09972adcbaebf21bce866 Mon Sep 17 00:00:00 2001 From: william Date: Mon, 7 Apr 2014 10:23:02 +0100 Subject: [PATCH 2/2] ENH: twoPhaseEulerFoam: added new interfacial models --- .../interfacialModels/Make/files | 2 + .../TomiyamaAspectRatio/TomiyamaAspectRatio.C | 81 ++++++++++++ .../TomiyamaAspectRatio/TomiyamaAspectRatio.H | 108 ++++++++++++++++ .../TomiyamaWallLubrication.C | 97 ++++++++++++++ .../TomiyamaWallLubrication.H | 118 ++++++++++++++++++ 5 files changed, 406 insertions(+) create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.C create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.H create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.H diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files index 7e028175..81bccf25 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files @@ -40,6 +40,7 @@ wallLubricationModels/wallLubricationModel/newWallLubricationModel.C wallLubricationModels/noWallLubrication/noWallLubrication.C wallLubricationModels/Antal/Antal.C wallLubricationModels/Frank/Frank.C +wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C @@ -51,6 +52,7 @@ turbulentDispersionModels/Gosman/Gosman.C aspectRatioModels/aspectRatioModel/aspectRatioModel.C aspectRatioModels/aspectRatioModel/newAspectRatioModel.C aspectRatioModels/constantAspectRatio/constantAspectRatio.C +aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.C aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C aspectRatioModels/Wellek/Wellek.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.C new file mode 100644 index 00000000..6e741014 --- /dev/null +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.C @@ -0,0 +1,81 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 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 "TomiyamaAspectRatio.H" +#include "orderedPhasePair.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace aspectRatioModels +{ + defineTypeNameAndDebug(TomiyamaAspectRatio, 0); + addToRunTimeSelectionTable + ( + aspectRatioModel, + TomiyamaAspectRatio, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::aspectRatioModels::TomiyamaAspectRatio::TomiyamaAspectRatio +( + const dictionary& dict, + const orderedPhasePair& pair +) +: + aspectRatioModel(dict, pair), + yWall_(pair.phase1().mesh().lookupObject("yWall")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::aspectRatioModels::TomiyamaAspectRatio::~TomiyamaAspectRatio() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::tmp +Foam::aspectRatioModels::TomiyamaAspectRatio::E() const +{ + return + pair_.Eo() + *max + ( + scalar(1) - 0.35*yWall_/pair_.dispersed().d(), + scalar(0.65) + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.H b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.H new file mode 100644 index 00000000..ba32d21c --- /dev/null +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/TomiyamaAspectRatio/TomiyamaAspectRatio.H @@ -0,0 +1,108 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 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::aspectRatioModels::TomiyamaAspectRatio + +Description + Aspect ratio model of Tomiyama. + + Reference: + \verbatim + "Implementation and Comparison of Correlations for interfacial Forces + in a Gas-Liquid System within an Euler-Euler Framework" + M Otromke + PhD Thesis + April 2013 + \endverbatim + +SourceFiles + TomiyamaAspectRatio.C + +\*---------------------------------------------------------------------------*/ + +#ifndef TomiyamaAspectRatio_H +#define TomiyamaAspectRatio_H + +#include "aspectRatioModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace aspectRatioModels +{ + +/*---------------------------------------------------------------------------*\ + Class TomiyamaAspectRatio Declaration +\*---------------------------------------------------------------------------*/ + +class TomiyamaAspectRatio +: + public aspectRatioModel +{ +private: + + // Private data + + //- Wall distance + const volScalarField& yWall_; + + +public: + + //- Runtime type information + TypeName("Tomiyama"); + + + // Constructors + + //- Construct from a dictionary and an ordered phase pair + TomiyamaAspectRatio + ( + const dictionary& dict, + const orderedPhasePair& pair + ); + + + //- Destructor + virtual ~TomiyamaAspectRatio(); + + + // Member Functions + + //- Aspect ratio + virtual tmp E() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace aspectRatioModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C new file mode 100644 index 00000000..09e45c32 --- /dev/null +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 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 "TomiyamaWallLubrication.H" +#include "phasePair.H" +#include "fvc.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallLubricationModels +{ + defineTypeNameAndDebug(TomiyamaWallLubrication, 0); + addToRunTimeSelectionTable + ( + wallLubricationModel, + TomiyamaWallLubrication, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallLubricationModels::TomiyamaWallLubrication::TomiyamaWallLubrication +( + const dictionary& dict, + const phasePair& pair +) +: + wallLubricationModel(dict, pair), + D_("Cwd", dimLength, dict.lookup("D")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallLubricationModels::TomiyamaWallLubrication::~TomiyamaWallLubrication() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallLubricationModels::TomiyamaWallLubrication::F() const +{ + volVectorField Ur(pair_.Ur()); + volVectorField nWall(- fvc::grad(yWall_)); + nWall /= mag(nWall) + SMALL; + + volScalarField Eo(pair_.Eo()); + + return + ( + pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179) + + pos(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187) + + pos(Eo - 33.0)*0.179 + ) + *0.5 + *pair_.dispersed().d() + *( + 1/sqr(yWall_) + - 1/sqr(D_ - yWall_) + ) + *pair_.dispersed() + *pair_.continuous().rho() + *magSqr(Ur - (Ur & nWall)*nWall) + *nWall; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.H b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.H new file mode 100644 index 00000000..24377af8 --- /dev/null +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.H @@ -0,0 +1,118 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 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::wallLubricationModels::TomiyamaWallLubrication + +Description + Wall lubrication model of Tomiyama. + + References: + \verbatim + "Implementation and Comparison of Correlations for interfacial Forces + in a Gas-Liquid System within an Euler-Euler Framework" + M Otromke + PhD Thesis + April 2013 + \endverbatim + + \verbatim + "Struggle with Computational Bubble Dynamics" + A Tomiyama + Multiphase Science and Technology + Volume 10, Issue 4, Pages 369-405, 1998 + \endverbatim + +SourceFiles + TomiyamaWallLubrication.C + +\*---------------------------------------------------------------------------*/ + +#ifndef TomiyamaWallLubrication_H +#define TomiyamaWallLubrication_H + +#include "wallLubricationModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class phasePair; + +namespace wallLubricationModels +{ + +/*---------------------------------------------------------------------------*\ + Class TomiyamaWallLubrication Declaration +\*---------------------------------------------------------------------------*/ + +class TomiyamaWallLubrication +: + public wallLubricationModel +{ +private: + + // Private data + + //- Characteristic channel dimension + const dimensionedScalar D_; + + +public: + + //- Runtime type information + TypeName("Tomiyama"); + + + // Constructors + + //- Construct from components + TomiyamaWallLubrication + ( + const dictionary& dict, + const phasePair& pair + ); + + + //- Destructor + virtual ~TomiyamaWallLubrication(); + + + // Member Functions + + //- Wall lubrication force + tmp F() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace wallLubricationModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //