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 4371b134..f64a0466 100644 Binary files a/doc/CFDEMcoupling_Manual.pdf and b/doc/CFDEMcoupling_Manual.pdf differ diff --git a/doc/CFDEMcoupling_Manual.txt b/doc/CFDEMcoupling_Manual.txt index 1b3d7d66..1787d187 100644 --- a/doc/CFDEMcoupling_Manual.txt +++ b/doc/CFDEMcoupling_Manual.txt @@ -170,6 +170,38 @@ Reasonable example settings for the "liggghtsCommands" dictionary are given in t + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6 Models/Solvers :h4,link(cmd_5),link(comm) This section lists all CFDEMcoupling sub-models and solvers alphabetically, with a separate diff --git a/doc/IOModel_sophIO.html b/doc/IOModel_sophIO.html index 21a784df..2bbf56ce 100644 --- a/doc/IOModel_sophIO.html +++ b/doc/IOModel_sophIO.html @@ -21,8 +21,7 @@

Description:

-

The soph IO-model writes particle positions, velocities, voidfraction, implicit forces, explicit forces , DEM forces and radii to files. the same as for basicIO model. Data is written every write time of the CFD simulation. -Currently paraview can only interpret position, velocity and radius (a port to VTK might help). +

The sophIO-model is based on basicIO model and additionally writes voidfraction, implicit forces, explicit forces. Data is written every write time of the CFD simulation.

Restrictions: None.

diff --git a/doc/IOModel_sophIO.txt b/doc/IOModel_sophIO.txt index 3a1a19c0..09dcd3e6 100644 --- a/doc/IOModel_sophIO.txt +++ b/doc/IOModel_sophIO.txt @@ -19,8 +19,7 @@ IOModel "sophIO"; :pre [Description:] -The soph IO-model writes particle positions, velocities, voidfraction, implicit forces, explicit forces , DEM forces and radii to files. the same as for basicIO model. Data is written every write time of the CFD simulation. -Currently paraview can only interpret position, velocity and radius (a port to VTK might help). +The sophIO-model is based on basicIO model and additionally writes voidfraction, implicit forces, explicit forces. Data is written every write time of the CFD simulation. [Restrictions:] None. diff --git a/doc/IOModel_trackIO.html b/doc/IOModel_trackIO.html index d9ac1dea..0d91e418 100644 --- a/doc/IOModel_trackIO.html +++ b/doc/IOModel_trackIO.html @@ -21,7 +21,7 @@

Description:

-

The basic IO-model writes particle positions, velocities, index and radii to files. The output directories ($casePath/CFD/$timestep) are created automatically. Data is written every write time of the CFD simulation. +

The trackIO-model is based on sophIO model and additionally writes fields necessary to use the particleTracks utility (which needs a particleTrackProperties file in the constant dir). The particleTracks generats tracks of the particles and writes them to a vtk file.

Restrictions: None.

diff --git a/doc/IOModel_trackIO.txt b/doc/IOModel_trackIO.txt index 27ac1400..7aa03e77 100644 --- a/doc/IOModel_trackIO.txt +++ b/doc/IOModel_trackIO.txt @@ -19,7 +19,7 @@ IOModel "trackIO"; :pre [Description:] -The basic IO-model writes particle positions, velocities, index and radii to files. The output directories ($casePath/CFD/$timestep) are created automatically. Data is written every write time of the CFD simulation. +The trackIO-model is based on sophIO model and additionally writes fields necessary to use the particleTracks utility (which needs a particleTrackProperties file in the constant dir). The particleTracks generats tracks of the particles and writes them to a vtk file. [Restrictions:] None. diff --git a/doc/forceModel_KochHillDrag.html b/doc/forceModel_KochHillDrag.html index 0edc8238..94857f53 100644 --- a/doc/forceModel_KochHillDrag.html +++ b/doc/forceModel_KochHillDrag.html @@ -33,6 +33,8 @@ KochHillDragProps
  • interpolation = flag to use interpolated voidfraction and fluid velocity values (normally off) +
  • implDEM = flag to use implicit formulation of drag on DEM side (normally off) +

    Examples: diff --git a/doc/forceModel_KochHillDrag.txt b/doc/forceModel_KochHillDrag.txt index fb67f9f7..565c8202 100644 --- a/doc/forceModel_KochHillDrag.txt +++ b/doc/forceModel_KochHillDrag.txt @@ -27,6 +27,7 @@ KochHillDragProps {density} = name of the finite volume gravity field :l {voidfraction} = name of the finite volume voidfraction field :l {interpolation} = flag to use interpolated voidfraction and fluid velocity values (normally off) :l +{implDEM} = flag to use implicit formulation of drag on DEM side (normally off) :l :ule [Examples:] diff --git a/doc/githubAccess_public.pdf b/doc/githubAccess_public.pdf index 146339fe..02ae3129 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 c2b9ddeb..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 @@ -43,6 +57,7 @@ $(IOModels)/IOModel/newIOModel.C $(IOModels)/noIO/noIO.C $(IOModels)/basicIO/basicIO.C $(IOModels)/trackIO/trackIO.C +$(IOModels)/sophIO/sophIO.C $(voidFractionModels)/voidFractionModel/voidFractionModel.C $(voidFractionModels)/voidFractionModel/newVoidFractionModel.C @@ -61,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 @@ -101,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.C b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C index 2a92775e..34fbc9c3 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C @@ -76,9 +76,11 @@ Foam::cfdemCloud::cfdemCloud modelType_(couplingProperties_.lookup("modelType")), positions_(NULL), velocities_(NULL), + fluidVel_(NULL), impForces_(NULL), expForces_(NULL), DEMForces_(NULL), + Cds_(NULL), radii_(NULL), voidfractions_(NULL), cellIDs_(NULL), @@ -92,6 +94,7 @@ Foam::cfdemCloud::cfdemCloud liggghtsCommandModelList_(liggghtsCommandDict_.lookup("liggghtsCommandModels")), turbulenceModelType_(couplingProperties_.lookup("turbulenceModelType")), cgOK_(true), + impDEMdrag_(false), turbulence_ ( #if defined(version21) || defined(version16ext) @@ -227,9 +230,11 @@ Foam::cfdemCloud::~cfdemCloud() clockM().normHist(); dataExchangeM().destroy(positions_,3); dataExchangeM().destroy(velocities_,3); + dataExchangeM().destroy(fluidVel_,3); dataExchangeM().destroy(impForces_,3); dataExchangeM().destroy(expForces_,3); dataExchangeM().destroy(DEMForces_,3); + dataExchangeM().destroy(Cds_,1); dataExchangeM().destroy(radii_,1); dataExchangeM().destroy(voidfractions_,1); dataExchangeM().destroy(cellIDs_,1); @@ -246,12 +251,16 @@ void Foam::cfdemCloud::getDEMdata() void Foam::cfdemCloud::giveDEMdata() { - for(int index = 0;index < numberOfParticles(); ++index){ - for(int i=0;i<3;i++){ - impForces_[index][i] += expForces_[index][i] + DEMForces_[index][i]; + if(forceM(0).coupleForce()) + { + dataExchangeM().giveData("dragforce","vector-atom",DEMForces_); + + if(impDEMdrag_) + { + dataExchangeM().giveData("Ksl","scalar-atom",Cds_); + dataExchangeM().giveData("uf","vector-atom",fluidVel_); } } - if(forceM(0).coupleForce()) dataExchangeM().giveData("dragforce","vector-atom",impForces_); if(verbose_) Info << "giveDEMdata done." << endl; } @@ -275,10 +284,12 @@ void Foam::cfdemCloud::findCells() void Foam::cfdemCloud::setForces() { + resetArray(fluidVel_,numberOfParticles(),3); resetArray(impForces_,numberOfParticles(),3); resetArray(expForces_,numberOfParticles(),3); resetArray(DEMForces_,numberOfParticles(),3); - for (int i=0;i 0; + CentredFitData 0; + CentredFitData 0; + CentredFitData 0; + ChomiakInjector 0; + Cloud 0; + Cloud 0; + Cloud 0; + Cloud 0; + Cloud 0; + Cloud 0; + Cloud 0; + CoEuler 0; + CompositionModel 0; + ConeInjection 0; + Constant 0; + ConstantRateDevolatilisation 0; + CrankNicholson 0; + CrossPowerLaw 0; + Cs 0; + DIC 0; + DICGaussSeidel 0; + DILU 0; + DILUGaussSeidel 0; + DataEntry 0; + DeardorffDiffStress 0; + DispersionModel 0; + DispersionRASModel 0; + DragModel 0; + ETAB 0; + Ergun 0; + Euler 0; + EulerImplicit 0; + EulerRotation 0; + extendedCellToFaceStencil 0; + FDIC 0; + FaceCellWave 0; + GAMG 0; + GAMGAgglomeration 0; + GAMGInterface 0; + GAMGInterfaceField 0; + Gamma 0; + Gamma01 0; + GammaV 0; + Gauss 0; + GaussSeidel 0; + Gibilaro 0; + Gidaspow 0; + GidaspowErgunWenYu 0; + GidaspowSchillerNaumann 0; + GradientDispersionRAS 0; + Gulders 0; + GuldersEGR 0; + H2O 0; + HashTable 0; + HeatTransferModel 0; + HerschelBulkley 0; + HrenyaSinclair 0; + IC8H18 0; + ICCG 0; + IDDESDelta 0; + IDEA 0; + IFstream 0; + IOMap 0; + IOPtrList 0; + IOPtrList 0; + IOPtrList 0; + IOPtrList 0; + IOobject 0; + InjectionModel 0; + IntegrationScheme 0; + JohnsonJackson 0; + KRR4 0; + KinematicCloud 0; + KinematicCloud 0; + KinematicCloud 0; + KinematicParcel 0; + KinematicParcel 0; + LESModel 0; + LESdelta 0; + LESfilter 0; + LISA 0; + LRR 0; + LRRDiffStress 0; + LamBremhorstKE 0; + LaunderGibsonRSTM 0; + LaunderSharmaKE 0; + LienCubicKE 0; + LienCubicKELowRe 0; + LienLeschzinerLowRe 0; + MB 0; + MC 0; + MCV 0; + MUSCL 0; + MUSCL01 0; + MUSCLV 0; + ManualInjection 0; + MarshakRadiation 0; + MarshakRadiationFixedT 0; + MassTransferModel 0; + MeshWave 0; + Minmod 0; + MinmodV 0; + N2 0; + NSRDSfunc0 0; + NSRDSfunc1 0; + NSRDSfunc14 0; + NSRDSfunc2 0; + NSRDSfunc3 0; + NSRDSfunc4 0; + NSRDSfunc5 0; + NSRDSfunc6 0; + NSRDSfunc7 0; + Newtonian 0; + NoDispersion 0; + NoDrag 0; + NoHeatTransfer 0; + NoInjection 0; + NoMassTransfer 0; + NoSurfaceReaction 0; + NonlinearKEShih 0; + ODE 0; + ODESolver 0; + OFstream 0; + ORourke 0; + OSPRE 0; + OSPREV 0; + P1 0; + PBiCG 0; + PCG 0; + PackedList 0; + ParSortableList 0; + PatchToPatchInterpolation 0; + Phi 0; + PointEdgeWave 0; + POSIX 0; + Prandtl 0; + PrimitivePatch 0; + Pstream 0; + QUICK 0; + QUICKV 0; + QZeta 0; + RASModel 0; + RK 0; + RNGkEpsilon 0; + RanzMarshall 0; + ReactingCloud 0; + ReactingParcel 0; + Rebound 0; + ReitzDiwakar 0; + ReitzKHRT 0; + RosinRammler 0; + RutlandFlashBoil 0; + SDA 0; + SFCD 0; + SFCDV 0; + SHF 0; + SIBS 0; + SKA 0; + SLTS 0; + SRFModel 0; + SRFVelocity 0; + STARCDRotation 0; + Schaeffer 0; + SchillerNaumann 0; + SinclairJackson 0; + SingleKineticRateDevolatilisation 0; + SingleMixtureFraction 0; + Smagorinsky 0; + SpalartAllmaras 0; + SpalartAllmarasDDES 0; + SpalartAllmarasIDDES 0; + SphereDrag 0; + StandardWallInteraction 0; + StaticHashTable 0; + StochasticDispersionRAS 0; + SuperBee 0; + SuperBeeV 0; + SurfaceReactionModel 0; + Syamlal 0; + SyamlalOBrien 0; + SyamlalRogersOBrien 0; + TAB 0; + Table 0; + ThermoCloud 0; + ThermoCloud 0; + ThermoParcel 0; + ThermoParcel 0; + UMIST 0; + UMISTV 0; + UpwindFitData 0; + UpwindFitData 0; + UpwindFitData 0; + WallInteractionModel 0; + WenYu 0; + aC11H10 0; + absorptionEmissionModel 0; + addCell 0; + addFace 0; + addPatchCellLayer 0; + addPoint 0; + advective 0; + algebraicPair 0; + alphaContactAngle 0; + alphaFixedPressure 0; + alphatWallFunction 0; + angularOscillatingDisplacement 0; + angularOscillatingVelocity 0; + anisotropic 0; + ash 0; + atomizationModel 0; + attachDetach 0; + autoDensity 0; + autoHexMeshDriver 0; + autoLayerDriver 0; + autoRefineDriver 0; + autoSnapDriver 0; + bC11H10 0; + backgroundMeshDecomposition 0; + backward 0; + basePatch 0; + basicKinematicCloud 0; + basicKinematicParcel 0; + basicMixture 0; + basicReactingCloud 0; + basicReactingParcel 0; + basicThermo 0; + basicThermoCloud 0; + basicThermoParcel 0; + biLinearFit 0; + binaryAbsorptionEmission 0; + blended 0; + blobsSheetAtomization 0; + blobsSwirlInjector 0; + booleanSurface 0; + boundaryCutter 0; + boundaryMesh 0; + boundaryToFace 0; + boundedBackward 0; + boxToCell 0; + boxToFace 0; + boxToPoint 0; + breakupModel 0; + calculated 0; + cell 0; + cellClassification 0; + cellCuts 0; + cellDistFuncs 0; + cellLimited 0; + cellList 0; + cellLooper 0; + cellMDLimited 0; + cellMotion 0; + cellPoint 0; + cellPointFace 0; + cellPointWeight 0; + cellSet 0; + cellSizeControlSurfaces 0; + cellToCell 0; + cellToFace 0; + cellToPoint 0; + cellZone 0; + centredCECStencil 0; + centredCFCStencil 0; + chemistryReader 0; + chemistrySolver 0; + chemkinReader 0; + clippedLinear 0; + cloud 0; + cloudAbsorptionEmission 0; + cloudScatter 0; + collisionModel 0; + combineFaces 0; + commSchedule 0; + commonRailInjector 0; + compound 0; + constInjector 0; + constant 0; + constantAbsorptionEmission 0; + constantAlphaContactAngle 0; + constantScatter 0; + coordinateRotation 0; + coordinateSystem 0; + coordinateSystems 0; + corrected 0; + coupled 0; + cubeRootVol 0; + cubic 0; + cubicUpwindFit 0; + curve 0; + cyclic 0; + cyclicLduInterface 0; + cyclicLduInterfaceField 0; + cylinderToCell 0; + cylindrical 0; + decompositionMethod 0; + definedHollowConeInjector 0; + definedInjector 0; + definedPressureSwirlInjector 0; + diagTensorField 0; + diagonal 0; + dictionary 0; + dimensionSet 1; + mappedBase 0; + mappedPatch 0; + mappedVelocityFlux 0; + directionMixed 0; + directional 0; + disallowGenericFvPatchField 0; + disallowGenericPointPatchField 0; + disallowGenericPolyPatch 0; + dispersionLESModel 0; + dispersionModel 0; + dispersionRASModel 0; + displacementComponentLaplacian 0; + displacementInterpolation 0; + displacementLaplacian 0; + displacementSBRStress 0; + distanceSurface 0; + Distribution 0; + downwind 0; + dragModel 0; + duplicatePoints 0; + dx 0; + dynMixedSmagorinsky 0; + dynOneEqEddy 0; + dynSmagorinsky 0; + dynamicAlphaContactAngle 0; + dynamicFvMesh 0; + dynamicInkJetFvMesh 0; + dynamicMotionSolverFvMesh 0; + dynamicRefineFvMesh 0; + edgeIntersections 0; + edgeList 0; + edgeSurface 0; + empty 0; + engineMesh 0; + enrichedPatch 0; + epsilonWallFunction 0; + errorDrivenRefinement 0; + evaporationModel 0; + exponential 0; + extendedLeastSquares 0; + extendedLeastSquaresVectors 0; + face 0; + faceAreaPair 0; + faceCoupleInfo 0; + faceLimited 0; + faceList 0; + faceMDLimited 0; + faceSet 0; + faceToCell 0; + faceToFace 0; + faceToPoint 0; + faceZone 0; + fan 0; + featureEdgeMesh 0; + fieldToCell 0; + file 0; + fileName 2; + filteredLinear 0; + filteredLinear2 0; + filteredLinear2V 0; + filteredLinear3 0; + filteredLinear3V 0; + fixedEnthalpy 0; + buoyantPressure 0; + fixedFluxBoussinesqBuoyantPressure 0; + fixedFluxPressure 0; + fixedGradient 0; + fixedInternalEnergy 0; + fixedInternalValue 0; + fixedNormalSlip 0; + fixedPressureCompressibleDensity 0; + fixedUnburntEnthalpy 0; + fixedValue 0; + flowRateInletVelocity 0; + fluxCorrectedVelocity 0; + foamChemistryReader 0; + foamFile 0; + forceCoeffs 0; + forces 0; + fourth 0; + freestream 0; + freestreamPressure 0; + frictionalStressModel 0; + functionObject 0; + fv 0; + fvMesh 0; + fvMeshDistribute 0; + fvMotionSolver 0; + fvPatchField 0; + fvScalarMatrix 0; + fvSchemes 0; + fvSphericalTensorMatrix 0; + fvSymmTensorMatrix 0; + fvTensorMatrix 0; + fvVectorMatrix 0; + fvsPatchField 0; + general 0; + generic 0; + genericPatch 0; + geomCellLooper 0; + geometricSurfacePatch 0; + global 0; + globalIndexAndTransform 0; + globalMeshData 0; + globalPoints 0; + gnuplot 0; + gradientDispersionRAS 0; + gradientEnthalpy 0; + gradientInternalEnergy 0; + gradientUnburntEnthalpy 0; + granularPressureModel 0; + hCombustionThermo 0; + hMixtureThermo>>>> 0; + hMixtureThermo>>>> 0; + hMixtureThermo>>>> 0; + hMixtureThermo>>>> 0; + hMixtureThermo>>>> 0; + hMixtureThermo>>>> 0; + hMixtureThermo 0; + hMixtureThermo>>>> 0; + hMixtureThermo>>>> 0; + hThermo>>>> 0; + hThermo>>>> 0; + hThermo>>>> 0; + harmonic 0; + heatTransferModel 0; + hexCellLooper 0; + hexRef8 0; + hhuCombustionThermo 0; + hhuMixtureThermo>>>> 0; + hhuMixtureThermo>>>> 0; + hhuMixtureThermo>>>> 0; + hhuMixtureThermo>>>> 0; + hhuMixtureThermo>>>> 0; + hhuMixtureThermo>>>> 0; + hhuMixtureThermo>>>> 0; + hhuMixtureThermo>>>> 0; + hierarchical 0; + hollowConeInjector 0; + iC3H8O 0; + indexedOctree 0; + indexedParticle 0; + injectorModel 0; + injectorType 0; + inletOutlet 0; + inletOutletTotalTemperature 0; + interfaceCompression 0; + intersectedSurface 0; + inverseDistance 0; + inverseFaceDistance 0; + inversePointDistance 0; + inverseVolume 0; + isoSurface 0; + isoSurfaceCell 0; + jplot 0; + jumpCyclic 0; + kEpsilon 0; + kOmega 0; + kOmegaSST 0; + kOmegaSSTSAS 0; + kqRWallFunction 0; + kinematicCloud 0; + labelField 0; + labelList 0; + labelListList 0; + labelToCell 0; + labelToFace 0; + labelToPoint 0; + laminar 0; + laminarFlameSpeed 0; + laplace 0; + layerAdditionRemoval 0; + layered 0; + lduInterface 0; + lduInterfaceField 0; + lduMatrix 1; + lduMesh 0; + leastSquares 0; + leastSquaresVectors 0; + level 2; + limitWith 0; + limited 0; + limitedCubic 0; + limitedCubic01 0; + limitedCubicV 0; + limitedGamma 0; + limitedLimitedCubic 0; + limitedLimitedLinear 0; + limitedLinear 0; + limitedLinear01 0; + limitedLinearV 0; + limitedMUSCL 0; + limitedSurfaceInterpolationScheme 0; + limitedVanLeer 0; + linear 0; + linearFit 0; + linearUpwind 0; + linearUpwindV 0; + liquid 0; + locDynOneEqEddy 0; + localBlended 0; + localMax 0; + localMin 0; + localPointRegion 0; + lowReOneEqEddy 0; + manual 0; + meshCutAndRemove 0; + meshCutter 0; + meshModifier 0; + meshRefinement 0; + meshSearch 0; + meshToMesh 0; + metis 0; + midPoint 0; + midPointAndFace 0; + mixed 0; + mixedEnthalpy 0; + mixedInternalEnergy 0; + mixedSmagorinsky 0; + mixedUnburntEnthalpy 0; + mixerFvMesh 0; + modifyCell 0; + modifyFace 0; + modifyPoint 0; + motionDiffusivity 0; + motionDirectional 0; + motionSmoother 0; + motionSolver 0; + movingConeTopoFvMesh 0; + movingWallVelocity 0; + muSgsSpalartAllmarasWallFunction 0; + multiDirRefinement 0; + multiHoleInjector 0; + multiLevel 1; + multivariateSelection 0; + mutRoughWallFunction 0; + mutSpalartAllmarasStandardRoughWallFunction 0; + mutSpalartAllmarasStandardWallFunction 0; + mutSpalartAllmarasWallFunction 0; + mutWallFunction 0; + nC3H8O 0; + nbrToCell 0; + nearestToCell 0; + nearestToPoint 0; + noAbsorptionEmission 0; + noDragModel 0; + noRadiation 0; + none 0; + normal 0; + normalToFace 0; + nuSgsSpalartAllmarasWallFunction 0; + nutRoughWallFunction 0; + nutSpalartAllmarasStandardRoughWallFunction 0; + nutSpalartAllmarasStandardWallFunction 0; + nutSpalartAllmarasWallFunction 0; + nutWallFunction 0; + obj 0; + objectRegistry 0; + off 0; + omegaWallFunction 0; + oneEqEddy 0; + orientedSurface 0; + oscillatingDisplacement 0; + oscillatingFixedValue 0; + oscillatingVelocity 0; + outletInlet 0; + outletStabilised 0; + pair 0; + parabolicCylindrical 0; + parcel 0; + partialSlip 0; + passiveParticle 0; + patch 0; + patchToFace 0; + patchZones 0; + pdf 0; + perfectInterface 0; + pointIndexHitList 0; + pointPatchField 0; + pointScalarField 0; + pointScalarField::DimensionedInternalField 0; + pointSet 0; + pointSphericalTensorField 0; + pointSphericalTensorField::DimensionedInternalField 0; + pointSymmTensorField 0; + pointSymmTensorField::DimensionedInternalField 0; + pointTensorField 0; + pointTensorField::DimensionedInternalField 0; + pointToCell 0; + pointToFace 0; + pointToPoint 0; + pointVectorField 0; + pointVectorField::DimensionedInternalField 0; + pointZone 0; + polyBoundaryMesh 0; + polyMesh 0; + polyMeshGeometry 0; + polyMeshInfo 0; + polyTopoChange 0; + polyTopoChanger 0; + powerLaw 0; + pressureDirectedInletOutletVelocity 0; + pressureDirectedInletVelocity 0; + pressureInletOutletVelocity 0; + pressureInletUniformVelocity 0; + pressureInletVelocity 0; + pressureNormalInletOutletVelocity 0; + pressureSwirlInjector 0; + primitiveMesh 0; + primitiveMeshGeometry 0; + probes 0; + processor 0; + processorLduInterface 0; + processorLduInterfaceField 0; + pureMixture>>> 0; + pureMixture>>> 0; + pureMixture>>> 0; + quadratic 0; + quadraticFit 0; + quadraticLinearFit 0; + quadraticLinearUpwindFit 0; + quadraticUpwindFit 0; + radiationModel 0; + raw 0; + reactingCloud 0; + reaction 0; + realizableKE 0; + refinementHistory 0; + refinementIterator 0; + reflect 0; + regIOobject 0; + regionSplit 0; + regionToCell 0; + remove 0; + removeCell 0; + removeCells 0; + removeFace 0; + removeFaces 0; + removePoint 0; + removePoints 0; + reverseLinear 0; + rotatedBoxToCell 0; + rotatingPressureInletOutletVelocity 0; + rotatingTotalPressure 0; + sampledPatch 0; + sampledPlane 0; + sampledSet 0; + sampledSurface 0; + saturateEvaporationModel 0; + scalarAverageField 0; + scalarField 0; + scalarRange 0; + scaleSimilarity 0; + scatterModel 0; + searchableBox 0; + searchableSurface 0; + sequential 0; + setUpdater 0; + sets 0; + shapeList 0; + shapeToCell 0; + simple 0; + sixDoFRigidBodyMotionConstraint 0; + skewCorrected 0; + skewCorrectionVectors 0; + sliced 0; + slidingInterface 0; + slip 0; + smooth 0; + smoothSolver 0; + solid 0; + solidBodyMotionFunction 0; + solidBodyMotionFvMesh 0; + solution 0; + spectEddyVisc 0; + sphereToCell 0; + spherical 0; + sphericalTensorAverageField 0; + sphericalTensorField 0; + standardDragModel 0; + standardEvaporationModel 0; + staticFvMesh 0; + steadyState 0; + stl 0; + string 0; + stochasticDispersionRAS 0; + supersonicFreestream 0; + surfaceFeatures 0; + surfaceInterpolation 0; + surfaceInterpolationScheme 0; + surfaceIntersection 0; + surfaceNormalFixedValue 0; + surfacePatch 0; + surfacePatchIOList 0; + surfaceScalarField 0; + surfaceScalarField::DimensionedInternalField 0; + surfaceSlipDisplacement 0; + surfaceSphericalTensorField 0; + surfaceSphericalTensorField::DimensionedInternalField 0; + surfaceSymmTensorField 0; + surfaceSymmTensorField::DimensionedInternalField 0; + surfaceTensorField 0; + surfaceTensorField::DimensionedInternalField 0; + surfaceToCell 0; + surfaceToPoint 0; + surfaceVectorField 0; + surfaceVectorField::DimensionedInternalField 0; + surfaceWriter 0; + surfaces 0; + swirlInjector 0; + symmTensorAverageField 0; + symmTensorField 0; + symmetryPlane 0; + syringePressure 0; + tensorAverageField 0; + tensorField 0; + tetDecomposedPolyMesh 0; + thermoCloud 0; + thermophysicalFunction 0; + time 0; + timeVaryingAlphaContactAngle 0; + timeVaryingFlowRateInletVelocity 0; + timeVaryingMappedFixedValue 0; + timeVaryingTotalPressure 0; + timeVaryingUniformFixedValue 0; + timer 0; + topoAction 0; + topoCellLooper 0; + topoChangerFvMesh 0; + topoSet 0; + topoSetSource 0; + toroidal 0; + totalPressure 0; + totalTemperature 0; + trackedParticle 0; + trajectory 0; + transform 0; + treeDataCell 0; + treeDataFace 0; + treeDataTriSurface 0; + treeLeaf 0; + treeNode 0; + triSurface 0; + triSurfaceMesh 0; + turbulenceModel 0; + turbulentHeatFluxTemperature 0; + turbulentInlet 0; + turbulentIntensityKineticEnergyInlet 0; + turbulentMixingLengthDissipationRateInlet 0; + turbulentMixingLengthFrequencyInlet 0; + uncorrected 0; + undoableMeshCutter 0; + uniform 0; + uniformFixedValue 0; + unitInjector 0; + upwind 0; + upwindCFCStencil 0; + value 0; + vanAlbada 0; + vanAlbadaV 0; + vanDriest 0; + vanLeer 0; + vanLeer01 0; + vanLeerV 0; + vector2DField 0; + vectorAverageField 0; + vectorField 0; + velocityComponentLaplacian 0; + velocityLaplacian 0; + viscosityModel 0; + volPointInterpolation 0; + volScalarField 0; + volScalarField::DimensionedInternalField 0; + volSphericalTensorField 0; + volSphericalTensorField::DimensionedInternalField 0; + volSymmTensorField 0; + volSymmTensorField::DimensionedInternalField 0; + volTensorField 0; + volTensorField::DimensionedInternalField 0; + volVectorField 0; + volVectorField::DimensionedInternalField 0; + vtk 0; + walkPatch 0; + wall 0; + wallHeatTransfer 0; + wallLayerCells 0; + wallModel 0; + waveTransmissive 0; + wedge 0; + weighted 0; + word 2; + writer 0; + xmgr 0; + zeroGradient 0; + zoneToCell 0; + zoneToFace 0; + zoneToPoint 0; +} + + +DimensionedConstants +{ + unitSet CGS; // SI // USCS + + CGSCoeffs + { + universal + { + c c [ 0 1 -1 0 0 0 0 ] 2.99792e+10; // speed of light in vacuum (cm/s) + G G [ -1 3 -2 0 0 0 0 ] 6.67429e-8; // gravitational constant (cm^3/(gs^2)) + h h [ 1 2 -1 0 0 0 0 ] 6.62607e-27; // Planck's constant (erg.s) + } + electromagnetic + { + e e [ 0 0 1 0 0 1 0 ] 4.803204e-10; // elementary charge (statcoulomb) + } + atomic + { + me me [ 1 0 0 0 0 0 0 ] 9.10938e-28; // electron mass (g) + mp mp [ 1 0 0 0 0 0 0 ] 1.67262e-24; // proton mass (g) + } + physicoChemical + { + mu mu [ 1 0 0 0 0 0 0 ] 1.66054e-24; // atomic mass unit (g) + k k [ 1 2 -2 -1 0 0 0 ] 1.38065e-16; // Boltzman constant (erg/K) + } + standard + { + //- Standard pressure [Pa] + Pstd Pstd [ 1 -1 -2 0 0 0 0 ] 1000000; // 1 bar (barye) + //- Standard temperature [degK] + Tstd Tstd [ 0 0 0 1 0 0 0 ] 298.15; // should be same as in SI unit system + } + } + + SICoeffs + { + universal + { + c c [ 0 1 -1 0 0 0 0 ] 2.99792e+08; + G G [ -1 3 -2 0 0 0 0 ] 6.67429e-11; + h h [ 1 2 -1 0 0 0 0 ] 6.62607e-34; + } + electromagnetic + { + e e [ 0 0 1 0 0 1 0 ] 1.60218e-19; + } + atomic + { + me me [ 1 0 0 0 0 0 0 ] 9.10938e-31; + mp mp [ 1 0 0 0 0 0 0 ] 1.67262e-27; + } + physicoChemical + { + mu mu [ 1 0 0 0 0 0 0 ] 1.66054e-27; + k k [ 1 2 -2 -1 0 0 0 ] 1.38065e-23; + } + standard + { + //- Standard pressure [Pa] + Pstd Pstd [ 1 -1 -2 0 0 0 0 ] 100000; + //- Standard temperature [degK] + Tstd Tstd [ 0 0 0 1 0 0 0 ] 298.15; + } + } + USCSCoeffs + { + universal + { + c c [ 0 1 -1 0 0 0 0 ] 9.83558e+08; + G G [ -1 3 -2 0 0 0 0 ] 1.06909e-09; + h h [ 1 2 -1 0 0 0 0 ] 1.57234e-32; + } + electromagnetic + { + e e [ 0 0 1 0 0 1 0 ] 1.60218e-19; + } + atomic + { + me me [ 1 0 0 0 0 0 0 ] 2.00825e-30; + mp mp [ 1 0 0 0 0 0 0 ] 3.68746e-27; + } + physicoChemical + { + mu mu [ 1 0 0 0 0 0 0 ] 3.66083e-27; + k k [ 1 2 -2 -1 0 0 0 ] 1.82012e-22; + } + standard + { + //- Standard pressure [lbm/ft^2] + Pstd Pstd [ 1 -1 -2 0 0 0 0 ] 2088.6; + //- Standard temperature [degR] + Tstd Tstd [ 0 0 0 1 0 0 0 ] 536.67; + } + } +} + + +// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C b/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C index 35b5f68a..8164317e 100644 --- a/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C +++ b/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C @@ -146,7 +146,14 @@ void basicIO::streamDataToPath(fileName path, double** array,word name,word type *fileStream << "FoamFile\n"; *fileStream << "{version 2.0; format ascii;class "<< className << "; location 0;object "<< name <<";}\n"; *fileStream << nPProc_ <<"\n"; - *fileStream << "(\n"; + //*fileStream << "(\n"; + + if(type!="origProcId")*fileStream << "(\n"; + else if(type=="origProcId") + { + if(nPProc_>0) *fileStream <<"{0}"<< "\n"; + else *fileStream <<"{}"<< "\n"; + } for(int index = 0;index < particleCloud_.numberOfParticles(); ++index) { @@ -154,13 +161,16 @@ void basicIO::streamDataToPath(fileName path, double** array,word name,word type { if (type=="scalar"){ *fileStream << array[index][0] << " \n"; - }else { + }else if (type=="position" || type=="vector"){ for(int i=0;i<3;i++) vec[i] = array[index][i]; *fileStream <<"( "<< vec[0] <<" "<","0"); - streamDataToPath(lagPath_, particleCloud_.velocities(), particleCloud_.numberOfParticles(), "v","vector","vectorField",""); - streamDataToPath(lagPath_, particleCloud_.velocities(), particleCloud_.numberOfParticles(), "origId","label","labelField",""); - streamDataToPath(lagPath_, particleCloud_.velocities(), particleCloud_.numberOfParticles(), "origProcId","origProcId","labelField",""); - streamDataToPath(lagPath_, particleCloud_.radii(), particleCloud_.numberOfParticles(), "r","scalar","scalarField",""); + streamDataToPath(lagPath_, particleCloud_.velocities(), "origId","label","labelField",""); + streamDataToPath(lagPath_, particleCloud_.velocities(), "origProcId","origProcId","labelField",""); } } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Private Member Functions -fileName trackIO::buildFilePath(word dirName) const -{ - // create file structure - fileName path("."/dirName); - OFstream* stubFile = new OFstream(fileName(path/"particles.foam")); - delete stubFile; - return path; -} - -void trackIO::streamDataToPath(fileName path, double** array,int n,word name,word type,word className,word finaliser) const -{ - vector vec; - OFstream* fileStream = new OFstream(fileName(path/name)); - *fileStream << "FoamFile\n"; - *fileStream << "{version 2.0; format ascii;class "<< className << "; location 0;object "<< name <<";}\n"; - *fileStream << n <<"\n"; - if(type!="origProcId")*fileStream << "(\n"; - else if(type=="origProcId")*fileStream <<"{0}"<< "\n"; - - for(int index = 0;index < n; ++index) - { - if (type=="scalar"){ - *fileStream << array[index][0] << finaliser << " \n"; - }else if (type=="position"){ - for(int i=0;i<3;i++) vec[i] = array[index][i]; -// You may need to use these two lines if you have cyclics -// if(vec[0]<0)vec[0]+=0.12;if(vec[0]>0.12)vec[0]-=0.12; -// if(vec[1]<0)vec[1]+=0.06;if(vec[1]>0.06)vec[1]-=0.06; - *fileStream <<"( "<< vec[0] <<" "< voidfractionInterpolator_(voidfraction_); interpolationCellPoint UInterpolator_(U_); @@ -128,6 +130,9 @@ void KochHillDrag::setForce //{ cellI = particleCloud_.cellIDs()[index][0]; drag = vector(0,0,0); + betaP = 0; + Vs = 0; + Ufluid =vector(0,0,0); if (cellI > -1) // particle Found { @@ -182,7 +187,7 @@ void KochHillDrag::setForce scalar F = voidfraction * (F0 + 0.5*F3*Rep); // calc drag model coefficient betaP - scalar betaP = 18.*nuf*rho/(ds/cg()*ds/cg())*voidfraction*F; + betaP = 18.*nuf*rho/(ds/cg()*ds/cg())*voidfraction*F; // calc particle's drag drag = Vs*betaP*Ur; @@ -206,8 +211,23 @@ void KochHillDrag::setForce } } // set force on particle - if(treatExplicit_) for(int j=0;j<3;j++) expForces[index][j] += drag[j]; - else for(int j=0;j<3;j++) impForces[index][j] += drag[j]; + if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += drag[j]; + else for(int j=0;j<3;j++) impForces()[index][j] += drag[j]; + + // set Cd + if(implDEM_) + { + for(int j=0;j<3;j++) fluidVel()[index][j]=Ufluid[j]; + + if (modelType_=="B") + Cds()[index][0] = Vs*betaP/voidfraction; + else + Cds()[index][0] = Vs*betaP; + + }else{ + for(int j=0;j<3;j++) DEMForces()[index][j] += drag[j]; + } + //} } } diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.H b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.H index 2c747296..0ac3b5ae 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/KochHillDrag/KochHillDrag.H @@ -32,6 +32,7 @@ Description based on Koch Hill 2001,"Inertial effects in suspensions and porous-media flows", Annual Review of fluid mechanics. including interpolation of the velocity to the exact position + including drag coefficient for implicit drag for DEM Class KochHillDrag @@ -100,13 +101,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C index 53fc42a4..996daede 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.C @@ -108,13 +108,7 @@ void LaEuScalarTemp::allocateMyArrays() const } // * * * * * * * * * * * * * * * public Member Functions * * * * * * * * * * * * * // -void LaEuScalarTemp::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void LaEuScalarTemp::setForce() const { // do nothing } diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.H b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.H index a2566088..f96c9338 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.H @@ -116,13 +116,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; void manipulateScalarField(volScalarField&) const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.C b/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.C index e4b6071c..cd95965c 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.C @@ -86,13 +86,7 @@ MeiLift::~MeiLift() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void MeiLift::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void MeiLift::setForce() const { // get viscosity field #ifdef comp @@ -171,9 +165,11 @@ void MeiLift::setForce } } // set force on particle - if(treatDEM_) for(int j=0;j<3;j++) DEMForces[index][j] += lift[j]; - else if(!treatExplicit_) for(int j=0;j<3;j++) impForces[index][j] += lift[j]; - else for(int j=0;j<3;j++) expForces[index][j] += lift[j]; + if(!treatDEM_){ + if(!treatExplicit_) for(int j=0;j<3;j++) impForces()[index][j] += lift[j]; + else for(int j=0;j<3;j++) expForces()[index][j] += lift[j]; + } + for(int j=0;j<3;j++) DEMForces()[index][j] += lift[j]; //} } diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.H b/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.H index 5f022949..6d58f002 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/MeiLift/MeiLift.H @@ -96,13 +96,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.C b/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.C index 00b76ce1..c9262700 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.C @@ -84,13 +84,7 @@ SchillerNaumannDrag::~SchillerNaumannDrag() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void SchillerNaumannDrag::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void SchillerNaumannDrag::setForce() const { // get viscosity field #ifdef comp @@ -149,8 +143,9 @@ void SchillerNaumannDrag::setForce } } // set force on particle - if(treatExplicit_) for(int j=0;j<3;j++) expForces[index][j] += drag[j]; - else for(int j=0;j<3;j++) impForces[index][j] += drag[j]; + if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += drag[j]; + else for(int j=0;j<3;j++) impForces()[index][j] += drag[j]; + for(int j=0;j<3;j++) DEMForces()[index][j] += drag[j]; //} } diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.H b/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.H index 9b7eb25c..f898a668 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.H @@ -91,13 +91,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.C b/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.C index 9d11a7de..cd7fd5d0 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.C @@ -94,13 +94,7 @@ ShirgaonkarIB::~ShirgaonkarIB() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void ShirgaonkarIB::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void ShirgaonkarIB::setForce() const { label cellI; @@ -136,10 +130,11 @@ void ShirgaonkarIB::setForce // set force on particle if(twoDimensional_) drag /= depth_; - if(treatExplicit_) for(int j=0;j<3;j++) expForces[index][j] += drag[j]; - else for(int j=0;j<3;j++) impForces[index][j] += drag[j]; + if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += drag[j]; + else for(int j=0;j<3;j++) impForces()[index][j] += drag[j]; + for(int j=0;j<3;j++) DEMForces()[index][j] += drag[j]; - if(verbose_) Info << "impForces = " << impForces[index][0]<<","< provideScalarField(); @@ -132,6 +134,16 @@ public: inline volVectorField& expParticleForces() const { return expParticleForces_;}; + inline double ** impForces() const { return particleCloud_.impForces_;}; + + inline double ** expForces() const { return particleCloud_.expForces_;}; + + inline double ** DEMForces() const { return particleCloud_.DEMForces_;}; + + inline double ** Cds() const { return particleCloud_.Cds_;}; + + inline double ** fluidVel() const { return particleCloud_.fluidVel_;}; + inline const bool& coupleForce() const { return coupleForce_;}; inline const scalar cg() const { return cg_; }; @@ -141,6 +153,10 @@ public: cg_ = cg; Info << "cg is set to: " << cg_ << endl; }; + + void const setImpDEMdrag() const {particleCloud_.impDEMdrag_=true;}; + + }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C index 3c41dff9..f70e5aea 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C @@ -105,13 +105,7 @@ gradPForce::~gradPForce() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void gradPForce::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void gradPForce::setForce() const { volVectorField gradPField = fvc::grad(p_); /*if (useU_) @@ -172,9 +166,11 @@ void gradPForce::setForce } // set force on particle - if(treatDEM_) for(int j=0;j<3;j++) DEMForces[index][j] += force[j]; - else if(!treatExplicit_) for(int j=0;j<3;j++) impForces[index][j] += force[j]; - else for(int j=0;j<3;j++) expForces[index][j] += force[j]; + if(!treatDEM_){ + if(!treatExplicit_) for(int j=0;j<3;j++) impForces()[index][j] += force[j]; + else for(int j=0;j<3;j++) expForces()[index][j] += force[j]; + } + for(int j=0;j<3;j++) DEMForces()[index][j] += force[j]; //} } diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.H b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.H index c46d5b52..053d92ad 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.H @@ -104,13 +104,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/interface/interface.C b/src/lagrangian/cfdemParticle/subModels/forceModel/interface/interface.C index 694f261f..23d2c7fc 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/interface/interface.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/interface/interface.C @@ -93,13 +93,7 @@ interface::~interface() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void interface::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void interface::setForce() const { Info << "interface::setForce" << endl; for(int index = 0;index < particleCloud_.numberOfParticles(); ++index) @@ -185,8 +179,9 @@ Info << "interface::setForce" << endl; Info << "interface force is limited to " << interfaceForce << endl; }*/ - if(treatExplicit_) for(int j=0;j<3;j++) expForces[index][j] += interfaceForce[j]; - else for(int j=0;j<3;j++) impForces[index][j] += interfaceForce[j]; + if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += interfaceForce[j]; + else for(int j=0;j<3;j++) impForces()[index][j] += interfaceForce[j]; + for(int j=0;j<3;j++) DEMForces()[index][j] += interfaceForce[j]; } // end if particle found on proc domain //}// end if in mask }// end loop particles diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/interface/interface.H b/src/lagrangian/cfdemParticle/subModels/forceModel/interface/interface.H index aded1519..1bc0047f 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/interface/interface.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/interface/interface.H @@ -105,13 +105,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/noDrag/noDrag.C b/src/lagrangian/cfdemParticle/subModels/forceModel/noDrag/noDrag.C index 1ad9b9e8..a4cf37f7 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/noDrag/noDrag.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/noDrag/noDrag.C @@ -74,13 +74,7 @@ noDrag::~noDrag() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void noDrag::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void noDrag::setForce() const { // Do nothing Info << "noDrag::setForce" << endl; @@ -89,8 +83,8 @@ void noDrag::setForce //if(mask[index][0]) //{ // set force on particle - if(treatExplicit_) for(int j=0;j<3;j++) expForces[index][j] = 0.; - else for(int j=0;j<3;j++) impForces[index][j] = 0.; + if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] = 0.; + else for(int j=0;j<3;j++) impForces()[index][j] = 0.; //} } } diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/noDrag/noDrag.H b/src/lagrangian/cfdemParticle/subModels/forceModel/noDrag/noDrag.H index 841c0ace..e07fc373 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/noDrag/noDrag.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/noDrag/noDrag.H @@ -76,13 +76,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.C b/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.C index 0d203ace..6457d5e3 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.C @@ -92,13 +92,7 @@ virtualMassForce::~virtualMassForce() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void virtualMassForce::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void virtualMassForce::setForce() const { reAllocArrays(); @@ -131,8 +125,9 @@ void virtualMassForce::setForce } // set force on particle - if(treatExplicit_) for(int j=0;j<3;j++) expForces[index][j] += virtualMassForce[j]; - else for(int j=0;j<3;j++) impForces[index][j] += virtualMassForce[j]; + if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += virtualMassForce[j]; + else for(int j=0;j<3;j++) impForces()[index][j] += virtualMassForce[j]; + for(int j=0;j<3;j++) DEMForces()[index][j] += virtualMassForce[j]; //} } diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.H b/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.H index 5536d808..7eb5d626 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/virtualMassForce/virtualMassForce.H @@ -91,13 +91,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; void reAllocArrays() const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.C b/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.C index 767c35cc..cd14959e 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.C @@ -96,13 +96,7 @@ viscForce::~viscForce() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void viscForce::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void viscForce::setForce() const { // get viscosity field @@ -167,9 +161,11 @@ void viscForce::setForce } // set force on particle - if(treatDEM_) for(int j=0;j<3;j++) DEMForces[index][j] += force[j]; - else if(!treatExplicit_) for(int j=0;j<3;j++) impForces[index][j] += force[j]; - else for(int j=0;j<3;j++) expForces[index][j] += force[j]; + if(!treatDEM_){ + if(!treatExplicit_) for(int j=0;j<3;j++) impForces()[index][j] += force[j]; + else for(int j=0;j<3;j++) expForces()[index][j] += force[j]; + } + for(int j=0;j<3;j++) DEMForces()[index][j] += force[j]; //} } diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.H b/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.H index 565e7190..14120e1a 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/viscForce/viscForce.H @@ -92,13 +92,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.C b/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.C index 42ff59dd..b54ceb09 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.C @@ -93,13 +93,7 @@ DiFeliceDragMS::~DiFeliceDragMS() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void DiFeliceDragMS::setForce -( - double** const& mask, - double**& impForces, - double**& expForces, - double**& DEMForces -) const +void DiFeliceDragMS::setForce() const { // get viscosity field #ifdef comp @@ -218,8 +212,8 @@ void DiFeliceDragMS::setForce Warning <<"A BUG occurred in DiFeliceDragMS::setForce!!! nrigidC = " << nrigidC <<", ind = " << ind <<", index=" << index <<"\n" << endl; nrigidC = 1000; } - if(treatExplicit_) for(int j=0;j<3;j++) expForces[index][j] += cloudRefMS().expForcesCM()[ind][j] / nrigidC; - else for(int j=0;j<3;j++) impForces[index][j] += cloudRefMS().impForcesCM()[ind][j] / nrigidC; + if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += cloudRefMS().expForcesCM()[ind][j] / nrigidC; + else for(int j=0;j<3;j++) impForces()[index][j] += cloudRefMS().impForcesCM()[ind][j] / nrigidC; } } } diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.H b/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.H index 06669379..7220708e 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModelMS/DiFeliceDragMS/DiFeliceDragMS.H @@ -100,13 +100,7 @@ public: // Member Functions - void setForce - ( - double** const& mask, - double**&, - double**&, - double**& - ) const; + void setForce() const; }; diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/liggghts.restart b/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/liggghts.restart index 015fc1f0..40d3b068 100644 Binary files a/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/liggghts.restart and b/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/liggghts.restart differ diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/liggghts.restart b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/liggghts.restart index 015fc1f0..40d3b068 100644 Binary files a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/liggghts.restart and b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/liggghts.restart differ diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy index 7a111b4c..b6532edb 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy @@ -37,3 +37,4 @@ dummyfile dummyfile dummyfile dummyfile +dummyfile diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties index 56342556..455b9702 100755 --- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties @@ -38,7 +38,7 @@ meshMotionModel noMeshMotion; regionModel allRegion; -IOModel basicIO; //trackIO; // +IOModel trackIO; //basicIO; // dataExchangeModel twoWayMPI;//twoWayFiles;//oneWayVTK;// diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/particleTrackProperties b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/particleTrackProperties index cd48fa8b..2642ec77 100644 --- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/particleTrackProperties +++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/particleTrackProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -cloudName cfdemCloud1; +cloudName particleCloud; sampleFrequency 1;