diff --git a/README b/README
new file mode 100755
index 00000000..fd2ca756
--- /dev/null
+++ b/README
@@ -0,0 +1,81 @@
+/*---------------------------------------------------------------------------*\
+ CFDEMcoupling - Open Source CFD-DEM coupling
+
+ CFDEMcoupling is part of the CFDEMproject
+ www.cfdem.com
+ Christoph Goniva, christoph.goniva@cfdem.com
+ Copyright 2009-2012 JKU Linz
+ Copyright 2012- DCS Computing GmbH, Linz
+-------------------------------------------------------------------------------
+License
+ This file is part of CFDEMcoupling.
+
+ CFDEMcoupling 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.
+
+ CFDEMcoupling 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 CFDEMcoupling; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+Description
+ This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
+ and OpenFOAM. Note: this code is not part of OpenFOAM (see DISCLAIMER).
+\*---------------------------------------------------------------------------*/
+
+
+CFDEM coupling provides an open source parallel coupled CFD-DEM framework
+combining the strengths of LIGGGHTS DEM code and the Open Source
+CFD package OpenFOAM(R)(*). The CFDEMcoupling toolbox allows to expand
+standard CFD solvers of OpenFOAM(R)(*) to include a coupling to the DEM
+code LIGGGHTS. In this toolbox the particle representation within the
+CFD solver is organized by "cloud" classes. Key functionalities are organised
+in sub-models (e.g. force models, data exchange models, etc.) which can easily
+be selected and combined by dictionary settings.
+
+The coupled solvers run fully parallel on distributed-memory clusters.
+
+Features are:
+
+- its modular approach allows users to easily implement new models
+- its MPI parallelization enables to use it for large scale problems
+- the "forum"_lws on CFD-DEM gives the possibility to exchange with other
+ users / developers
+- the use of GIT allows to easily update to the latest version
+- basic documentation is provided
+
+The file structure:
+
+- "src" directory including the source files of the coupling toolbox and models
+- "applications" directory including the solver files for coupled CFD-DEM simulations
+- "doc" directory including the documentation of CFDEMcoupling
+- "tutorials" directory including basic tutorial cases showing the functionality
+
+
+
+Details on installation are given on the "www.cfdem.com"
+
+The functionality of this CFD-DEM framwork is described via "tutorial cases" showing
+how to use different solvers and models.
+
+CFDEMcoupling stands for Computational Fluid Dynamics (CFD) -
+Discrete Element Method (DEM) coupling.
+
+CFDEMcoupling is an open-source code, distributed freely under the terms of the
+GNU Public License (GPL).
+
+Core development of CFDEMcoupling is done by
+Christoph Goniva and Christoph Kloss, both at DCS Computing GmbH, 2012
+
+
+\*---------------------------------------------------------------------------*/
+(*) "OpenFOAM(R)"_of is a registered trade mark of the ESI Group.
+This offering is not affiliated, approved or endorsed by ESI Group,
+the producer of the OpenFOAMĀ® software and owner of the OpenFOAMĀ® trade mark.
+\*---------------------------------------------------------------------------*/
diff --git a/applications/solvers/cfdemSolverIB/Make/options b/applications/solvers/cfdemSolverIB/Make/options
index c32ff599..8a1101ab 100755
--- a/applications/solvers/cfdemSolverIB/Make/options
+++ b/applications/solvers/cfdemSolverIB/Make/options
@@ -11,7 +11,6 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude
-
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lincompressibleRASModels \
@@ -22,3 +21,4 @@ EXE_LIBS = \
-ldynamicMesh \
-lfvOptions \
-l$(CFDEM_LIB_NAME)
+
diff --git a/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C b/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C
index 87d83393..025b264a 100644
--- a/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C
+++ b/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C
@@ -42,6 +42,7 @@ Description
#include "implicitCouple.H"
#include "clockModel.H"
#include "smoothingModel.H"
+#include "forceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -59,10 +60,9 @@ int main(int argc, char *argv[])
#include "checkModelType.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
+ Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
- Info<< "\nStarting time loop\n" << endl;
particleCloud.clockM().start(1,"Global");
Info<< "Time = " << runTime.timeName() << nl << endl;
@@ -72,7 +72,17 @@ int main(int argc, char *argv[])
// do particle stuff
particleCloud.clockM().start(2,"Coupling");
- particleCloud.evolve(voidfraction,Us,U);
+ bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);
+
+ if(hasEvolved)
+ {
+ //Smoothen implicit momCoupling force
+ //fSmooth.internalField() = particleCloud.forceM(0).impParticleForces() ;
+ //particleCloud.smoothingM().smoothen(fSmooth);
+ //fSmooth.correctBoundaryConditions();
+ //particleCloud.forceM(0).impParticleForces() = fSmooth;
+ particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces());
+ }
Info << "update Ksl.internalField()" << endl;
Ksl = particleCloud.momCoupleM(0).impMomSource();
@@ -97,16 +107,16 @@ int main(int argc, char *argv[])
// Momentum predictor
fvVectorMatrix UEqn
(
- fvm::ddt(voidfraction,U) + fvm::Sp(fvc::ddt(voidfraction),U)
- + fvm::div(phi,U) + fvm::Sp(fvc::div(phi),U)
+ fvm::ddt(voidfraction,U) - fvm::Sp(fvc::ddt(voidfraction),U)
+ + fvm::div(phi,U) - fvm::Sp(fvc::div(phi),U)
// + turbulence->divDevReff(U)
+ particleCloud.divVoidfractionTau(U, voidfraction)
==
- fvm::Sp(Ksl/rho,U)
);
- if (modelType=="B")
- UEqn == - fvc::grad(p) + Ksl/rho*Us;
+ if (modelType=="B" || modelType=="Bfull")
+ UEqn == - fvc::grad(p) + Ksl/rho*Us;
else
UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us;
@@ -169,7 +179,7 @@ int main(int argc, char *argv[])
#include "continuityErrorPhiPU.H"
- if (modelType=="B")
+ if (modelType=="B" || modelType=="Bfull")
U -= rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
else
U -= voidfraction*rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
diff --git a/applications/solvers/cfdemSolverPiso/createFields.H b/applications/solvers/cfdemSolverPiso/createFields.H
index 849ef338..fba80df6 100644
--- a/applications/solvers/cfdemSolverPiso/createFields.H
+++ b/applications/solvers/cfdemSolverPiso/createFields.H
@@ -89,6 +89,22 @@
mesh
);
+/*
+ volVectorField fSmooth
+ (
+ IOobject
+ (
+ "fSmooth",
+ runTime.timeName(),
+ mesh,
+ IOobject::READ_IF_PRESENT,
+ IOobject::NO_WRITE
+ ),
+ mesh,
+ dimensionedVector("0", dimensionSet(1, 1, -2, 0, 0), vector::zero)
+ );
+*/
+
//===============================
//# include "createPhi.H"
diff --git a/applications/solvers/cfdemSolverPisoScalar/cfdemSolverPisoScalar.C b/applications/solvers/cfdemSolverPisoScalar/cfdemSolverPisoScalar.C
index ac015944..6a3bf53c 100644
--- a/applications/solvers/cfdemSolverPisoScalar/cfdemSolverPisoScalar.C
+++ b/applications/solvers/cfdemSolverPisoScalar/cfdemSolverPisoScalar.C
@@ -40,30 +40,26 @@ Description
#include "cfdemCloud.H"
#include "implicitCouple.H"
-#include "forceModel.H"
#include "smoothingModel.H"
+#include "forceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
-
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
-
#include "initContinuityErrs.H"
// create cfdemCloud
#include "readGravitationalAcceleration.H"
cfdemCloud particleCloud(mesh);
-
#include "checkModelType.H"
+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
Info<< "\nStarting time loop\n" << endl;
-
while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
@@ -73,7 +69,7 @@ int main(int argc, char *argv[])
// do particle stuff
Info << "- evolve()" << endl;
- particleCloud.evolve(voidfraction,Us,U);
+ bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);
Ksl.internalField() = particleCloud.momCoupleM(0).impMomSource();
particleCloud.smoothingM().smoothen(Ksl);
@@ -115,7 +111,7 @@ int main(int argc, char *argv[])
if (momentumPredictor)
{
//solve UEqn
- if (modelType=="B")
+ if (modelType=="B" || modelType=="Bfull")
solve(UEqn == - fvc::grad(p) + Ksl/rho*Us);
else
solve(UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us);
@@ -176,7 +172,7 @@ int main(int argc, char *argv[])
#include "continuityErrorPhiPU.H"
- if (modelType=="B")
+ if (modelType=="B" || modelType=="Bfull")
U -= rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
else
U -= voidfraction*rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
diff --git a/applications/utilities/cfdemPostproc/cfdemPostproc.C b/applications/utilities/cfdemPostproc/cfdemPostproc.C
index 8db48d87..478136e3 100644
--- a/applications/utilities/cfdemPostproc/cfdemPostproc.C
+++ b/applications/utilities/cfdemPostproc/cfdemPostproc.C
@@ -71,6 +71,7 @@ int main(int argc, char *argv[])
double **voidfractions_;
double **particleWeights_;
double **particleVolumes_;
+ double **particleV_;
double **cellIDs_;
particleCloud.dataExchangeM().allocateArray(positions_,0.,3);
@@ -80,6 +81,7 @@ int main(int argc, char *argv[])
particleCloud.dataExchangeM().allocateArray(voidfractions_,0.,1);
particleCloud.dataExchangeM().allocateArray(particleWeights_,0.,1);
particleCloud.dataExchangeM().allocateArray(particleVolumes_,0.,1);
+ particleCloud.dataExchangeM().allocateArray(particleV_,0.,1);
particleCloud.get_cellIDs(cellIDs_); // get ref to cellIDs
//particleCloud.dataExchangeM().allocateArray(cellIDs_,0.,1);
@@ -105,7 +107,7 @@ int main(int argc, char *argv[])
particleCloud.locateM().findCell(NULL,positions_,cellIDs_,particleCloud.numberOfParticles());
particleCloud.setPos(positions_);
- particleCloud.voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_);
+ particleCloud.voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_,particleV_);
voidfraction.internalField() = particleCloud.voidFractionM().voidFractionInterp();
voidfraction.correctBoundaryConditions();
@@ -135,6 +137,7 @@ int main(int argc, char *argv[])
particleCloud.dataExchangeM().destroy(voidfractions_,1);
particleCloud.dataExchangeM().destroy(particleWeights_,1);
particleCloud.dataExchangeM().destroy(particleVolumes_,1);
+ particleCloud.dataExchangeM().destroy(particleV_,1);
//particleCloud.dataExchangeM().destroy(cellIDs_); // destroyed in cloud
Info<< "End\n" << endl;
diff --git a/doc/CFDEMcoupling_Manual.html b/doc/CFDEMcoupling_Manual.html
index 793e3968..5f120f05 100644
--- a/doc/CFDEMcoupling_Manual.html
+++ b/doc/CFDEMcoupling_Manual.html
@@ -164,7 +164,7 @@ In order to get the latest code version, please use the git repository at http:/
modelType
-"modelType" refers to the formulation of the equations to be solved. Choose "A" or "B", according to Zhou et al. (2010): "Discrete particle simulation of particle-fluid flow: model formulations and their applicability", JFM. "A" requires the use of the force models gradPForce and viscForce, whereas "B" requires the force model "Archimedes".
+
"modelType" refers to the formulation of the equations to be solved. Choose "A", "B" or "Bfull", according to Zhou et al. (2010): "Discrete particle simulation of particle-fluid flow: model formulations and their applicability", JFM. "A" requires the use of the force models gradPForce and viscForce, whereas "B" requires the force model "Archimedes". "Bfull" refers to model type I.
couplingInterval
diff --git a/doc/CFDEMcoupling_Manual.pdf b/doc/CFDEMcoupling_Manual.pdf
index 334e5e73..2f6afc0c 100644
Binary files a/doc/CFDEMcoupling_Manual.pdf and b/doc/CFDEMcoupling_Manual.pdf differ
diff --git a/doc/CFDEMcoupling_Manual.txt b/doc/CFDEMcoupling_Manual.txt
index 9d5ebd48..6e0f2156 100644
--- a/doc/CFDEMcoupling_Manual.txt
+++ b/doc/CFDEMcoupling_Manual.txt
@@ -133,7 +133,7 @@ Reasonable example settings for the "couplingProperties" dictionary are given in
modelType :pre
-"modelType" refers to the formulation of the equations to be solved. Choose "A" or "B", according to Zhou et al. (2010): "Discrete particle simulation of particle-fluid flow: model formulations and their applicability", JFM. "A" requires the use of the force models gradPForce and viscForce, whereas "B" requires the force model "Archimedes".
+"modelType" refers to the formulation of the equations to be solved. Choose "A", "B" or "Bfull", according to Zhou et al. (2010): "Discrete particle simulation of particle-fluid flow: model formulations and their applicability", JFM. "A" requires the use of the force models gradPForce and viscForce, whereas "B" requires the force model "Archimedes". "Bfull" refers to model type I.
couplingInterval :pre
diff --git a/doc/forceModel.html b/doc/forceModel.html
index 411ada29..0e71fa58 100644
--- a/doc/forceModel.html
+++ b/doc/forceModel.html
@@ -33,7 +33,7 @@
Description:
-The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. All force models selected are executed sequentially and the forces on the particles are superposed.
+
The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. All force models selected are executed sequentially and the forces on the particles are superposed. If the fluid density field is needed, by default a field named "rho" will be used. Via the forceSubModel an alternative field can be chosen.
Restrictions:
diff --git a/doc/forceModel.txt b/doc/forceModel.txt
index 790b1106..4ae3a1a1 100644
--- a/doc/forceModel.txt
+++ b/doc/forceModel.txt
@@ -31,7 +31,7 @@ Note: This examples list might not be complete - please look for other models (f
[Description:]
-The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. All force models selected are executed sequentially and the forces on the particles are superposed.
+The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. All force models selected are executed sequentially and the forces on the particles are superposed. If the fluid density field is needed, by default a field named "rho" will be used. Via the forceSubModel an alternative field can be chosen.
[Restrictions:]
diff --git a/doc/forceModel_Archimedes.html b/doc/forceModel_Archimedes.html
index 95e5156b..8301478d 100644
--- a/doc/forceModel_Archimedes.html
+++ b/doc/forceModel_Archimedes.html
@@ -19,13 +19,10 @@
);
ArchimedesProps
{
- densityFieldName "density";
gravityFieldName "gravity";
};
-- density = name of the finite volume density field
-
-
- gravity = name of the finite volume gravity field
+
- gravity = name of the finite volume gravity field
@@ -37,7 +34,6 @@ ArchimedesProps
);
ArchimedesProps
{
- densityFieldName "rho";
gravityFieldName "g";
}
diff --git a/doc/forceModel_Archimedes.txt b/doc/forceModel_Archimedes.txt
index cd3f7658..41c18aee 100644
--- a/doc/forceModel_Archimedes.txt
+++ b/doc/forceModel_Archimedes.txt
@@ -17,12 +17,10 @@ forceModels
);
ArchimedesProps
\{
- densityFieldName "density";
gravityFieldName "gravity";
\}; :pre
-{density} = name of the finite volume density field :ulb,l
-{gravity} = name of the finite volume gravity field :l
+{gravity} = name of the finite volume gravity field :ulb,l
:ule
[Examples:]
@@ -33,7 +31,6 @@ forceModels
);
ArchimedesProps
\{
- densityFieldName "rho";
gravityFieldName "g";
\} :pre
diff --git a/doc/forceModel_ArchimedesIB.html b/doc/forceModel_ArchimedesIB.html
index 01468568..9f43172f 100644
--- a/doc/forceModel_ArchimedesIB.html
+++ b/doc/forceModel_ArchimedesIB.html
@@ -19,14 +19,11 @@
);
ArchimedesIBProps
{
- densityFieldName "density";
gravityFieldName "gravity";
voidfractionFieldName "voidfraction";
};
-- density = name of the finite volume density field
-
-
- gravity = name of the finite volume gravity field
+
- gravity = name of the finite volume gravity field
- voidfraction = name of the finite volume voidfraction field
@@ -40,7 +37,6 @@ ArchimedesIBProps
);
ArchimedesIBProps
{
- densityFieldName "rho";
gravityFieldName "g";
voidfractionFieldName "voidfractionNext";
}
diff --git a/doc/forceModel_ArchimedesIB.txt b/doc/forceModel_ArchimedesIB.txt
index b9aca335..041d737b 100644
--- a/doc/forceModel_ArchimedesIB.txt
+++ b/doc/forceModel_ArchimedesIB.txt
@@ -17,13 +17,11 @@ forceModels
);
ArchimedesIBProps
\{
- densityFieldName "density";
gravityFieldName "gravity";
voidfractionFieldName "voidfraction";
\}; :pre
-{density} = name of the finite volume density field :ulb,l
-{gravity} = name of the finite volume gravity field :l
+{gravity} = name of the finite volume gravity field :ulb,l
{voidfraction} = name of the finite volume voidfraction field :l
:ule
@@ -35,7 +33,6 @@ forceModels
);
ArchimedesIBProps
\{
- densityFieldName "rho";
gravityFieldName "g";
voidfractionFieldName "voidfractionNext";
\} :pre
diff --git a/doc/forceModel_DiFeliceDrag.html b/doc/forceModel_DiFeliceDrag.html
index 9b02164b..53a2aebf 100644
--- a/doc/forceModel_DiFeliceDrag.html
+++ b/doc/forceModel_DiFeliceDrag.html
@@ -20,15 +20,12 @@
DiFeliceDragProps
{
velFieldName "U";
- densityFieldName "density";
- interpolation;
+ interpolation switch1;
};
- U = name of the finite volume fluid velocity field
-
- density = name of the finite volume gravity field
-
-
- interpolation = flag to use interpolated voidfraction and velocity values (normally off)
+
- switch1 = flag to use interpolated voidfraction and velocity values (normally off)
@@ -41,8 +38,7 @@ DiFeliceDragProps
DiFeliceDragProps
{
velFieldName "U";
- densityFieldName "rho";
- interpolation;
+ interpolation true;
}
Description:
diff --git a/doc/forceModel_DiFeliceDrag.txt b/doc/forceModel_DiFeliceDrag.txt
index 7180d17f..77e6e4ba 100644
--- a/doc/forceModel_DiFeliceDrag.txt
+++ b/doc/forceModel_DiFeliceDrag.txt
@@ -18,13 +18,11 @@ forceModels
DiFeliceDragProps
\{
velFieldName "U";
- densityFieldName "density";
- interpolation;
+ interpolation switch1;
\}; :pre
{U} = name of the finite volume fluid velocity field :ulb,l
-{density} = name of the finite volume gravity field :l
-{interpolation} = flag to use interpolated voidfraction and velocity values (normally off) :l
+{switch1} = flag to use interpolated voidfraction and velocity values (normally off) :l
:ule
[Examples:]
@@ -36,8 +34,7 @@ forceModels
DiFeliceDragProps
\{
velFieldName "U";
- densityFieldName "rho";
- interpolation;
+ interpolation true;
\} :pre
[Description:]
diff --git a/doc/forceModel_GidaspowDrag.html b/doc/forceModel_GidaspowDrag.html
index 7554faf0..9aa7318d 100644
--- a/doc/forceModel_GidaspowDrag.html
+++ b/doc/forceModel_GidaspowDrag.html
@@ -20,27 +20,24 @@
GidaspowDragProps
{
velFieldName "U";
- densityFieldName "density";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
phi "scalar";
- interpolation;
- implDEM;
+ interpolation switch1;
+ implForceDEM switch2;
};
- U = name of the finite volume fluid velocity field
-
- density = name of the finite volume gravity field
-
- voidfraction = name of the finite volume voidfraction field
- Us = name of the finite volume cell averaged particle velocity field
- phi = drag correction factor (in doubt 1)
-
- interpolation = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
+
- switch1 = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
-implDEM = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
+switch2 = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
Examples:
@@ -52,7 +49,6 @@ GidaspowDragProps
GidaspowDragProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
}
diff --git a/doc/forceModel_GidaspowDrag.txt b/doc/forceModel_GidaspowDrag.txt
index 3d87b577..452c67f1 100644
--- a/doc/forceModel_GidaspowDrag.txt
+++ b/doc/forceModel_GidaspowDrag.txt
@@ -18,21 +18,19 @@ forceModels
GidaspowDragProps
\{
velFieldName "U";
- densityFieldName "density";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
phi "scalar";
- interpolation;
- implDEM;
+ interpolation switch1;
+ implForceDEM switch2;
\}; :pre
{U} = name of the finite volume fluid velocity field :ulb,l
-{density} = name of the finite volume gravity field :l
{voidfraction} = name of the finite volume voidfraction field :l
{Us} = name of the finite volume cell averaged particle velocity field :l
{phi} = drag correction factor (in doubt 1) :l
-{interpolation} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
-{implDEM} = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
+{switch1} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
+{switch2} = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
:ule
[Examples:]
@@ -44,7 +42,6 @@ forceModels
GidaspowDragProps
\{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
\} :pre
diff --git a/doc/forceModel_KochHillDrag.html b/doc/forceModel_KochHillDrag.html
index db34b8aa..1cf16d96 100644
--- a/doc/forceModel_KochHillDrag.html
+++ b/doc/forceModel_KochHillDrag.html
@@ -20,21 +20,18 @@
KochHillDragProps
{
velFieldName "U";
- densityFieldName "density";
voidfractionFieldName "voidfraction";
- interpolation;
- implDEM;
+ interpolation "bool1";
+ implForceDEM "bool2";
};
- U = name of the finite volume fluid velocity field
-
- density = name of the finite volume gravity field
-
- voidfraction = name of the finite volume voidfraction field
-
- interpolation = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
+
- bool1 = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
-implDEM = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
+bool2 = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
Examples:
@@ -46,7 +43,6 @@ KochHillDragProps
KochHillDragProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
}
diff --git a/doc/forceModel_KochHillDrag.txt b/doc/forceModel_KochHillDrag.txt
index 5a783fea..0737bb22 100644
--- a/doc/forceModel_KochHillDrag.txt
+++ b/doc/forceModel_KochHillDrag.txt
@@ -18,17 +18,15 @@ forceModels
KochHillDragProps
\{
velFieldName "U";
- densityFieldName "density";
voidfractionFieldName "voidfraction";
- interpolation;
- implDEM;
+ interpolation "bool1";
+ implForceDEM "bool2";
\}; :pre
{U} = name of the finite volume fluid velocity field :ulb,l
-{density} = name of the finite volume gravity field :l
{voidfraction} = name of the finite volume voidfraction field :l
-{interpolation} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
-{implDEM} = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
+{bool1} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
+{bool2} = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
:ule
[Examples:]
@@ -40,7 +38,6 @@ forceModels
KochHillDragProps
\{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
\} :pre
diff --git a/doc/forceModel_LaEuScalarTemp.html b/doc/forceModel_LaEuScalarTemp.html
index c0075c96..2e936521 100644
--- a/doc/forceModel_LaEuScalarTemp.html
+++ b/doc/forceModel_LaEuScalarTemp.html
@@ -27,9 +27,8 @@ LaEuScalarTempProps
partHeatFluxName "convectiveHeatFlux";
lambda value;
Cp value1;
- densityFieldName "density";
- interpolation;
- verbose;
+ interpolation "switch1";
+ verbose "switch2";
};
- U = name of the finite volume fluid velocity field
@@ -48,11 +47,9 @@ LaEuScalarTempProps
- value1 = fluid specific heat capacity [W*s/(kg*K)]
-
- density = name of the finite volume fluid density field
+
- switch1 = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
-
- interpolation = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
-
-
- verbose = (normally off) for verbose run
+
- switch2 = (normally off) for verbose run
@@ -72,7 +69,6 @@ LaEuScalarTempProps
partHeatFluxName "convectiveHeatFlux";
lambda 0.0256;
Cp 1007;
- densityFieldName "rho";
}
Description:
diff --git a/doc/forceModel_LaEuScalarTemp.txt b/doc/forceModel_LaEuScalarTemp.txt
index a2b8690d..9558d2cf 100644
--- a/doc/forceModel_LaEuScalarTemp.txt
+++ b/doc/forceModel_LaEuScalarTemp.txt
@@ -25,9 +25,8 @@ LaEuScalarTempProps
partHeatFluxName "convectiveHeatFlux";
lambda value;
Cp value1;
- densityFieldName "density";
- interpolation;
- verbose;
+ interpolation "switch1";
+ verbose "switch2";
\}; :pre
{U} = name of the finite volume fluid velocity field :ulb,l
@@ -38,9 +37,8 @@ LaEuScalarTempProps
{convectiveHeatFlux} = name of the DEM data representing the particle-fluid convective heat flux :l
{value} = fluid thermal conductivity \[W/(m*K)\] :l
{value1} = fluid specific heat capacity \[W*s/(kg*K)\] :l
-{density} = name of the finite volume fluid density field :l
-{interpolation} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
-{verbose} = (normally off) for verbose run :l
+{switch1} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
+{switch2} = (normally off) for verbose run :l
:ule
[Examples:]
@@ -59,7 +57,6 @@ LaEuScalarTempProps
partHeatFluxName "convectiveHeatFlux";
lambda 0.0256;
Cp 1007;
- densityFieldName "rho";
\} :pre
[Description:]
diff --git a/doc/forceModel_MeiLift.html b/doc/forceModel_MeiLift.html
index b1045e5d..e21aa8b2 100644
--- a/doc/forceModel_MeiLift.html
+++ b/doc/forceModel_MeiLift.html
@@ -20,21 +20,18 @@
MeiLiftProps
{
velFieldName "U";
- densityFieldName "density";
useSecondOrderTerms;
- interpolation;
- verbose;
+ interpolation "switch1";
+ verbose "switch2";
};
- U = name of the finite volume fluid velocity field
-
- density = name of the finite volume fluid density field
-
- useSecondOrderTerms = switch to activate second order terms in the lift force model
-
- interpolation = switch to activate tri-linear interpolation of the flow quantities at the particle position
+
- switch1 = switch to activate tri-linear interpolation of the flow quantities at the particle position
-
- verbose = switch to activate the report of per-particle quantities to the screen
+
- switch2 = switch to activate the report of per-particle quantities to the screen
@@ -47,10 +44,9 @@ MeiLiftProps
MeiLiftProps
{
velFieldName "U";
- densityFieldName "rho";
useSecondOrderTerms;
- interpolation;
- verbose;
+ interpolation true;
+ verbose true;
}
Description:
diff --git a/doc/forceModel_MeiLift.txt b/doc/forceModel_MeiLift.txt
index 4513065f..205a5978 100644
--- a/doc/forceModel_MeiLift.txt
+++ b/doc/forceModel_MeiLift.txt
@@ -18,17 +18,15 @@ forceModels
MeiLiftProps
\{
velFieldName "U";
- densityFieldName "density";
useSecondOrderTerms;
- interpolation;
- verbose;
+ interpolation "switch1";
+ verbose "switch2";
\}; :pre
{U} = name of the finite volume fluid velocity field :ulb,l
-{density} = name of the finite volume fluid density field :l
{useSecondOrderTerms} = switch to activate second order terms in the lift force model :l
-{interpolation} = switch to activate tri-linear interpolation of the flow quantities at the particle position :l
-{verbose} = switch to activate the report of per-particle quantities to the screen :l
+{switch1} = switch to activate tri-linear interpolation of the flow quantities at the particle position :l
+{switch2} = switch to activate the report of per-particle quantities to the screen :l
:ule
[Examples:]
@@ -40,10 +38,9 @@ forceModels
MeiLiftProps
\{
velFieldName "U";
- densityFieldName "rho";
useSecondOrderTerms;
- interpolation;
- verbose;
+ interpolation true;
+ verbose true;
\} :pre
[Description:]
diff --git a/doc/forceModel_SchillerNaumannDrag.html b/doc/forceModel_SchillerNaumannDrag.html
index acd2fa3a..7ff1ecae 100644
--- a/doc/forceModel_SchillerNaumannDrag.html
+++ b/doc/forceModel_SchillerNaumannDrag.html
@@ -20,13 +20,10 @@
SchillerNaumannDragProps
{
velFieldName "U";
- densityFieldName "density";
};
- U = name of the finite volume fluid velocity field
-
- density = name of the finite volume gravity field
-
Examples:
@@ -38,7 +35,6 @@ SchillerNaumannDragProps
SchillerNaumannDragProps
{
velFieldName "U";
- densityFieldName "rho";
}
Description:
diff --git a/doc/forceModel_SchillerNaumannDrag.txt b/doc/forceModel_SchillerNaumannDrag.txt
index 4357264e..aaa1c8a8 100644
--- a/doc/forceModel_SchillerNaumannDrag.txt
+++ b/doc/forceModel_SchillerNaumannDrag.txt
@@ -18,11 +18,9 @@ forceModels
SchillerNaumannDragProps
\{
velFieldName "U";
- densityFieldName "density";
\}; :pre
{U} = name of the finite volume fluid velocity field :ulb,l
-{density} = name of the finite volume gravity field :l
:ule
[Examples:]
@@ -34,7 +32,6 @@ forceModels
SchillerNaumannDragProps
\{
velFieldName "U";
- densityFieldName "rho";
\} :pre
[Description:]
diff --git a/doc/forceModel_ShirgaonkarIB.html b/doc/forceModel_ShirgaonkarIB.html
index 5e198cfc..27e0ddc4 100644
--- a/doc/forceModel_ShirgaonkarIB.html
+++ b/doc/forceModel_ShirgaonkarIB.html
@@ -20,14 +20,11 @@
ShirgaonkarIBProps
{
velFieldName "U";
- densityFieldName "density";
pressureFieldName "pressure";
};
- U = name of the finite volume fluid velocity field
-
- density = name of the finite volume density field
-
- pressure = name of the finite volume pressure field
@@ -41,7 +38,6 @@ ShirgaonkarIBProps
ShirgaonkarIBProps
{
velFieldName "U";
- densityFieldName "rho";
pressureFieldName "p";
}
diff --git a/doc/forceModel_ShirgaonkarIB.txt b/doc/forceModel_ShirgaonkarIB.txt
index 9f488cfc..87cae6ce 100644
--- a/doc/forceModel_ShirgaonkarIB.txt
+++ b/doc/forceModel_ShirgaonkarIB.txt
@@ -18,12 +18,10 @@ forceModels
ShirgaonkarIBProps
\{
velFieldName "U";
- densityFieldName "density";
pressureFieldName "pressure";
\}; :pre
{U} = name of the finite volume fluid velocity field :ulb,l
-{density} = name of the finite volume density field :l
{pressure} = name of the finite volume pressure field :l
:ule
@@ -36,7 +34,6 @@ forceModels
ShirgaonkarIBProps
\{
velFieldName "U";
- densityFieldName "rho";
pressureFieldName "p";
\} :pre
diff --git a/doc/forceModel_gradPForce.html b/doc/forceModel_gradPForce.html
index f5553131..661b4a0e 100644
--- a/doc/forceModel_gradPForce.html
+++ b/doc/forceModel_gradPForce.html
@@ -20,18 +20,15 @@
gradPForceProps
{
pFieldName "pressure";
- densityFieldName "density";
velocityFieldName "U";
- interpolation;
+ interpolation switch1;
};
- pressure = name of the finite volume fluid pressure field
-
- density = name of the finite volume gravity field
-
- U = name of the finite volume fluid velocity field
-
- interpolation = flag to use interpolated pressure values (normally off)
+
- switch1 = flag to use interpolated pressure values (normally off)
@@ -44,9 +41,8 @@ gradPForceProps
gradPForceProps
{
pFieldName "p";
- densityFieldName "rho";
velocityFieldName "U";
- interpolation;
+ interpolation true;
}
Description:
diff --git a/doc/forceModel_gradPForce.txt b/doc/forceModel_gradPForce.txt
index 7a0801d3..68a8b30c 100644
--- a/doc/forceModel_gradPForce.txt
+++ b/doc/forceModel_gradPForce.txt
@@ -18,15 +18,13 @@ forceModels
gradPForceProps
\{
pFieldName "pressure";
- densityFieldName "density";
velocityFieldName "U";
- interpolation;
+ interpolation switch1;
\}; :pre
{pressure} = name of the finite volume fluid pressure field :ulb,l
-{density} = name of the finite volume gravity field :l
{U} = name of the finite volume fluid velocity field :l
-{interpolation} = flag to use interpolated pressure values (normally off) :l
+{switch1} = flag to use interpolated pressure values (normally off) :l
:ule
[Examples:]
@@ -38,9 +36,8 @@ forceModels
gradPForceProps
\{
pFieldName "p";
- densityFieldName "rho";
velocityFieldName "U";
- interpolation;
+ interpolation true;
\} :pre
[Description:]
diff --git a/doc/forceModel_virtualMassForce.html b/doc/forceModel_virtualMassForce.html
index 98202c4a..8c7499fc 100644
--- a/doc/forceModel_virtualMassForce.html
+++ b/doc/forceModel_virtualMassForce.html
@@ -20,13 +20,10 @@
virtualMassForceProps
{
velFieldName "U";
- densityFieldName "density";
};
- U = name of the finite volume fluid velocity field
-
- density = name of the finite volume fluid density field
-
Examples:
@@ -38,7 +35,6 @@ virtualMassForceProps
virtualMassForceProps
{
velFieldName "U";
- densityFieldName "rho";
}
Description:
diff --git a/doc/forceModel_virtualMassForce.txt b/doc/forceModel_virtualMassForce.txt
index af557809..084371fe 100644
--- a/doc/forceModel_virtualMassForce.txt
+++ b/doc/forceModel_virtualMassForce.txt
@@ -18,11 +18,9 @@ forceModels
virtualMassForceProps
\{
velFieldName "U";
- densityFieldName "density";
\}; :pre
{U} = name of the finite volume fluid velocity field :ulb,l
-{density} = name of the finite volume fluid density field :l
:ule
[Examples:]
@@ -34,7 +32,6 @@ forceModels
virtualMassForceProps
\{
velFieldName "U";
- densityFieldName "rho";
\} :pre
[Description:]
diff --git a/doc/forceModel_viscForce.html b/doc/forceModel_viscForce.html
index ebd76ec6..cb233bf1 100644
--- a/doc/forceModel_viscForce.html
+++ b/doc/forceModel_viscForce.html
@@ -20,15 +20,12 @@
viscForceProps
{
velocityFieldName "U";
- densityFieldName "density";
- interpolation;
+ interpolation "switch";
};
- U = name of the finite volume fluid velocity field
-
- density = name of the finite volume gravity field
-
-
- interpolation = flag to use interpolated stress values (normally off)
+
- switch = flag to use interpolated stress values (normally off)
@@ -41,7 +38,6 @@ viscForceProps
viscForceProps
{
velocityFieldName "U";
- densityFieldName "density";
}
Description:
diff --git a/doc/forceModel_viscForce.txt b/doc/forceModel_viscForce.txt
index 8577846c..6bcd3cbb 100644
--- a/doc/forceModel_viscForce.txt
+++ b/doc/forceModel_viscForce.txt
@@ -18,13 +18,11 @@ forceModels
viscForceProps
\{
velocityFieldName "U";
- densityFieldName "density";
- interpolation;
+ interpolation "switch";
\}; :pre
{U} = name of the finite volume fluid velocity field :ulb,l
-{density} = name of the finite volume gravity field :l
-{interpolation} = flag to use interpolated stress values (normally off) :l
+{switch} = flag to use interpolated stress values (normally off) :l
:ule
[Examples:]
@@ -36,7 +34,6 @@ forceModels
viscForceProps
\{
velocityFieldName "U";
- densityFieldName "density";
\} :pre
[Description:]
diff --git a/doc/githubAccess_public.pdf b/doc/githubAccess_public.pdf
index 1a83c85c..ef054d06 100644
Binary files a/doc/githubAccess_public.pdf and b/doc/githubAccess_public.pdf differ
diff --git a/doc/liggghtsCommandModel_writeLiggghts.html b/doc/liggghtsCommandModel_writeLiggghts.html
index 3a96aaf7..1fa64a67 100644
--- a/doc/liggghtsCommandModel_writeLiggghts.html
+++ b/doc/liggghtsCommandModel_writeLiggghts.html
@@ -26,13 +26,12 @@ writeLiggghtsProps
verbose;
}
-
- switch1 = switch (choose on/off) to select if only last step is stored or every write step.
+
- switch1 = switch (choose on/off) to select if only last step is stored or every write step (default on).
-
- name = name of the restart file to be written in /$caseDir/DEM/ default default "liggghts.restartCFDEM"
+
- name = name of the restart file to be written in /$caseDir/DEM/ default (default "liggghts.restartCFDEM")
-
- switch2 = switch (choose on/off) to select if only one restart file $name or many files $name_$timeStamp are written
-
-
- verbose = (normally off) for verbose run
+
- switch2 = switch (choose on/off) to select if only one restart file $name or many files $name_$timeStamp are written (default off):l
+verbose = (default off) for verbose run
diff --git a/doc/liggghtsCommandModel_writeLiggghts.txt b/doc/liggghtsCommandModel_writeLiggghts.txt
index 77f4f461..7bd7a3d1 100644
--- a/doc/liggghtsCommandModel_writeLiggghts.txt
+++ b/doc/liggghtsCommandModel_writeLiggghts.txt
@@ -24,10 +24,10 @@ writeLiggghtsProps
verbose;
\} :pre
-{switch1} = switch (choose on/off) to select if only last step is stored or every write step. :ulb,l
-{name} = name of the restart file to be written in /$caseDir/DEM/ default default "liggghts.restartCFDEM" :l
-{switch2} = switch (choose on/off) to select if only one restart file $name or many files $name_$timeStamp are written :l
-{verbose} = (normally off) for verbose run :l
+{switch1} = switch (choose on/off) to select if only last step is stored or every write step (default on). :ulb,l
+{name} = name of the restart file to be written in /$caseDir/DEM/ default (default "liggghts.restartCFDEM") :l
+{switch2} = switch (choose on/off) to select if only one restart file $name or many files $name_$timeStamp are written (default off):l
+{verbose} = (default off) for verbose run :l
:ule
[Examples:]
diff --git a/src/lagrangian/cfdemParticle/Make/files b/src/lagrangian/cfdemParticle/Make/files
index a6bcedac..192b1043 100644
--- a/src/lagrangian/cfdemParticle/Make/files
+++ b/src/lagrangian/cfdemParticle/Make/files
@@ -1,5 +1,6 @@
cfdemCloud = cfdemCloud
forceModels = subModels/forceModel
+forceSubModels = subModels/forceModel/forceSubModels
forceModelsMS = subModels/forceModelMS
IOModels = subModels/IOModel
voidFractionModels = subModels/voidFractionModel
@@ -44,6 +45,10 @@ $(forceModelsMS)/forceModelMS/forceModelMS.C
$(forceModelsMS)/forceModelMS/newForceModelMS.C
$(forceModelsMS)/DiFeliceDragMS/DiFeliceDragMS.C
+$(forceSubModels)/forceSubModel/newForceSubModel.C
+$(forceSubModels)/forceSubModel/forceSubModel.C
+$(forceSubModels)/ImEx/ImEx.C
+
$(probeModels)/probeModel/probeModel.C
$(probeModels)/probeModel/newProbeModel.C
$(probeModels)/noProbe/noProbe.C
diff --git a/src/lagrangian/cfdemParticle/cfdTools/checkModelType.H b/src/lagrangian/cfdemParticle/cfdTools/checkModelType.H
index 9a6ddf5d..a91bb786 100644
--- a/src/lagrangian/cfdemParticle/cfdTools/checkModelType.H
+++ b/src/lagrangian/cfdemParticle/cfdTools/checkModelType.H
@@ -4,8 +4,7 @@
word modelType = particleCloud.modelType();
//Warning << "model type not being checked" << endl;
-
- if (modelType=="B"){
+ if (modelType=="Bfull"){
Info << "solving volume averaged Navier Stokes equations of type B\n"<< endl;
// check if Archimedes is used
@@ -18,6 +17,41 @@
if(!found)
FatalError <<"Archimedes model not found!\n" << abort(FatalError);
+ // check if gradPForce is used
+ found=false;
+ forAll(particleCloud.forceModels(),i)
+ {
+ if(particleCloud.forceModels()[i]=="gradPForce")
+ found=true;
+ }
+ if(!found)
+ FatalError <<"gradPForce model not found!\n" << abort(FatalError);
+
+ // check if viscForce is used
+ found=false;
+ forAll(particleCloud.forceModels(),i)
+ {
+ if(particleCloud.forceModels()[i]=="viscForce")
+ found=true;
+ }
+ if(!found)
+ FatalError <<"viscForce model not found!\n" << abort(FatalError);
+
+ }else if(modelType=="B"){
+ Info << "solving volume averaged Navier Stokes equations of type B\n"<< endl;
+
+ // check if Archimedes is used
+ bool found=false;
+ forAll(particleCloud.forceModels(),i)
+ {
+ if(particleCloud.forceModels()[i]=="Archimedes")
+ found=true;
+ }
+ if(!found)
+ FatalError <<"Archimedes model not found!\n" << abort(FatalError);
+
+
+
// check if gradP and viscForce are used
found=false;
forAll(particleCloud.forceModels(),i)
diff --git a/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H b/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H
index 6fe49f4f..eeec5b55 100755
--- a/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H
+++ b/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H
@@ -1,5 +1,5 @@
-word CFDEMversion="cfdem-2.7.2";
-word compatibleLIGGGHTSversion="3.0.2";
+word CFDEMversion="cfdem-2.7.9";
+word compatibleLIGGGHTSversion="3.0.3";
word OFversion="2.3.x-commit-4d6f4a3115ff76ec4154c580eb041bc95ba4ec09";
Info << "\nCFDEMcoupling version: " << CFDEMversion << "\n" << endl;
diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C
index 114ac5f7..1e6da060 100644
--- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C
+++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C
@@ -80,6 +80,7 @@ Foam::cfdemCloud::cfdemCloud
positions_(NULL),
velocities_(NULL),
fluidVel_(NULL),
+ fAcc_(NULL),
impForces_(NULL),
expForces_(NULL),
DEMForces_(NULL),
@@ -89,6 +90,7 @@ Foam::cfdemCloud::cfdemCloud
cellIDs_(NULL),
particleWeights_(NULL),
particleVolumes_(NULL),
+ particleV_(NULL),
numberOfParticles_(0),
numberOfParticlesChanged_(false),
arraysReallocated_(false),
@@ -99,6 +101,7 @@ Foam::cfdemCloud::cfdemCloud
cg_(1.),
cgOK_(true),
impDEMdrag_(false),
+ impDEMdragAcc_(false),
imExSplitFactor_(1.0),
treatVoidCellsAsExplicitForce_(false),
useDDTvoidfraction_(false),
@@ -279,6 +282,7 @@ Foam::cfdemCloud::~cfdemCloud()
dataExchangeM().destroy(positions_,3);
dataExchangeM().destroy(velocities_,3);
dataExchangeM().destroy(fluidVel_,3);
+ dataExchangeM().destroy(fAcc_,3);
dataExchangeM().destroy(impForces_,3);
dataExchangeM().destroy(expForces_,3);
dataExchangeM().destroy(DEMForces_,3);
@@ -288,6 +292,7 @@ Foam::cfdemCloud::~cfdemCloud()
dataExchangeM().destroy(cellIDs_,1);
dataExchangeM().destroy(particleWeights_,1);
dataExchangeM().destroy(particleVolumes_,1);
+ dataExchangeM().destroy(particleV_,1);
}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
void Foam::cfdemCloud::getDEMdata()
@@ -295,6 +300,9 @@ void Foam::cfdemCloud::getDEMdata()
dataExchangeM().getData("radius","scalar-atom",radii_);
dataExchangeM().getData("x","vector-atom",positions_);
dataExchangeM().getData("v","vector-atom",velocities_);
+
+ if(impDEMdragAcc_)
+ dataExchangeM().getData("dragAcc","vector-atom",fAcc_); // array is used twice - might be necessary to clean it first
}
void Foam::cfdemCloud::giveDEMdata()
@@ -305,6 +313,7 @@ void Foam::cfdemCloud::giveDEMdata()
if(impDEMdrag_)
{
+ if(verbose_) Info << "sending Ksl and uf" << endl;
dataExchangeM().giveData("Ksl","scalar-atom",Cds_);
dataExchangeM().giveData("uf","vector-atom",fluidVel_);
}
@@ -499,7 +508,7 @@ bool Foam::cfdemCloud::evolve
// set void fraction field
clockM().start(19,"setvoidFraction");
if(verbose_) Info << "- setvoidFraction()" << endl;
- voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_);
+ voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_,particleV_);
if(verbose_) Info << "setvoidFraction done." << endl;
clockM().stop("setvoidFraction");
@@ -507,7 +516,6 @@ bool Foam::cfdemCloud::evolve
clockM().start(20,"setVectorAverage");
setVectorAverages();
-
//Smoothen "next" fields
smoothingM().dSmoothing();
smoothingM().smoothen(voidFractionM().voidFractionNext());
@@ -516,7 +524,7 @@ bool Foam::cfdemCloud::evolve
//because we need unsmoothened Us field to detect cells for explicit
//force coupling
if(!treatVoidCellsAsExplicitForce())
- smoothingM().smoothenReferenceField(averagingM().UsNext());
+ smoothingM().smoothenReferenceField(averagingM().UsNext());
clockM().stop("setVectorAverage");
}
@@ -592,6 +600,7 @@ bool Foam::cfdemCloud::reAllocArrays() const
dataExchangeM().allocateArray(positions_,0.,3);
dataExchangeM().allocateArray(velocities_,0.,3);
dataExchangeM().allocateArray(fluidVel_,0.,3);
+ dataExchangeM().allocateArray(fAcc_,0.,3);
dataExchangeM().allocateArray(impForces_,0.,3);
dataExchangeM().allocateArray(expForces_,0.,3);
dataExchangeM().allocateArray(DEMForces_,0.,3);
@@ -601,6 +610,7 @@ bool Foam::cfdemCloud::reAllocArrays() const
dataExchangeM().allocateArray(cellIDs_,-1.,voidFractionM().maxCellsPerParticle());
dataExchangeM().allocateArray(particleWeights_,0.,voidFractionM().maxCellsPerParticle());
dataExchangeM().allocateArray(particleVolumes_,0.,voidFractionM().maxCellsPerParticle());
+ dataExchangeM().allocateArray(particleV_,0.,1);
arraysReallocated_ = true;
return true;
}
@@ -612,7 +622,7 @@ tmp cfdemCloud::divVoidfractionTau(volVectorField& U,volScalarFi
return
(
- fvm::laplacian(voidfractionNuEff(voidfraction), U)
- - fvc::div(voidfractionNuEff(voidfraction)*dev(fvc::grad(U)().T()))
+ - fvc::div(voidfractionNuEff(voidfraction)*dev2(fvc::grad(U)().T()))
);
}
@@ -645,7 +655,7 @@ void cfdemCloud::calcDdtVoidfraction(volScalarField& voidfraction) const
tmp cfdemCloud::voidfractionNuEff(volScalarField& voidfraction) const
{
- if (modelType_=="B")
+ if (modelType_=="B" || modelType_=="Bfull")
{
return tmp
(
diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H
index d53dd867..cafdfec4 100644
--- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H
+++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H
@@ -102,6 +102,8 @@ protected:
mutable double **fluidVel_;
+ mutable double **fAcc_;
+
mutable double **impForces_;
mutable double **expForces_;
@@ -120,6 +122,8 @@ protected:
mutable double **particleVolumes_;
+ mutable double **particleV_;
+
int numberOfParticles_;
bool numberOfParticlesChanged_;
@@ -140,6 +144,8 @@ protected:
bool impDEMdrag_;
+ bool impDEMdragAcc_;
+
mutable scalar imExSplitFactor_;
mutable bool treatVoidCellsAsExplicitForce_; //will treat the coupling force in cells with no Us data explicitly
@@ -246,6 +252,8 @@ public:
inline const bool& impDEMdrag() const;
+ inline const bool& impDEMdragAcc() const;
+
inline const scalar& imExSplitFactor() const;
inline const bool& treatVoidCellsAsExplicitForce() const;
@@ -266,6 +274,8 @@ public:
inline double ** fluidVels() const;
+ inline double ** fAccs() const;
+
inline double ** impForces() const;
inline double ** expForces() const;
diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H
index 3993ec17..fcdaae2c 100644
--- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H
+++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H
@@ -55,6 +55,11 @@ inline const bool& cfdemCloud::impDEMdrag() const
return impDEMdrag_;
};
+inline const bool& cfdemCloud::impDEMdragAcc() const
+{
+ return impDEMdragAcc_;
+};
+
inline const scalar& cfdemCloud::imExSplitFactor() const
{
return imExSplitFactor_;
@@ -110,6 +115,11 @@ inline double ** cfdemCloud::fluidVels() const
return fluidVel_;
}
+inline double ** cfdemCloud::fAccs() const
+{
+ return fAcc_;
+}
+
inline double ** cfdemCloud::impForces() const
{
return impForces_;
@@ -174,7 +184,7 @@ inline label Foam::cfdemCloud::body(int index)
inline double cfdemCloud::particleVolume(int index)
{
- return particleVolumes_[index][0];
+ return particleV_[index][0];
}
inline scalar cfdemCloud::radius(int index)
diff --git a/src/lagrangian/cfdemParticle/derived/cfdemCloudIB/cfdemCloudIB.C b/src/lagrangian/cfdemParticle/derived/cfdemCloudIB/cfdemCloudIB.C
index 828a859c..913881d2 100644
--- a/src/lagrangian/cfdemParticle/derived/cfdemCloudIB/cfdemCloudIB.C
+++ b/src/lagrangian/cfdemParticle/derived/cfdemCloudIB/cfdemCloudIB.C
@@ -121,7 +121,7 @@ bool Foam::cfdemCloudIB::evolve()
// set void fraction field
if(verbose_) Info << "- setvoidFraction()" << endl;
- voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_);
+ voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_,particleV_);
if(verbose_) Info << "setvoidFraction done." << endl;
}
@@ -190,6 +190,7 @@ void Foam::cfdemCloudIB::calcVelocityCorrection
}
//}
}
+ U.correctBoundaryConditions();
// make field divergence free - set reference value in case it is needed
fvScalarMatrix phiIBEqn
diff --git a/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.C b/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.C
index c282416c..91057bd4 100644
--- a/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.C
+++ b/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.C
@@ -56,8 +56,8 @@ cfdemCloudMS::cfdemCloudMS
cellIDsCM_(NULL),
bodies_(NULL),
nrigids_(NULL),
- nClumpTypes_(1),
clumpType_(NULL),
+ nClumpTypes_(1),
clumpVol_(NULL),
clumpDH_(NULL),
clumpWeights_(NULL),
@@ -73,6 +73,8 @@ cfdemCloudMS::cfdemCloudMS
DEMForcesCM_(NULL),
numberOfClumps_(-1),
numberOfClumpsChanged_(false),
+ manDHdev_(false),
+ dHbyV_(scalarList(0)),
useforcePerClump_(false),
forceModels_(couplingProperties_.lookup("forceModelsMS"))
{
@@ -86,6 +88,7 @@ cfdemCloudMS::cfdemCloudMS
forceModels_[i]
);
}
+
}
@@ -132,9 +135,17 @@ void cfdemCloudMS::getDEMdata()
//- save clump volume and mass
double **typeDH(NULL);
- dataExchangeM().allocateArray(typeDH,-1,1,nClumpTypes()+1);
- for(int k = 1;k <= nClumpTypes(); k++)
- typeDH[k][0]=pow(typeVol_[k]*1.9099,1./3.); // 6/pi=1.9099 // calc a hydraulic diameter as d of vol equal sphere
+ dataExchangeM().allocateArray(typeDH,-1,1,nClumpTypes()+1);
+ if(manDHdev_) // use manually defined dH
+ {
+ for(int k = 1;k <= nClumpTypes(); k++)
+ typeDH[k][0]=dHbyV_[k-1]*typeVol_[k];
+ }
+ else // calc dH from volAeqivalent shpere
+ {
+ for(int k = 1;k <= nClumpTypes(); k++)
+ typeDH[k][0]=pow(typeVol_[k]*1.9099,1./3.); // 6/pi=1.9099 // calc a hydraulic diameter as d of vol equal sphere
+ }
int ct(0);
for(int ind = 0;ind < numberOfClumps(); ind++)
@@ -193,7 +204,7 @@ bool cfdemCloudMS::reAllocArrays() const
dataExchangeM().allocateArray(cellIDsCM_,-1,1,"nbodies");
dataExchangeM().allocateArray(bodies_,0,1);
dataExchangeM().allocateArray(nrigids_,0,1,"nbodies");
- dataExchangeM().allocateArray(clumpType_,0,3,"nbodies");
+ dataExchangeM().allocateArray(clumpType_,0,1,"nbodies");
dataExchangeM().allocateArray(clumpVol_,0,1,"nbodies");
dataExchangeM().allocateArray(clumpDH_,1.,1,"nbodies");
dataExchangeM().allocateArray(clumpWeights_,1,1,"nbodies");
@@ -215,7 +226,6 @@ bool cfdemCloudMS::reAllocArrays() const
void Foam::cfdemCloudMS::setNumberOfParticles(int nP)
{
cfdemCloud::setNumberOfParticles(nP);
-
int nC = dataExchangeM().getNumberOfClumps();
if(nC != numberOfClumps())
@@ -223,6 +233,9 @@ void Foam::cfdemCloudMS::setNumberOfParticles(int nP)
numberOfClumpsChanged_ = true;
numberOfClumps_ = nC;
}
+
+ // in case last particle has left an ma-_tag_ms is not up to date
+ numberOfClumps_ = min(numberOfParticles(),numberOfClumps_);
}
void Foam::cfdemCloudMS::findCells()
diff --git a/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.H b/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.H
index 0d1fa40f..fb24fb51 100644
--- a/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.H
+++ b/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.H
@@ -59,7 +59,6 @@ class cfdemCloudMS
public cfdemCloud
{
private:
-
mutable double **positionsCM_;
mutable double **velocitiesCM_;
mutable double **cellIDsCM_;
@@ -86,9 +85,10 @@ private:
int numberOfClumps_;
bool numberOfClumpsChanged_;
+ Switch manDHdev_;
+ scalarList dHbyV_;
bool useforcePerClump_;
-
const wordList forceModels_;
autoPtr* forceModel_;
@@ -154,6 +154,12 @@ public:
inline bool numberOfClumpsChanged() const;
+ inline void setManDHdev(Switch);
+
+ inline void setDHbyV(scalarList);
+
+ inline scalarList& dHbyV();
+
inline bool useforcePerClump() const;
const forceModel& forceM(int);
diff --git a/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMSI.H b/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMSI.H
index 3a5d0fd2..8b1796a2 100644
--- a/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMSI.H
+++ b/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMSI.H
@@ -138,6 +138,21 @@ inline bool cfdemCloudMS::numberOfClumpsChanged() const
return numberOfClumpsChanged_;
}
+inline void cfdemCloudMS::setManDHdev(Switch v)
+{
+ manDHdev_ = v;
+}
+
+inline void cfdemCloudMS::setDHbyV(scalarList v)
+{
+ dHbyV_ = v;
+}
+
+inline scalarList& cfdemCloudMS::dHbyV()
+{
+ return dHbyV_;
+}
+
inline bool cfdemCloudMS::useforcePerClump() const
{
return useforcePerClump_;
diff --git a/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H b/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H
index 233ee974..aa7bbb96 100644
--- a/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H
+++ b/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H
@@ -8,7 +8,7 @@
//#define comp // if comp is on - you must use Make/options_comp!
//define multi sphere
-//#define multisphere
+#define multisphere
// features of 2.1 work also in 2.3
#if defined(version23)
diff --git a/src/lagrangian/cfdemParticle/etc/bashrc b/src/lagrangian/cfdemParticle/etc/bashrc
index d78af936..abef2168 100755
--- a/src/lagrangian/cfdemParticle/etc/bashrc
+++ b/src/lagrangian/cfdemParticle/etc/bashrc
@@ -37,12 +37,22 @@
#- export environment variables (adapt to your paths)
#------------------------------------------------------------------------------
+#check if default lammps lib path should be used
+if [[ $CFDEM_LAMMPS_LIB_DIR == "" ]]; then
+ export CFDEM_LAMMPS_LIB_DIR=$CFDEM_LIGGGHTS_SRC_DIR/../lib/
+else
+ echo "using already defined CFDEM_LAMMPS_LIB_DIR=$CFDEM_LAMMPS_LIB_DIR ."
+fi
+
#- LIGGGHTS lib name
export CFDEM_LIGGGHTS_LIB_NAME=lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME
#- CFDEM lib name
export CFDEM_LIB_NAME=lagrangianCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION
+#-----------------------------------------------------
+# additional libraries
+
#- LMP Many2Many lib path and makefile
export CFDEM_Many2ManyLIB_PATH=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/library
export CFDEM_Many2ManyLIB_MAKEFILENAME=$CFDEM_LIGGGHTS_MAKEFILE_NAME
@@ -52,9 +62,14 @@ export CFDEM_M2MLIB_PATH=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataE
export CFDEM_M2MLIB_MAKEFILENAME=$CFDEM_LIGGGHTS_MAKEFILE_NAME
#- LMP POEMS lib path and makefile
-export CFDEM_POEMSLIB_PATH=$CFDEM_LIGGGHTS_SRC_DIR/../lib/poems
+export CFDEM_POEMSLIB_PATH=$CFDEM_LAMMPS_LIB_DIR/poems
export CFDEM_POEMSLIB_MAKEFILENAME=g++
+#- LMP ASPHERE lib path and makefile
+export CFDEM_ASPHERELIB_PATH=$CFDEM_LAMMPS_LIB_DIR/poems
+export CFDEM_ASPHERELIB_MAKEFILENAME=g++
+#-----------------------------------------------------
+
#- path to test harness
export CFDEM_TEST_HARNESS_PATH=$CFDEM_PROJECT_USER_DIR/log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION
diff --git a/src/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh b/src/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh
index ac9f18d8..4461d7de 100755
--- a/src/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh
+++ b/src/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh
@@ -33,6 +33,8 @@ mkdir -p $logDir
COUNT=0
fi
+ logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
+
while [ $COUNT -lt $NLINES ]
do
let COUNT++
@@ -57,7 +59,7 @@ mkdir -p $logDir
#--------------------------------------------------------------------------------#
#- define variables
- logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
+ #logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
logfileName="log_compile$LINE""lib"
headerText="$logfileName""-$NOW"
libVarMakefileName="CFDEM_$LINE""LIB_MAKEFILENAME"
diff --git a/src/lagrangian/cfdemParticle/etc/functions.sh b/src/lagrangian/cfdemParticle/etc/functions.sh
index 45e91aae..526221aa 100755
--- a/src/lagrangian/cfdemParticle/etc/functions.sh
+++ b/src/lagrangian/cfdemParticle/etc/functions.sh
@@ -195,7 +195,13 @@ compileLMPlib()
rm $logpath/$logfileName
#- change path
- cd $libraryPath
+ if [ -d "$libraryPath" ]; then
+ cd $libraryPath
+ else
+ echo ""
+ echo "lib path $libraryPath does not exist - check settings in .../etc/bashrc."
+ read
+ fi
#- header
echo 2>&1 | tee -a $logpath/$logfileName
@@ -556,6 +562,7 @@ parCFDDEMrun()
machineFileName="$7"
debugMode="$8"
reconstuctCase="$9"
+ cleanCase="$10"
#--------------------------------------------------------------------------------#
if [ $debugMode == "on" ]; then
diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.C b/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.C
index c2fd0e6d..0883d0e6 100644
--- a/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.C
+++ b/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.C
@@ -50,6 +50,15 @@ int IOModel::dumpDEMdata() const
return -1;
}
+bool IOModel::dumpNow() const
+{
+ //bool dmp(false);
+ //if (time_.value()+SMALL > time_.endTime().value()-time_.deltaT().value() || time_.outputTime())
+ // dmp=true;
+
+ return time_.outputTime();
+}
+
fileName IOModel::createTimeDir(fileName path) const
{
fileName timeDirPath(path/time_.timeName());
diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.H b/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.H
index 28243339..d266fc0b 100644
--- a/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.H
+++ b/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.H
@@ -113,6 +113,8 @@ public:
virtual int dumpDEMdata() const;
+ bool dumpNow() const;
+
fileName createTimeDir(fileName) const;
fileName createLagrangianDir(fileName) const;
diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C b/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C
index c229befa..37214e61 100644
--- a/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C
+++ b/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C
@@ -84,7 +84,7 @@ basicIO::~basicIO()
int basicIO::dumpDEMdata() const
{
- if (time_.outputTime())
+ if (dumpNow())
{
// make time directory
if (parOutput_) lagPath_=buildFilePath(dirName_);
diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/sophIO/sophIO.C b/src/lagrangian/cfdemParticle/subModels/IOModel/sophIO/sophIO.C
index 98014eed..e540c5a6 100644
--- a/src/lagrangian/cfdemParticle/subModels/IOModel/sophIO/sophIO.C
+++ b/src/lagrangian/cfdemParticle/subModels/IOModel/sophIO/sophIO.C
@@ -79,7 +79,7 @@ int sophIO::dumpDEMdata() const
{
int npProcs(-1);
- if (time_.outputTime())
+ if (dumpNow())
{
npProcs=basicIO::dumpDEMdata();
diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/trackIO/trackIO.C b/src/lagrangian/cfdemParticle/subModels/IOModel/trackIO/trackIO.C
index 2f981e2b..888a08fc 100644
--- a/src/lagrangian/cfdemParticle/subModels/IOModel/trackIO/trackIO.C
+++ b/src/lagrangian/cfdemParticle/subModels/IOModel/trackIO/trackIO.C
@@ -77,7 +77,7 @@ int trackIO::dumpDEMdata() const
{
int npProcs(-1);
- if (time_.outputTime())
+ if (dumpNow())
{
npProcs = sophIO::dumpDEMdata();
diff --git a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/twoWayMany2Many.C b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/twoWayMany2Many.C
index 843245bb..bef6c76d 100644
--- a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/twoWayMany2Many.C
+++ b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/twoWayMany2Many.C
@@ -69,6 +69,12 @@ twoWayMany2Many::twoWayMany2Many
neighbourProcs_(pData_[Pstream::myProcNo()]),
neighbourProcIndices_(Pstream::nProcs(), -1)
{
+ allowDiagComm_=true;
+ if (propsDict_.found("allowDiagComm"))
+ allowDiagComm_=Switch(propsDict_.lookup("allowDiagComm"));
+ if(!allowDiagComm_)
+ Warning << "Make sure you decompose only in one direction as allowDiagComm flag is false!" << endl;
+
forAll(neighbourProcs_, i) neighbourProcIndices_[neighbourProcs_[i]] = i;
Info<<"Starting up LIGGGHTS for first time execution"<input->one(line);
+ MPI_Bcast(&n,1,MPI_INT,0,MPI_COMM_WORLD);
+ if (n > 0) {
+ MPI_Bcast(liggghtsPathChar,n,MPI_CHAR,0,MPI_COMM_WORLD);
+ if (liggghts == 1) lmp->input->file(liggghtsPathChar);
}
+ delete [] liggghtsPathChar;
+
// get DEM time step size
DEMts_ = lmp->update->dt;
checkTSsize();
@@ -189,14 +184,46 @@ void twoWayMany2Many::getData
) const
{
char* charName = wordToChar(name);
- if ( type == "vector-atom" && name != "x")
+ if(name != "x")
{
- double **tmp_ = (double **) lammps_extract_atom(lmp,charName);
- lmp2foam_vec_->exchange(tmp_ ? tmp_[0] : NULL, field[0]);
- }else if (name != "x")
- {
- double *tmp_ = (double *) lammps_extract_atom(lmp,charName);
- lmp2foam_->exchange(tmp_, field[0]);
+ if ( type == "vector-atom")
+ {
+ double **tmp_ = (double **) lammps_extract_atom(lmp,charName);
+ if(!tmp_)
+ {
+ LAMMPS_NS::Fix *fix = NULL;
+ fix = lmp->modify->find_fix_property(charName,"property/atom","vector",0,0,"cfd coupling",false);
+ if(fix)
+ tmp_ = (double **) static_cast(fix)->array_atom;
+ else
+ Warning << "coupling fix not found!"<exchange(tmp_ ? tmp_[0] : NULL, field[0]);
+ }else if ( type == "scalar-atom")
+ {
+ double *tmp_ = (double *) lammps_extract_atom(lmp,charName);
+ if(!tmp_)
+ {
+ LAMMPS_NS::Fix *fix = NULL;
+ fix = lmp->modify->find_fix_property(charName,"property/atom","scalar",0,0,"cfd coupling",true);
+ if(fix)
+ tmp_ = (double *) static_cast(fix)->vector_atom;
+ else
+ FatalError << "coupling fix not found!"<< abort(FatalError);
+
+ if(!tmp_)
+ FatalError << "find_fix_property " << charName << " array_atom not found." << abort(FatalError);
+ }
+
+ lmp2foam_->exchange(tmp_, field[0]);
+ }else
+ {
+ FatalError << "requesting type " << type << " and name " << name << abort(FatalError);
+ }
}
}
@@ -232,24 +259,26 @@ void twoWayMany2Many::giveData
else
Warning << "coupling fix not found!"<exchange(field[0],tmp_ ? tmp_[0] : NULL);
}else if( type == "scalar-atom" )
{
- Warning << "LIGGGHTS not ready for use of impleDEM and Many2Many" << endl;
double *tmp_=NULL;
LAMMPS_NS::Fix *fix = NULL;
- fix = lmp->modify->find_fix_property(charName,"property/atom","scalar",0,0,"cfd coupling",false);
+ fix = lmp->modify->find_fix_property(charName,"property/atom","scalar",0,0,"cfd coupling",true);
if(fix)
- tmp_ = (double *) static_cast(fix)->array_atom;
+ tmp_ = (double *) static_cast(fix)->vector_atom;
else
FatalError << "coupling fix not found!"<< abort(FatalError);
if(!tmp_)
- allocateArray(tmp_,0,nlocal_lammps_);
+ FatalError << "find_fix_property " << charName << " array_atom not found." << abort(FatalError);
- foam2lmp_->exchange(field[0],tmp_ ? tmp_ : NULL);
+ foam2lmp_->exchange(field[0],tmp_ ? tmp_ : NULL); // for double *
}else{
- FatalError << "twoWayMany2Many::giveData requested type not implemented! \n"<< abort(FatalError);
+ FatalError << "twoWayMany2Many::giveData requested type "<< type <<" not implemented! \n"<< abort(FatalError);
}
}
@@ -355,6 +384,7 @@ void inline Foam::twoWayMany2Many::destroy(int* array) const
bool Foam::twoWayMany2Many::couple() const
{
bool coupleNow = false;
+ label commandLines(0);
if (doCoupleNow())
{
couplingStep_++;
@@ -371,9 +401,13 @@ bool Foam::twoWayMany2Many::couple() const
if(particleCloud_.liggghtsCommand()[i]().runCommand(couplingStep()))
{
- const char* command = particleCloud_.liggghtsCommand()[i]().command(0);
- Info << "Executing command: '"<< command <<"'"<< endl;
- lmp->input->one(command);
+ commandLines=particleCloud_.liggghtsCommand()[i]().commandLines();
+ for(int j=0;jinput->one(command);
+ }
}
}
particleCloud_.clockM().stop("LIGGGHTS");
@@ -595,18 +629,29 @@ void Foam::twoWayMany2Many::locateParticle(int* id_lammpsSync, bool id_lammps_al
{
label patchI = pbm_.whichPatch(nearestFace);
+ label n(-1);
if (procPatchIndices_[patchI] != -1)
{
- label n = neighbourProcIndices_
+ n = neighbourProcIndices_
[
refCast
(
pbm_[patchI]
).neighbProcNo()
];
- particleTransferID[n].append(id_lammps_[i]);
- particleTransferPos[n].append(pos);
- commPart=true;
+
+ if(n==Pstream::myProcNo())
+ {
+ //Pout << couplingStep_ << "st communicating particle " << id_lammps_[i]
+ // << "communication fails as particle travels diagonal or jumps over proc" << endl;
+ }
+ else
+ {
+ particleTransferID[n].append(id_lammps_[i]);
+ particleTransferPos[n].append(pos);
+ commPart=true;
+ //Pout << couplingStep_ << "st communicating particle " << id_lammps_[i] << ", to proc# " << n << endl;
+ }
}
}
if (!commPart)
@@ -703,7 +748,7 @@ void Foam::twoWayMany2Many::locateParticle(int* id_lammpsSync, bool id_lammps_al
particleCloud_.clockM().start(9,"locate_Stage3");
int nlocal_foam_lostAll(-1);
- if (firstRun_)
+ if (firstRun_ || allowDiagComm_)
{
particleCloud_.clockM().start(10,"locate_Stage3_1");
MPI_Allreduce(&nlocal_foam_lost_, &nlocal_foam_lostAll, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
diff --git a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/twoWayMany2Many.H b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/twoWayMany2Many.H
index 180c3a0b..65d11150 100644
--- a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/twoWayMany2Many.H
+++ b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/twoWayMany2Many.H
@@ -90,6 +90,7 @@ private:
// new vars
mutable bool firstRun_;
+ Switch allowDiagComm_;
mutable bool particleLost_;
mutable double Npart_;
mutable Many2Many * lmp2foam_;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.C b/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.C
index 74625881..42416b79 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.C
@@ -63,8 +63,6 @@ Archimedes::Archimedes
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
twoDimensional_(false),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
gravityFieldName_(propsDict_.lookup("gravityFieldName")),
#if defined(version21) || defined(version16ext)
g_(sm.mesh().lookupObject (gravityFieldName_))
@@ -91,18 +89,20 @@ Archimedes::Archimedes
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
- forceSubM(0).setSwitchesList(1,true); // activate treatDEM switch
-
- // read those switches defined above, if provided in dict
+ forceSubM(0).setSwitchesList(1,true); // activate treatForceDEM switch
forceSubM(0).readSwitches();
- if (modelType_=="A"){
- forceSubM(0).setSwitches(1,true); // treatDEM = true
- Info << "accounting for Archimedes only on DEM side!" << endl;
+ if (modelType_=="A" || modelType_=="Bfull"){
+ if(!forceSubM(0).switches()[1]) // treatDEM != true
+ {
+ Warning << "Usually model type A and Bfull need Archimedes only on DEM side only (treatForceDEM=true)! are you sure about your settings?" << endl;
+ }
}
if (modelType_=="B"){
- forceSubM(0).setSwitches(1,false); // treatDEM = false
- Info << "accounting for Archimedes on DEM and CFD side!" << endl;
+ if(forceSubM(0).switches()[1]) // treatDEM = true
+ {
+ Warning << "Usually model type B needs Archimedes only on CFD and DEM side (treatForceDEM=false)! are you sure about your settings?" << endl;
+ }
}
particleCloud_.checkCG(true);
@@ -136,12 +136,21 @@ void Archimedes::setForce() const
if(twoDimensional_)
{
- force = -g_.value()*rho_[cellI]*pow(dp,2)/4*M_PI;
+ force = -g_.value()*forceSubM(0).rhoField()[cellI]*pow(dp,2)/4*M_PI;
Warning << "Archimedes::setForce() : this functionality is not tested!" << endl;
}else{
- force = -g_.value()*rho_[cellI]*particleCloud_.particleVolume(index);
+ force = -g_.value()*forceSubM(0).rhoField()[cellI]*particleCloud_.particleVolume(index);
}
+ //if(index >=0 && index <100)
+ //{
+ // Pout << "cellI = " << cellI << endl;
+ // Pout << "index = " << index << endl;
+ // Pout << "forceSubM(0).rhoField()[cellI] = " << forceSubM(0).rhoField()[cellI] << endl;
+ // Pout << "particleCloud_.particleVolume(index) = " << particleCloud_.particleVolume(index) << endl;
+ // Pout << "force = " << force << endl;
+ //}
+
//Set value fields and write the probe
if(probeIt_)
{
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.H b/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.H
index 59747b8c..41d3c51d 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.H
@@ -63,10 +63,6 @@ private:
bool twoDimensional_;
- word densityFieldName_;
-
- const volScalarField& rho_; // ref to fluid density
-
word gravityFieldName_;
#ifdef version21
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.C b/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.C
index e8915b7b..846f43aa 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.C
@@ -63,8 +63,6 @@ ArchimedesIB::ArchimedesIB
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
twoDimensional_(false),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")), //mod by alice
voidfractions_(sm.mesh().lookupObject (voidfractionFieldName_)),//mod by alice
gravityFieldName_(propsDict_.lookup("gravityFieldName")),
@@ -125,8 +123,8 @@ void ArchimedesIB::setForce() const
label cellI = particleCloud_.cellIDs()[index][subCell];
if (cellI > -1) // particle Found
{
- //force += -g_.value()*rho_[cellI]*rho_.mesh().V()[cellI]*(1-particleCloud_.voidfractions()[index][subCell]);//mod by alice
- force += -g_.value()*rho_[cellI]*rho_.mesh().V()[cellI]*(1-voidfractions_[cellI]);//mod by alice
+ //force += -g_.value()*forceSubM(0).rhoField()[cellI]*forceSubM(0).rhoField().mesh().V()[cellI]*(1-particleCloud_.voidfractions()[index][subCell]);//mod by alice
+ force += -g_.value()*forceSubM(0).rhoField()[cellI]*particleCloud_.mesh().V()[cellI]*(1-voidfractions_[cellI]);//mod by alice
}
}
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.H b/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.H
index a117e523..7b1ff8e6 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.H
@@ -65,10 +65,6 @@ private:
bool twoDimensional_;
- word densityFieldName_;
-
- const volScalarField& rho_; // ref to fluid density
-
word voidfractionFieldName_;
const volScalarField& voidfractions_;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.C b/src/lagrangian/cfdemParticle/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.C
index d31e980f..57160c15 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.C
@@ -64,14 +64,10 @@ DiFeliceDrag::DiFeliceDrag
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
- verbose_(false),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject (velFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject (voidfractionFieldName_)),
- interpolation_(false),
UsFieldName_(propsDict_.lookup("granVelFieldName")),
UsField_(sm.mesh().lookupObject (UsFieldName_)),
scaleDia_(1.),
@@ -86,12 +82,6 @@ DiFeliceDrag::DiFeliceDrag
particleCloud_.probeM().scalarFields_.append("voidfraction"); //other are debug
particleCloud_.probeM().writeHeader();
- if (propsDict_.found("verbose")) verbose_=true;
- if (propsDict_.found("interpolation"))
- {
- Info << "using interpolated value of U." << endl;
- interpolation_=true;
- }
particleCloud_.checkCG(true);
if (propsDict_.found("scale"))
scaleDia_=scalar(readScalar(propsDict_.lookup("scale")));
@@ -104,6 +94,9 @@ DiFeliceDrag::DiFeliceDrag
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
forceSubM(0).setSwitchesList(2,true); // activate implDEM switch
+ forceSubM(0).setSwitchesList(3,true); // activate search for verbose switch
+ forceSubM(0).setSwitchesList(4,true); // activate search for interpolate switch
+ forceSubM(0).setSwitchesList(8,true); // activate scalarViscosity switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
@@ -126,14 +119,10 @@ void DiFeliceDrag::setForce() const
scaleDia_=particleCloud_.cg();
Info << "DiFeliceDrag using scale from liggghts cg = " << scaleDia_ << endl;
}
-
- // get viscosity field
- #ifdef comp
- const volScalarField nufField = particleCloud_.turbulence().mu() / rho_;
- #else
- const volScalarField& nufField = particleCloud_.turbulence().nu();
- #endif
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
+
vector position(0,0,0);
scalar voidfraction(1);
vector Ufluid(0,0,0);
@@ -157,9 +146,6 @@ void DiFeliceDrag::setForce() const
for(int index = 0;index < particleCloud_.numberOfParticles(); index++)
{
- //if(mask[index][0])
- //{
-
cellI = particleCloud_.cellIDs()[index][0];
drag = vector(0,0,0);
dragExplicit = vector(0,0,0);
@@ -168,7 +154,7 @@ void DiFeliceDrag::setForce() const
if (cellI > -1) // particle Found
{
- if(interpolation_)
+ if(forceSubM(0).interpolation())
{
position = particleCloud_.position(index);
voidfraction = voidfractionInterpolator_.interpolate(position,cellI);
@@ -183,7 +169,7 @@ void DiFeliceDrag::setForce() const
Ur = Ufluid-Us;
ds = 2*particleCloud_.radius(index);
nuf = nufField[cellI];
- rho = rho_[cellI];
+ rho = rhoField[cellI];
magUr = mag(Ur);
Rep = 0;
Cd = 0;
@@ -212,10 +198,10 @@ void DiFeliceDrag::setForce() const
drag = dragCoefficient*Ur; //total drag force!
- forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],verbose_,index);
+ forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],forceSubM(0).verbose(),index);
}
- if(verbose_ && index >-1 && index <102)
+ if(forceSubM(0).verbose() && index >-1 && index <102)
{
Pout << "index = " << index << endl;
Pout << "Us = " << Us << endl;
@@ -245,7 +231,6 @@ void DiFeliceDrag::setForce() const
// write particle based data to global array
forceSubM(0).partToArray(index,drag,dragExplicit,Ufluid,dragCoefficient);
}
- //}
}
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.H b/src/lagrangian/cfdemParticle/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.H
index be593035..a043b28e 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.H
@@ -60,22 +60,14 @@ class DiFeliceDrag
private:
dictionary propsDict_;
- bool verbose_;
-
word velFieldName_;
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
word voidfractionFieldName_;
const volScalarField& voidfraction_;
- bool interpolation_; // use interpolated U field values
-
word UsFieldName_;
const volVectorField& UsField_; // the average particle velocity field (for implicit/expliti force split)
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/GidaspowDrag/GidaspowDrag.C b/src/lagrangian/cfdemParticle/subModels/forceModel/GidaspowDrag/GidaspowDrag.C
index e5d661ed..778a1e01 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/GidaspowDrag/GidaspowDrag.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/GidaspowDrag/GidaspowDrag.C
@@ -63,15 +63,11 @@ GidaspowDrag::GidaspowDrag
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
- verbose_(false),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject (velFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject (voidfractionFieldName_)),
phi_(readScalar(propsDict_.lookup("phi"))),
- interpolation_(false),
UsFieldName_(propsDict_.lookup("granVelFieldName")),
UsField_(sm.mesh().lookupObject (UsFieldName_)),
scaleDia_(1.),
@@ -87,17 +83,14 @@ GidaspowDrag::GidaspowDrag
particleCloud_.probeM().scalarFields_.append("voidfraction");
particleCloud_.probeM().writeHeader();
- if (propsDict_.found("verbose")) verbose_=true;
- if (propsDict_.found("interpolation")) interpolation_=true;
-
// init force sub model
setForceSubModels(propsDict_);
-
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
forceSubM(0).setSwitchesList(2,true); // activate implDEM switch
-
- // read those switches defined above, if provided in dict
+ forceSubM(0).setSwitchesList(3,true); // activate search for verbose switch
+ forceSubM(0).setSwitchesList(4,true); // activate search for interpolate switch
+ forceSubM(0).setSwitchesList(8,true); // activate scalarViscosity switch
forceSubM(0).readSwitches();
particleCloud_.checkCG(true);
@@ -108,8 +101,6 @@ GidaspowDrag::GidaspowDrag
if (propsDict_.found("switchingVoidfraction"))
switchingVoidfraction_ = readScalar(propsDict_.lookup("switchingVoidfraction"));
-
- Info << "Gidaspow - interpolation switch: " << interpolation_ << endl;
}
@@ -130,12 +121,8 @@ void GidaspowDrag::setForce() const
Info << "Gidaspow using scale from liggghts cg = " << scaleDia_ << endl;
}
- // get viscosity field
- #ifdef comp
- const volScalarField nufField = particleCloud_.turbulence().mu() / rho_;
- #else
- const volScalarField& nufField = particleCloud_.turbulence().nu();
- #endif
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
vector position(0,0,0);
scalar voidfraction(1);
@@ -180,7 +167,7 @@ void GidaspowDrag::setForce() const
if (cellI > -1) // particle Found
{
- if(interpolation_)
+ if( forceSubM(0).interpolation() )
{
position = particleCloud_.position(index);
voidfraction = voidfractionInterpolator_.interpolate(position,cellI);
@@ -199,8 +186,8 @@ void GidaspowDrag::setForce() const
Us = particleCloud_.velocity(index);
Ur = Ufluid-Us;
magUr = mag(Ur);
- ds = 2*particleCloud_.radius(index)*phi_;
- rho = rho_[cellI];
+ ds = 2*particleCloud_.radius(index);
+ rho = rhoField[cellI];
nuf = nufField[cellI];
Rep=0.0;
@@ -223,10 +210,10 @@ void GidaspowDrag::setForce() const
else //dense
{
betaP = (150 * localPhiP*nuf*rho) //this is betaP = beta / localPhiP!
- / (voidfraction*ds/scaleDia_*ds/scaleDia_)
+ / (voidfraction*ds/scaleDia_*phi_*ds/scaleDia_*phi_)
+
(1.75 * magUr * rho)
- /((ds/scaleDia_));
+ /((ds/scaleDia_*phi_));
}
// calc particle's drag
@@ -237,9 +224,9 @@ void GidaspowDrag::setForce() const
drag = dragCoefficient * Ur;
// explicitInterpCorr
- forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],verbose_);
+ forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],forceSubM(0).verbose());
- if(verbose_ && index >=0 && index <2)
+ if(forceSubM(0).verbose() && index >=0 && index <2)
{
Pout << "cellI = " << cellI << endl;
Pout << "index = " << index << endl;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/GidaspowDrag/GidaspowDrag.H b/src/lagrangian/cfdemParticle/subModels/forceModel/GidaspowDrag/GidaspowDrag.H
index db45472e..61c7d191 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/GidaspowDrag/GidaspowDrag.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/GidaspowDrag/GidaspowDrag.H
@@ -32,7 +32,7 @@ Description
- only valid for low-Reynolds number systems (Re_p<1000)
- including interpolation of the velocity to the exact position
- splits off explicit drag component due to fluctuation in fluid and particle
- velocity
+ velocity (optional via forceSubModel "ImExCorr")
Class
GidaspowDrag
@@ -64,24 +64,16 @@ class GidaspowDrag
private:
dictionary propsDict_;
- bool verbose_;
-
word velFieldName_;
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
word voidfractionFieldName_;
const volScalarField& voidfraction_;
const scalar phi_;
- bool interpolation_; // use interpolated field values
-
word UsFieldName_;
const volVectorField& UsField_; // the average particle velocity field
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.C b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.C
index d0c12c85..5684071d 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.C
@@ -64,16 +64,12 @@ KochHillDrag::KochHillDrag
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
- verbose_(false),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject (velFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject (voidfractionFieldName_)),
UsFieldName_(propsDict_.lookupOrDefault("granVelFieldName",word("Us"))),
UsField_(sm.mesh().lookupObject (UsFieldName_)),
- interpolation_(false),
scaleDia_(1.),
scaleDrag_(1.)
{
@@ -86,15 +82,16 @@ KochHillDrag::KochHillDrag
particleCloud_.probeM().scalarFields_.append("voidfraction"); //other are debug
particleCloud_.probeM().writeHeader();
- if (propsDict_.found("verbose")) verbose_=true;
- if (propsDict_.found("interpolation")) interpolation_=true;
-
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
forceSubM(0).setSwitchesList(2,true); // activate implDEM switch
+ forceSubM(0).setSwitchesList(3,true); // activate search for verbose switch
+ forceSubM(0).setSwitchesList(4,true); // activate search for interpolate switch
+ forceSubM(0).setSwitchesList(7,true); // activate implForceDEMacc switch
+ forceSubM(0).setSwitchesList(8,true); // activate scalarViscosity switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
@@ -125,12 +122,8 @@ void KochHillDrag::setForce() const
Info << "KochHill using scale from liggghts cg = " << scaleDia_ << endl;
}
- // get viscosity field
- #ifdef comp
- const volScalarField nufField = particleCloud_.turbulence().mu()/rho_;
- #else
- const volScalarField& nufField = particleCloud_.turbulence().nu();
- #endif
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
vector position(0,0,0);
scalar voidfraction(1);
@@ -151,6 +144,8 @@ void KochHillDrag::setForce() const
scalar volumefraction(0);
scalar betaP(0);
+ int couplingInterval(particleCloud_.dataExchangeM().couplingInterval());
+
interpolationCellPoint voidfractionInterpolator_(voidfraction_);
interpolationCellPoint UInterpolator_(U_);
@@ -158,8 +153,6 @@ void KochHillDrag::setForce() const
for(int index = 0;index < particleCloud_.numberOfParticles(); index++)
{
- //if(mask[index][0])
- //{
cellI = particleCloud_.cellIDs()[index][0];
drag = vector(0,0,0);
dragExplicit = vector(0,0,0);
@@ -171,7 +164,7 @@ void KochHillDrag::setForce() const
if (cellI > -1) // particle Found
{
- if(interpolation_)
+ if(forceSubM(0).interpolation())
{
position = particleCloud_.position(index);
voidfraction = voidfractionInterpolator_.interpolate(position,cellI);
@@ -190,7 +183,7 @@ void KochHillDrag::setForce() const
Ur = Ufluid-Us;
ds = particleCloud_.d(index);
nuf = nufField[cellI];
- rho = rho_[cellI];
+ rho = rhoField[cellI];
magUr = mag(Ur);
Rep = 0;
Vs = ds*ds*ds*M_PI/6;
@@ -230,13 +223,20 @@ void KochHillDrag::setForce() const
if (modelType_=="B")
dragCoefficient /= voidfraction;
- drag = dragCoefficient * Ur;
+ if(forceSubM(0).switches()[7]) // implForceDEMaccumulated=true
+ {
+ //get drag from the particle itself
+ for (int j=0 ; j<3 ; j++) drag[j] = particleCloud_.fAccs()[index][j]/couplingInterval;
+ }else
+ {
+ drag = dragCoefficient * Ur;
- // explicitInterpCorr
- forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],verbose_);
+ // explicitInterpCorr
+ forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],forceSubM(0).verbose());
+ }
}
- if(verbose_ && index >=0 && index <2)
+ if(forceSubM(0).verbose() && index >=0 && index <2)
{
Pout << "cellI = " << cellI << endl;
Pout << "index = " << index << endl;
@@ -267,8 +267,6 @@ void KochHillDrag::setForce() const
// write particle based data to global array
forceSubM(0).partToArray(index,drag,dragExplicit,Ufluid,dragCoefficient);
-
- //}
}
}
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.H b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.H
index 77b6cec1..95d6712e 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.H
@@ -64,16 +64,10 @@ class KochHillDrag
private:
dictionary propsDict_;
- bool verbose_;
-
word velFieldName_;
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
word voidfractionFieldName_;
const volScalarField& voidfraction_;
@@ -82,8 +76,6 @@ private:
const volVectorField& UsField_;
- bool interpolation_; // use interpolated field values
-
mutable scalar scaleDia_;
mutable scalar scaleDrag_;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillRWDrag/KochHillRWDrag.C b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillRWDrag/KochHillRWDrag.C
index 994e005e..fe35fab4 100755
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillRWDrag/KochHillRWDrag.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillRWDrag/KochHillRWDrag.C
@@ -67,8 +67,6 @@ KochHillRWDrag::KochHillRWDrag
verbose_(false),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject (velFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject (voidfractionFieldName_)),
UsFieldName_(propsDict_.lookupOrDefault("granVelFieldName",word("Us"))),
@@ -152,16 +150,9 @@ void KochHillRWDrag::setForce() const
Info << "KochHillRW using scale from liggghts cg = " << scale_ << endl;
}
- // get viscosity field
- #ifdef comp
- const volScalarField nufField = particleCloud_.turbulence().mu()/rho_;
- const volScalarField& muField = particleCloud_.turbulence().mu();
- #else
- const volScalarField& nufField = particleCloud_.turbulence().nu();
- const volScalarField muField = particleCloud_.turbulence().nu()*rho_;
-
- #endif
-
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& mufField = forceSubM(0).muField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
vector position(0,0,0);
scalar voidfraction(1);
@@ -263,7 +254,7 @@ void KochHillRWDrag::setForce() const
if(t>=partTime_[index][0])
{
scalar ds = 2*particleCloud_.radius(index);
- mu = muField[cellI];
+ mu = mufField[cellI];
k = kField[cellI];
epsilon = epsilonField[cellI];
@@ -323,7 +314,7 @@ void KochHillRWDrag::setForce() const
ds = 2*particleCloud_.radius(index);
nuf = nufField[cellI];
- rho = rho_[cellI];
+ rho = rhoField[cellI];
Rep = 0;
Vs = ds*ds*ds*M_PI/6;
volumefraction = 1-voidfraction+SMALL;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillRWDrag/KochHillRWDrag.H b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillRWDrag/KochHillRWDrag.H
index a78f04b9..d43aaddc 100755
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillRWDrag/KochHillRWDrag.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillRWDrag/KochHillRWDrag.H
@@ -71,10 +71,6 @@ private:
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
word voidfractionFieldName_;
const volScalarField& voidfraction_;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C
index d92e225a..1fdccec8 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C
@@ -63,7 +63,6 @@ LaEuScalarTemp::LaEuScalarTemp
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
- verbose_(false),
tempFieldName_(propsDict_.lookup("tempFieldName")),
tempField_(sm.mesh().lookupObject (tempFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
@@ -76,10 +75,7 @@ LaEuScalarTemp::LaEuScalarTemp
partHeatFluxName_(propsDict_.lookup("partHeatFluxName")),
partHeatFlux_(NULL),
lambda_(readScalar(propsDict_.lookup("lambda"))),
- Cp_(readScalar(propsDict_.lookup("Cp"))),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
- interpolation_(false)
+ Cp_(readScalar(propsDict_.lookup("Cp")))
{
allocateMyArrays();
@@ -88,10 +84,18 @@ LaEuScalarTemp::LaEuScalarTemp
maxSource_=readScalar(propsDict_.lookup ("maxSource"));
Info << "limiting eulerian source field to: " << maxSource_ << endl;
}
- if (propsDict_.found("interpolation")) interpolation_=true;
- if (propsDict_.found("verbose")) verbose_=true;
-Info << "verbose_" << verbose_ << endl;
+ // init force sub model
+ setForceSubModels(propsDict_);
+
+ // define switches which can be read from dict
+ forceSubM(0).setSwitchesList(3,true); // activate search for verbose switch
+ forceSubM(0).setSwitchesList(4,true); // activate search for interpolate switch
+ forceSubM(0).setSwitchesList(8,true); // activate scalarViscosity switch
+
+ // read those switches defined above, if provided in dict
+ forceSubM(0).readSwitches();
+
particleCloud_.checkCG(false);
}
@@ -131,12 +135,10 @@ void LaEuScalarTemp::manipulateScalarField(volScalarField& EuField) const
// get DEM data
particleCloud_.dataExchangeM().getData(partTempName_,"scalar-atom",partTemp_);
- // get viscosity field
- #ifdef comp
- const volScalarField& nufField = particleCloud_.turbulence().mu() / rho_;
- #else
- const volScalarField& nufField = particleCloud_.turbulence().nu();
- #endif
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
+
+Info << "nufField=" << nufField << endl;
// calc La based heat flux
vector position(0,0,0);
@@ -165,7 +167,7 @@ void LaEuScalarTemp::manipulateScalarField(volScalarField& EuField) const
cellI = particleCloud_.cellIDs()[index][0];
if(cellI >= 0)
{
- if(interpolation_)
+ if(forceSubM(0).interpolation())
{
position = particleCloud_.position(index);
voidfraction = voidfractionInterpolator_.interpolate(position,cellI);
@@ -185,7 +187,7 @@ void LaEuScalarTemp::manipulateScalarField(volScalarField& EuField) const
As = ds*ds*M_PI;
nuf = nufField[cellI];
Rep = ds*magUr/nuf;
- Pr = Cp_*nuf*rho_[cellI]/lambda_;
+ Pr = Cp_*nuf*rhoField[cellI]/lambda_;
if (Rep < 200)
{
@@ -207,7 +209,7 @@ void LaEuScalarTemp::manipulateScalarField(volScalarField& EuField) const
partHeatFlux_[index][0] = partHeatFlux;
- if(verbose_ && index >=0 && index <2)
+ if(forceSubM(0).verbose() && index >=0 && index <2)
{
Info << "partHeatFlux = " << partHeatFlux << endl;
Info << "magUr = " << magUr << endl;
@@ -233,7 +235,7 @@ void LaEuScalarTemp::manipulateScalarField(volScalarField& EuField) const
);
// scale with -1/(Vcell*rho*Cp)
- EuField.internalField() /= -rho_.internalField()*Cp_*EuField.mesh().V();
+ EuField.internalField() /= -rhoField.internalField()*Cp_*EuField.mesh().V();
// limit source term
scalar EuFieldInCell;
@@ -247,7 +249,7 @@ void LaEuScalarTemp::manipulateScalarField(volScalarField& EuField) const
}
}
- Info << "total convective particle-fluid heat flux [W] (Eulerian) = " << gSum(EuField*rho_*Cp_*EuField.mesh().V()) << endl;
+ Info << "total convective particle-fluid heat flux [W] (Eulerian) = " << gSum(EuField*rhoField*Cp_*EuField.mesh().V()) << endl;
// give DEM data
particleCloud_.dataExchangeM().giveData(partHeatFluxName_,"scalar-atom", partHeatFlux_);
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.H b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.H
index fe72dc01..01e6354f 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.H
@@ -65,8 +65,6 @@ private:
dictionary propsDict_;
- bool verbose_;
-
word tempFieldName_;
const volScalarField& tempField_; // ref to temperature field
@@ -93,12 +91,6 @@ private:
scalar Cp_; // specific heat capacity [W*s/(kg*K)]
- word densityFieldName_;
-
- const volScalarField& rho_; // ref to fluid density field
-
- bool interpolation_; // use interpolated field values
-
void allocateMyArrays() const;
public:
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.C b/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.C
index 05d12b02..cc745a4e 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.C
@@ -66,30 +66,20 @@ MeiLift::MeiLift
propsDict_(dict.subDict(typeName + "Props")),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject (velFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
- useSecondOrderTerms_(false),
- interpolation_(false),
- verbose_(false)
-/*,
- vorticityFieldName_(propsDict_.lookup("vorticityFieldName")),
- vorticity_(sm.mesh().lookupObject (vorticityFieldName_))*/
+ useSecondOrderTerms_(false)
{
if (propsDict_.found("useSecondOrderTerms")) useSecondOrderTerms_=true;
// init force sub model
setForceSubModels(propsDict_);
-
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
-
- // read those switches defined above, if provided in dict
+ forceSubM(0).setSwitchesList(3,true); // activate search for verbose switch
+ forceSubM(0).setSwitchesList(4,true); // activate search for interpolate switch
+ forceSubM(0).setSwitchesList(8,true); // activate scalarViscosity switch
forceSubM(0).readSwitches();
- if (propsDict_.found("interpolation")) interpolation_=true;
- if (propsDict_.found("verbose")) verbose_=true;
-
- particleCloud_.checkCG(false);
+ particleCloud_.checkCG(false);
//Append the field names to be probed
particleCloud_.probeM().initialize(typeName, "meiLift.logDat");
@@ -114,12 +104,8 @@ MeiLift::~MeiLift()
void MeiLift::setForce() const
{
- // get viscosity field
- #ifdef comp
- const volScalarField nufField = particleCloud_.turbulence().mu() / rho_;
- #else
- const volScalarField& nufField = particleCloud_.turbulence().nu();
- #endif
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
vector position(0,0,0);
vector lift(0,0,0);
@@ -159,7 +145,7 @@ void MeiLift::setForce() const
{
Us = particleCloud_.velocity(index);
- if(interpolation_)
+ if( forceSubM(0).interpolation() )
{
position = particleCloud_.position(index);
Ur = UInterpolator_.interpolate(position,cellI)
@@ -180,7 +166,7 @@ void MeiLift::setForce() const
{
ds = 2*particleCloud_.radius(index);
nuf = nufField[cellI];
- rho = rho_[cellI];
+ rho = rhoField[cellI];
// calc dimensionless properties
Rep = ds*magUr/nuf;
@@ -236,7 +222,7 @@ void MeiLift::setForce() const
//**********************************
//SAMPLING AND VERBOSE OUTOUT
- if(verbose_ )
+ if( forceSubM(0).verbose() )
{
Pout << "index = " << index << endl;
Pout << "Us = " << Us << endl;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.H b/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.H
index 86eb066f..6a6016b9 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.H
@@ -80,20 +80,8 @@ private:
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
bool useSecondOrderTerms_;
- bool interpolation_;
-
- bool verbose_;
-
- /*word vorticityFieldName_;
-
- volVectorField& vorticity_;*/
-
public:
//- Runtime type information
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.C b/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.C
index e034b8d9..6aa7f206 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.C
@@ -66,9 +66,7 @@ SchillerNaumannDrag::SchillerNaumannDrag
propsDict_(dict.subDict(typeName + "Props")),
verbose_(false),
velFieldName_(propsDict_.lookup("velFieldName")),
- U_(sm.mesh().lookupObject (velFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_))
+ U_(sm.mesh().lookupObject (velFieldName_))
{
//Append the field names to be probed
particleCloud_.probeM().initialize(typeName, "schillerNaumannDrag.logDat");
@@ -103,15 +101,11 @@ SchillerNaumannDrag::~SchillerNaumannDrag()
void SchillerNaumannDrag::setForce() const
{
- // get viscosity field
- #ifdef comp
- const volScalarField nufField = particleCloud_.turbulence().mu() / rho_;
- #else
- const volScalarField& nufField = particleCloud_.turbulence().nu();
- #endif
-
#include "setupProbeModel.H"
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
+
for(int index = 0;index < particleCloud_.numberOfParticles(); index++)
{
//if(mask[index][0])
@@ -126,7 +120,7 @@ void SchillerNaumannDrag::setForce() const
vector Ur = U_[cellI]-Us;
scalar ds = 2*particleCloud_.radius(index);
scalar nuf = nufField[cellI];
- scalar rho = rho_[cellI];
+ scalar rho = rhoField[cellI];
scalar voidfraction = particleCloud_.voidfraction(index);
scalar magUr = mag(Ur);
scalar Rep = 0;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.H b/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.H
index f898a668..4b7dc8d2 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.H
@@ -66,10 +66,6 @@ private:
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
public:
//- Runtime type information
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.C b/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.C
index 33ac3f19..310783ff 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.C
@@ -68,8 +68,6 @@ ShirgaonkarIB::ShirgaonkarIB
depth_(1),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject (velFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
pressureFieldName_(propsDict_.lookup("pressureFieldName")),
p_(sm.mesh().lookupObject (pressureFieldName_))
{
@@ -115,13 +113,12 @@ void ShirgaonkarIB::setForce() const
vector drag;
#ifdef comp
- // get viscosity field
- const volScalarField& mufField = particleCloud_.turbulence().mu();
+ const volScalarField& mufField = forceSubM(0).muField();
volVectorField h = (mufField*fvc::laplacian(U_)-fvc::grad(p_));
#else
- // get viscosity field
- const volScalarField& nufField = particleCloud_.turbulence().nu();
- volVectorField h = rho_*(nufField*fvc::laplacian(U_)-fvc::grad(p_));
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
+ volVectorField h = rhoField*(nufField*fvc::laplacian(U_)-fvc::grad(p_));
#endif
#include "setupProbeModel.H"
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.H b/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.H
index ff462348..feb270ae 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.H
@@ -70,10 +70,6 @@ private:
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
word pressureFieldName_;
const volScalarField& p_;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/checkCouplingInterval/checkCouplingInterval.C b/src/lagrangian/cfdemParticle/subModels/forceModel/checkCouplingInterval/checkCouplingInterval.C
index 97ad879f..ab50686c 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/checkCouplingInterval/checkCouplingInterval.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/checkCouplingInterval/checkCouplingInterval.C
@@ -64,8 +64,6 @@ checkCouplingInterval::checkCouplingInterval
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
rhoP_(readScalar(propsDict_.lookup("rhoP")))
{}
@@ -82,12 +80,9 @@ void checkCouplingInterval::setForce() const
{
if(particleCloud_.mesh().time().write())
{
- // get viscosity field
- #ifdef comp
- const volScalarField nufField = particleCloud_.turbulence().mu() / rho_;
- #else
- const volScalarField& nufField = particleCloud_.turbulence().nu();
- #endif
+
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
// find min particle relaxation time
scalar minTauP = 1000;
@@ -101,7 +96,7 @@ void checkCouplingInterval::setForce() const
{
scaledRad = particleCloud_.radius(index)/particleCloud_.cg();
tauP = rhoP_*4*scaledRad*scaledRad/
- (18 * nufField[cellI] * rho_[cellI]);
+ (18 * nufField[cellI] * rhoField[cellI]);
minTauP = min(minTauP,tauP);
}
}
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/checkCouplingInterval/checkCouplingInterval.H b/src/lagrangian/cfdemParticle/subModels/forceModel/checkCouplingInterval/checkCouplingInterval.H
index 0ff44acb..01d1943d 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/checkCouplingInterval/checkCouplingInterval.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/checkCouplingInterval/checkCouplingInterval.H
@@ -62,10 +62,6 @@ class checkCouplingInterval
private:
dictionary propsDict_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
const scalar rhoP_;
public:
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/forceSubModels/forceSubModel/forceSubModel.C b/src/lagrangian/cfdemParticle/subModels/forceModel/forceSubModels/forceSubModel/forceSubModel.C
index 9f8b696a..ba1aaa9d 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/forceSubModels/forceSubModel/forceSubModel.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/forceSubModels/forceSubModel/forceSubModel.C
@@ -59,15 +59,39 @@ forceSubModel::forceSubModel
dict_(dict),
particleCloud_(sm),
forceModel_(fm),
- nrDefaultSwitches_(3),
+ nrDefaultSwitches_(9), // !!!
switchesNameList_(wordList(nrDefaultSwitches_)),
switchesList_(List(nrDefaultSwitches_)),
- switches_(List(nrDefaultSwitches_))
+ switches_(List(nrDefaultSwitches_)),
+ nu_
+ (
+ IOobject
+ (
+ "scalarViscosity",
+ sm.mesh().time().timeName(),
+ sm.mesh(),
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ sm.mesh(),
+ dimensionedScalar("nu0", dimensionSet(0, 2, -1, 0, 0), 1.)
+ ),
+ nuField_(sm.turbulence().nu()),
+ densityFieldName_(dict_.lookupOrDefault("densityFieldName","rho")),
+ rho_(sm.mesh().lookupObject (densityFieldName_))
{
- // init switches lists
- switchesNameList_[0]="treatExplicit";
- switchesNameList_[1]="treatDEM";
- switchesNameList_[2]="implDEM";
+ // init standard switch list
+ int iCounter(0);
+ switchesNameList_[iCounter]="treatForceExplicit"; iCounter++; //0
+ switchesNameList_[iCounter]="treatForceDEM";iCounter++; //1
+ switchesNameList_[iCounter]="implForceDEM";iCounter++; //2
+ switchesNameList_[iCounter]="verbose";iCounter++; //3
+ switchesNameList_[iCounter]="interpolation";iCounter++; //4
+ switchesNameList_[iCounter]="useFilteredDragModel";iCounter++; //5
+ switchesNameList_[iCounter]="useParcelSizeDependentFilteredDrag";iCounter++; //6
+ switchesNameList_[iCounter]="implForceDEMaccumulated";iCounter++; //7
+ switchesNameList_[iCounter]="scalarViscosity";iCounter++; //8
+
for(int i=0;i 0+SMALL)
+ if(switchesList_[i] > 0+SMALL) //check if switch is required
{
Info << " looking for " << switchesNameList_[i] << " ..." << endl;
if (dict_.found(switchesNameList_[i]))
@@ -161,20 +187,91 @@ void forceSubModel::readSwitches() const
}
Info << endl;
- if(switches_[2]) // implDEM=true
+ if(switches_[2]) // implForceDEM=true
{
- // communicate implDEM to particleCloud
+ // communicate implForceDEM to particleCloud
particleCloud_.impDEMdrag_=true;
// do sanity check
if(switches_[0]) // treatExplicit=true
{
- Warning<< "please check your settings, treatExplicit together with implDEM does not work! (using treatExplicit=false)" << endl;
- switches_[0]=false;
+ FatalError << "Please check your settings, treatExplicit together with implForceDEM does not work!."
+ << abort(FatalError);
}
}
+
+ if(switches_[7]) // implForceDEMaccumulated=true
+ {
+ // sanity check for implForceDEMaccumulated
+ if(!switches_[2]) //implForceDEM=false
+ {
+ Warning<< "please check your settings, implForceDEMaccumulated without implForceDEM does not work! (using implForceDEMaccumulated=false)" << endl;
+ switches_[3]=false;
+ }else
+ {
+ particleCloud_.impDEMdragAcc_=true;
+ }
+ }
+
+ if(switches_[8]) // scalarViscosity=true
+ {
+ Info << "Using a constant viscosity for this force model." << endl;
+ dimensionedScalar nu0_("nu", dimensionSet(0, 2, -1, 0, 0), dict_.lookup("nu"));
+ nu_=volScalarField
+ (
+ IOobject
+ (
+ "scalarViscosity",
+ particleCloud_.mesh().time().timeName(),
+ particleCloud_.mesh(),
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ particleCloud_.mesh(),
+ nu0_
+ );
+ }
+
+ // look for old nomenclature
+ if (dict_.found("treatExplicit") || dict_.found("treatDEM") || dict_.found("implDEM"))
+ FatalError<< "You are using an old nomenclature for force model settings, please have a look at the forceSubModel doc." << abort(FatalError);
+
+ // look for old nomenclature
+ if (dict_.found("verbose"))
+ Warning<< "Please make sure you use the new nomenclature for verbose force model settings, please have a look at the forceSubModel doc." << endl;
+
+ //if (dict_.found("interpolation"))
+ // FatalError<< "Please make sure you use the new nomenclature for interpolation in force model settings, please have a look at the forceSubModel doc." << endl;
}
+const volScalarField& forceSubModel::nuField() const
+{
+ #ifdef comp
+ return particleCloud_.turbulence().mu() / rho_;
+ #else
+ if(switches_[8]) // scalarViscosity=true
+ return nu_;
+ else
+ return particleCloud_.turbulence().nu();
+ #endif
+}
+
+const volScalarField& forceSubModel::muField() const
+{
+ #ifdef comp
+ return particleCloud_.turbulence().mu();
+ #else
+ if(switches_[8]) // scalarViscosity=true
+ return nu_*rho_;
+ else
+ return particleCloud_.turbulence().nu()*rho_;
+ #endif
+}
+
+const volScalarField& forceSubModel::rhoField() const
+{
+ return rho_;
+}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/forceSubModels/forceSubModel/forceSubModel.H b/src/lagrangian/cfdemParticle/subModels/forceModel/forceSubModels/forceSubModel/forceSubModel.H
index fb383d6b..59d80a73 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/forceSubModels/forceSubModel/forceSubModel.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/forceSubModels/forceSubModel/forceSubModel.H
@@ -71,6 +71,13 @@ protected:
mutable List switches_;
+ mutable volScalarField nu_;
+
+ const volScalarField& nuField_;
+
+ word densityFieldName_;
+
+ const volScalarField& rho_;
public:
@@ -127,6 +134,14 @@ public:
// Access
+ inline bool verbose() const { return switches_[3]; };
+
+ inline bool interpolation() const { return switches_[4]; };
+
+ inline bool useFilteredDragModel() const { return switches_[5]; };
+
+ inline bool useParcelSizeDependentFilteredDrag() const { return switches_[6]; };
+
virtual word myType() const=0;
inline forceModel& myForceM() const { return forceModel_;};
@@ -142,6 +157,12 @@ public:
virtual void readSwitches() const;
const label& nrDefaultSwitches() const {return nrDefaultSwitches_;};
+
+ const volScalarField& nuField() const;
+
+ const volScalarField& muField() const;
+
+ const volScalarField& rhoField() const;
};
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C
index 560036bd..1885294c 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C
@@ -62,25 +62,21 @@ gradPForce::gradPForce
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
- verbose_(false),
pFieldName_(propsDict_.lookup("pFieldName")),
p_(sm.mesh().lookupObject (pFieldName_)),
velocityFieldName_(propsDict_.lookup("velocityFieldName")),
U_(sm.mesh().lookupObject (velocityFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
useRho_(false),
useU_(false),
- addedMassCoeff_(0.0),
- interpolation_(false)
+ addedMassCoeff_(0.0)
{
- if (propsDict_.found("verbose")) verbose_=true;
-
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
+ forceSubM(0).setSwitchesList(1,true); // activate treatForceDEM switch
+ forceSubM(0).setSwitchesList(4,true); // activate search for interpolate switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
@@ -88,10 +84,20 @@ gradPForce::gradPForce
if (modelType_ == "B")
{
FatalError <<"using model gradPForce with model type B is not valid\n" << abort(FatalError);
- }else
+ }else if (modelType_ == "Bfull")
{
- forceSubM(0).setSwitches(1,true); // treatDEM = true
- Info << "gradPForce is applied only to DEM side" << endl;
+ if(forceSubM(0).switches()[1])
+ {
+ Info << "Using treatForceDEM false!" << endl;
+ forceSubM(0).setSwitches(1,false); // treatForceDEM = false
+ }
+ }else // modelType_=="A"
+ {
+ if(!forceSubM(0).switches()[1])
+ {
+ Info << "Using treatForceDEM true!" << endl;
+ forceSubM(0).setSwitches(1,true); // treatForceDEM = true
+ }
}
if (propsDict_.found("useU")) useU_=true;
@@ -101,11 +107,6 @@ gradPForce::gradPForce
Info << "gradP will also include added mass with coefficient: " << addedMassCoeff_ << endl;
Info << "WARNING: use fix nve/sphere/addedMass in LIGGGHTS input script to correctly account for added mass effects!" << endl;
}
- if (propsDict_.found("interpolation"))
- {
- Info << "using interpolated value of pressure gradient." << endl;
- interpolation_=true;
- }
if(p_.dimensions()==dimensionSet(0,2,-2,0,0))
useRho_ = true;
@@ -138,7 +139,7 @@ void gradPForce::setForce() const
if (useRho_)
gradPField = fvc::grad(0.5*U2);
else
- gradPField = fvc::grad(0.5*rho_*U2);
+ gradPField = fvc::grad(0.5*forceSubM(0).rhoField()*U2);
}*/
vector gradP;
scalar Vs;
@@ -162,7 +163,7 @@ void gradPForce::setForce() const
{
position = particleCloud_.position(index);
- if(interpolation_) // use intepolated values for alpha (normally off!!!)
+ if(forceSubM(0).interpolation()) // use intepolated values for alpha (normally off!!!)
{
gradP = gradPInterpolator_.interpolate(position,cellI);
}else
@@ -171,7 +172,7 @@ void gradPForce::setForce() const
}
Vs = particleCloud_.particleVolume(index);
- rho = rho_[cellI];
+ rho = forceSubM(0).rhoField()[cellI];
// calc particle's pressure gradient force
if (useRho_)
@@ -179,7 +180,7 @@ void gradPForce::setForce() const
else
force = -Vs*gradP*(1.0+addedMassCoeff_);
- if(verbose_ && index >=0 && index <2)
+ if(forceSubM(0).verbose() && index >=0 && index <2)
{
Info << "index = " << index << endl;
Info << "gradP = " << gradP << endl;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.H b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.H
index 85ffe188..68001a69 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.H
@@ -63,8 +63,6 @@ class gradPForce
private:
dictionary propsDict_;
- bool verbose_;
-
word pFieldName_;
const volScalarField& p_;
@@ -73,18 +71,12 @@ private:
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
bool useRho_;
bool useU_; // if false: substitution p=0.5*rho*U^2
mutable double addedMassCoeff_; //added mass coefficient
- bool interpolation_; // use interpolated field values
-
public:
//- Runtime type information
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.C b/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.C
index b55c3206..5443d948 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.C
@@ -40,6 +40,8 @@ Description
namespace Foam
{
+#define NOTONCPU 9999
+
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(virtualMassForce, 0);
@@ -63,30 +65,42 @@ virtualMassForce::virtualMassForce
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
- verbose_(false),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject (velFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
- UrelOld_(NULL)
+ phiFieldName_(propsDict_.lookup("phiFieldName")),
+ phi_(sm.mesh().lookupObject (phiFieldName_)),
+ UrelOld_(NULL),
+ splitUrelCalculation_(false),
+ Cadd_(0.5)
{
- if (propsDict_.found("verbose")) verbose_=true;
if (particleCloud_.dataExchangeM().maxNumberOfParticles() > 0)
{
// get memory for 2d array
- particleCloud_.dataExchangeM().allocateArray(UrelOld_,0.,3);
+ particleCloud_.dataExchangeM().allocateArray(UrelOld_,NOTONCPU,3);
}
// init force sub model
setForceSubModels(propsDict_);
-
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
-
- // read those switches defined above, if provided in dict
+ forceSubM(0).setSwitchesList(4,true); // activate search for interpolate switch
forceSubM(0).readSwitches();
+ //Extra switches/settings
+ if(propsDict_.found("splitUrelCalculation"))
+ {
+ splitUrelCalculation_ = readBool(propsDict_.lookup("splitUrelCalculation"));
+ if(splitUrelCalculation_)
+ Info << "Virtual mass model: will split the Urel calculation\n";
+ Info << "WARNING: be sure that LIGGGHTS integration takes ddtv_p implicitly into account! \n";
+ }
+ if(propsDict_.found("Cadd"))
+ {
+ Cadd_ = readScalar(propsDict_.lookup("Cadd"));
+ Info << "Virtual mass model: using non-standard Cadd = " << Cadd_ << endl;
+ }
+
particleCloud_.checkCG(true);
//Append the field names to be probed
@@ -94,6 +108,7 @@ virtualMassForce::virtualMassForce
particleCloud_.probeM().vectorFields_.append("virtualMassForce"); //first entry must the be the force
particleCloud_.probeM().vectorFields_.append("Urel");
particleCloud_.probeM().vectorFields_.append("UrelOld");
+ particleCloud_.probeM().vectorFields_.append("ddtUrel");
particleCloud_.probeM().scalarFields_.append("Vs");
particleCloud_.probeM().scalarFields_.append("rho");
particleCloud_.probeM().writeHeader();
@@ -116,32 +131,88 @@ void virtualMassForce::setForce() const
scalar dt = U_.mesh().time().deltaT().value();
+ vector position(0,0,0);
+ vector Ufluid(0,0,0);
+ vector Ur(0,0,0);
+ vector DDtU(0,0,0);
+
+ //Compute extra vfields in case it is needed
+ volVectorField DDtU_(0.0*U_/U_.mesh().time().deltaT());
+ if(splitUrelCalculation_)
+ DDtU_ = fvc::ddt(U_) + fvc::div(phi_, U_); //Total Derivative of fluid velocity
+
+ interpolationCellPoint UInterpolator_( U_);
+ interpolationCellPoint DDtUInterpolator_(DDtU_);
+
#include "setupProbeModel.H"
+ bool haveUrelOld_(false);
+
for(int index = 0;index < particleCloud_.numberOfParticles(); index++)
{
- //if(mask[index][0])
- //{
vector virtualMassForce(0,0,0);
label cellI = particleCloud_.cellIDs()[index][0];
if (cellI > -1) // particle Found
{
- vector Us = particleCloud_.velocity(index);
- vector Ur = U_[cellI]-Us;
- vector UrelOld;
- for(int j=0;j<3;j++)
+
+ if(forceSubM(0).interpolation())
{
- UrelOld[j] = UrelOld_[index][j];
- UrelOld_[index][j] = Ur[j];
+ position = particleCloud_.position(index);
+ Ufluid = UInterpolator_.interpolate(position,cellI);
+ }
+ else
+ {
+ Ufluid = U_[cellI];
+ }
+
+
+ if(splitUrelCalculation_) //if split, just use total derivative of fluid velocity
+ if(forceSubM(0).interpolation())
+ {
+ DDtU = DDtUInterpolator_.interpolate(position,cellI);
+ }
+ else
+ {
+ DDtU = DDtU_[cellI];
+ }
+ else
+ {
+ vector Us = particleCloud_.velocity(index);
+ Ur = Ufluid - Us;
}
- vector ddtUrel = (Ur-UrelOld)/dt;
+
+ //Check of particle was on this CPU the last step
+ if(UrelOld_[index][0]==NOTONCPU) //use 1. element to indicate that particle was on this CPU the last time step
+ haveUrelOld_ = false;
+ else
+ haveUrelOld_ = true;
+
+ vector UrelOld(0.,0.,0.);
+ vector ddtUrel(0.,0.,0.);
+ for(int j=0;j<3;j++)
+ {
+ UrelOld[j] = UrelOld_[index][j];
+ UrelOld_[index][j] = Ur[j];
+ }
+ if(haveUrelOld_ ) //only compute force if we have old (relative) velocity
+ ddtUrel = (Ur-UrelOld)/dt;
+
+ if(splitUrelCalculation_) //we can always compute the total derivative in case we split
+ ddtUrel = DDtU;
+
scalar ds = 2*particleCloud_.radius(index);
scalar Vs = ds*ds*ds*M_PI/6;
- scalar rho = rho_[cellI];
+ scalar rho = forceSubM(0).rhoField()[cellI];
- virtualMassForce = 0.5 * rho * Vs * ddtUrel;
+ virtualMassForce = Cadd_ * rho * Vs * ddtUrel;
+
+ if( forceSubM(0).verbose() ) //&& index>100 && index < 105)
+ {
+ Pout << "index / cellI = " << index << tab << cellI << endl;
+ Pout << "position = " << particleCloud_.position(index) << endl;
+ }
//Set value fields and write the probe
if(probeIt_)
@@ -150,25 +221,27 @@ void virtualMassForce::setForce() const
vValues.append(virtualMassForce); //first entry must the be the force
vValues.append(Ur);
vValues.append(UrelOld);
+ vValues.append(ddtUrel);
sValues.append(Vs);
sValues.append(rho);
particleCloud_.probeM().writeProbe(index, sValues, vValues);
}
}
-
+ else //particle not on this CPU
+ UrelOld_[index][0]=NOTONCPU;
+
// write particle based data to global array
forceSubM(0).partToArray(index,virtualMassForce,vector::zero);
- //}
}
-
}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::virtualMassForce::reAllocArrays() const
{
if(particleCloud_.numberOfParticlesChanged())
{
- // get arrays of new length
- particleCloud_.dataExchangeM().allocateArray(UrelOld_,1.,1);
+ Pout << "virtualMassForce::reAllocArrays..." << endl;
+ particleCloud_.dataExchangeM().allocateArray(UrelOld_,NOTONCPU,3);
}
}
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.H b/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.H
index 7eb5d626..ff2ee4df 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.H
@@ -41,6 +41,7 @@ SourceFiles
#include "forceModel.H"
#include "dataExchangeModel.H"
+#include "interpolationCellPoint.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -58,18 +59,22 @@ class virtualMassForce
private:
dictionary propsDict_;
- bool verbose_;
-
word velFieldName_;
const volVectorField& U_;
- word densityFieldName_;
+ word phiFieldName_;
- const volScalarField& rho_;
+ const surfaceScalarField& phi_;
mutable double **UrelOld_;
+ mutable bool splitUrelCalculation_; //indicator to split calculation of Urel between CFDEM and LIGGGHTS
+ //requires the integration fix to take dv/dt into account!
+
+ mutable double Cadd_; //indicator to split calculation of Urel between CFDEM and LIGGGHTS
+ //requires the integration fix to take dv/dt into account!
+
public:
//- Runtime type information
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.C b/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.C
index ed87267a..b53af340 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.C
@@ -62,13 +62,9 @@ viscForce::viscForce
:
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
- verbose_(false),
velocityFieldName_(propsDict_.lookup("velocityFieldName")),
U_(sm.mesh().lookupObject (velocityFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
- addedMassCoeff_(0.0),
- interpolation_(false)
+ addedMassCoeff_(0.0)
{
// init force sub model
@@ -76,6 +72,9 @@ viscForce::viscForce
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
+ forceSubM(0).setSwitchesList(1,true); // activate treatForceDEM switch
+ forceSubM(0).setSwitchesList(4,true); // activate search for interpolate switch
+ forceSubM(0).setSwitchesList(8,true); // activate scalarViscosity switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
@@ -83,12 +82,22 @@ viscForce::viscForce
if (modelType_ == "B")
{
FatalError <<"using model viscForce with model type B is not valid\n" << abort(FatalError);
- }else
+ }else if (modelType_ == "Bfull")
{
- forceSubM(0).setSwitches(1,true); // treatDEM = true
- Info << "viscForce is applied only to DEM side" << endl;
+ if(forceSubM(0).switches()[1])
+ {
+ Info << "Using treatForceDEM false!" << endl;
+ forceSubM(0).setSwitches(1,false); // treatForceDEM = false
+ }
+
+ }else // modelType_=="A"
+ {
+ if(!forceSubM(0).switches()[1])
+ {
+ Info << "Using treatForceDEM true!" << endl;
+ forceSubM(0).setSwitches(1,true); // treatForceDEM = true
+ }
}
- if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("useAddedMass"))
{
@@ -97,11 +106,6 @@ viscForce::viscForce
Info << "WARNING: use fix nve/sphere/addedMass in LIGGGHTS input script to correctly account for added mass effects!" << endl;
}
- if (propsDict_.found("interpolation"))
- {
- Info << "using interpolated value of pressure gradient." << endl;
- interpolation_=true;
- }
particleCloud_.checkCG(true);
//Append the field names to be probed
@@ -122,22 +126,20 @@ viscForce::~viscForce()
void viscForce::setForce() const
{
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
// get viscosity field
#ifdef comp
- const volScalarField& mufField = particleCloud_.turbulence().mu();
-
// calc div(Tau)
volVectorField divTauField =
- - fvc::laplacian(mufField, U_)
- - fvc::div(mufField*dev(fvc::grad(U_)().T()));
+ - fvc::laplacian(forceSubM(0).muField(), U_)
+ - fvc::div(forceSubM(0).muField()*dev(fvc::grad(U_)().T()));
#else
- const volScalarField& nufField = particleCloud_.turbulence().nu();
-
// calc div(Tau)
volVectorField divTauField =
- - fvc::laplacian(nufField*rho_, U_)
- - fvc::div(nufField*rho_*dev(fvc::grad(U_)().T()));
+ - fvc::laplacian(nufField*rhoField, U_)
+ - fvc::div(nufField*rhoField*dev(fvc::grad(U_)().T()));
#endif
vector divTau;
@@ -162,7 +164,7 @@ void viscForce::setForce() const
position = particleCloud_.position(index);
- if(interpolation_) // use intepolated values for alpha (normally off!!!)
+ if(forceSubM(0).interpolation()) // use intepolated values for alpha (normally off!!!)
{
divTau = divTauInterpolator_.interpolate(position,cellI);
}else
@@ -176,7 +178,7 @@ void viscForce::setForce() const
// to the generalized buoyancy force
force = -Vs*divTau*(1.0+addedMassCoeff_);
- if(verbose_ && index >0 && index <2)
+ if(forceSubM(0).verbose() && index >0 && index <2)
{
Info << "index = " << index << endl;
Info << "gradP = " << divTau << endl;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.H b/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.H
index 2632fbd7..772556c1 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.H
@@ -59,19 +59,12 @@ class viscForce
private:
dictionary propsDict_;
- bool verbose_;
-
word velocityFieldName_;
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
mutable double addedMassCoeff_; //added mass coefficient
- bool interpolation_; // use interpolated field values
public:
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.C b/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.C
index 1399a5f6..691b61e3 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.C
@@ -67,8 +67,6 @@ DiFeliceDragMS::DiFeliceDragMS
verbose_(false),
velFieldName_(propsDict_.lookup("velFieldName")),
U_(sm.mesh().lookupObject (velFieldName_)),
- densityFieldName_(propsDict_.lookup("densityFieldName")),
- rho_(sm.mesh().lookupObject (densityFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject (voidfractionFieldName_)),
interpolation_(false),
@@ -112,6 +110,8 @@ DiFeliceDragMS::DiFeliceDragMS
Info << "WARNING: will only consider fluctuating particle velocity in implicit / explicit force split!" << endl;
}
particleCloud_.checkCG(false);
+
+ readDhbyV(propsDict_);
}
@@ -125,12 +125,8 @@ DiFeliceDragMS::~DiFeliceDragMS()
void DiFeliceDragMS::setForce() const
{
- // get viscosity field
- #ifdef comp
- const volScalarField& nufField = cloudRefMS().turbulence().mu() / rho_;
- #else
- const volScalarField& nufField = cloudRefMS().turbulence().nu();
- #endif
+ const volScalarField& nufField = forceSubM(0).nuField();
+ const volScalarField& rhoField = forceSubM(0).rhoField();
vector position(0,0,0);
scalar voidfraction(1);
@@ -185,7 +181,7 @@ void DiFeliceDragMS::setForce() const
Ur = Ufluid-Us;
ds = cloudRefMS().clumpDH()[index][0];
nuf = nufField[cellI];
- rho = rho_[cellI];
+ rho = rhoField[cellI];
magUr = mag(Ur);
Rep = 0;
Cd = 0;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.H b/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.H
index eb487e08..dd31d9ac 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.H
@@ -67,10 +67,6 @@ private:
const volVectorField& U_;
- word densityFieldName_;
-
- const volScalarField& rho_;
-
word voidfractionFieldName_;
const volScalarField& voidfraction_;
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelMS/forceModelMS/forceModelMS.C b/src/lagrangian/cfdemParticle/subModels/forceModelMS/forceModelMS/forceModelMS.C
index ea0d1156..ebf9e656 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModelMS/forceModelMS/forceModelMS.C
+++ b/src/lagrangian/cfdemParticle/subModels/forceModelMS/forceModelMS/forceModelMS.C
@@ -108,6 +108,17 @@ cfdemCloudMS& forceModelMS::cloudRefMS() const
{
return particleCloudMS_;
}
+
+void forceModelMS::readDhbyV(dictionary& dict)
+{
+ if (dict.found("manDHdev"))
+ {
+ cloudRefMS().setManDHdev(Switch(dict.lookup("manDHdev")));
+ cloudRefMS().setDHbyV(scalarList(dict.lookup("dHbyV")));
+ }
+ Warning << "You defined:" << cloudRefMS().dHbyV().size()
+ << " diameters manually - is this the number of clump types defined in *.in file?" << endl;
+}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelMS/forceModelMS/forceModelMS.H b/src/lagrangian/cfdemParticle/subModels/forceModelMS/forceModelMS/forceModelMS.H
index 034b8dce..79b68587 100644
--- a/src/lagrangian/cfdemParticle/subModels/forceModelMS/forceModelMS/forceModelMS.H
+++ b/src/lagrangian/cfdemParticle/subModels/forceModelMS/forceModelMS/forceModelMS.H
@@ -110,6 +110,8 @@ public:
// Access
cfdemCloudMS& cloudRefMS() const;
+
+ void readDhbyV(dictionary& dict);
};
diff --git a/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/writeLiggghts/writeLiggghts.C b/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/writeLiggghts/writeLiggghts.C
index f0bd2412..967216ef 100644
--- a/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/writeLiggghts/writeLiggghts.C
+++ b/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/writeLiggghts/writeLiggghts.C
@@ -67,7 +67,7 @@ writeLiggghts::writeLiggghts
path_(word("..")/word("DEM")),
writeName_("liggghts.restartCFDEM"),
writeLast_(true),
- overwrite_(true)
+ overwrite_(false)
{
if (dict.found(typeName + "Props"))
{
diff --git a/src/lagrangian/cfdemParticle/subModels/meshMotionModel/meshMotionModel/meshMotionModel.C b/src/lagrangian/cfdemParticle/subModels/meshMotionModel/meshMotionModel/meshMotionModel.C
index 450fbd29..bb0f8502 100644
--- a/src/lagrangian/cfdemParticle/subModels/meshMotionModel/meshMotionModel/meshMotionModel.C
+++ b/src/lagrangian/cfdemParticle/subModels/meshMotionModel/meshMotionModel/meshMotionModel.C
@@ -68,6 +68,75 @@ meshMotionModel::~meshMotionModel()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+volVectorField& meshMotionModel::f() const
+{
+ volVectorField tmp
+ (
+ IOobject
+ (
+ "xxx",
+ particleCloud_.mesh().time().timeName(),
+ particleCloud_.mesh(),
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ particleCloud_.mesh(),
+ dimensionedVector
+ (
+ "zero",
+ dimensionSet(0, 1, -1, 0, 0),
+ vector::zero
+ )
+ );
+ return tmp;
+}
+
+volScalarField& meshMotionModel::body() const
+{
+ volScalarField tmp
+ (
+ IOobject
+ (
+ "xxx",
+ particleCloud_.mesh().time().timeName(),
+ particleCloud_.mesh(),
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ particleCloud_.mesh(),
+ dimensionedScalar
+ (
+ "zero",
+ dimensionSet(0, 1, -1, 0, 0),
+ 0.
+ )
+ );
+ return tmp;
+}
+
+volScalarField& meshMotionModel::inside() const
+{
+ volScalarField tmp
+ (
+ IOobject
+ (
+ "xxx",
+ particleCloud_.mesh().time().timeName(),
+ particleCloud_.mesh(),
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ particleCloud_.mesh(),
+ dimensionedScalar
+ (
+ "zero",
+ dimensionSet(0, 1, -1, 0, 0),
+ 0.
+ )
+ );
+ return tmp;
+}
+
} // End namespace Foam
// ************************************************************************* //
diff --git a/src/lagrangian/cfdemParticle/subModels/meshMotionModel/meshMotionModel/meshMotionModel.H b/src/lagrangian/cfdemParticle/subModels/meshMotionModel/meshMotionModel/meshMotionModel.H
index cf3da10a..41d80d8e 100644
--- a/src/lagrangian/cfdemParticle/subModels/meshMotionModel/meshMotionModel/meshMotionModel.H
+++ b/src/lagrangian/cfdemParticle/subModels/meshMotionModel/meshMotionModel/meshMotionModel.H
@@ -109,6 +109,16 @@ public:
// Member Function
virtual tmp setMotion() const=0;
+ virtual void correctF(volVectorField&) const {};
+
+ virtual void correctUo(volVectorField&) const {};
+
+ virtual volVectorField& f() const;
+
+ virtual volScalarField& body() const;
+
+ virtual volScalarField& inside() const;
+
// Access
};
diff --git a/src/lagrangian/cfdemParticle/subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.C b/src/lagrangian/cfdemParticle/subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.C
index 17844f78..695e5154 100644
--- a/src/lagrangian/cfdemParticle/subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.C
+++ b/src/lagrangian/cfdemParticle/subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.C
@@ -77,6 +77,8 @@ constDiffSmoothing::constDiffSmoothing
if(propsDict_.found("smoothingLengthReferenceField"))
smoothingLengthReferenceField_.value() = double(readScalar(propsDict_.lookup("smoothingLengthReferenceField")));
+ checkFields(sSmoothField_);
+ checkFields(vSmoothField_);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
@@ -94,65 +96,74 @@ bool constDiffSmoothing::doSmoothing() const
void Foam::constDiffSmoothing::smoothen(volScalarField& fieldSrc) const
{
- // transfer data to working field to not mess up ddt
- volScalarField field=fieldSrc;
- field.correctBoundaryConditions();
- field.oldTime()=fieldSrc;
- field.oldTime().correctBoundaryConditions();
+ // Create scalar smooth field from virgin scalar smooth field template
+ volScalarField sSmoothField = sSmoothField_;
- double deltaT = field.mesh().time().deltaTValue();
+ sSmoothField.dimensions().reset(fieldSrc.dimensions());
+ sSmoothField.internalField()=fieldSrc.internalField();
+ sSmoothField.correctBoundaryConditions();
+ sSmoothField.oldTime().dimensions().reset(fieldSrc.dimensions());
+ sSmoothField.oldTime()=fieldSrc;
+ sSmoothField.oldTime().correctBoundaryConditions();
+
+ double deltaT = sSmoothField.mesh().time().deltaTValue();
DT_.value() = smoothingLength_.value() * smoothingLength_.value() / deltaT;
// do smoothing
solve
(
- fvm::ddt(field)
- -fvm::laplacian(DT_, field)
+ fvm::ddt(sSmoothField)
+ -fvm::laplacian(DT_, sSmoothField)
);
- // bound field
- forAll(field,cellI)
+ // bound sSmoothField_
+ forAll(sSmoothField,cellI)
{
- field[cellI]=max(lowerLimit_,min(upperLimit_,field[cellI]));
+ sSmoothField[cellI]=max(lowerLimit_,min(upperLimit_,sSmoothField[cellI]));
}
- // get data from working field - will copy only values at new time
- fieldSrc=field;
+ // get data from working sSmoothField - will copy only values at new time
+ fieldSrc=sSmoothField;
fieldSrc.correctBoundaryConditions();
if(verbose_)
{
- Info << "min/max(fieldoldTime) (unsmoothed): " << min(field.oldTime()) << tab << max(field.oldTime()) << endl;
+ Info << "min/max(fieldoldTime) (unsmoothed): " << min(sSmoothField.oldTime()) << tab << max(sSmoothField.oldTime()) << endl;
Info << "min/max(fieldSrc): " << min(fieldSrc) << tab << max(fieldSrc) << endl;
Info << "min/max(fieldSrc.oldTime): " << min(fieldSrc.oldTime()) << tab << max(fieldSrc.oldTime()) << endl;
}
+
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::constDiffSmoothing::smoothen(volVectorField& fieldSrc) const
{
- // transfer data to working field to not mess up ddt
- volVectorField field=fieldSrc;
- field.correctBoundaryConditions();
- field.oldTime()=fieldSrc;
- field.oldTime().correctBoundaryConditions();
+ // Create scalar smooth field from virgin scalar smooth field template
+ volVectorField vSmoothField = vSmoothField_;
- double deltaT = field.mesh().time().deltaTValue();
+ vSmoothField.dimensions().reset(fieldSrc.dimensions());
+ vSmoothField.internalField()=fieldSrc.internalField();
+ vSmoothField.correctBoundaryConditions();
+ vSmoothField.oldTime().dimensions().reset(fieldSrc.dimensions());
+ vSmoothField.oldTime()=fieldSrc;
+ vSmoothField.oldTime().correctBoundaryConditions();
+
+ double deltaT = vSmoothField_.mesh().time().deltaTValue();
DT_.value() = smoothingLength_.value() * smoothingLength_.value() / deltaT;
// do smoothing
solve
(
- fvm::ddt(field)
- -fvm::laplacian(DT_, field)
+ fvm::ddt(vSmoothField)
+ -fvm::laplacian(DT_, vSmoothField)
);
- // get data from working field
- fieldSrc=field;
+ // get data from working vSmoothField
+ fieldSrc=vSmoothField;
fieldSrc.correctBoundaryConditions();
if(verbose_)
{
- Info << "min/max(fieldoldTime) (unsmoothed): " << min(field.oldTime()) << tab << max(field.oldTime()) << endl;
+ Info << "min/max(fieldoldTime) (unsmoothed): " << min(vSmoothField.oldTime()) << tab << max(vSmoothField.oldTime()) << endl;
Info << "min/max(fieldSrc): " << min(fieldSrc) << tab << max(fieldSrc) << endl;
Info << "min/max(fieldSrc.oldTime): " << min(fieldSrc.oldTime()) << tab << max(fieldSrc.oldTime()) << endl;
}
@@ -161,15 +172,19 @@ void Foam::constDiffSmoothing::smoothen(volVectorField& fieldSrc) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::constDiffSmoothing::smoothenReferenceField(volVectorField& fieldSrc) const
{
- // transfer data to working field to not mess up ddt
- volVectorField field=fieldSrc;
- field.correctBoundaryConditions();
- field.oldTime()=fieldSrc;
- field.oldTime().correctBoundaryConditions();
+ // Create scalar smooth field from virgin scalar smooth field template
+ volVectorField vSmoothField = vSmoothField_;
+
+ vSmoothField.dimensions().reset(fieldSrc.dimensions());
+ vSmoothField.internalField()=fieldSrc.internalField();
+ vSmoothField.correctBoundaryConditions();
+ vSmoothField.oldTime().dimensions().reset(fieldSrc.dimensions());
+ vSmoothField.oldTime()=fieldSrc;
+ vSmoothField.oldTime().correctBoundaryConditions();
double sourceStrength = 1e5; //large number to keep reference values constant
- dimensionedScalar deltaT = field.mesh().time().deltaT();
+ dimensionedScalar deltaT = vSmoothField.mesh().time().deltaT();
DT_.value() = smoothingLengthReferenceField_.value()
* smoothingLengthReferenceField_.value() / deltaT.value();
@@ -192,29 +207,29 @@ void Foam::constDiffSmoothing::smoothenReferenceField(volVectorField& fieldSrc)
//loop over particles and map max particle diameter to Euler Grid
- forAll(field,cellI)
+ forAll(vSmoothField,cellI)
{
- if ( mag(field.oldTime().internalField()[cellI]) > 0.0f) // have a vector in the OLD field, so keep it!
+ if ( mag(vSmoothField.oldTime().internalField()[cellI]) > 0.0f) // have a vector in the OLD vSmoothField, so keep it!
NLarge()[cellI] = sourceStrength;
}
// do the smoothing
solve
(
- fvm::ddt(field)
- -fvm::laplacian( DT_, field)
+ fvm::ddt(vSmoothField)
+ -fvm::laplacian( DT_, vSmoothField)
==
- NLarge() / deltaT * field.oldTime() //add source to keep cell values constant
- -fvm::Sp( NLarge() / deltaT, field) //add sink to keep cell values constant
+ NLarge() / deltaT * vSmoothField.oldTime() //add source to keep cell values constant
+ -fvm::Sp( NLarge() / deltaT, vSmoothField) //add sink to keep cell values constant
);
- // get data from working field
- fieldSrc=field;
+ // get data from working vSmoothField
+ fieldSrc=vSmoothField;
fieldSrc.correctBoundaryConditions();
if(verbose_)
{
- Info << "min/max(fieldoldTime) (unsmoothed): " << min(field.oldTime()) << tab << max(field.oldTime()) << endl;
+ Info << "min/max(fieldoldTime) (unsmoothed): " << min(vSmoothField.oldTime()) << tab << max(vSmoothField.oldTime()) << endl;
Info << "min/max(fieldSrc): " << min(fieldSrc) << tab << max(fieldSrc) << endl;
Info << "min/max(fieldSrc.oldTime): " << min(fieldSrc.oldTime()) << tab << max(fieldSrc.oldTime()) << endl;
}
diff --git a/src/lagrangian/cfdemParticle/subModels/smoothingModel/smoothingModel/smoothingModel.C b/src/lagrangian/cfdemParticle/subModels/smoothingModel/smoothingModel/smoothingModel.C
index 6eb3407d..b906a160 100644
--- a/src/lagrangian/cfdemParticle/subModels/smoothingModel/smoothingModel/smoothingModel.C
+++ b/src/lagrangian/cfdemParticle/subModels/smoothingModel/smoothingModel/smoothingModel.C
@@ -57,7 +57,33 @@ Foam::smoothingModel::smoothingModel
)
:
dict_(dict),
- particleCloud_(sm)
+ particleCloud_(sm),
+ vSmoothField_
+ (
+ IOobject
+ (
+ "vSmoothField",
+ particleCloud_.mesh().time().timeName(),
+ particleCloud_.mesh(),
+ IOobject::READ_IF_PRESENT,
+ IOobject::NO_WRITE
+ ),
+ particleCloud_.mesh(),
+ dimensionedVector("zero", dimensionSet(0,0,0,0,0), vector::zero)
+ ),
+ sSmoothField_
+ (
+ IOobject
+ (
+ "sSmoothField",
+ particleCloud_.mesh().time().timeName(),
+ particleCloud_.mesh(),
+ IOobject::READ_IF_PRESENT,
+ IOobject::NO_WRITE
+ ),
+ particleCloud_.mesh(),
+ dimensionedScalar("zero", dimensionSet(0,0,0,0,0), 0)
+ )
{}
@@ -69,6 +95,28 @@ Foam::smoothingModel::~smoothingModel()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+void smoothingModel::checkFields(volScalarField& sSmoothField_) const
+{
+ // currently it is detected if field was auto generated or defined
+ // improvement would be changing the type here automatically
+ forAll(sSmoothField_.boundaryField(),patchI)
+ if(sSmoothField_.boundaryField()[patchI].type()=="calculated")
+ FatalError <<"Scalar field:"<< sSmoothField_.name() << " must be defined.\n" << abort(FatalError);
+
+ sSmoothField_.writeOpt() = IOobject::AUTO_WRITE;
+}
+
+void smoothingModel::checkFields(volVectorField& vSmoothField_) const
+{
+ // currently it is detected if field was auto generated or defined
+ // improvement would be changing the type here automatically
+ forAll(vSmoothField_.boundaryField(),patchI)
+ if(vSmoothField_.boundaryField()[patchI].type()=="calculated")
+ FatalError <<"Vector field:"<< vSmoothField_.name() << " must be defined.\n" << abort(FatalError);
+
+ vSmoothField_.writeOpt() = IOobject::AUTO_WRITE;
+}
+
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool smoothingModel::doSmoothing() const
{
diff --git a/src/lagrangian/cfdemParticle/subModels/smoothingModel/smoothingModel/smoothingModel.H b/src/lagrangian/cfdemParticle/subModels/smoothingModel/smoothingModel/smoothingModel.H
index 336bf754..d0c56a62 100644
--- a/src/lagrangian/cfdemParticle/subModels/smoothingModel/smoothingModel/smoothingModel.H
+++ b/src/lagrangian/cfdemParticle/subModels/smoothingModel/smoothingModel/smoothingModel.H
@@ -59,6 +59,12 @@ protected:
const dictionary& dict_;
cfdemCloud& particleCloud_;
+ mutable volVectorField vSmoothField_;
+ mutable volScalarField sSmoothField_;
+
+ void checkFields(volScalarField&) const;
+ void checkFields(volVectorField&) const;
+
public:
//- Runtime type information
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.C
index a00514bc..60a8eb89 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.C
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.C
@@ -87,7 +87,7 @@ GaussVoidFraction::~GaussVoidFraction()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-void GaussVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes) const
+void GaussVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes,double**& particleV) const
{
reAllocArrays();
@@ -109,6 +109,7 @@ void GaussVoidFraction::setvoidFraction(double** const& mask,double**& voidfract
particleVolumes[index][subcell]=0;
}
cellsPerParticle_[index][0]=1.0;
+ particleV[index][0]=0;
//collecting data
label particleCenterCellID=particleCloud_.cellIDs()[index][0];
@@ -161,6 +162,7 @@ void GaussVoidFraction::setvoidFraction(double** const& mask,double**& voidfract
particleWeights[index][0] += core;
particleVolumes[index][0] += occupiedVolume;
+ particleV[index][0] += occupiedVolume;
//Info << "Centre:set voidfraction in cellI=" << particleCenterCellID
// << ", voidfraction =" << voidfractionNext_[particleCenterCellID] << endl;
@@ -177,6 +179,7 @@ void GaussVoidFraction::setvoidFraction(double** const& mask,double**& voidfract
voidfractionNext_[cellI] -=occupiedVolume/particleCloud_.mesh().V()[cellI];
particleWeights[index][i+1] += core;
particleVolumes[index][i+1] += occupiedVolume;
+ particleV[index][0] += occupiedVolume;
//Info << "AFTER:set voidfraction in cellI=" << cellI
// << ", voidfraction =" << voidfractionNext_[cellI] << endl;
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.H b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.H
index 23aee919..535166ba 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.H
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.H
@@ -86,7 +86,7 @@ public:
// Member Functions
- void setvoidFraction(double** const& ,double**&, double**&, double**&) const;
+ void setvoidFraction(double** const& ,double**&, double**&, double**&, double**&) const;
void buildLabelHashSet
(
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.C
index a0fb5840..a5d327e2 100755
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.C
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.C
@@ -90,7 +90,7 @@ IBVoidFraction::~IBVoidFraction()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-void IBVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes) const
+void IBVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes,double**& particleV) const
{
int numprocs, me;
@@ -113,6 +113,7 @@ void IBVoidFraction::setvoidFraction(double** const& mask,double**& voidfraction
particleVolumes[index][subcell]=0;
}
cellsPerParticle_[index][0]=1.0;
+ particleV[index][0]=0;
//collecting data
label particleCenterCellID=particleCloud_.cellIDs()[index][0];
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.H b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.H
index 4ca146fc..78620719 100755
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.H
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.H
@@ -91,7 +91,7 @@ public:
// Member Functions
- void setvoidFraction(double** const& ,double**&, double**&, double**&) const;
+ void setvoidFraction(double** const& ,double**&, double**&, double**&, double**&) const;
void buildLabelHashSet
(
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.C
index 3859153d..2fd72eae 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.C
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.C
@@ -86,7 +86,7 @@ bigParticleVoidFraction::~bigParticleVoidFraction()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-void bigParticleVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes) const
+void bigParticleVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes,double**& particleV) const
{
reAllocArrays();
@@ -108,6 +108,7 @@ void bigParticleVoidFraction::setvoidFraction(double** const& mask,double**& voi
particleVolumes[index][subcell]=0;
}
cellsPerParticle_[index][0]=1.0;
+ particleV[index][0]=0;
//collecting data
label particleCenterCellID=particleCloud_.cellIDs()[index][0];
@@ -153,6 +154,7 @@ void bigParticleVoidFraction::setvoidFraction(double** const& mask,double**& voi
particleWeights[index][0] += 1.0/hashSetLength;
particleVolumes[index][0] += occupiedVolume;
+ particleV[index][0] += occupiedVolume;
//Info << "Centre:set voidfraction in cellI=" << particleCenterCellID
// << ", voidfraction =" << voidfractionNext_[particleCenterCellID] << endl;
@@ -166,6 +168,7 @@ void bigParticleVoidFraction::setvoidFraction(double** const& mask,double**& voi
voidfractionNext_[cellI] -=occupiedVolume/particleCloud_.mesh().V()[cellI];
particleWeights[index][i+1] += 1.0/hashSetLength;
particleVolumes[index][i+1] += occupiedVolume;
+ particleV[index][0] += occupiedVolume;
//Info << "AFTER:set voidfraction in cellI=" << cellI
// << ", voidfraction =" << voidfractionNext_[cellI] << endl;
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.H b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.H
index e4a56ba3..8e470a44 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.H
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.H
@@ -83,7 +83,7 @@ public:
// Member Functions
- void setvoidFraction(double** const& ,double**&, double**&, double**&) const;
+ void setvoidFraction(double** const& ,double**&, double**&, double**&, double**&) const;
void buildLabelHashSet
(
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/centreVoidFraction/centreVoidFraction.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/centreVoidFraction/centreVoidFraction.C
index 9edd1055..f04cfc07 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/centreVoidFraction/centreVoidFraction.C
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/centreVoidFraction/centreVoidFraction.C
@@ -78,7 +78,7 @@ centreVoidFraction::~centreVoidFraction()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-void centreVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes) const
+void centreVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes,double**& particleV) const
{
reAllocArrays();
@@ -105,6 +105,7 @@ void centreVoidFraction::setvoidFraction(double** const& mask,double**& voidfrac
// store volume for each particle
particleVolumes[index][0] = volume;
+ particleV[index][0] = volume;
voidfractionNext_[cellI] -= volume/cellVol;
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/centreVoidFraction/centreVoidFraction.H b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/centreVoidFraction/centreVoidFraction.H
index c84291b4..15199923 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/centreVoidFraction/centreVoidFraction.H
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/centreVoidFraction/centreVoidFraction.H
@@ -83,7 +83,7 @@ public:
// Member Functions
- void setvoidFraction(double** const& ,double**&, double**&, double**&) const;
+ void setvoidFraction(double** const& ,double**&, double**&, double**&, double**&) const;
};
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/dividedVoidFraction.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/dividedVoidFraction.C
index 384bc8b3..14d1bdbe 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/dividedVoidFraction.C
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/dividedVoidFraction.C
@@ -94,7 +94,7 @@ dividedVoidFraction::~dividedVoidFraction()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-void dividedVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes) const
+void dividedVoidFraction::setvoidFraction(double** const& mask,double**& voidfractions,double**& particleWeights,double**& particleVolumes, double**& particleV) const
{
reAllocArrays();
@@ -119,6 +119,7 @@ void dividedVoidFraction::setvoidFraction(double** const& mask,double**& voidfra
particleWeights[index][subcell]=0;
particleVolumes[index][subcell]=0;
}
+ particleV[index][0]=0;
cellsPerParticle_[index][0]=1;
position = particleCloud_.position(index);
@@ -190,6 +191,7 @@ void dividedVoidFraction::setvoidFraction(double** const& mask,double**& voidfra
// store particleVolume for each particle
particleVolumes[index][0] += volume*centreWeight;
+ particleV[index][0] += volume*centreWeight;
/*//OUTPUT
if (index==0 && verbose_)
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/dividedVoidFraction.H b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/dividedVoidFraction.H
index bcbb370f..b5ea6e88 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/dividedVoidFraction.H
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/dividedVoidFraction.H
@@ -95,7 +95,7 @@ public:
// Member Functions
- void setvoidFraction(double** const& ,double**&, double**&, double**&) const;
+ void setvoidFraction(double** const& ,double**&, double**&, double**&, double**&) const;
};
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/setWeightedSource.H b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/setWeightedSource.H
index d91b7b19..36d472c9 100755
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/setWeightedSource.H
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/dividedVoidFraction/setWeightedSource.H
@@ -57,6 +57,7 @@
particleWeights[index][storeInIndex] += 1/static_cast(nPoints);
particleVolumes[index][storeInIndex] += particleVolume;
+ particleV[index][0] += particleVolume;
//====================================================//
}
}
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.H b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.H
index 9f76616b..1acd3f03 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.H
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.H
@@ -122,7 +122,7 @@ public:
// public member functions
- virtual void setvoidFraction(double** const&,double**&,double**&,double**&) const = 0;
+ virtual void setvoidFraction(double** const&,double**&,double**&,double**&,double**&) const = 0;
tmp voidFractionInterp() const;
diff --git a/tutorials/cfdemPostproc/fillCylinder/DEM/post/dummy b/tutorials/cfdemPostproc/fillCylinder/DEM/post/dummy
deleted file mode 100644
index ebf63dfd..00000000
--- a/tutorials/cfdemPostproc/fillCylinder/DEM/post/dummy
+++ /dev/null
@@ -1 +0,0 @@
-dummyfile
diff --git a/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/CFD/constant/couplingProperties
index 5cb31dc6..f50b6964 100644
--- a/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/CFD/constant/couplingProperties
+++ b/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/CFD/constant/couplingProperties
@@ -70,14 +70,12 @@ turbulenceModelType RASProperties;//LESProperties; //
ShirgaonkarIBProps
{
velFieldName "U";
- densityFieldName "rho";
pressureFieldName "p";
verbose;
}
ArchimedesIBProps
{
- densityFieldName "rho";
gravityFieldName "g";
voidfractionFieldName "voidfractionNext";
}
diff --git a/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/DEM/post/.gitignore b/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/DEM/post/.gitignore
new file mode 100644
index 00000000..e69de29b
diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/Allrun.sh b/tutorials/cfdemSolverPiso/ErgunTestCG/Allrun.sh
index 404f3a12..329831fa 100755
--- a/tutorials/cfdemSolverPiso/ErgunTestCG/Allrun.sh
+++ b/tutorials/cfdemSolverPiso/ErgunTestCG/Allrun.sh
@@ -2,15 +2,18 @@
#===================================================================#
# allrun script for testcase as part of test routine
-# run settlingTest
+# run ErgunTestCG
# Christoph Goniva - Sept. 2010
#===================================================================#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
+#- include functions
+source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
+
# check if mesh was built
-if [ -d "$casePath/CFD/constant/polyMesh/boundary" ]; then
+if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then
echo "mesh was built before - using old mesh"
else
echo "mesh needs to be built"
@@ -18,7 +21,7 @@ else
blockMesh
fi
-if [ -f "$casePath/DEM/post/restart/liggghts.restart*" ]; then
+if [ -f "$casePath/DEM/post/restart/liggghts.restart"* ]; then
echo "LIGGGHTS init was run before - using existing restart file"
else
#- run DEM in new terminal
diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/couplingProperties
index f68a2b9b..f6b4891c 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/couplingProperties
+++ b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/couplingProperties
@@ -99,23 +99,20 @@ implicitCoupleProps
ArchimedesProps
{
- densityFieldName "rho";
gravityFieldName "g";
}
gradPForceProps
{
pFieldName "p";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
- interpolation;
+ interpolation true;
}
viscForceProps
{
velocityFieldName "U";
- densityFieldName "rho";
- interpolation;
+ interpolation true;
}
noDragProps
{
@@ -133,7 +130,7 @@ volWeightedAverageProps
);
upperThreshold 0.999;
lowerThreshold 0;
- verbose;
+ verbose true;
}
totalMomentumExchangeProps
{
@@ -141,57 +138,51 @@ totalMomentumExchangeProps
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
- densityFieldName "rho";
}
GidaspowDragProps
{
- verbose;
+ verbose true;
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
phi 1;
- //interpolation; // this case does not like interpolation
+ //interpolation true; // this case does not like interpolation
implDEM_;
}
KochHillDragProps
{
- //verbose;
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
- //interpolation;
+ //interpolation true;
implDEM_;
- verbose;
+ verbose true;
}
BeetstraDragProps
{
velFieldName "U";
- densityFieldName "rho";
gravityFieldName "g";
rhoParticle 2000.;
voidfractionFieldName "voidfraction";
- interpolation ;
+ interpolation true;
useFilteredDragModel ;
useParcelSizeDependentFilteredDrag ;
k 0.05;
aLimit 0.0;
-// verbose ;
+// verbose true;
}
virtualMassForceProps
{
velFieldName "U";
- densityFieldName "rho";
}
particleCellVolumeProps
{
upperThreshold 0.999;
lowerThreshold 0.;
- verbose;
+ verbose true;
}
oneWayVTKProps
diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/octave/totalPressureDrop.m b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/octave/totalPressureDrop.m
index 2f84fe13..f1c519b7 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/octave/totalPressureDrop.m
+++ b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/octave/totalPressureDrop.m
@@ -104,8 +104,4 @@ axis([0,Uend,0,dpErgun(length(dpErgun))])
%print('cfdemSolverPiso_settlingTest.eps','-deps2')
print -color "cfdemSolverPiso_ErgunTestCG.eps"
-replot;
-
-
-
diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh
index dee36df1..2a476176 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh
+++ b/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh
@@ -86,7 +86,7 @@ source $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd $casePath/CFD
cleanCase
rm -r $casePath/CFD/clockData
-rm -r $casePath/DEM/post/*.*
+rm $casePath/DEM/post/*.*
#rm -r $casePath/DEM/post/restart/*.*
touch $casePath/DEM/post/.gitignore
touch $casePath/DEM/post/restart/.gitignore
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties
index 399fe8f7..be34b393 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties
@@ -55,9 +55,11 @@ forceModels
//GidaspowDrag
//BeetstraDrag
//DiFeliceDrag
- KochHillDrag
gradPForce
viscForce
+ KochHillDrag
+ //DEMbasedDrag
+ //RongDrag
//Archimedes
//volWeightedAverage
//totalMomentumExchange
@@ -99,23 +101,20 @@ implicitCoupleProps
ArchimedesProps
{
- densityFieldName "rho";
gravityFieldName "g";
}
gradPForceProps
{
pFieldName "p";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
- interpolation;
+ interpolation true;
}
viscForceProps
{
velocityFieldName "U";
- densityFieldName "rho";
- interpolation;
+ interpolation true;
}
volWeightedAverageProps
{
@@ -128,7 +127,7 @@ volWeightedAverageProps
);
upperThreshold 0.999;
lowerThreshold 0;
- verbose;
+ verbose true;
}
totalMomentumExchangeProps
{
@@ -136,46 +135,48 @@ totalMomentumExchangeProps
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
- densityFieldName "rho";
}
GidaspowDragProps
{
- verbose;
+ verbose true;
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
- interpolation;
+ interpolation true;
phi 1;
}
+DEMbasedDragProps
+{
+ velFieldName "U";
+ voidfractionFieldName "voidfraction";
+}
+
DiFeliceDragProps
{
- //verbose;
+ //verbose true;
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
- interpolation;
+ interpolation true;
}
KochHillDragProps
{
- //verbose;
+ //verbose true;
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
- interpolation;
+ interpolation true;
//forceSubModels
//(
// ImExCorr
//);
- //implDEM true;
+ implForceDEM true;
+ //implForceDEMaccumulated true;
//explicitInterpCorr true;
}
BeetstraDragProps
{
velFieldName "U";
- densityFieldName "rho";
gravityFieldName "g";
rhoParticle 2000.;
voidfractionFieldName "voidfraction";
@@ -184,20 +185,30 @@ BeetstraDragProps
useParcelSizeDependentFilteredDrag ;
k 0.05;
aLimit 0.0;
-// verbose ;
+// verbose true;
+}
+
+RongDragProps
+{
+ verbose true;
+ velFieldName "U";
+ voidfractionFieldName "voidfraction";
+ interpolation true;
+ implForceDEM true;
+ implForceDEMaccumulated true;
+ granVelFieldName "Us";
}
virtualMassForceProps
{
velFieldName "U";
- densityFieldName "rho";
}
particleCellVolumeProps
{
upperThreshold 0.999;
lowerThreshold 0.;
- verbose;
+ verbose true;
}
oneWayVTKProps
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/liggghtsCommands b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/liggghtsCommands
index a5ffcaed..59d44b08 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/liggghtsCommands
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/liggghtsCommands
@@ -26,6 +26,7 @@ FoamFile
liggghtsCommandModels
(
runLiggghts
+ //writeLiggghts
);
// ************************************************************************* //
@@ -33,3 +34,10 @@ liggghtsCommandModels
{
preNo false;
}*/
+
+/*writeLiggghtsProps
+{
+ writeLast off;
+ writeName "post/restart/liggghts.restartCFDEM";
+ overwrite on;
+}*/
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/octave/totalPressureDrop.m b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/octave/totalPressureDrop.m
index b6ec7d7c..5a7d1a37 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/octave/totalPressureDrop.m
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/octave/totalPressureDrop.m
@@ -53,7 +53,7 @@ fprintf('so the result does not depend on density\n')
%==================================
% min fluidization velocity in m/s
%==================================
-rhoP = 2000 % particle density in kg/m3
+rhoP = 2000 % particle density in kg/m3
g = 9.81 % gravity m/s2
Umf = dp^2*(rhoP-rhoG)*g/(150*muG)*(epsilon^3*phip^2)/(1-epsilon);
@@ -96,8 +96,4 @@ axis([0,Uend,0,dpErgun(length(dpErgun))])
%print('cfdemSolverPiso_settlingTest.eps','-deps2')
print -color "cfdemSolverPiso_ErgunTestMPI.eps"
-replot;
-
-
-
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/in.liggghts_run b/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/in.liggghts_run
index 1e1b64ec..2d498630 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/in.liggghts_run
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/in.liggghts_run
@@ -44,6 +44,8 @@ set group all density 2000
# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force/implicit
+#fix cfd2 all couple/cfd/force/accumulator RongDrag 10 1.5e-3
+#fix cfd2 all couple/cfd/force/implicit/accumulated #CrankNicolson 0.5
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh
index a2a32a16..9642f34e 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh
@@ -87,7 +87,8 @@ cd $casePath/CFD
cleanCase
rm -r $casePath/CFD/clockData
rm $casePath/DEM/post/*.*
-#rm -r $casePath/DEM/post/restart/*.*
touch $casePath/DEM/post/.gitignore
+#rm $casePath/DEM/post/restart/*.*
+rm $casePath/DEM/post/restart/liggghts.restartCFDEM*
touch $casePath/DEM/post/restart/.gitignore
echo "done"
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/couplingProperties
index d727158b..c3ca8762 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/couplingProperties
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/couplingProperties
@@ -81,23 +81,20 @@ implicitCoupleProps
ArchimedesProps
{
- densityFieldName "rho";
gravityFieldName "g";
}
gradPForceProps
{
pFieldName "p";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
- //interpolation;
+ //interpolation true;
}
viscForceProps
{
velocityFieldName "U";
- densityFieldName "rho";
- interpolation;
+ interpolation true;
}
volWeightedAverageProps
{
@@ -118,17 +115,14 @@ totalMomentumExchangeProps
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
- densityFieldName "rho";
}
GidaspowDragProps
{
velFieldName "U";
- densityFieldName "rho";
}
DiFeliceDragProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
}
@@ -136,14 +130,12 @@ DiFeliceDragProps
KochHillDragProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
}
virtualMassForceProps
{
velFieldName "U";
- densityFieldName "rho";
}
oneWayVTKProps
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/octave/totalPressureDrop.m b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/octave/totalPressureDrop.m
index 4c225a38..d1e329fb 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/octave/totalPressureDrop.m
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/octave/totalPressureDrop.m
@@ -97,8 +97,4 @@ ylabel("pressure drop [Pa]")
%print('cfdemSolverPiso_settlingTest.eps','-deps2')
print -color "cfdemSolverPiso_ErgunTestMPI.eps"
-replot;
-
-
-
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_restart b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_restart
index 311b8ac3..4dae9fb6 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_restart
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_restart
@@ -98,23 +98,20 @@ implicitCoupleProps
ArchimedesProps
{
- densityFieldName "rho";
gravityFieldName "g";
}
gradPForceProps
{
pFieldName "p";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
- //interpolation;
+ //interpolation true;
}
viscForceProps
{
velocityFieldName "U";
- densityFieldName "rho";
- interpolation;
+ interpolation true;
}
volWeightedAverageProps
{
@@ -135,20 +132,17 @@ totalMomentumExchangeProps
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
- densityFieldName "rho";
}
GidaspowDragProps
{
verbose;
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
phi 1;
}
DiFeliceDragProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
}
@@ -156,14 +150,12 @@ KochHillDragProps
{
//verbose;
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
}
BeetstraDragProps
{
velFieldName "U";
- densityFieldName "rho";
gravityFieldName "g";
rhoParticle 2000.;
voidfractionFieldName "voidfraction";
@@ -178,7 +170,6 @@ BeetstraDragProps
virtualMassForceProps
{
velFieldName "U";
- densityFieldName "rho";
}
particleCellVolumeProps
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_run b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_run
index 75dedb9f..95b9fe79 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_run
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_run
@@ -98,23 +98,20 @@ implicitCoupleProps
ArchimedesProps
{
- densityFieldName "rho";
gravityFieldName "g";
}
gradPForceProps
{
pFieldName "p";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
- //interpolation;
+ //interpolation true;
}
viscForceProps
{
velocityFieldName "U";
- densityFieldName "rho";
- interpolation;
+ interpolation true;
}
volWeightedAverageProps
{
@@ -135,20 +132,17 @@ totalMomentumExchangeProps
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
- densityFieldName "rho";
}
GidaspowDragProps
{
verbose;
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
phi 1;
}
DiFeliceDragProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
}
@@ -156,14 +150,12 @@ KochHillDragProps
{
//verbose;
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
}
BeetstraDragProps
{
velFieldName "U";
- densityFieldName "rho";
gravityFieldName "g";
rhoParticle 2000.;
voidfractionFieldName "voidfraction";
@@ -178,7 +170,6 @@ BeetstraDragProps
virtualMassForceProps
{
velFieldName "U";
- densityFieldName "rho";
}
particleCellVolumeProps
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/liggghtsCommands_run b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/liggghtsCommands_run
index 4a02d58c..ebd482f4 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/liggghtsCommands_run
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/liggghtsCommands_run
@@ -37,8 +37,9 @@ runLiggghtsProps
//- optional
writeLiggghtsProps
{
- writeLast on;
+ writeLast off;
writeName "post/restart/liggghts.restartCFDEM";
+ overwrite on;
}
// ************************************************************************* //
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/octave/totalPressureDrop.m b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/octave/totalPressureDrop.m
index c04819d9..a6873016 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/octave/totalPressureDrop.m
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/octave/totalPressureDrop.m
@@ -112,8 +112,4 @@ axis([0,Uend,0,dpErgun(length(dpErgun))])
%print('cfdemSolverPiso_settlingTest.eps','-deps2')
print -color "cfdemSolverPiso_ErgunTestMPI.eps"
-replot;
-
-
-
diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/0/f b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/0/f
new file mode 100644
index 00000000..25997958
--- /dev/null
+++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/0/f
@@ -0,0 +1,30 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 1.6 |
+| \\ / A nd | Web: http://www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class volVectorField;
+ object f;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions [1 -2 -2 0 0 0 0];
+
+internalField uniform (0 0 0);
+
+boundaryField
+{
+ "(inlet|outlet|walls)"
+ {
+ type zeroGradient;
+ value uniform (0 0 0);
+ }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/0/sSmoothField b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/0/sSmoothField
new file mode 100755
index 00000000..447a450e
--- /dev/null
+++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/0/sSmoothField
@@ -0,0 +1,31 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 1.6 |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class volScalarField;
+ location "0";
+ object sSmoothField;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions [0 0 0 0 0 0 0];
+
+internalField uniform 0;
+
+boundaryField
+{
+ ".*"
+ {
+ type zeroGradient;
+ }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/0/vSmoothField b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/0/vSmoothField
new file mode 100644
index 00000000..afefb5e4
--- /dev/null
+++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/0/vSmoothField
@@ -0,0 +1,31 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: 1.6 |
+| \\ / A nd | Web: www.OpenFOAM.org |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class volVectorField;
+ location "0";
+ object vSmoothField;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions [0 0 0 0 0 0 0];
+
+internalField uniform (0 0 0);
+
+boundaryField
+{
+ ".*"
+ {
+ type zeroGradient;
+ }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties
index 377798f4..a9630293 100755
--- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties
+++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties
@@ -91,10 +91,13 @@ implicitCoupleProps
DiFeliceDragProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
- verbose;
+ verbose true;
+
+ //- use of scalar viscosity for drag
+ //scalarViscosity true;
+ //nu nu [ 0 2 -1 0 0 0 0 ] 1e-04;
}
SchillerNaumannDragProps
@@ -120,7 +123,6 @@ ArchimedesProps
{
densityFieldName "rho";
gravityFieldName "g";
- treatDEM;
}
virtualMassForceProps
diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/liggghtsCommands b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/liggghtsCommands
index 7431b210..6517f084 100644
--- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/liggghtsCommands
+++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/liggghtsCommands
@@ -25,7 +25,16 @@ FoamFile
liggghtsCommandModels
(
- runLiggghts
+ runLiggghts
+ writeLiggghts
);
// ************************************************************************* //
+
+writeLiggghtsProps
+{
+ writeLast off;
+ //writeName "name";
+ overwrite on;
+ verbose;
+}
diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/system/fvSolution b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/system/fvSolution
index 96a1d5c2..276538b9 100644
--- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/system/fvSolution
+++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/system/fvSolution
@@ -41,7 +41,7 @@ solvers
relTol 0;
}
- "(voidfraction|Ksl|UsNext|voidfractionNext)"
+ "(voidfraction|Ksl|UsNext|voidfractionNext|sSmoothField|vSmoothField|fSmooth)"
{
solver PCG;
preconditioner DIC;
diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/DEM/post/.gitignore b/tutorials/cfdemSolverPiso/settlingTestMPI/DEM/post/.gitignore
new file mode 100644
index 00000000..e69de29b
diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/settlingTestMPI/parCFDDEMrun.sh
index 2bedf5db..2d622d70 100644
--- a/tutorials/cfdemSolverPiso/settlingTestMPI/parCFDDEMrun.sh
+++ b/tutorials/cfdemSolverPiso/settlingTestMPI/parCFDDEMrun.sh
@@ -24,7 +24,7 @@ machineFileName="none" # yourMachinefileName | none
debugMode="off" # on | off| strict
testHarnessPath="$CFDEM_TEST_HARNESS_PATH"
runOctave="true"
-cleanCase="true"
+cleanUp="true"
postproc="false"
#--------------------------------------------------------------------------------#
@@ -77,7 +77,7 @@ if [ $postproc == "true" ]
fi
#- clean up case
-if [ $cleanCase == "true" ]
+if [ $cleanUp == "true" ]
then
echo "deleting data at: $casePath :\n"
source $WM_PROJECT_DIR/bin/tools/CleanFunctions
@@ -86,6 +86,7 @@ if [ $cleanCase == "true" ]
cd $casePath
rm -r $casePath/CFD/clockData
rm -r $casePath/DEM/post/*
+ rm -r $casePath/DEM/liggghts.restartCFDEM*
echo "done"
fi
diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/couplingProperties
index 011b18d2..ab54283b 100644
--- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/couplingProperties
+++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/couplingProperties
@@ -105,7 +105,6 @@ volWeightedAverageProps
DiFeliceDragMSProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
//verbose;
@@ -114,14 +113,12 @@ DiFeliceDragMSProps
GidaspowDragMSProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
hydraulicDiameter 0.002;
}
ArchimedesProps
{
- densityFieldName "rho";
gravityFieldName "g";
}
diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/octave/totalPressureDrop.m b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/octave/totalPressureDrop.m
index 5345552e..deca1fbc 100644
--- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/octave/totalPressureDrop.m
+++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/octave/totalPressureDrop.m
@@ -109,7 +109,6 @@ axis([0,Uend,0,dpErgun(length(dpErgun))])
%print('cfdemSolverPiso_settlingTest.eps','-deps2')
print -color "cfdemSolverPisoMS_ErgunTestMPI.eps"
-replot;
SimName="ErgunTestMPI_sphereOfSpheres"
print(fig,strcat("figure_",SimName,".png"));
diff --git a/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/couplingProperties b/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/couplingProperties
index f6e1a5b1..171ae60c 100644
--- a/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/couplingProperties
+++ b/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/couplingProperties
@@ -77,7 +77,6 @@ LaEuScalarTempProps
partHeatFluxName "convectiveHeatFlux";
lambda 0.0256;
Cp 1007;
- densityFieldName "rho";
}
implicitCoupleProps
@@ -91,36 +90,31 @@ implicitCoupleProps
KochHillDragProps
{
velFieldName "U";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
}
DiFeliceDragProps
{
velFieldName "U";
- densityFieldName "rho";
- //verbose;
+ //verbose true;
}
ArchimedesProps
{
- densityFieldName "rho";
gravityFieldName "g";
}
gradPForceProps
{
pFieldName "p";
- densityFieldName "rho";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
- //interpolation;
+ //interpolation true;
}
viscForceProps
{
velocityFieldName "U";
- densityFieldName "rho";
- interpolation;
+ interpolation true;
}
oneWayVTKProps
diff --git a/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/octave/totalPressureDropAndNusselt.m b/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/octave/totalPressureDropAndNusselt.m
index b572108a..e60ef385 100644
--- a/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/octave/totalPressureDropAndNusselt.m
+++ b/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/octave/totalPressureDropAndNusselt.m
@@ -51,7 +51,6 @@ legend("analytical - Ergun","simulation")
%print('cfdemSolverPiso_settlingTest.eps','-deps2')
print -color "cfdemSolverPisoScalar_pressureDrop.eps"
-replot;
%*********************************************************************%
% heat transfer
@@ -126,7 +125,6 @@ legend("analytical - ","simulation")
%print('cfdemSolverPisoScalar_NusseltNr.eps','-deps2')
print -color "cfdemSolverPisoScalar_Nusselt.eps"
-replot;
figure(3)
plot(t_sim,Tin_sim,t_sim,Tout_sim)
@@ -135,5 +133,4 @@ legend("inlet","outlet")
%print('cfdemSolverPisoScalar_NusseltNr.eps','-deps2')
print -color "cfdemSolverPisoScalar_temperatures.eps"
-replot;