From 4b31e2f36f526e71e46a019ddabffd63b8b3185e Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Wed, 20 Jul 2016 14:51:11 +0200 Subject: [PATCH 01/12] Adapt solvers to OF 4.x. --- .../solvers/cfdemSolverIB/Make/options | 13 +++-- .../solvers/cfdemSolverIB/cfdemSolverIB.C | 52 +++++-------------- .../solvers/cfdemSolverPiso/Make/options | 11 ++-- .../solvers/cfdemSolverPiso/cfdemSolverPiso.C | 40 +++++--------- .../solvers/cfdemSolverPisoMS/Make/options | 17 ++++-- .../cfdemSolverPisoMS/cfdemSolverPisoMS.C | 29 +++-------- .../cfdemSolverPisoScalar/Make/options | 11 ++-- .../cfdemSolverPisoScalar.C | 38 ++++---------- 8 files changed, 78 insertions(+), 133 deletions(-) diff --git a/applications/solvers/cfdemSolverIB/Make/options b/applications/solvers/cfdemSolverIB/Make/options index a51d1dae..b841d1a3 100755 --- a/applications/solvers/cfdemSolverIB/Make/options +++ b/applications/solvers/cfdemSolverIB/Make/options @@ -1,24 +1,27 @@ include $(CFDEM_ADD_LIBS_DIR)/additionalLibs EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude + EXE_LIBS = \ -L$(CFDEM_LIB_DIR)\ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ + -lmeshTools \ -ldynamicFvMesh \ -ldynamicMesh \ -lfvOptions \ diff --git a/applications/solvers/cfdemSolverIB/cfdemSolverIB.C b/applications/solvers/cfdemSolverIB/cfdemSolverIB.C index 9c930e63..9c6e41be 100755 --- a/applications/solvers/cfdemSolverIB/cfdemSolverIB.C +++ b/applications/solvers/cfdemSolverIB/cfdemSolverIB.C @@ -39,7 +39,8 @@ Contributions #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" +#include "pisoControl.H" #include "cfdemCloudIB.H" #include "implicitCouple.H" @@ -52,10 +53,9 @@ Contributions #include "cellSet.H" -#if defined(version22) - #include "meshToMeshNew.H" - #include "fvIOoptionList.H" -#endif +#include "meshToMeshNew.H" +#include "fvIOoptionList.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -66,14 +66,14 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createDynamicFvMesh.H" + + #include "createControl.H" #include "createFields.H" #include "initContinuityErrs.H" - #if defined(version22) #include "createFvOptions.H" - #endif // create cfdemCloud #include "readGravitationalAcceleration.H" @@ -91,7 +91,6 @@ int main(int argc, char *argv[]) interFace = mag(mesh.lookupObject("voidfractionNext")); mesh.update(); //dyM - #include "readPISOControls.H" #include "CourantNo.H" // do particle stuff @@ -107,45 +106,33 @@ int main(int argc, char *argv[]) fvm::ddt(voidfraction,U) + fvm::div(phi, U) + turbulence->divDevReff(U) - #if defined(version22) == fvOptions(U) - #endif ); UEqn.relax(); - #if defined(version22) fvOptions.constrain(UEqn); - #endif - if (momentumPredictor) + if (piso.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); } // --- PISO loop - for (int corr=0; corr()); Info << "TotalForceExp: " << fTotal << endl; Info << "TotalForceImp: " << fImpTotal << endl; @@ -111,17 +112,14 @@ int main(int argc, char *argv[]) ); UEqn.relax(); - if (momentumPredictor && (modelType=="B" || modelType=="Bfull")) + if (piso.momentumPredictor() && (modelType=="B" || modelType=="Bfull")) solve(UEqn == - fvc::grad(p) + Ksl/rho*Us); - else if (momentumPredictor) + else if (piso.momentumPredictor()) solve(UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us); // --- PISO loop - //for (int corr=0; corr Date: Wed, 20 Jul 2016 14:53:48 +0200 Subject: [PATCH 02/12] CfdemSolverPiso tutorial adapted to OF 4.x. --- .../ErgunTestMPI/CFD/constant/RASProperties | 25 ------------------- .../CFD/constant/couplingProperties | 2 +- .../CFD/constant/turbulenceProperties | 2 +- .../ErgunTestMPI/CFD/system/controlDict | 24 ++---------------- .../ErgunTestMPI/parCFDDEMrun.sh | 0 5 files changed, 4 insertions(+), 49 deletions(-) delete mode 100644 tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/RASProperties mode change 100644 => 100755 tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/RASProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/RASProperties deleted file mode 100644 index daec1829..00000000 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties index 2c6aee77..8f405355 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties @@ -75,7 +75,7 @@ momCoupleModels implicitCouple ); -turbulenceModelType "RASProperties";//"LESProperties";// +turbulenceModelType "turbulenceProperties";//"LESProperties";// //===========================================================================// // sub-model properties diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/turbulenceProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/turbulenceProperties index f6753662..9cfc50a3 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/turbulenceProperties +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict index 596886d1..05af8ef1 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict @@ -49,10 +49,9 @@ adjustTimeStep no; maxCo 0.1; -//libs ( "libgroovyBC.so" "libfiniteVolumeCFDEM.so"); functions -( +{ probes { @@ -94,24 +93,5 @@ functions outputInterval 1; } - /*pressureDrop - { - type patchAverage; - functionObjectLibs - ( - "libsimpleFunctionObjects.so" - ); - verbose true; - patches - ( - inlet - outlet - ); - fields - ( - p - ); - factor 1; - }*/ -); +}; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh old mode 100644 new mode 100755 From 44d9b77f07587de6c4aa7bf1b32ceda3e9c53988 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Wed, 20 Jul 2016 14:55:01 +0200 Subject: [PATCH 03/12] rmdepall changed to wrmdep -a. --- src/lagrangian/cfdemParticle/etc/functions.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lagrangian/cfdemParticle/etc/functions.sh b/src/lagrangian/cfdemParticle/etc/functions.sh index 2524130b..60ac7812 100755 --- a/src/lagrangian/cfdemParticle/etc/functions.sh +++ b/src/lagrangian/cfdemParticle/etc/functions.sh @@ -76,17 +76,17 @@ compileLib() i=$((${#str}-4)) ending=${str:$i:4} if [[ $ending == "Comp" ]]; then - echo "Compiling a compressible library - so doing an rmdepall of incomp library first." + echo "Compiling a compressible library - so doing an wrmdep -a of incomp library first." echo "Please make sure to have the compressible libraries first in the library-list.txt!" cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle echo "changing to $PWD" - rmdepall 2>&1 | tee -a $logpath/$logfileName + wrmdep -a 2>&1 | tee -a $logpath/$logfileName cd $casePath echo "changing to $PWD" else echo "Compiling a incompressible library." fi - rmdepall 2>&1 | tee -a $logpath/$logfileName + wrmdep -a 2>&1 | tee -a $logpath/$logfileName wclean 2>&1 | tee -a $logpath/$logfileName #fi wmake libso 2>&1 | tee -a $logpath/$logfileName @@ -128,7 +128,7 @@ compileSolver() #- wclean and wmake #if [ $doClean != "noClean" ]; then - rmdepall 2>&1 | tee -a $logpath/$logfileName + wrmdep -a 2>&1 | tee -a $logpath/$logfileName wclean 2>&1 | tee -a $logpath/$logfileName #fi @@ -284,7 +284,7 @@ cleanCFDEM() cd $path echo "cleaning library $PWD" - rmdepall + wrmdep -a wclean rm -r ./Make/linux* rm -r ./lnInclude @@ -338,7 +338,7 @@ cleanCFDEM() cd $path echo "cleaning solver $PWD" - rmdepall + wrmdep -a wclean done } From 3ad42f232611d5f44a70f7a12d57324a81698680 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Wed, 20 Jul 2016 14:55:55 +0200 Subject: [PATCH 04/12] New OF version. Not needed by code. --- src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H b/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H index bc3c6931..ede037d2 100644 --- a/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H +++ b/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H @@ -1,4 +1,5 @@ -#define version23 // currently being used +#define version4x +//#define version23 // currently being used //#define version22 //#define version21 //#define version16ext From 1265463275aa2b1125e8a8a7c02171226b7acaa4 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Wed, 20 Jul 2016 14:56:41 +0200 Subject: [PATCH 05/12] Update files and options lists. --- src/finiteVolume/Make/files | 1 - src/lagrangian/cfdemParticle/Make/files | 2 -- src/lagrangian/cfdemParticle/Make/options | 5 ++--- src/lagrangian/cfdemParticle/etc/solver-list.txt | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index ded87676..3eecbfaf 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -3,7 +3,6 @@ derivedFvPatchFields = $(fvPatchFields)/derived general = cfdTools/general -$(derivedFvPatchFields)/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchFields.C $(derivedFvPatchFields)/uniformFixedValueTube/uniformFixedValueTubeFvPatchFields.C LIB = $(CFDEM_LIB_DIR)/libfiniteVolumeCFDEM diff --git a/src/lagrangian/cfdemParticle/Make/files b/src/lagrangian/cfdemParticle/Make/files index e3d3da50..15526657 100644 --- a/src/lagrangian/cfdemParticle/Make/files +++ b/src/lagrangian/cfdemParticle/Make/files @@ -85,7 +85,6 @@ $(locateModels)/turboEngineSearch/turboEngineSearch.C $(locateModels)/engineSearchMany2Many/engineSearchMany2Many.C $(locateModels)/engineSearchIB/engineSearchIB.C - $(meshMotionModels)/meshMotionModel/meshMotionModel.C $(meshMotionModels)/meshMotionModel/newMeshMotionModel.C $(meshMotionModels)/noMeshMotion/noMeshMotion.C @@ -106,7 +105,6 @@ $(dataExchangeModels)/oneWayVTK/oneWayVTK.C $(dataExchangeModels)/twoWayFiles/twoWayFiles.C $(dataExchangeModels)/noDataExchange/noDataExchange.C $(dataExchangeModels)/twoWayMPI/twoWayMPI.C -$(dataExchangeModels)/twoWayMany2Many/twoWayMany2Many.C $(averagingModels)/averagingModel/averagingModel.C $(averagingModels)/averagingModel/newAveragingModel.C diff --git a/src/lagrangian/cfdemParticle/Make/options b/src/lagrangian/cfdemParticle/Make/options index 730442ef..9cb7777e 100644 --- a/src/lagrangian/cfdemParticle/Make/options +++ b/src/lagrangian/cfdemParticle/Make/options @@ -12,7 +12,7 @@ EXE_INC = \ -I ./cfdemParticle \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/OpenFOAM/containers/HashTables/labelHashSet \ @@ -24,8 +24,7 @@ LIB_LIBS = \ $(PLIBS) \ -L$(CFDEM_LIB_DIR) \ -lfiniteVolume \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lincompressibleTurbulenceModels \ -lmeshTools \ -llagrangian \ -lmpi_cxx \ diff --git a/src/lagrangian/cfdemParticle/etc/solver-list.txt b/src/lagrangian/cfdemParticle/etc/solver-list.txt index 925e9976..586ad71d 100644 --- a/src/lagrangian/cfdemParticle/etc/solver-list.txt +++ b/src/lagrangian/cfdemParticle/etc/solver-list.txt @@ -1,4 +1,3 @@ cfdemSolverPisoMS/dir cfdemSolverPiso/dir -cfdemSolverIB/dir cfdemSolverPisoScalar/dir From 8bb99ae9ce05f80d8f9d8ca8f0fa38aa0b28f1f6 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Wed, 20 Jul 2016 14:57:05 +0200 Subject: [PATCH 06/12] Adapted source code to OF 4.x. --- .../uniformFixedValueTubeFvPatchField.C | 2 +- .../uniformFixedValueTubeFvPatchField.H | 4 +-- ...niformFixedValueVoidfractionFvPatchField.C | 2 +- ...niformFixedValueVoidfractionFvPatchField.H | 4 +-- .../cfdemParticle/cfdemCloud/cfdemCloud.C | 10 +------ .../cfdemParticle/cfdemCloud/cfdemCloud.H | 28 +++---------------- .../cfdemParticle/cfdemCloud/cfdemCloudI.H | 10 +------ .../averagingModel/averagingModel.C | 12 ++++---- .../forceModel/Archimedes/Archimedes.C | 6 +--- .../forceModel/Archimedes/Archimedes.H | 6 +--- .../forceModel/ArchimedesIB/ArchimedesIB.C | 6 +--- .../forceModel/ArchimedesIB/ArchimedesIB.H | 8 ++---- .../LaEuScalarTemp/LaEuScalarTemp.C | 4 +-- .../particleCellVolume/particleCellVolume.C | 6 ++-- .../volWeightedAverage/volWeightedAverage.C | 4 +-- .../locateModel/engineSearch/engineSearch.C | 8 +----- .../locateModel/engineSearch/engineSearch.H | 2 -- .../standardSearch/standardSearch.C | 12 ++------ .../turboEngineSearch/turboEngineSearch.C | 6 +--- .../explicitCouple/explicitCouple.C | 8 +++--- .../implicitCouple/implicitCouple.C | 8 +++--- .../constDiffSmoothing/constDiffSmoothing.C | 8 +++--- .../GaussVoidFraction/GaussVoidFraction.C | 2 +- .../IBVoidFraction/IBVoidFraction.C | 2 +- .../bigParticleVoidFraction.C | 2 +- .../voidFractionModel/voidFractionModel.C | 8 +++--- 26 files changed, 53 insertions(+), 125 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueTube/uniformFixedValueTubeFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueTube/uniformFixedValueTubeFvPatchField.C index ae1b8c20..9787583a 100755 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueTube/uniformFixedValueTubeFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueTube/uniformFixedValueTubeFvPatchField.C @@ -88,7 +88,7 @@ uniformFixedValueTubeFvPatchField::uniformFixedValueTubeFvPatchField ) : fixedValueFvPatchField(p, iF), - uniformValue_(DataEntry::New("uniformValue", dict)), + uniformValue_(Function1::New("uniformValue", dict)), pName_("p"), //JOKER phiName_("phi"), //JOKER velocityFieldName_("U"), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueTube/uniformFixedValueTubeFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueTube/uniformFixedValueTubeFvPatchField.H index a7abc6e7..d86a92f2 100755 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueTube/uniformFixedValueTubeFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueTube/uniformFixedValueTubeFvPatchField.H @@ -40,7 +40,7 @@ SourceFiles #include "Random.H" #include "fixedValueFvPatchFields.H" -#include "DataEntry.H" +#include "Function1.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,7 +58,7 @@ class uniformFixedValueTubeFvPatchField { // Private data - autoPtr > uniformValue_; + autoPtr > uniformValue_; word pName_; //JOKER pressure diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchField.C index ed490709..e696fe31 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchField.C @@ -73,7 +73,7 @@ uniformFixedValueVoidfractionFvPatchField::uniformFixedValueVoidfractionFv ) : fixedValueFvPatchField(p, iF), - uniformValue_(DataEntry::New("uniformValue", dict)), + uniformValue_(Function1::New("uniformValue", dict)), voidfractionFieldName_("voidfraction") { const scalar t = this->db().time().timeOutputValue(); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchField.H index 02c230e7..96f4e20c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchField.H @@ -40,7 +40,7 @@ SourceFiles #include "Random.H" #include "fixedValueFvPatchFields.H" -#include "DataEntry.H" +#include "Function1.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,7 +58,7 @@ class uniformFixedValueVoidfractionFvPatchField { // Private data - autoPtr > uniformValue_; + autoPtr > uniformValue_; word voidfractionFieldName_; diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C index e36e9b54..bc29645e 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C @@ -125,15 +125,7 @@ cfdemCloud::cfdemCloud ), turbulence_ ( - #if defined(version21) || defined(version16ext) - #ifdef compre - mesh.lookupObject - #else - mesh.lookupObject - #endif - #elif defined(version15) - mesh.lookupObject - #endif + mesh.lookupObject ( turbulenceModelType_ ) diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H index ffb3a589..1eadd20a 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H @@ -49,11 +49,7 @@ SourceFiles #include "fvCFD.H" #include "IFstream.H" -#if defined(version21) || defined(version16ext) - #include -#elif defined(version15) - #include -#endif +#include // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -157,15 +153,7 @@ protected: mutable volScalarField ddtVoidfraction_; - #if defined(version21) || defined(version16ext) - #ifdef compre - const compressible::turbulenceModel& turbulence_; - #else - const incompressible::turbulenceModel& turbulence_; - #endif - #elif defined(version15) - const incompressible::RASModel& turbulence_; - #endif + const turbulenceModel& turbulence_; autoPtr* forceModel_; @@ -364,16 +352,8 @@ public: inline autoPtr* liggghtsCommand() const; - #if defined(version21) || defined(version16ext) - #ifdef compre - inline const compressible::turbulenceModel& turbulence() const; - #else - inline const incompressible::turbulenceModel& turbulence() const; - #endif - #elif defined(version15) - inline const incompressible::RASModel& turbulence() const; - #endif - + inline const turbulenceModel& turbulence() const; + // Write // write cfdemCloud internal data diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H index 29558e29..84cd29c5 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H @@ -302,15 +302,7 @@ inline autoPtr* cfdemCloud::liggghtsCommand() const return liggghtsCommand_; } -#if defined(version21) || defined(version16ext) - #ifdef compre - inline const compressible::turbulenceModel& cfdemCloud::turbulence() const - #else - inline const incompressible::turbulenceModel& cfdemCloud::turbulence() const - #endif -#elif defined(version15) - inline const incompressible::RASModel& cfdemCloud::turbulence() const -#endif +inline const turbulenceModel& cfdemCloud::turbulence() const { return turbulence_; } diff --git a/src/lagrangian/cfdemParticle/subModels/averagingModel/averagingModel/averagingModel.C b/src/lagrangian/cfdemParticle/subModels/averagingModel/averagingModel/averagingModel.C index b186db91..0f65f783 100644 --- a/src/lagrangian/cfdemParticle/subModels/averagingModel/averagingModel/averagingModel.C +++ b/src/lagrangian/cfdemParticle/subModels/averagingModel/averagingModel/averagingModel.C @@ -59,7 +59,7 @@ void averagingModel::undoVectorAverage { // WARNING - not sure if this is valid for dilute model!!! - if(!single) fieldPrev.internalField() = fieldNext.internalField(); + if(!single) fieldPrev.ref() = fieldNext.ref(); label cellI; vector valueVec; @@ -303,13 +303,13 @@ void averagingModel::setDSauter void averagingModel::resetVectorAverage(volVectorField& prev,volVectorField& next,bool single) const { - if(!single) prev.internalField() = next.internalField(); - next.internalField() = vector::zero; + if(!single) prev.ref() = next.ref(); + next.primitiveFieldRef() = vector::zero; } void averagingModel::resetWeightFields() const { - UsWeightField_.internalField() = 0; + UsWeightField_.ref() = 0; } @@ -352,12 +352,12 @@ tmp Foam::averagingModel::UsInterp() const if (particleCloud_.dataExchangeM().couplingStep() > 1) { - tsource() = (1 - particleCloud_.dataExchangeM().timeStepFraction()) * UsPrev_ + tsource.ref() = (1 - particleCloud_.dataExchangeM().timeStepFraction()) * UsPrev_ + particleCloud_.dataExchangeM().timeStepFraction() * UsNext_; } else { - tsource() = UsNext_; + tsource.ref() = UsNext_; } return tsource; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.C b/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.C index f0becad6..50f5a7e4 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.C @@ -64,11 +64,7 @@ Archimedes::Archimedes propsDict_(dict.subDict(typeName + "Props")), twoDimensional_(false), gravityFieldName_(propsDict_.lookup("gravityFieldName")), - #if defined(version21) || defined(version16ext) - g_(sm.mesh().lookupObject (gravityFieldName_)) - #elif defined(version15) - g_(dimensionedVector(sm.mesh().lookupObject("environmentalProperties").lookup(gravityFieldName_)).value()) - #endif + g_(sm.mesh().lookupObject (gravityFieldName_)) { //Append the field names to be probed diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.H b/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.H index 41d3c51d..edb09ff4 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/Archimedes/Archimedes.H @@ -65,11 +65,7 @@ private: word gravityFieldName_; - #ifdef version21 - const uniformDimensionedVectorField& g_; // ref to gravity - #elif defined(version16ext) || defined(version15) - const dimensionedVector& g_; // ref to gravity - #endif + const uniformDimensionedVectorField& g_; // ref to gravity public: diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.C b/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.C index 846f43aa..46c016b6 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.C @@ -66,11 +66,7 @@ ArchimedesIB::ArchimedesIB voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")), //mod by alice voidfractions_(sm.mesh().lookupObject (voidfractionFieldName_)),//mod by alice gravityFieldName_(propsDict_.lookup("gravityFieldName")), - #if defined(version21) || defined(version16ext) - g_(sm.mesh().lookupObject (gravityFieldName_)) - #elif defined(version15) - g_(dimensionedVector(sm.mesh().lookupObject("environmentalProperties").lookup(gravityFieldName_)).value()) - #endif + g_(sm.mesh().lookupObject (gravityFieldName_)) { //Append the field names to be probed particleCloud_.probeM().initialize(typeName, "archimedesIBF.logDat"); diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.H b/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.H index 7b1ff8e6..c80b3900 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/ArchimedesIB/ArchimedesIB.H @@ -71,12 +71,8 @@ private: word gravityFieldName_; - #ifdef version21 - const uniformDimensionedVectorField& g_; // ref to gravity - #elif defined(version16ext) || defined(version15) - const dimensionedVector& g_; // ref to gravity - #endif - + const uniformDimensionedVectorField& g_; // ref to gravity + public: diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C index 7a94f570..09cb8c46 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C @@ -130,7 +130,7 @@ void LaEuScalarTemp::manipulateScalarField(volScalarField& EuField) const allocateMyArrays(); // reset Scalar field - EuField.internalField() = 0.0; + EuField.primitiveFieldRef() = 0.0; // get DEM data particleCloud_.dataExchangeM().getData(partTempName_,"scalar-atom",partTemp_); @@ -232,7 +232,7 @@ void LaEuScalarTemp::manipulateScalarField(volScalarField& EuField) const ); // scale with -1/(Vcell*rho*Cp) - EuField.internalField() /= -rhoField.internalField()*Cp_*EuField.mesh().V(); + EuField.primitiveFieldRef() /= -rhoField.internalField()*Cp_*EuField.mesh().V(); // limit source term forAll(EuField,cellI) diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/particleCellVolume/particleCellVolume.C b/src/lagrangian/cfdemParticle/subModels/forceModel/particleCellVolume/particleCellVolume.C index ee406c6e..54c956b1 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/particleCellVolume/particleCellVolume.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/particleCellVolume/particleCellVolume.C @@ -120,7 +120,7 @@ void particleCellVolume::setForce() const { if(verbose_) Info << "particleCellVolume.C - setForce()" << endl; - scalarField_.internalField()=0.; + scalarField_.ref()=0.; // get reference to actual field const volScalarField& field = mesh_.lookupObject(scalarFieldName_); @@ -143,8 +143,8 @@ void particleCellVolume::setForce() const scalarField2_[cellI] = 0.; } } - scalarField_.internalField() = gSum(scalarField_); - scalarField2_.internalField() = gSum(scalarField2_); + scalarField_.ref() = gSum(scalarField_); + scalarField2_.ref() = gSum(scalarField2_); if(verbose_) { diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.C b/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.C index e4054c75..d4d3d603 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/volWeightedAverage/volWeightedAverage.C @@ -179,7 +179,7 @@ void volWeightedAverage::setForce() const MPI_Allreduce(&totVol, &totVol_all, 3, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); integralValue = gSum(scalarFields_[i]); volWeightedAverage = integralValue / (totVol_all+SMALL); - scalarFields_[i].internalField() = volWeightedAverage; + scalarFields_[i].ref() = volWeightedAverage; if(verbose_) { @@ -224,7 +224,7 @@ void volWeightedAverage::setForce() const MPI_Allreduce(&totVol, &totVol_all, 3, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); volWeightedAverage = gSum(vectorFields_[i]) / (totVol_all+SMALL); - vectorFields_[i].internalField() = volWeightedAverage; + vectorFields_[i].ref() = volWeightedAverage; if(verbose_) { diff --git a/src/lagrangian/cfdemParticle/subModels/locateModel/engineSearch/engineSearch.C b/src/lagrangian/cfdemParticle/subModels/locateModel/engineSearch/engineSearch.C index 224cd364..861ca33e 100644 --- a/src/lagrangian/cfdemParticle/subModels/locateModel/engineSearch/engineSearch.C +++ b/src/lagrangian/cfdemParticle/subModels/locateModel/engineSearch/engineSearch.C @@ -61,14 +61,8 @@ engineSearch::engineSearch : locateModel(dict,sm), propsDict_(dict.subDict(typeName + "Props")), - //faceDecomp_(propsDict_.lookup("faceDecomp")), treeSearch_(propsDict_.lookup("treeSearch")), - #ifdef version16ext - searchEngine_(particleCloud_.mesh(),false) //(particleCloud_.mesh(),faceDecomp_) - #elif defined(version21) - searchEngine_(particleCloud_.mesh(),polyMesh::FACEPLANES) // FACEPLANES or FACECENTRETETS; FACEDIAGTETS not stable - #endif - //searchEngine_(particleCloud_.mesh(),faceDecomp_) // only 2.0.x + searchEngine_(particleCloud_.mesh(), polyMesh::FACE_PLANES) {} diff --git a/src/lagrangian/cfdemParticle/subModels/locateModel/engineSearch/engineSearch.H b/src/lagrangian/cfdemParticle/subModels/locateModel/engineSearch/engineSearch.H index e855b438..33070599 100644 --- a/src/lagrangian/cfdemParticle/subModels/locateModel/engineSearch/engineSearch.H +++ b/src/lagrangian/cfdemParticle/subModels/locateModel/engineSearch/engineSearch.H @@ -61,8 +61,6 @@ private: dictionary propsDict_; - //Switch faceDecomp_; - Switch treeSearch_; protected: diff --git a/src/lagrangian/cfdemParticle/subModels/locateModel/standardSearch/standardSearch.C b/src/lagrangian/cfdemParticle/subModels/locateModel/standardSearch/standardSearch.C index 1ee8b044..afbdf504 100644 --- a/src/lagrangian/cfdemParticle/subModels/locateModel/standardSearch/standardSearch.C +++ b/src/lagrangian/cfdemParticle/subModels/locateModel/standardSearch/standardSearch.C @@ -89,11 +89,7 @@ label standardSearch::findCell for(int i=0;i<3;i++) position[i] = positions[index][i]; // find cell - #ifdef version16ext - cellIDs[index][0] = particleCloud_.mesh().findCell(position); - #elif defined(version21) - cellIDs[index][0] = particleCloud_.mesh().findCell(position, polyMesh::FACEPLANES); - #endif + cellIDs[index][0] = particleCloud_.mesh().findCell(position, polyMesh::FACE_PLANES); } else cellIDs[index][0] = -1; } @@ -108,11 +104,7 @@ label standardSearch::findSingleCell ) const { // find cell - #ifdef version16ext - return particleCloud_.mesh().findCell(position); - #elif defined(version21) - return particleCloud_.mesh().findCell(position, polyMesh::FACEPLANES); - #endif + return particleCloud_.mesh().findCell(position, polyMesh::FACE_PLANES); } diff --git a/src/lagrangian/cfdemParticle/subModels/locateModel/turboEngineSearch/turboEngineSearch.C b/src/lagrangian/cfdemParticle/subModels/locateModel/turboEngineSearch/turboEngineSearch.C index 9975c0af..cc8137f4 100644 --- a/src/lagrangian/cfdemParticle/subModels/locateModel/turboEngineSearch/turboEngineSearch.C +++ b/src/lagrangian/cfdemParticle/subModels/locateModel/turboEngineSearch/turboEngineSearch.C @@ -64,11 +64,7 @@ turboEngineSearch::turboEngineSearch propsDict_(dict.subDict(typeName + "Props")), treeSearch_(propsDict_.lookup("treeSearch")), bb_(particleCloud_.mesh().points(),false), - #ifdef version16ext - searchEngine_(particleCloud_.mesh(),false) //(particleCloud_.mesh(),faceDecomp_) - #elif defined(version21) - searchEngine_(particleCloud_.mesh(),polyMesh::FACEPLANES) // FACEPLANES or FACECENTRETETS; FACEDIAGTETS not stable - #endif + searchEngine_(particleCloud_.mesh(), polyMesh::FACE_PLANES) {} diff --git a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.C b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.C index fc4572ed..8afed35b 100644 --- a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.C +++ b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.C @@ -145,18 +145,18 @@ tmp explicitCouple::expMomSource() const if (fNext_[cellI][i] > fLimit_[i]) fNext_[cellI][i] = fLimit_[i]; } } - tsource() = fPrev_; + tsource.ref() = fPrev_; }else { - tsource() = (1 - tsf) * fPrev_ + tsf * fNext_; + tsource.ref() = (1 - tsf) * fPrev_ + tsf * fNext_; } return tsource; } void Foam::explicitCouple::resetMomSourceField() const { - fPrev_.internalField() = fNext_.internalField(); - fNext_.internalField() = vector::zero; + fPrev_.ref() = fNext_.ref(); + fNext_.primitiveFieldRef() = vector::zero; } inline vector Foam::explicitCouple::arrayToField(label cellI) const diff --git a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/implicitCouple/implicitCouple.C b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/implicitCouple/implicitCouple.C index 88b9631f..377fc137 100644 --- a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/implicitCouple/implicitCouple.C +++ b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/implicitCouple/implicitCouple.C @@ -166,10 +166,10 @@ tmp implicitCouple::impMomSource() const // limiter if (KslNext_[cellI] > KslLimit_) KslNext_[cellI] = KslLimit_; } - tsource() = KslPrev_; + tsource.ref() = KslPrev_; }else { - tsource() = (1 - tsf) * KslPrev_ + tsf * KslNext_; + tsource.ref() = (1 - tsf) * KslPrev_ + tsf * KslNext_; } return tsource; @@ -177,8 +177,8 @@ tmp implicitCouple::impMomSource() const void Foam::implicitCouple::resetMomSourceField() const { - KslPrev_.internalField() = KslNext_.internalField(); - KslNext_.internalField() = 0; + KslPrev_.ref() = KslNext_.ref(); + KslNext_.primitiveFieldRef() = 0; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/cfdemParticle/subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.C b/src/lagrangian/cfdemParticle/subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.C index 695e5154..1af57abe 100644 --- a/src/lagrangian/cfdemParticle/subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.C +++ b/src/lagrangian/cfdemParticle/subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.C @@ -100,7 +100,7 @@ void Foam::constDiffSmoothing::smoothen(volScalarField& fieldSrc) const volScalarField sSmoothField = sSmoothField_; sSmoothField.dimensions().reset(fieldSrc.dimensions()); - sSmoothField.internalField()=fieldSrc.internalField(); + sSmoothField.ref()=fieldSrc.internalField(); sSmoothField.correctBoundaryConditions(); sSmoothField.oldTime().dimensions().reset(fieldSrc.dimensions()); sSmoothField.oldTime()=fieldSrc; @@ -141,7 +141,7 @@ void Foam::constDiffSmoothing::smoothen(volVectorField& fieldSrc) const volVectorField vSmoothField = vSmoothField_; vSmoothField.dimensions().reset(fieldSrc.dimensions()); - vSmoothField.internalField()=fieldSrc.internalField(); + vSmoothField.ref()=fieldSrc.internalField(); vSmoothField.correctBoundaryConditions(); vSmoothField.oldTime().dimensions().reset(fieldSrc.dimensions()); vSmoothField.oldTime()=fieldSrc; @@ -176,7 +176,7 @@ void Foam::constDiffSmoothing::smoothenReferenceField(volVectorField& fieldSrc) volVectorField vSmoothField = vSmoothField_; vSmoothField.dimensions().reset(fieldSrc.dimensions()); - vSmoothField.internalField()=fieldSrc.internalField(); + vSmoothField.ref()=fieldSrc.internalField(); vSmoothField.correctBoundaryConditions(); vSmoothField.oldTime().dimensions().reset(fieldSrc.dimensions()); vSmoothField.oldTime()=fieldSrc; @@ -210,7 +210,7 @@ void Foam::constDiffSmoothing::smoothenReferenceField(volVectorField& fieldSrc) forAll(vSmoothField,cellI) { if ( mag(vSmoothField.oldTime().internalField()[cellI]) > 0.0f) // have a vector in the OLD vSmoothField, so keep it! - NLarge()[cellI] = sourceStrength; + NLarge.ref()[cellI] = sourceStrength; } // do the smoothing diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.C index 1c90f8c8..9a929d67 100644 --- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.C +++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.C @@ -91,7 +91,7 @@ void GaussVoidFraction::setvoidFraction(double** const& mask,double**& voidfract { reAllocArrays(); - voidfractionNext_.internalField()=1; + voidfractionNext_.ref()=1; scalar radius(-1); scalar volume(0); diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.C index 27bc9423..2b60cfac 100755 --- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.C +++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.C @@ -96,7 +96,7 @@ void IBVoidFraction::setvoidFraction(double** const& mask,double**& voidfraction reAllocArrays(); - voidfractionNext_.internalField()=1; + voidfractionNext_.ref()=1; for(int index=0; index< particleCloud_.numberOfParticles(); index++) { diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.C index b8d5bbad..179a3b6a 100644 --- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.C +++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.C @@ -90,7 +90,7 @@ void bigParticleVoidFraction::setvoidFraction(double** const& mask,double**& voi { reAllocArrays(); - voidfractionNext_.internalField()=1; + voidfractionNext_.ref()=1; scalar radius(-1); scalar volume(0); diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.C index 54182eb7..b5ddbddf 100644 --- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.C +++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.C @@ -127,19 +127,19 @@ tmp Foam::voidFractionModel::voidFractionInterp() const scalar tsf = particleCloud_.dataExchangeM().timeStepFraction(); if(1-tsf < 1e-4 && particleCloud_.dataExchangeM().couplingStep() > 1) //tsf==1 { - tsource() = voidfractionPrev_; + tsource.ref() = voidfractionPrev_; } else { - tsource() = (1 - tsf) * voidfractionPrev_ + tsf * voidfractionNext_; + tsource.ref() = (1 - tsf) * voidfractionPrev_ + tsf * voidfractionNext_; } return tsource; } void Foam::voidFractionModel::resetVoidFractions() const { - voidfractionPrev_.internalField() = voidfractionNext_.internalField(); - voidfractionNext_.internalField() = 1; + voidfractionPrev_.ref() = voidfractionNext_.ref(); + voidfractionNext_.ref() = 1; } /*void Foam::voidFractionModel::undoVoidFractions(double**const& mask) const From 0a2f1c793a4a38418fb07e8205239ab4c677920c Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Thu, 21 Jul 2016 12:16:09 +0200 Subject: [PATCH 07/12] Cleaning up cfdemSolverPiso tutorial ErgunMPI. --- .../cfdemSolverPiso/ErgunTestMPI/CFD/0/U | 26 +------------------ .../cfdemSolverPiso/ErgunTestMPI/CFD/0/p | 6 +---- .../CFD/constant/couplingProperties | 5 ++-- .../CFD/octave/totalPressureDrop.m | 2 +- .../ErgunTestMPI/CFD/system/controlDict | 2 +- 5 files changed, 7 insertions(+), 34 deletions(-) diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/0/U b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/0/U index 5fc0e4e2..d809edc4 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/0/U +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/0/U @@ -30,40 +30,16 @@ boundaryField inlet { - /*type flowRateInletVelocity; - flowRate 0.001; - value uniform (0 0 0);*/ - - /*type fixedValue; - value uniform (0 0 0.0001);*/ - - //type zeroGradient; - -/* type groovyBC; - variables "Uend=vector(0,0,0.02);tEnd=0.1;"; - valueExpression "((time() < tEnd) ? Uend/tEnd*time():Uend)"; - value uniform (0 0 0);*/ - - /*// 2.0.x, 1.6,ext - type timeVaryingUniformFixedValue; - fileName "steps_0p1s"; - outOfBounds clamp; - value uniform (0 0 0);*/ - - // 2.1.x type uniformFixedValue; uniformValue table ( (0.000 (0 0 0.002)) - (0.100 (0 0 0.020)) + (0.500 (0 0 0.020)) ); } outlet { - /*type fluxCorrectedVelocity; //inletOutlet; - value uniform (0 0 0); - inletValue uniform (0 0 0);*/ type zeroGradient; } } diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/0/p b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/0/p index 3a456746..fce46965 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/0/p +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/0/p @@ -16,7 +16,7 @@ FoamFile dimensions [0 2 -2 0 0 0 0]; -internalField uniform 1; +internalField uniform 0e0; boundaryField { @@ -29,13 +29,9 @@ boundaryField inlet { type zeroGradient; - //type fixedValue; - //value uniform 100000; } outlet { - //type zeroGradient; - type fixedValue; value $internalField; } diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties index 8f405355..de31de23 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/constant/couplingProperties @@ -55,12 +55,12 @@ smoothingModel off;// localPSizeDiffSmoothing;// constDiffSmoothing; // forceModels ( - //GidaspowDrag + GidaspowDrag //BeetstraDrag //DiFeliceDrag gradPForce viscForce - KochHillDrag + //KochHillDrag //DEMbasedDrag //RongDrag //Archimedes @@ -143,6 +143,7 @@ GidaspowDragProps { verbose true; velFieldName "U"; + granVelFieldName "Us"; voidfractionFieldName "voidfraction"; interpolation true; phi 1; diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/octave/totalPressureDrop.m b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/octave/totalPressureDrop.m index 5a7d1a37..e0905ca6 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/octave/totalPressureDrop.m +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/octave/totalPressureDrop.m @@ -9,7 +9,7 @@ rhoG = 10 % density in kg/m3 %path = '../probes/0/p'; % 2.1.x path = '../postProcessing/probes/0/p'; % 2.2.x columns=22; -headerlines=4; +headerlines=23;%4; data = loaddata(path,columns,headerlines); data=transpose(data); [x,y]=size(data) diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict index 05af8ef1..f63efff4 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict @@ -23,7 +23,7 @@ startTime 0; stopAt endTime; -endTime 0.1; +endTime 0.5; deltaT 0.0005; From d30f828fe5d4a7bb3886bc39baf696d3cf8fb949 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Thu, 21 Jul 2016 12:16:55 +0200 Subject: [PATCH 08/12] Updating solvers to OF 4.x. --- .../solvers/cfdemSolverPiso/cfdemSolverPiso.C | 71 +----- .../solvers/cfdemSolverPiso/createFields.H | 2 + .../cfdemSolverPisoMS/cfdemSolverPisoMS.C | 114 +++------ .../cfdemSolverPisoScalar/Make/options | 1 + .../cfdemSolverPisoScalar.C | 103 ++------ .../cfdemSolverPisoScalar/createFields.H | 228 +++++++++--------- .../cfdTools/continuityErrorPhiPU.H | 2 +- 7 files changed, 189 insertions(+), 332 deletions(-) diff --git a/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C b/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C index e779aac4..73ec3fca 100644 --- a/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C +++ b/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C @@ -38,6 +38,7 @@ Description #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "pisoControl.H" +#include "fvOptions.H" #include "cfdemCloud.H" #include "implicitCouple.H" @@ -54,6 +55,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "createControl.H" #include "createFields.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" // create cfdemCloud @@ -101,78 +103,19 @@ int main(int argc, char *argv[]) // Pressure-velocity PISO corrector { // Momentum predictor - fvVectorMatrix UEqn - ( - 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) - ); - - UEqn.relax(); - if (piso.momentumPredictor() && (modelType=="B" || modelType=="Bfull")) - solve(UEqn == - fvc::grad(p) + Ksl/rho*Us); - else if (piso.momentumPredictor()) - solve(UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us); + #include "UEqn.H" // --- PISO loop while (piso.correct()) { - volScalarField rUA = 1.0/UEqn.A(); - - surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); - volScalarField rUAvoidfraction("(voidfraction2|A(U))",rUA*voidfraction); - surfaceScalarField rUAfvoidfraction("(voidfraction2|A(U)F)", fvc::interpolate(rUAvoidfraction)); - - U = rUA*UEqn.H(); - - - phi = ( fvc::interpolate(U*voidfraction) & mesh.Sf() ) - + rUAfvoidfraction*fvc::ddtCorr(U, phi); - - surfaceScalarField phiS(fvc::interpolate(Us*voidfraction) & mesh.Sf()); - surfaceScalarField phiGes = phi + rUAf*(fvc::interpolate(Ksl/rho) * phiS); - - if (modelType=="A") - rUAvoidfraction = volScalarField("(voidfraction2|A(U))",rUA*voidfraction*voidfraction); - - // Non-orthogonal pressure corrector loop - while (piso.correctNonOrthogonal()) - { - // Pressure corrector - fvScalarMatrix pEqn - ( - fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + particleCloud.ddtVoidfraction() - ); - pEqn.setReference(pRefCell, pRefValue); - - pEqn.solve(mesh.solver(p.select(piso.finalInnerIter()))); - - if (piso.finalNonOrthogonalIter()) - { - phiGes -= pEqn.flux(); - phi = phiGes; - } - - } // end non-orthogonal corrector loop - - #include "continuityErrorPhiPU.H" - - 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; - - U.correctBoundaryConditions(); - - } // end piso loop + #include "pEqn.H" + } } + laminarTransport.correct(); turbulence->correct(); - }// end solveFlow + } else { Info << "skipping flow solution." << endl; diff --git a/applications/solvers/cfdemSolverPiso/createFields.H b/applications/solvers/cfdemSolverPiso/createFields.H index 849ef338..8f0b5584 100644 --- a/applications/solvers/cfdemSolverPiso/createFields.H +++ b/applications/solvers/cfdemSolverPiso/createFields.H @@ -122,3 +122,5 @@ surfaceScalarField phi ( incompressible::turbulenceModel::New(U, phi, laminarTransport) ); + +#include "createMRF.H" \ No newline at end of file diff --git a/applications/solvers/cfdemSolverPisoMS/cfdemSolverPisoMS.C b/applications/solvers/cfdemSolverPisoMS/cfdemSolverPisoMS.C index 0d8e5137..c8322fad 100644 --- a/applications/solvers/cfdemSolverPisoMS/cfdemSolverPisoMS.C +++ b/applications/solvers/cfdemSolverPisoMS/cfdemSolverPisoMS.C @@ -25,12 +25,12 @@ License along with CFDEMcoupling. If not, see . Application - cfdemSolverPisoMS + cfdemSolverPiso Description Transient solver for incompressible flow. Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. - The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6, + The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6, where additional functionality for CFD-DEM coupling is added. \*---------------------------------------------------------------------------*/ @@ -38,11 +38,13 @@ Description #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "pisoControl.H" +#include "fvOptions.H" #include "cfdemCloudMS.H" #include "implicitCouple.H" #include "clockModel.H" #include "smoothingModel.H" +#include "forceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,6 +55,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "createControl.H" #include "createFields.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" // create cfdemCloud @@ -61,11 +64,10 @@ 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"); + particleCloud.clockM().start(1,"Global"); Info<< "Time = " << runTime.timeName() << nl << endl; @@ -73,91 +75,51 @@ 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) + { + particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces()); + } + Info << "update Ksl.internalField()" << endl; Ksl = particleCloud.momCoupleM(0).impMomSource(); - particleCloud.smoothingM().smoothen(Ksl); Ksl.correctBoundaryConditions(); + //Force Checks + vector fTotal(0,0,0); + vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value(); + reduce(fImpTotal, sumOp()); + Info << "TotalForceExp: " << fTotal << endl; + Info << "TotalForceImp: " << fImpTotal << endl; + #include "solverDebugInfo.H" particleCloud.clockM().stop("Coupling"); particleCloud.clockM().start(26,"Flow"); - // Pressure-velocity PISO corrector + + if(particleCloud.solveFlow()) { - // Momentum predictor - fvVectorMatrix UEqn - ( - fvm::ddt(voidfraction,U) //particleCloud.ddtVoidfractionU(U,voidfraction) // - + fvm::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; - else - UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us; - - UEqn.relax(); - - if (piso.momentumPredictor()) - solve(UEqn); - - // --- PISO loop - - while (piso.correct()) + // Pressure-velocity PISO corrector { - volScalarField rUA = 1.0/UEqn.A(); + // Momentum predictor + #include "UEqn.H" - surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); - volScalarField rUAvoidfraction("(voidfraction2|A(U))",rUA*voidfraction); + // --- PISO loop - U = rUA*UEqn.H(); - - phi = (fvc::interpolate(U*voidfraction) & mesh.Sf() ); - //+ fvc::ddtPhiCorr(rUAvoidfraction, U, phi); - surfaceScalarField phiS(fvc::interpolate(Us*voidfraction) & mesh.Sf()); - surfaceScalarField phiGes = phi + rUAf*(fvc::interpolate(Ksl/rho) * phiS); - - if (modelType=="A") - rUAvoidfraction = volScalarField("(voidfraction2|A(U))",rUA*voidfraction*voidfraction); - - // Non-orthogonal pressure corrector loop - while (piso.correctNonOrthogonal()) + while (piso.correct()) { - // Pressure corrector - fvScalarMatrix pEqn - ( - fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + particleCloud.ddtVoidfraction() - ); - pEqn.setReference(pRefCell, pRefValue); + #include "pEqn.H" + } + } - pEqn.solve(mesh.solver(p.select(piso.finalInnerIter()))); - - if (piso.finalNonOrthogonalIter()) - { - phiGes -= pEqn.flux(); - } - - } // end non-orthogonal corrector loop - - #include "continuityErrorPhiPU.H" - - if (modelType=="B") - U -= rUA*fvc::grad(p) - Ksl/rho*Us*rUA; - else - U -= voidfraction*rUA*fvc::grad(p) - Ksl/rho*Us*rUA; - - U.correctBoundaryConditions(); - - } // end piso loop + laminarTransport.correct(); + turbulence->correct(); + } + else + { + Info << "skipping flow solution." << endl; } - - turbulence->correct(); runTime.write(); @@ -170,7 +132,7 @@ int main(int argc, char *argv[]) } Info<< "End\n" << endl; - + return 0; } diff --git a/applications/solvers/cfdemSolverPisoScalar/Make/options b/applications/solvers/cfdemSolverPisoScalar/Make/options index 91f9f553..69598800 100644 --- a/applications/solvers/cfdemSolverPisoScalar/Make/options +++ b/applications/solvers/cfdemSolverPisoScalar/Make/options @@ -7,6 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I ../cfdemSolverPiso \ -I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \ -I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \ diff --git a/applications/solvers/cfdemSolverPisoScalar/cfdemSolverPisoScalar.C b/applications/solvers/cfdemSolverPisoScalar/cfdemSolverPisoScalar.C index d2621d91..788c8f02 100644 --- a/applications/solvers/cfdemSolverPisoScalar/cfdemSolverPisoScalar.C +++ b/applications/solvers/cfdemSolverPisoScalar/cfdemSolverPisoScalar.C @@ -25,7 +25,7 @@ License along with CFDEMcoupling. If not, see . Application - cfdemSolverPisoScalar + cfdemSolverPiso Description Transient solver for incompressible flow. @@ -38,9 +38,11 @@ Description #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "pisoControl.H" +#include "fvOptions.H" #include "cfdemCloud.H" #include "implicitCouple.H" +#include "clockModel.H" #include "smoothingModel.H" #include "forceModel.H" @@ -53,6 +55,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "createControl.H" #include "createFields.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" // create cfdemCloud @@ -64,11 +67,14 @@ int main(int argc, char *argv[]) Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) { + particleCloud.clockM().start(1,"Global"); + Info<< "Time = " << runTime.timeName() << nl << endl; #include "CourantNo.H" // do particle stuff + particleCloud.clockM().start(2,"Coupling"); bool hasEvolved = particleCloud.evolve(voidfraction,Us,U); if(hasEvolved) @@ -80,100 +86,38 @@ int main(int argc, char *argv[]) Ksl = particleCloud.momCoupleM(0).impMomSource(); Ksl.correctBoundaryConditions(); + //Force Checks + vector fTotal(0,0,0); + vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value(); + reduce(fImpTotal, sumOp()); + Info << "TotalForceExp: " << fTotal << endl; + Info << "TotalForceImp: " << fImpTotal << endl; #include "solverDebugInfo.H" + particleCloud.clockM().stop("Coupling"); - // get scalar source from DEM - particleCloud.forceM(1).manipulateScalarField(Tsource); - Tsource.correctBoundaryConditions(); - - // solve scalar transport equation - fvScalarMatrix TEqn - ( - fvm::ddt(voidfraction,T) - fvm::Sp(fvc::ddt(voidfraction),T) - + fvm::div(phi, T) - fvm::Sp(fvc::div(phi),T) - - fvm::laplacian(DT*voidfraction, T) - == - Tsource - ); - TEqn.relax(); - TEqn.solve(); + particleCloud.clockM().start(26,"Flow"); + + #include "TEqn.H" if(particleCloud.solveFlow()) { // Pressure-velocity PISO corrector { // Momentum predictor - fvVectorMatrix UEqn - ( - 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) - ); - - UEqn.relax(); - if (piso.momentumPredictor() && (modelType=="B" || modelType=="Bfull")) - solve(UEqn == - fvc::grad(p) + Ksl/rho*Us); - else if (piso.momentumPredictor()) - solve(UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us); + #include "UEqn.H" // --- PISO loop while (piso.correct()) { - volScalarField rUA = 1.0/UEqn.A(); - - surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); - volScalarField rUAvoidfraction("(voidfraction2|A(U))",rUA*voidfraction); - surfaceScalarField rUAfvoidfraction("(voidfraction2|A(U)F)", fvc::interpolate(rUAvoidfraction)); - - U = rUA*UEqn.H(); - - phi = ( fvc::interpolate(U*voidfraction) & mesh.Sf() ) - + rUAfvoidfraction*fvc::ddtCorr(U, phi); - - surfaceScalarField phiS(fvc::interpolate(Us*voidfraction) & mesh.Sf()); - surfaceScalarField phiGes = phi + rUAf*(fvc::interpolate(Ksl/rho) * phiS); - - if (modelType=="A") - rUAvoidfraction = volScalarField("(voidfraction2|A(U))",rUA*voidfraction*voidfraction); - - while (piso.correctNonOrthogonal()) - { - // Pressure corrector - fvScalarMatrix pEqn - ( - fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + particleCloud.ddtVoidfraction() - ); - pEqn.setReference(pRefCell, pRefValue); - - pEqn.solve(mesh.solver(p.select(piso.finalInnerIter()))); - - if (piso.finalNonOrthogonalIter()) - { - phiGes -= pEqn.flux(); - phi = phiGes; - } - - } // end non-orthogonal corrector loop - - #include "continuityErrorPhiPU.H" - - 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; - - U.correctBoundaryConditions(); - - } // end piso loop + #include "pEqn.H" + } } + laminarTransport.correct(); turbulence->correct(); - }// end solveFlow + } else { Info << "skipping flow solution." << endl; @@ -184,6 +128,9 @@ int main(int argc, char *argv[]) Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; + + particleCloud.clockM().stop("Flow"); + particleCloud.clockM().stop("Global"); } Info<< "End\n" << endl; diff --git a/applications/solvers/cfdemSolverPisoScalar/createFields.H b/applications/solvers/cfdemSolverPisoScalar/createFields.H index bff7514c..fe5dd29a 100644 --- a/applications/solvers/cfdemSolverPisoScalar/createFields.H +++ b/applications/solvers/cfdemSolverPisoScalar/createFields.H @@ -1,36 +1,36 @@ - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading physical velocity field U" << endl; - Info<< "Note: only if voidfraction at boundary is 1, U is superficial velocity!!!\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -//======================== -// drag law modelling -//======================== - + Info<< "Reading field p\n" << endl; + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + Info<< "Reading physical velocity field U" << endl; + Info<< "Note: only if voidfraction at boundary is 1, U is superficial velocity!!!\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + +//======================== +// drag law modelling +//======================== + Info<< "\nReading momentum exchange field Ksl\n" << endl; volScalarField Ksl ( @@ -44,8 +44,8 @@ ), mesh //dimensionedScalar("0", dimensionSet(0, 0, -1, 0, 0), 1.0) - ); - + ); + Info<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl; volScalarField voidfraction ( @@ -58,8 +58,8 @@ IOobject::AUTO_WRITE ), mesh - ); - + ); + Info<< "\nCreating density field rho\n" << endl; volScalarField rho ( @@ -71,27 +71,27 @@ IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), - mesh, + mesh, dimensionedScalar("0", dimensionSet(1, -3, 0, 0, 0), 1.0) - ); - - Info<< "Reading particle velocity field Us\n" << endl; - volVectorField Us - ( - IOobject - ( - "Us", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -//======================== -// scalar field modelling -//======================== + ); + + Info<< "Reading particle velocity field Us\n" << endl; + volVectorField Us + ( + IOobject + ( + "Us", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + +//======================== +// scalar field modelling +//======================== Info<< "\nCreating dummy density field rho = 1\n" << endl; volScalarField T ( @@ -103,10 +103,10 @@ IOobject::MUST_READ, IOobject::AUTO_WRITE ), - mesh//, + mesh//, //dimensionedScalar("0", dimensionSet(0, 0, -1, 1, 0), 273.15) - ); - + ); + Info<< "\nCreating fluid-particle heat flux field\n" << endl; volScalarField Tsource ( @@ -118,57 +118,59 @@ IOobject::MUST_READ, IOobject::AUTO_WRITE ), - mesh//, + mesh//, //dimensionedScalar("0", dimensionSet(0, 0, -1, 1, 0), 0.0) - ); - - IOdictionary transportProperties - ( - IOobject - ( - "transportProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar DT - ( - transportProperties.lookup("DT") - ); - -//======================== - -//# include "createPhi.H" -#ifndef createPhi_H -#define createPhi_H -Info<< "Reading/calculating face flux field phi\n" << endl; -surfaceScalarField phi - ( - IOobject - ( - "phi", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - linearInterpolate(U*voidfraction) & mesh.Sf() - ); -#endif - - - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); - - - singlePhaseTransportModel laminarTransport(U, phi); - - autoPtr turbulence - ( - incompressible::turbulenceModel::New(U, phi, laminarTransport) - ); + ); + + IOdictionary transportProperties + ( + IOobject + ( + "transportProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + dimensionedScalar DT + ( + transportProperties.lookup("DT") + ); + +//======================== + +//# include "createPhi.H" +#ifndef createPhi_H +#define createPhi_H +Info<< "Reading/calculating face flux field phi\n" << endl; +surfaceScalarField phi + ( + IOobject + ( + "phi", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + linearInterpolate(U*voidfraction) & mesh.Sf() + ); +#endif + + + + label pRefCell = 0; + scalar pRefValue = 0.0; + setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); + + + singlePhaseTransportModel laminarTransport(U, phi); + + autoPtr turbulence + ( + incompressible::turbulenceModel::New(U, phi, laminarTransport) + ); + +#include "createMRF.H" \ No newline at end of file diff --git a/src/lagrangian/cfdemParticle/cfdTools/continuityErrorPhiPU.H b/src/lagrangian/cfdemParticle/cfdTools/continuityErrorPhiPU.H index c58afcfb..6506ef64 100644 --- a/src/lagrangian/cfdemParticle/cfdTools/continuityErrorPhiPU.H +++ b/src/lagrangian/cfdemParticle/cfdTools/continuityErrorPhiPU.H @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ { - volScalarField contErr( fvc::div(phiGes) + fvc::ddt(voidfraction) ); + volScalarField contErr( fvc::div(phi) + fvc::ddt(voidfraction) ); scalar sumLocalContErr = runTime.deltaTValue()* mag(contErr)().weightedAverage(mesh.V()).value(); From 4ce58382387d8baf3f2fd7229f1e991f4b86c87e Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Mon, 1 Aug 2016 15:43:33 +0200 Subject: [PATCH 09/12] Updated Piso/ErgunTestCG tutorial. --- tutorials/cfdemSolverPiso/ErgunTestCG/CFD/0/U | 27 +------ .../ErgunTestCG/CFD/constant/RASProperties | 25 ------ .../CFD/constant/couplingProperties | 2 +- .../CFD/constant/turbulenceProperties | 2 +- .../ErgunTestCG/CFD/steps_0p1s | 22 ------ .../ErgunTestCG/CFD/system/controlDict | 76 +------------------ .../ErgunTestCG/parCFDDEMrun.sh | 0 7 files changed, 5 insertions(+), 149 deletions(-) delete mode 100644 tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/RASProperties delete mode 100644 tutorials/cfdemSolverPiso/ErgunTestCG/CFD/steps_0p1s mode change 100644 => 100755 tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/0/U b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/0/U index d6975143..d1ce5aa8 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/0/U +++ b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/0/U @@ -30,29 +30,7 @@ boundaryField inlet { - /*type flowRateInletVelocity; - flowRate 0.001; - value uniform (0 0 0);*/ - - /*type fixedValue; - value uniform (0 0 0.0001);*/ - - //type zeroGradient; - -/* type groovyBC; - variables "Uend=vector(0,0,0.02);tEnd=0.1;"; - valueExpression "((time() < tEnd) ? Uend/tEnd*time():Uend)"; - value uniform (0 0 0);*/ - - /*// 2.0.x, 1.6,ext - type timeVaryingUniformFixedValue; - fileName "steps_0p1s"; - outOfBounds clamp; - value uniform (0 0 0);*/ - - // 2.1.x - //type uniformFixedValue; - type uniformFixedValueVoidfraction; + type uniformFixedValue; uniformValue table ( (0.000 (0 0 0.002)) @@ -62,9 +40,6 @@ boundaryField outlet { - /*type fluxCorrectedVelocity; //inletOutlet; - value uniform (0 0 0); - inletValue uniform (0 0 0);*/ type zeroGradient; } } diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/RASProperties b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/RASProperties deleted file mode 100644 index daec1829..00000000 --- a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/couplingProperties index f6b4891c..862de403 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/couplingProperties @@ -70,7 +70,7 @@ momCoupleModels implicitCouple ); -turbulenceModelType "RASProperties";//"LESProperties";// +turbulenceModelType "turbulenceProperties"; //===========================================================================// // sub-model properties diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/turbulenceProperties b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/turbulenceProperties index f6753662..9cfc50a3 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/turbulenceProperties +++ b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/steps_0p1s b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/steps_0p1s deleted file mode 100644 index 0b9befc7..00000000 --- a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/steps_0p1s +++ /dev/null @@ -1,22 +0,0 @@ -( - (0.000 (0 0 0.002)) - (0.010 (0 0 0.002)) - (0.011 (0 0 0.004)) - (0.020 (0 0 0.004)) - (0.021 (0 0 0.006)) - (0.030 (0 0 0.006)) - (0.031 (0 0 0.008)) - (0.040 (0 0 0.008)) - (0.041 (0 0 0.010)) - (0.050 (0 0 0.010)) - (0.051 (0 0 0.012)) - (0.060 (0 0 0.012)) - (0.061 (0 0 0.014)) - (0.070 (0 0 0.014)) - (0.071 (0 0 0.016)) - (0.080 (0 0 0.016)) - (0.081 (0 0 0.018)) - (0.090 (0 0 0.018)) - (0.091 (0 0 0.020)) - (0.100 (0 0 0.020)) -) diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/system/controlDict b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/system/controlDict index 85e89dbe..3d2ac69f 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/system/controlDict +++ b/tutorials/cfdemSolverPiso/ErgunTestCG/CFD/system/controlDict @@ -53,8 +53,7 @@ maxCo 0.1; libs ( "libfiniteVolumeCFDEM.so" ); functions -( - +{ probes { type probes; @@ -94,76 +93,5 @@ functions outputControl timeStep;//outputTime; outputInterval 1; } - -/* - probes_inletFlux - { - type faceSource; - functionObjectLibs ("libfieldFunctionObjects.so"); - enabled true; - outputControl timeStep; //outputTime; - log true; // log to screen? - valueOutput true; // Write values at run-time output times? - source patch; // Type of face source: - sourceName inlet; // faceZone name, see below - operation sum; - fields - ( - phi - ); - } - - probes_outletFlux - { - type faceSource; - functionObjectLibs ("libfieldFunctionObjects.so"); - enabled true; - outputControl timeStep; //outputTime; - log true; // log to screen? - valueOutput true; // Write values at run-time output times? - source patch; // Type of face source: - sourceName outlet; // faceZone name, see below - operation sum; - fields - ( - phi - ); - } - - probes_wallFlux - { - type faceSource; - functionObjectLibs ("libfieldFunctionObjects.so"); - enabled true; - outputControl timeStep; //outputTime; - log true; // log to screen? - valueOutput true; // Write values at run-time output times? - source patch; // Type of face source: - sourceName wall; // faceZone name, see below - operation sum; - fields - ( - phi - ); - }*/ - /*pressureDrop - { - type patchAverage; - functionObjectLibs - ( - "libsimpleFunctionObjects.so" - ); - verbose true; - patches - ( - inlet - outlet - ); - fields - ( - p - ); - factor 1; - }*/ -); +}; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh old mode 100644 new mode 100755 From ec60bf8eeee533309457041a76e043c923cf6362 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Mon, 1 Aug 2016 15:48:27 +0200 Subject: [PATCH 10/12] Updated Piso/ErgunTestMPI_cgs tutorial. --- .../cfdemSolverPiso/ErgunTestMPI_cgs/CFD/0/U | 26 ------------------- .../CFD/constant/RASProperties | 25 ------------------ .../CFD/constant/couplingProperties | 2 +- .../CFD/constant/turbulenceProperties | 2 +- .../ErgunTestMPI_cgs/CFD/system/controlDict | 25 ++---------------- 5 files changed, 4 insertions(+), 76 deletions(-) delete mode 100644 tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/RASProperties diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/0/U b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/0/U index dfc40ee9..5dc0fcdb 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/0/U +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/0/U @@ -23,34 +23,11 @@ boundaryField wall { - //type fixedValue; - //value uniform (0 0 0); type slip; } inlet { - /*type flowRateInletVelocity; - flowRate 0.001; - value uniform (0 0 0);*/ - - /*type fixedValue; - value uniform (0 0 0.0001);*/ - - //type zeroGradient; - - /*type groovyBC; - variables "Uend=vector(0,0,2);tEnd=0.1;"; - valueExpression "((time() < tEnd) ? Uend/tEnd*time():Uend)"; - value uniform (0 0 0);*/ - - /*// 2.0.x, 1.6,ext - type timeVaryingUniformFixedValue; - fileName "steps_0p1s"; - outOfBounds clamp; - value uniform (0 0 0);*/ - - // 2.1.x type uniformFixedValue; uniformValue table ( @@ -79,9 +56,6 @@ boundaryField outlet { - /*type fluxCorrectedVelocity; //inletOutlet; - value uniform (0 0 0); - inletValue uniform (0 0 0);*/ type zeroGradient; } } diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/RASProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/RASProperties deleted file mode 100644 index daec1829..00000000 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/couplingProperties index c3ca8762..16387bd8 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/couplingProperties @@ -67,7 +67,7 @@ momCoupleModels implicitCouple ); -turbulenceModelType "RASProperties";//"LESProperties";// +turbulenceModelType "turbulenceProperties"; //===========================================================================// // sub-model properties diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/turbulenceProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/turbulenceProperties index f6753662..9cfc50a3 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/turbulenceProperties +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/system/controlDict b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/system/controlDict index 6fcc089c..642173cc 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/system/controlDict +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/CFD/system/controlDict @@ -149,8 +149,7 @@ DimensionedConstants } functions -( - +{ probes { type probes; @@ -190,25 +189,5 @@ functions outputControl timeStep;//outputTime; outputInterval 1; } - - /*pressureDrop - { - type patchAverage; - functionObjectLibs - ( - "libsimpleFunctionObjects.so" - ); - verbose true; - patches - ( - inlet - outlet - ); - fields - ( - p - ); - factor 1; - }*/ -); +}; // ************************************************************************* // From 308cdf27c46e6996ccd6f9849432a658c14e7131 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Mon, 1 Aug 2016 15:51:59 +0200 Subject: [PATCH 11/12] Updated tutorials. --- .../ErgunTestMPI_restart/CFD/0/U | 44 ------------------- .../CFD/constant/RASProperties | 25 ----------- .../CFD/constant/couplingProperties_restart | 2 +- .../CFD/constant/couplingProperties_run | 2 +- .../CFD/constant/turbulenceProperties | 2 +- .../CFD/system/controlDict | 5 +-- .../CFD/system/controlDict_restart | 5 +-- .../CFD/system/controlDict_run | 5 +-- .../CFD/constant/RASProperties | 25 ----------- .../CFD/constant/couplingProperties | 2 +- .../CFD/constant/turbulenceProperties | 2 +- 11 files changed, 11 insertions(+), 108 deletions(-) delete mode 100644 tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/RASProperties delete mode 100644 tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/RASProperties diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/0/U b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/0/U index 9bd6c981..242c0c3e 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/0/U +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/0/U @@ -23,65 +23,21 @@ boundaryField wall { - //type fixedValue; - //value uniform (0 0 0); type slip; } inlet { - /*type flowRateInletVelocity; - flowRate 0.001; - value uniform (0 0 0);*/ - - /*type fixedValue; - value uniform (0 0 0.0001);*/ - - //type zeroGradient; - -/* type groovyBC; - variables "Uend=vector(0,0,0.02);tEnd=0.1;"; - valueExpression "((time() < tEnd) ? Uend/tEnd*time():Uend)"; - value uniform (0 0 0);*/ - - /*// 2.0.x, 1.6,ext - type timeVaryingUniformFixedValue; - fileName "steps_0p1s"; - outOfBounds clamp; - value uniform (0 0 0);*/ - - // 2.1.x type uniformFixedValue; uniformValue table ( (0.000 (0 0 0.002)) - /*(0.010 (0 0 0.002)) - (0.011 (0 0 0.004)) - (0.020 (0 0 0.004)) - (0.021 (0 0 0.006)) - (0.030 (0 0 0.006)) - (0.031 (0 0 0.008)) - (0.040 (0 0 0.008)) - (0.041 (0 0 0.010)) - (0.050 (0 0 0.010)) - (0.051 (0 0 0.012)) - (0.060 (0 0 0.012)) - (0.061 (0 0 0.014)) - (0.070 (0 0 0.014)) - (0.071 (0 0 0.016)) - (0.080 (0 0 0.016)) - (0.081 (0 0 0.018)) - (0.090 (0 0 0.018)) - (0.091 (0 0 0.020))*/ (0.100 (0 0 0.020)) ); } outlet { - /*type fluxCorrectedVelocity; //inletOutlet; - value uniform (0 0 0); - inletValue uniform (0 0 0);*/ type zeroGradient; } } diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/RASProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/RASProperties deleted file mode 100644 index daec1829..00000000 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_restart b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_restart index 4dae9fb6..b74c6fcf 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_restart +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_restart @@ -69,7 +69,7 @@ momCoupleModels implicitCouple ); -turbulenceModelType "RASProperties";//"LESProperties";// +turbulenceModelType "turbulenceProperties"; //===========================================================================// // sub-model properties diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_run b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_run index 95b9fe79..a99a472c 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_run +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/couplingProperties_run @@ -69,7 +69,7 @@ momCoupleModels implicitCouple ); -turbulenceModelType "RASProperties";//"LESProperties";// +turbulenceModelType "turbulenceProperties"; //===========================================================================// // sub-model properties diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/turbulenceProperties b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/turbulenceProperties index f6753662..9cfc50a3 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/turbulenceProperties +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict index 680381e2..45e68085 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict @@ -52,8 +52,7 @@ maxCo 0.1; //libs ( "libgroovyBC.so" "libfiniteVolumeCFDEM.so"); functions -( - +{ probes { type probes; @@ -113,5 +112,5 @@ functions ); factor 1; }*/ -); +}; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_restart b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_restart index 680381e2..45e68085 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_restart +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_restart @@ -52,8 +52,7 @@ maxCo 0.1; //libs ( "libgroovyBC.so" "libfiniteVolumeCFDEM.so"); functions -( - +{ probes { type probes; @@ -113,5 +112,5 @@ functions ); factor 1; }*/ -); +}; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_run b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_run index 1d2f9b52..6cca81dd 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_run +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_run @@ -52,8 +52,7 @@ maxCo 0.1; //libs ( "libgroovyBC.so" "libfiniteVolumeCFDEM.so"); functions -( - +{ probes { type probes; @@ -113,5 +112,5 @@ functions ); factor 1; }*/ -); +}; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/RASProperties b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/RASProperties deleted file mode 100644 index 4df79a53..00000000 --- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar;//kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties index a9630293..8137386f 100755 --- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties @@ -69,7 +69,7 @@ momCoupleModels implicitCouple ); -turbulenceModelType RASProperties;//LESProperties;// +turbulenceModelType "turbulenceProperties"; //===========================================================================// // sub-model properties diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/turbulenceProperties b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/turbulenceProperties index 3aa73871..9cfc50a3 100644 --- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/turbulenceProperties +++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel;//LESModel; // +simulationType laminar; // ************************************************************************* // From cd614bf29968cae16b2cc49ad043ab0b48b14aa9 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Mon, 1 Aug 2016 15:55:45 +0200 Subject: [PATCH 12/12] Updated tutorials. --- .../cfdemSolverPisoMS/ErgunTestMPI/CFD/0/U | 27 ------ .../ErgunTestMPI/CFD/constant/RASProperties | 25 ------ .../CFD/constant/couplingProperties | 2 +- .../CFD/constant/turbulenceProperties | 2 +- .../ErgunTestMPI/CFD/system/controlDict | 25 +----- .../CFD/constant/couplingProperties | 2 +- .../packedBedTemp/CFD/system/controlDict | 84 +------------------ 7 files changed, 7 insertions(+), 160 deletions(-) delete mode 100644 tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/RASProperties diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/0/U b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/0/U index 959b298e..275c16f4 100644 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/0/U +++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/0/U @@ -23,35 +23,11 @@ boundaryField wall { - //type fixedValue; - //value uniform (0 0 0); type slip; } inlet { - /*type flowRateInletVelocity; - flowRate 0.001; - value uniform (0 0 0);*/ - -/* type fixedValue; - value uniform (0 0 0.1);*/ - - //type zeroGradient; - - /*// superficial velocity BC - type groovyBC; - variables "Usup=vector(0,0,2);alpha=voidfraction;tEnd=0.1;"; // should be used with zeroGradient voidfraction - valueExpression "((time() < tEnd) ? Usup/alpha*(time()/tEnd) : Usup/alpha)"; - value uniform (0 0 0);*/ - - /*// 2.0.x, ext - type timeVaryingUniformFixedValue; - fileName "steps_0p1s"; - outOfBounds clamp; - value uniform (0 0 0);*/ - - // 2.1.x type uniformFixedValue; uniformValue table ( @@ -62,9 +38,6 @@ boundaryField } outlet { - /*type fluxCorrectedVelocity; //inletOutlet; - value uniform (0 0 0); - inletValue uniform (0 0 0);*/ type zeroGradient; } } diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/RASProperties b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/RASProperties deleted file mode 100644 index daec1829..00000000 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/couplingProperties index 98d1e091..cc931b75 100644 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/couplingProperties @@ -70,7 +70,7 @@ momCoupleModels implicitCouple ); -turbulenceModelType RASProperties;//LESProperties;// +turbulenceModelType "turbulenceProperties"; //===========================================================================// // sub-model properties diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/turbulenceProperties b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/turbulenceProperties index f6753662..9cfc50a3 100644 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/turbulenceProperties +++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/system/controlDict b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/system/controlDict index 0831dcb2..5c6c2725 100644 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/system/controlDict +++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/CFD/system/controlDict @@ -52,8 +52,7 @@ maxCo 0.1; //libs ("libOpenFOAM.so" "libgroovyBC.so"); functions -( - +{ probes { type probes; @@ -93,25 +92,5 @@ functions outputControl timeStep;//outputTime; outputInterval 1; } - - /*pressureDrop - { - type patchAverage; - functionObjectLibs - ( - "libsimpleFunctionObjects.so" - ); - verbose true; - patches - ( - inlet - outlet - ); - fields - ( - p - ); - factor 1; - }*/ -); +}; // ************************************************************************* // diff --git a/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/couplingProperties b/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/couplingProperties index 8bb90025..e935ef42 100644 --- a/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/couplingProperties @@ -62,7 +62,7 @@ momCoupleModels implicitCouple ); -turbulenceModelType RASProperties;//LESProperties;// +turbulenceModelType "turbulenceProperties"; //===========================================================================// // sub-model properties diff --git a/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/system/controlDict b/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/system/controlDict index c21bc0ac..77da5f4e 100644 --- a/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/system/controlDict +++ b/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/system/controlDict @@ -54,8 +54,7 @@ maxDeltaT 1; //libs ( "libgroovyBC.so" ); functions -( - +{ probes { type probes; @@ -76,84 +75,5 @@ functions outputControl timeStep;//outputTime; outputInterval 1; } - -/* -// simpleFunctionObjects - heatFlux - { - type patchHeatFlux; - functionObjectLibs - ( - "libsimpleFunctionObjects.so" - ); - verbose true; - patches - ( - inlet - outlet - ); - fields // name of temp field - ( - T - ); - cp 1007; // cp in [J/(kg*K)] - factor 1.188; // density for incomp solvers! - } - - massFlux - { - type patchMassFlow; - functionObjectLibs - ( - "libsimpleFunctionObjects.so" - ); - verbose true; - patches - ( - inlet - outlet - ); - factor 1.188; // density for incomp solvers! - } - - pressureDrop - { - type patchAverage; - functionObjectLibs - ( - "libsimpleFunctionObjects.so" - ); - verbose true; - patches - ( - inlet - outlet - ); - fields - ( - p - ); - factor 1; - } - - T - { - type patchAverage; - functionObjectLibs - ( - "libsimpleFunctionObjects.so" - ); - verbose true; - patches - ( - inlet - outlet - ); - fields // name of temp field - ( - T - ); - factor 1; - }*/ -); +}; // ************************************************************************* //