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
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C
index ce71727d..cd70eb39 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C
@@ -1047,6 +1047,18 @@ const Foam::pointField& Foam::polyMesh::points() const
}
+bool Foam::polyMesh::upToDatePoints(const regIOobject& io) const
+{
+ return io.upToDate(points_);
+}
+
+
+void Foam::polyMesh::setUpToDatePoints(regIOobject& io) const
+{
+ io.eventNo() = points_.eventNo();
+}
+
+
const Foam::faceList& Foam::polyMesh::faces() const
{
if (clearedPrimitives_)
@@ -1132,7 +1144,7 @@ Foam::tmp Foam::polyMesh::movePoints
points_.writeOpt() = IOobject::AUTO_WRITE;
points_.instance() = time().timeName();
-
+ points_.eventNo() = getEvent();
tmp sweptVols = primitiveMesh::movePoints
(
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H
index 5d95d9cf..ffabc4c7 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -394,6 +394,12 @@ public:
//- Return raw points
virtual const pointField& points() const;
+ //- Return true if io is up-to-date with points
+ virtual bool upToDatePoints(const regIOobject& io) const;
+
+ //- Set io to be up-to-date with points
+ virtual void setUpToDatePoints(regIOobject& io) const;
+
//- Return raw faces
virtual const faceList& faces() const;
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C
index 44a1a2c4..030fdea8 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C
@@ -28,6 +28,7 @@ License
#include "volFields.H"
#include "transformField.H"
#include "cellZoneMesh.H"
+#include "cellSet.H"
#include "boolList.H"
#include "syncTools.H"
@@ -74,8 +75,9 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
false
)
),
- zoneID_(-1),
- pointIDs_()
+ pointIDs_(),
+ moveAllCells_(false),
+ UName_(dynamicMeshCoeffs_.lookupOrDefault("UName", "U"))
{
if (undisplacedPoints_.size() != nPoints())
{
@@ -92,14 +94,31 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
word cellZoneName =
dynamicMeshCoeffs_.lookupOrDefault("cellZone", "none");
+ word cellSetName =
+ dynamicMeshCoeffs_.lookupOrDefault("cellSet", "none");
+
+ if ((cellZoneName != "none") && (cellSetName != "none"))
+ {
+ FatalIOErrorIn
+ (
+ "solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)",
+ dynamicMeshCoeffs_
+ )
+ << "Either cellZone OR cellSet can be supplied, but not both. "
+ << "If neither is supplied, all cells will be included"
+ << exit(FatalIOError);
+ }
+
+
+ labelList cellIDs;
if (cellZoneName != "none")
{
Info<< "Applying solid body motion to cellZone " << cellZoneName
<< endl;
- zoneID_ = cellZones().findZoneID(cellZoneName);
+ label zoneID = cellZones().findZoneID(cellZoneName);
- if (zoneID_ == -1)
+ if (zoneID == -1)
{
FatalErrorIn
(
@@ -111,16 +130,35 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
<< exit(FatalError);
}
- const cellZone& cz = cellZones()[zoneID_];
+ cellIDs = cellZones()[zoneID];
+ }
+ if (cellSetName != "none")
+ {
+ Info<< "Applying solid body motion to cellSet " << cellSetName
+ << endl;
+ cellSet set(*this, cellSetName);
+
+ cellIDs = set.toc();
+ }
+
+ label nCells = returnReduce(cellIDs.size(), sumOp