Skip to content

Commit 71acedd

Browse files
authored
Merge pull request #154 from ParticulateFlow/release
Release 24.01
2 parents 86753f2 + 31d49b4 commit 71acedd

File tree

565 files changed

+513120
-691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

565 files changed

+513120
-691
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
CFDEM®coupling stands for Computational Fluid Dynamics (CFD) - Discrete Element Method (DEM) coupling. It combines the open source packages OpenFOAM® (CFD) and LIGGGHTS® (DEM) to simulate particle-laden flows. CFDEM®coupling is part of the [CFDEM®project](https://www.cfdem.com).
44

5-
[![CircleCI](https://circleci.com/gh/ParticulateFlow/CFDEMcoupling.svg?style=shield&circle-token=e4b6af30d3aa7aee109d206116f01600bf9ee9c6)](https://circleci.com/gh/ParticulateFlow/CFDEMcoupling)
5+
[![CircleCI](https://circleci.com/gh/ParticulateFlow/CFDEMcoupling.svg?style=shield&circle-token=7e8118524babddbefccf4e3608a7545d405acbb4)](https://circleci.com/gh/ParticulateFlow/CFDEMcoupling)
66
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
77

88
## Disclaimer

applications/solvers/cfdemSolverIB/Make/options

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
22

33
EXE_INC = \
4-
-I$(CFDEM_OFVERSION_DIR) \
54
-I$(LIB_SRC)/finiteVolume/lnInclude \
65
-I$(LIB_SRC)/meshTools/lnInclude \
76
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \

applications/solvers/cfdemSolverIBContinuousForcing/Make/options

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
22

33
EXE_INC = \
4-
-I$(CFDEM_OFVERSION_DIR) \
54
-I$(LIB_SRC)/finiteVolume/lnInclude \
65
-I$(LIB_SRC)/meshTools/lnInclude \
76
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \

applications/solvers/cfdemSolverMultiphase/Make/options

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
55

66
EXE_INC = \
77
$(PFLAGS) \
8-
-I$(CFDEM_OFVERSION_DIR) \
98
-ImultiphaseMixture/lnInclude \
109
-I$(LIB_SRC)/transportModels \
1110
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \

applications/solvers/cfdemSolverMultiphaseScalar/Make/options

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
55

66
EXE_INC = \
77
$(PFLAGS) \
8-
-I$(CFDEM_OFVERSION_DIR) \
98
-ImultiphaseMixtureScalar/lnInclude \
109
-I$(LIB_SRC)/transportModels \
1110
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cfdemSolverPimple.C
2+
3+
EXE=$(CFDEM_APP_DIR)/cfdemSolverPimple
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
2+
3+
EXE_INC = \
4+
-I$(LIB_SRC)/finiteVolume/lnInclude \
5+
-I$(LIB_SRC)/meshTools/lnInclude \
6+
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
7+
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
8+
-I$(LIB_SRC)/transportModels \
9+
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
10+
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
11+
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
12+
-Wno-deprecated-copy
13+
14+
EXE_LIBS = \
15+
-L$(CFDEM_LIB_DIR)\
16+
-lturbulenceModels \
17+
-lincompressibleTurbulenceModels \
18+
-lincompressibleTransportModels \
19+
-lfiniteVolume \
20+
-lmeshTools \
21+
-lfvOptions \
22+
-l$(CFDEM_LIB_NAME) \
23+
$(CFDEM_ADD_LIB_PATHS) \
24+
$(CFDEM_ADD_LIBS)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
particleCloud.otherForces(fOther);
2+
3+
tmp<fvVectorMatrix> tUEqn
4+
(
5+
fvm::ddt(voidfraction,U) - fvm::Sp(fvc::ddt(voidfraction),U)
6+
+ fvm::div(phi,U) - fvm::Sp(fvc::div(phi),U)
7+
// in case of "periodic box" simulations the viscous term can be commented
8+
// during testing the effect of this term on the results was negligible (about 1-2%)
9+
+ particleCloud.divVoidfractionTau(U, voidfraction)
10+
- fOther/rho
11+
==
12+
fvOptions(U)
13+
- fvm::Sp(Ksl/rho,U)
14+
);
15+
16+
fvVectorMatrix& UEqn = tUEqn.ref();
17+
18+
UEqn.relax();
19+
20+
fvOptions.constrain(UEqn);
21+
22+
volScalarField rAU = 1.0/UEqn.A();
23+
24+
surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU));
25+
26+
surfaceScalarField voidfractionf = fvc::interpolate(voidfraction);
27+
28+
surfaceScalarField phicForces
29+
(
30+
fvc::interpolate(rAU*(Ksl*Us)/rho) & mesh.Sf()
31+
);
32+
33+
if (pimple.momentumPredictor() && (modelType=="B" || modelType=="Bfull"))
34+
{
35+
solve(UEqn == fvc::reconstruct(phicForces/rAUf - fvc::snGrad(p)*mesh.magSf()));
36+
fvOptions.correct(U);
37+
}
38+
else if (pimple.momentumPredictor())
39+
{
40+
solve(UEqn == fvc::reconstruct(phicForces/rAUf - fvc::snGrad(p)*voidfractionf*mesh.magSf()));
41+
fvOptions.correct(U);
42+
}
43+
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
/*---------------------------------------------------------------------------*\
2+
Open Source CFD-DEM coupling
3+
4+
Copyright (C) 2023 Behrad Esgandari, JKU Linz, Austria
5+
-------------------------------------------------------------------------------
6+
License
7+
8+
This program is free software: you can redistribute it and/or modify it
9+
under the terms of the GNU General Public License as published by
10+
the Free Software Foundation, either version 3 of the License, or
11+
(at your option) any later version.
12+
13+
This program is distributed in the hope that it will be useful, but WITHOUT
14+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16+
for more details.
17+
18+
You should have received a copy of the GNU General Public License
19+
along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
21+
Application
22+
cfdemSolverPimple
23+
24+
Description
25+
Transient solver for incompressible flow.
26+
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
27+
The code is an evolution of the solver pimpleFoam in OpenFOAM(R) 6.0,
28+
where additional functionality for CFD-DEM coupling is added.
29+
30+
\*---------------------------------------------------------------------------*/
31+
32+
#include "fvCFD.H"
33+
#include "singlePhaseTransportModel.H"
34+
#include "turbulentTransportModel.H"
35+
#include "pimpleControl.H"
36+
#include "fvOptions.H"
37+
38+
#include "cfdemCloud.H"
39+
#include "implicitCouple.H"
40+
#include "clockModel.H"
41+
#include "smoothingModel.H"
42+
#include "forceModel.H"
43+
44+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45+
46+
int main(int argc, char *argv[])
47+
{
48+
#include "setRootCase.H"
49+
#include "createTime.H"
50+
#include "createMesh.H"
51+
#include "createControl.H"
52+
#include "createFields.H"
53+
#include "createFvOptions.H"
54+
#include "initContinuityErrs.H"
55+
56+
// create cfdemCloud
57+
#include "readGravitationalAcceleration.H"
58+
cfdemCloud particleCloud(mesh);
59+
#include "checkModelType.H"
60+
61+
// switch for periodic box simulations
62+
Switch periodicBoxSwitch
63+
(
64+
pimple.dict().lookupOrDefault<Switch>("periodicBoxSwitch", false)
65+
);
66+
67+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68+
Info<< "\nStarting time loop\n" << endl;
69+
while (runTime.loop())
70+
{
71+
particleCloud.clockM().start(1,"Global");
72+
73+
Info<< "Time = " << runTime.timeName() << nl << endl;
74+
75+
#include "CourantNo.H"
76+
77+
// do particle stuff
78+
particleCloud.clockM().start(2,"Coupling");
79+
bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);
80+
81+
if(hasEvolved)
82+
{
83+
particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces());
84+
}
85+
86+
Info << "update Ksl.internalField()" << endl;
87+
Ksl = particleCloud.momCoupleM(0).impMomSource();
88+
Ksl.correctBoundaryConditions();
89+
90+
//Force Checks
91+
vector fTotal(0,0,0);
92+
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
93+
reduce(fImpTotal, sumOp<vector>());
94+
Info << "TotalForceExp: " << fTotal << endl;
95+
Info << "TotalForceImp: " << fImpTotal << endl;
96+
97+
#include "solverDebugInfo.H"
98+
particleCloud.clockM().stop("Coupling");
99+
100+
particleCloud.clockM().start(26,"Flow");
101+
102+
if(particleCloud.solveFlow())
103+
{
104+
// Pressure-velocity PIMPLE corrector
105+
while (pimple.loop())
106+
{
107+
// Momentum predictor
108+
#include "UEqn.H"
109+
110+
// --- Inner PIMPLE loop
111+
112+
while (pimple.correct())
113+
{
114+
#include "pEqn.H"
115+
}
116+
}
117+
118+
laminarTransport.correct();
119+
turbulence->correct();
120+
}
121+
else
122+
{
123+
Info << "skipping flow solution." << endl;
124+
}
125+
126+
if (periodicBoxSwitch)
127+
{
128+
#include "periodicBoxProperties.H"
129+
}
130+
131+
runTime.write();
132+
133+
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
134+
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
135+
<< nl << endl;
136+
137+
particleCloud.clockM().stop("Flow");
138+
particleCloud.clockM().stop("Global");
139+
}
140+
141+
Info<< "End\n" << endl;
142+
143+
return 0;
144+
}
145+
146+
147+
// ************************************************************************* //

0 commit comments

Comments
 (0)