Skip to content

Commit 86753f2

Browse files
authored
Merge pull request #146 from ParticulateFlow/release
Release 23.02
2 parents 16a415a + 13e5989 commit 86753f2

File tree

316 files changed

+12807
-22418
lines changed

Some content is hidden

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

316 files changed

+12807
-22418
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ log.*
88
*.swp
99
*.swo
1010

11-
**/linux*Gcc*/
11+
**/linux*cc*/
1212
**/.vscode
1313

1414
lnInclude

applications/solvers/cfdemSolverIB/Make/options

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ EXE_INC = \
99
-I$(LIB_SRC)/transportModels \
1010
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
1111
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
12-
-I$(LIB_SRC)/sampling/lnInclude \
1312
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
1413
-I$(LIB_SRC)/dynamicMesh/lnInclude \
1514
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
1615
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
1716
-I$(LIB_SRC)/fvOptions/lnInclude \
17+
-I$(LIB_SRC)/sampling/lnInclude \
1818
-Wno-deprecated-copy
1919

2020
EXE_LIBS = \
@@ -27,6 +27,7 @@ EXE_LIBS = \
2727
-ldynamicFvMesh \
2828
-ldynamicMesh \
2929
-lfvOptions \
30+
-lsampling \
3031
-l$(CFDEM_LIB_NAME) \
3132
$(CFDEM_ADD_LIB_PATHS) \
3233
$(CFDEM_ADD_LIBS)

applications/solvers/cfdemSolverIB/cfdemSolverIB.C

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
Christoph Goniva, [email protected]
77
Copyright (C) 1991-2009 OpenCFD Ltd.
88
Copyright (C) 2009-2012 JKU, Linz
9-
Copyright (C) 2012- DCS Computing GmbH,Linz
9+
Copyright (C) 2012-2015 DCS Computing GmbH,Linz
10+
Copyright (C) 2015- JKU, Linz
1011
-------------------------------------------------------------------------------
1112
License
1213
This file is part of CFDEMcoupling.
@@ -29,11 +30,14 @@ Application
2930
3031
Description
3132
Transient solver for incompressible flow.
32-
The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6,
33+
The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6,
3334
where additional functionality for CFD-DEM coupling using immersed body
3435
(fictitious domain) method is added.
3536
Contributions
3637
Alice Hager
38+
Daniel Queteschiner
39+
Thomas Lichtenegger
40+
Achuth N. Balachandran Nair
3741
\*---------------------------------------------------------------------------*/
3842

3943

@@ -53,23 +57,21 @@ Contributions
5357

5458
#include "cellSet.H"
5559

60+
#include "fvOptions.H" // added the fvOptions library
61+
5662
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
5763

5864
int main(int argc, char *argv[])
5965
{
60-
#include "setRootCase.H"
6166

67+
#include "setRootCase.H"
6268
#include "createTime.H"
63-
6469
#include "createDynamicFvMesh.H"
65-
6670
#include "createControl.H"
67-
6871
#include "createTimeControls.H"
69-
7072
#include "createFields.H"
71-
7273
#include "initContinuityErrs.H"
74+
#include "createFvOptions.H"
7375

7476
// create cfdemCloud
7577
#include "readGravitationalAcceleration.H"
@@ -93,24 +95,31 @@ int main(int argc, char *argv[])
9395

9496
// do particle stuff
9597
Info << "- evolve()" << endl;
96-
particleCloud.evolve();
98+
particleCloud.evolve(Us);
9799

98100
// Pressure-velocity PISO corrector
99101
{
102+
MRF.correctBoundaryVelocity(U);
103+
100104
// Momentum predictor
101105

102106
fvVectorMatrix UEqn
103107
(
104-
fvm::ddt(voidfraction,U)
108+
fvm::ddt(voidfraction,U) + MRF.DDt(U)
105109
+ fvm::div(phi, U)
106110
+ turbulence->divDevReff(U)
111+
==
112+
fvOptions(U)
107113
);
108114

109115
UEqn.relax();
110116

117+
fvOptions.constrain(UEqn);
118+
111119
if (piso.momentumPredictor())
112120
{
113121
solve(UEqn == -fvc::grad(p));
122+
fvOptions.correct(U);
114123
}
115124

116125
// --- PISO loop
@@ -126,6 +135,7 @@ int main(int argc, char *argv[])
126135

127136
adjustPhi(phi, U, p);
128137

138+
129139
while (piso.correctNonOrthogonal())
130140
{
131141
// Pressure corrector
@@ -152,12 +162,15 @@ int main(int argc, char *argv[])
152162
}
153163
}
154164

165+
laminarTransport.correct();
155166
turbulence->correct();
156167

157168
Info << "particleCloud.calcVelocityCorrection() " << endl;
158169
volScalarField voidfractionNext=mesh.lookupObject<volScalarField>("voidfractionNext");
159170
particleCloud.calcVelocityCorrection(p,U,phiIB,voidfractionNext);
160171

172+
fvOptions.correct(U);
173+
161174
runTime.write();
162175

163176
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"

applications/solvers/cfdemSolverIB/createFields.H

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,6 @@
2626
),
2727
mesh
2828
);
29-
//mod by alice
30-
Info<< "Reading physical velocity field U" << endl;
31-
Info<< "Note: only if voidfraction at boundary is 1, U is superficial velocity!!!\n" << endl;
32-
volVectorField Us
33-
(
34-
IOobject
35-
(
36-
"Us",
37-
runTime.timeName(),
38-
mesh,
39-
IOobject::MUST_READ,
40-
IOobject::AUTO_WRITE
41-
),
42-
mesh
43-
);
4429

4530
//========================
4631
// drag law modelling
@@ -76,9 +61,8 @@
7661
mesh
7762
);
7863

79-
8064
//mod by alice
81-
Info<< "Reading field phiIB\n" << endl;
65+
Info<< "Reading field voidfraction\n" << endl;
8266
volScalarField voidfraction
8367
(
8468
IOobject
@@ -91,6 +75,21 @@
9175
),
9276
mesh
9377
);
78+
79+
Info<< "Reading particle velocity field Us\n" << endl;
80+
volVectorField Us
81+
(
82+
IOobject
83+
(
84+
"Us",
85+
runTime.timeName(),
86+
mesh,
87+
IOobject::MUST_READ,
88+
IOobject::AUTO_WRITE
89+
),
90+
mesh
91+
);
92+
9493
//========================
9594

9695
# include "createPhi.H"
@@ -126,3 +125,5 @@
126125
);
127126

128127
//===========================
128+
129+
#include "createMRF.H"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cfdemSolverIBContinuousForcing.C
2+
3+
EXE=$(CFDEM_APP_DIR)/cfdemSolverIBContinuousForcing
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
2+
3+
EXE_INC = \
4+
-I$(CFDEM_OFVERSION_DIR) \
5+
-I$(LIB_SRC)/finiteVolume/lnInclude \
6+
-I$(LIB_SRC)/meshTools/lnInclude \
7+
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
8+
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
9+
-I$(LIB_SRC)/transportModels \
10+
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
11+
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
12+
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
13+
-I$(LIB_SRC)/dynamicMesh/lnInclude \
14+
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
15+
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
16+
-I$(LIB_SRC)/fvOptions/lnInclude \
17+
-I$(LIB_SRC)/sampling/lnInclude \
18+
-Wno-deprecated-copy
19+
20+
EXE_LIBS = \
21+
-L$(CFDEM_LIB_DIR)\
22+
-lturbulenceModels \
23+
-lincompressibleTurbulenceModels \
24+
-lincompressibleTransportModels \
25+
-lfiniteVolume \
26+
-lmeshTools \
27+
-ldynamicFvMesh \
28+
-ldynamicMesh \
29+
-lfvOptions \
30+
-lsampling \
31+
-l$(CFDEM_LIB_NAME) \
32+
$(CFDEM_ADD_LIB_PATHS) \
33+
$(CFDEM_ADD_LIBS)
34+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
fvVectorMatrix UEqn
2+
(
3+
fvm::ddt(voidfractionNext,U) + MRF.DDt(U)
4+
+ fvm::div(phi, U)
5+
+ turbulence->divDevReff(U)
6+
==
7+
fvOptions(U)
8+
+ (lambda*(1-voidfractionNext)/U.mesh().time().deltaT())*(fvc::Sp(1,Us)-fvm::Sp(1,U))
9+
);
10+
11+
UEqn.relax();
12+
13+
fvOptions.constrain(UEqn);
14+
15+
if (piso.momentumPredictor())
16+
{
17+
solve(UEqn == -fvc::grad(p));
18+
fvOptions.correct(U);
19+
}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
/*---------------------------------------------------------------------------*\
2+
CFDEMcoupling - Open Source CFD-DEM coupling
3+
4+
CFDEMcoupling is part of the CFDEMproject
5+
www.cfdem.com
6+
Copyright (C) 1991-2009 OpenCFD Ltd.
7+
Copyright (C) 2009-2012 JKU, Linz
8+
Copyright (C) 2012-2015 DCS Computing GmbH,Linz
9+
Copyright (C) 2015- JKU, Linz
10+
-------------------------------------------------------------------------------
11+
License
12+
This file is part of CFDEMcoupling.
13+
14+
CFDEMcoupling is free software: you can redistribute it and/or modify it
15+
under the terms of the GNU General Public License as published by
16+
the Free Software Foundation, either version 3 of the License, or
17+
(at your option) any later version.
18+
19+
CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT
20+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22+
for more details.
23+
24+
You should have received a copy of the GNU General Public License
25+
along with CFDEMcoupling. If not, see <http://www.gnu.org/licenses/>.
26+
27+
Application
28+
cfdemSolverIBContinuousForcing
29+
30+
Description
31+
Transient solver for incompressible flow.
32+
The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6,
33+
where additional functionality for CFD-DEM coupling using immersed body
34+
(fictitious domain) method and a continuous forcing approach is added.
35+
Contributions
36+
Alice Hager
37+
Achuth N. Balachandran Nair
38+
\*---------------------------------------------------------------------------*/
39+
40+
41+
#include "fvCFD.H"
42+
#include "singlePhaseTransportModel.H"
43+
#include "turbulentTransportModel.H"
44+
#include "pisoControl.H"
45+
46+
#include "cfdemCloudIB.H"
47+
#include "implicitCouple.H"
48+
49+
#include "averagingModel.H"
50+
#include "regionModel.H"
51+
#include "voidFractionModel.H"
52+
53+
#include "dynamicFvMesh.H"
54+
55+
#include "cellSet.H"
56+
57+
#include "fvOptions.H"
58+
59+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60+
61+
int main(int argc, char *argv[])
62+
{
63+
64+
#include "setRootCase.H"
65+
#include "createTime.H"
66+
#include "createDynamicFvMesh.H"
67+
#include "createControl.H"
68+
#include "createTimeControls.H"
69+
#include "createFields.H"
70+
#include "initContinuityErrs.H"
71+
#include "createFvOptions.H"
72+
73+
// create cfdemCloud
74+
#include "readGravitationalAcceleration.H"
75+
cfdemCloudIB particleCloud(mesh);
76+
77+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78+
79+
Info<< "\nStarting time loop\n" << endl;
80+
81+
while (runTime.loop())
82+
{
83+
Info<< "Time = " << runTime.timeName() << nl << endl;
84+
85+
//=== dyM ===================
86+
interFace = mag(mesh.lookupObject<volScalarField>("voidfractionNext"));
87+
mesh.update(); //dyM
88+
89+
#include "readTimeControls.H"
90+
#include "CourantNo.H"
91+
#include "setDeltaT.H"
92+
93+
// do particle stuff
94+
Info << "- evolve()" << endl;
95+
particleCloud.evolve(Us);
96+
97+
volScalarField voidfractionNext=mesh.lookupObject<volScalarField>("voidfractionNext");
98+
99+
// Pressure-velocity PISO corrector
100+
{
101+
MRF.correctBoundaryVelocity(U);
102+
103+
// Momentum predictor
104+
#include "UEqn.H"
105+
106+
// --- PISO loop
107+
while (piso.correct())
108+
{
109+
#include "pEqn.H"
110+
}
111+
}
112+
113+
laminarTransport.correct();
114+
turbulence->correct();
115+
116+
runTime.write();
117+
118+
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
119+
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
120+
<< nl << endl;
121+
}
122+
123+
Info<< "End\n" << endl;
124+
125+
return 0;
126+
}
127+
128+
129+
// ************************************************************************* //

0 commit comments

Comments
 (0)