diff --git a/README b/README new file mode 100644 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/doc/CFDEMcoupling_Manual.pdf b/doc/CFDEMcoupling_Manual.pdf index 1f588f02..8692b871 100644 Binary files a/doc/CFDEMcoupling_Manual.pdf and b/doc/CFDEMcoupling_Manual.pdf differ diff --git a/doc/githubAccess_public.pdf b/doc/githubAccess_public.pdf index 9558f9e2..8efb8c10 100644 Binary files a/doc/githubAccess_public.pdf and b/doc/githubAccess_public.pdf differ diff --git a/src/lagrangian/cfdemParticle/Make/files b/src/lagrangian/cfdemParticle/Make/files index d2f26c35..5434353f 100644 --- a/src/lagrangian/cfdemParticle/Make/files +++ b/src/lagrangian/cfdemParticle/Make/files @@ -6,7 +6,6 @@ voidFractionModels = subModels/voidFractionModel locateModels = subModels/locateModel meshMotionModels = subModels/meshMotionModel momCoupleModels = subModels/momCoupleModel -regionModels = subModels/regionModel dataExchangeModels = subModels/dataExchangeModel averagingModels = subModels/averagingModel clockModels = subModels/clockModel @@ -21,18 +20,33 @@ $(forceModels)/forceModel/newForceModel.C $(forceModels)/noDrag/noDrag.C $(forceModels)/checkCouplingInterval/checkCouplingInterval.C $(forceModels)/DiFeliceDrag/DiFeliceDrag.C +$(forceModels)/DiFeliceDragNLift/DiFeliceDragNLift.C $(forceModels)/GidaspowDrag/GidaspowDrag.C $(forceModels)/SchillerNaumannDrag/SchillerNaumannDrag.C $(forceModels)/Archimedes/Archimedes.C $(forceModels)/ArchimedesIB/ArchimedesIB.C $(forceModels)/interface/interface.C $(forceModels)/ShirgaonkarIB/ShirgaonkarIB.C +$(forceModels)/fieldTimeAverage/fieldTimeAverage.C +$(forceModels)/fieldBound/fieldBound.C +$(forceModels)/volWeightedAverage/volWeightedAverage.C +$(forceModels)/totalMomentumExchange/totalMomentumExchange.C $(forceModels)/KochHillDrag/KochHillDrag.C +$(forceModels)/BeetstraDrag/multiphaseFlowBasic/multiphaseFlowBasic.C +$(forceModels)/BeetstraDrag/BeetstraDrag.C +$(forceModels)/LaEuScalarLiquid/LaEuScalarLiquid.C $(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C +$(forceModels)/LaEuScalarDust/LaEuScalarDust.C $(forceModels)/virtualMassForce/virtualMassForce.C $(forceModels)/gradPForce/gradPForce.C +$(forceModels)/gradULiftForce/gradULiftForce.C $(forceModels)/viscForce/viscForce.C $(forceModels)/MeiLift/MeiLift.C +$(forceModels)/KochHillDragNLift/KochHillDragNLift.C +$(forceModels)/solidsPressureForce/solidsPressureForce.C +$(forceModels)/periodicPressure/periodicPressure.C +$(forceModels)/periodicPressureControl/periodicPressureControl.C +$(forceModels)/averageSlipVel/averageSlipVel.C $(forceModelsMS)/forceModelMS/forceModelMS.C $(forceModelsMS)/forceModelMS/newForceModelMS.C @@ -62,21 +76,18 @@ $(locateModels)/turboEngineSearch/turboEngineSearch.C $(locateModels)/turboEngineSearchM2M/turboEngineSearchM2M.C $(locateModels)/engineSearchIB/engineSearchIB.C - $(meshMotionModels)/meshMotionModel/meshMotionModel.C $(meshMotionModels)/meshMotionModel/newMeshMotionModel.C $(meshMotionModels)/noMeshMotion/noMeshMotion.C +$(meshMotionModels)/DEMdrivenMeshMotion/DEMdrivenMeshMotion.C $(momCoupleModels)/momCoupleModel/momCoupleModel.C $(momCoupleModels)/momCoupleModel/newMomCoupleModel.C $(momCoupleModels)/explicitCouple/explicitCouple.C +$(momCoupleModels)/explicitCoupleSource/explicitCoupleSource.C $(momCoupleModels)/implicitCouple/implicitCouple.C $(momCoupleModels)/noCouple/noCouple.C -$(regionModels)/regionModel/regionModel.C -$(regionModels)/regionModel/newRegionModel.C -$(regionModels)/allRegion/allRegion.C - $(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C $(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C $(dataExchangeModels)/oneWayVTK/oneWayVTK.C @@ -102,4 +113,4 @@ $(liggghtsCommandModels)/runLiggghts/runLiggghts.C $(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C $(liggghtsCommandModels)/readLiggghtsData/readLiggghtsData.C -LIB = $(FOAM_USER_LIBBIN)/lib$(CFDEM_LIB_NAME) +LIB = $(CFDEM_LIB_DIR)/lib$(CFDEM_LIB_NAME) diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H index e71f7f55..40b8ccdb 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H @@ -45,9 +45,6 @@ SourceFiles // choose version #include "OFversion.H" -// choose comp/incomp -//#define comp - #include "fvCFD.H" #include "IFstream.H" diff --git a/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.C b/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.C index 901fdc73..faca16bb 100644 --- a/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.C +++ b/src/lagrangian/cfdemParticle/derived/cfdemCloudMS/cfdemCloudMS.C @@ -222,6 +222,9 @@ void Foam::cfdemCloudMS::setForces() resetArray(impForces_,numberOfParticles(),3); resetArray(expForces_,numberOfParticles(),3); resetArray(DEMForces_,numberOfParticles(),3); +Info << "hallo1" << endl; +cfdemCloudMS::nrForceModels(); +Info << "hallo2" << endl; for (int i=0;i 0) - { - for (int j=0;j 0) +// { +// for (int j=0;j(scalarFieldNames_[i]).dimensions(), 0) + ) + ); + } + + // create time average vector fields + vectorFields_.setSize(vectorFieldNames_.size()); + + for (int i=0;i < vectorFieldNames_.size(); i++) + { + word fieldName = "timeAverage_" + vectorFieldNames_[i]; + + Info<< "Creating field " << fieldName << endl; + vectorFields_.set + ( + i, + new volVectorField + ( + IOobject + ( + fieldName, + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh_, + dimensionedVector("0", mesh_.lookupObject(vectorFieldNames_[i]).dimensions(), vector::zero) + ) + ); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +fieldTimeAverage::~fieldTimeAverage() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void fieldTimeAverage::setForce() const +{ + if(mesh_.time().value() >= startTime_) + { + if(particleCloud_.verbose()) Info << "fieldTimeAverage.C - setForce()" << endl; + + for (int i=0;i < scalarFieldNames_.size(); i++) + { + // get reference to actual field + volScalarField& field = (volScalarField&) mesh_.lookupObject(scalarFieldNames_[i]); + + // first entry in this field + if(nrAverages_ == 0) + { + scalarFields_[i] = field; + } + else + { + scalarFields_[i] = (scalarFields_[i]*nrAverages_+field*1)/(nrAverages_+1); + } + } + + for (int i=0;i < vectorFieldNames_.size(); i++) + { + // get reference to actual field + volVectorField& field = (volVectorField&) mesh_.lookupObject(vectorFieldNames_[i]); + + // first entry in this field + if(nrAverages_ == 0) + { + vectorFields_[i] = field; + } + else + { + vectorFields_[i] = (vectorFields_[i]*nrAverages_+field*1)/(nrAverages_+1); + } + } + nrAverages_++; + }// end if time >= startTime_ +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/fieldTimeAverage/fieldTimeAverage.H b/src/lagrangian/cfdemParticle/subModels/forceModel/fieldTimeAverage/fieldTimeAverage.H new file mode 100644 index 00000000..5de898ec --- /dev/null +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/fieldTimeAverage/fieldTimeAverage.H @@ -0,0 +1,111 @@ +/*---------------------------------------------------------------------------*\ + 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(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER). + + calc time average of scalar or vector field + +Class + fieldTimeAverage + +SourceFiles + fieldTimeAverage.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fieldTimeAverage_H +#define fieldTimeAverage_H + +#include "forceModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class fieldTimeAverage Declaration +\*---------------------------------------------------------------------------*/ + +class fieldTimeAverage +: + public forceModel +{ +private: + + dictionary propsDict_; + + const fvMesh& mesh_; + + scalar startTime_; + + const wordList scalarFieldNames_; + + const wordList vectorFieldNames_; + + mutable PtrList scalarFields_; + + mutable PtrList vectorFields_; + + mutable double nrAverages_; + + +public: + + //- Runtime type information + TypeName("fieldTimeAverage"); + + + // Constructors + + //- Construct from components + fieldTimeAverage + ( + const dictionary& dict, + cfdemCloud& sm + ); + + // Destructor + + ~fieldTimeAverage(); + + + // Member Functions + void setForce() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.C b/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.C new file mode 100644 index 00000000..494a7ea7 --- /dev/null +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.C @@ -0,0 +1,241 @@ +/*---------------------------------------------------------------------------*\ + 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(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER). +\*---------------------------------------------------------------------------*/ + +#include "error.H" + +#include "volWeightedAverage.H" +#include "addToRunTimeSelectionTable.H" +#include "dataExchangeModel.H" +#include "mpi.h" +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(volWeightedAverage, 0); + +addToRunTimeSelectionTable +( + forceModel, + volWeightedAverage, + dictionary +); + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// Construct from components +volWeightedAverage::volWeightedAverage +( + const dictionary& dict, + cfdemCloud& sm +) +: + forceModel(dict,sm), + propsDict_(dict.subDict(typeName + "Props")), + mesh_(particleCloud_.mesh()), + startTime_(0.), + scalarFieldNames_(propsDict_.lookup("scalarFieldNames")), + vectorFieldNames_(propsDict_.lookup("vectorFieldNames")), + scalarFields_(NULL), + vectorFields_(NULL), + upperThreshold_(readScalar(propsDict_.lookup("upperThreshold"))), + lowerThreshold_(readScalar(propsDict_.lookup("lowerThreshold"))), + verbose_(false) +{ + if (propsDict_.found("startTime")){ + startTime_=readScalar(propsDict_.lookup("startTime")); + } + + if (propsDict_.found("verbose")){ + verbose_ = true; + } + + // create vol weighted average scalar fields + scalarFields_.setSize(scalarFieldNames_.size()); + + for (int i=0;i < scalarFieldNames_.size(); i++) + { + word fieldName = "volAverage_" + scalarFieldNames_[i]; + + Info<< "Creating field " << fieldName << endl; + scalarFields_.set + ( + i, + new volScalarField + ( + IOobject + ( + fieldName, + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh_, + dimensionedScalar("0", mesh_.lookupObject(scalarFieldNames_[i]).dimensions(), 0) + ) + ); + } + + // create vol weighted average vector fields + vectorFields_.setSize(vectorFieldNames_.size()); + + for (int i=0;i < vectorFieldNames_.size(); i++) + { + word fieldName = "volAverage_" + vectorFieldNames_[i]; + + Info<< "Creating field " << fieldName << endl; + vectorFields_.set + ( + i, + new volVectorField + ( + IOobject + ( + fieldName, + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh_, + dimensionedVector("0", mesh_.lookupObject(vectorFieldNames_[i]).dimensions(), vector::zero) + ) + ); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +volWeightedAverage::~volWeightedAverage() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void volWeightedAverage::setForce() const +{ + if(mesh_.time().value() >= startTime_) + { + if(verbose_) Info << "volWeightedAverage.C - setForce()" << endl; + + for (int i=0;i < scalarFieldNames_.size(); i++) + { + // get reference to actual field + volScalarField& field = (volScalarField&) mesh_.lookupObject(scalarFieldNames_[i]); + + scalar fieldValue=-1; + scalar volWeightedAverage=-1; + scalar cellVol=-1; + scalar totVol=0; + scalar totVol_all=0; + + forAll(field,cellI) + { + fieldValue = field[cellI]; + if(fieldValue < upperThreshold_ && fieldValue > lowerThreshold_) + { + cellVol = mesh_.V()[cellI]; + scalarFields_[i][cellI] = fieldValue * cellVol; + totVol += cellVol; + } + else + { + scalarFields_[i][cellI] = 0.; + } + } + + MPI_Allreduce(&totVol, &totVol_all, 3, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); + volWeightedAverage = gSum(scalarFields_[i]) / (totVol_all+SMALL); + scalarFields_[i].internalField() = volWeightedAverage; + + if(verbose_) + { + Info << "calculated vol. weighted average of field: " << scalarFieldNames_[i] + << " = " << volWeightedAverage + << ",\n considering cells where the field < " << upperThreshold_ + << ", and > " << lowerThreshold_ << endl; + } + } + + for (int i=0;i < vectorFieldNames_.size(); i++) + { + // get reference to actual field + volVectorField& field = (volVectorField&) mesh_.lookupObject(vectorFieldNames_[i]); + + vector fieldValue(-1,-1,-1); + vector volWeightedAverage(-1,-1,-1); + scalar magvolWeightedAverage=-1; + scalar cellVol=-1; + scalar totVol=0; + scalar totVol_all=0; + + forAll(field,cellI) + { + fieldValue = field[cellI]; + magvolWeightedAverage = mag(fieldValue); + if(magvolWeightedAverage < upperThreshold_ && magvolWeightedAverage > lowerThreshold_) + { + cellVol = mesh_.V()[cellI]; + vectorFields_[i][cellI] = fieldValue * cellVol; + totVol += cellVol; + } + else + { + vectorFields_[i][cellI] = vector::zero; + } + } + + MPI_Allreduce(&totVol, &totVol_all, 3, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); + volWeightedAverage = gSum(vectorFields_[i]) / (totVol_all+SMALL); + vectorFields_[i].internalField() = volWeightedAverage; + + if(verbose_) + { + Info << "calculated vol. weighted average of field: " << vectorFieldNames_[i] + << " = " << volWeightedAverage + << ",\n considering cells where the mag(field) < " << upperThreshold_ + << ", and > " << lowerThreshold_ << endl; + } + } + }// end if time >= startTime_ +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.H b/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.H new file mode 100644 index 00000000..0aa4743e --- /dev/null +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.H @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + 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(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER). + + calc time average of scalar or vector field +Class + volWeightedAverage + +SourceFiles + volWeightedAverage.C + +\*---------------------------------------------------------------------------*/ + +#ifndef volWeightedAverage_H +#define volWeightedAverage_H + +#include "forceModel.H" +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class volWeightedAverage Declaration +\*---------------------------------------------------------------------------*/ + +class volWeightedAverage +: + public forceModel +{ +private: + + dictionary propsDict_; + + const fvMesh& mesh_; + + scalar startTime_; + + const wordList scalarFieldNames_; + + const wordList vectorFieldNames_; + + mutable PtrList scalarFields_; + + mutable PtrList vectorFields_; + + mutable scalar upperThreshold_; + + mutable scalar lowerThreshold_; + + Switch verbose_; + +public: + + //- Runtime type information + TypeName("volWeightedAverage"); + + + // Constructors + + //- Construct from components + volWeightedAverage + ( + const dictionary& dict, + cfdemCloud& sm + ); + + // Destructor + + ~volWeightedAverage(); + + + // Member Functions + void setForce() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/liggghtsCommandModel/liggghtsCommandModel.C b/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/liggghtsCommandModel/liggghtsCommandModel.C index 26713e43..3d17aee8 100644 --- a/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/liggghtsCommandModel/liggghtsCommandModel.C +++ b/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/liggghtsCommandModel/liggghtsCommandModel.C @@ -171,7 +171,6 @@ bool liggghtsCommandModel::runThisCommand(int couplingStep) lastRun_=couplingStep; } } - return runIt; } diff --git a/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/writeLiggghts/writeLiggghts.C b/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/writeLiggghts/writeLiggghts.C index 66603626..9f9c94bc 100644 --- a/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/writeLiggghts/writeLiggghts.C +++ b/src/lagrangian/cfdemParticle/subModels/liggghtsCommandModel/writeLiggghts/writeLiggghts.C @@ -83,12 +83,11 @@ writeLiggghts::writeLiggghts overwrite_=Switch(propsDict_.lookup("overwrite")); } } - if(writeLast_) runLast_=true; else { - Warning << "Using invalid options of writeLiggghts, please use 'writeLast' option." << endl; + //Warning << "Using invalid options of writeLiggghts, please use 'writeLast' option." << endl; runEveryWriteStep_=true; } diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/DEM/in.liggghts_init b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/DEM/in.liggghts_init index 3e9c9025..43159afc 100755 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/DEM/in.liggghts_init +++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/DEM/in.liggghts_init @@ -47,7 +47,7 @@ fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0 group rigid_group region reg region bc cylinder z 0.0 0.0 0.012 0.001 0.055 units box -fix ins rigid_group insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. 0. insert_every once overlapcheck yes region bc ntry_mc 10000 particles_in_region 2500 # volumefraction_region 0.01 # +fix ins rigid_group insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. 0. insert_every once overlapcheck yes region bc ntry_mc 10000 particles_in_region 1 #2500 # volumefraction_region 0.01 # #integrator for multisphere rigid bodies fix integr rigid_group multisphere diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/DEM/post/dummy b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/DEM/post/dummy index 9a3cd299..a1be24d4 100644 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/DEM/post/dummy +++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/DEM/post/dummy @@ -7,3 +7,20 @@ dummyfile dummyfile dummyfile dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile +dummyfile diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/parCFDDEMrun.sh b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/parCFDDEMrun.sh index 6333f23b..7fa5abe0 100644 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/parCFDDEMrun.sh @@ -21,7 +21,7 @@ logfileName="log_$headerText" solverName="cfdemSolverPisoMS" nrProcs="2" machineFileName="none" # yourMachinefileName | none -debugMode="off" # on | off +debugMode="on" # on | off testHarnessPath="$CFDEM_TEST_HARNESS_PATH" cleanUp="true"