PhasicFlow
v0.1
www.cemf.ir
sphereGranFlow.cpp
Go to the documentation of this file.
1
/*------------------------------- phasicFlow ---------------------------------
2
O C enter of
3
O O E ngineering and
4
O O M ultiscale modeling of
5
OOOOOOO F luid flow
6
------------------------------------------------------------------------------
7
Copyright (C): www.cemf.ir
8
email: hamid.r.norouzi AT gmail.com
9
------------------------------------------------------------------------------
10
Licence:
11
This file is part of phasicFlow code. It is a free software for simulating
12
granular and multiphase flows. You can redistribute it and/or modify it under
13
the terms of GNU General Public License v3 or any other later versions.
14
15
phasicFlow is distributed to help others in their research in the field of
16
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19
-----------------------------------------------------------------------------*/
20
21
#include "
property.hpp
"
22
#include "
geometry.hpp
"
23
#include "
sphereParticles.hpp
"
24
#include "
Insertions.hpp
"
25
#include "
systemControl.hpp
"
26
#include "
contactSearch.hpp
"
27
#include "
sphereInteraction.hpp
"
28
#include "commandLine.hpp"
29
#include "
readControlDict.hpp
"
30
31
using
pFlow::output
;
32
using
pFlow::endl
;
33
using
pFlow::property
;
34
using
pFlow::sphereParticles
;
35
using
pFlow::objectFile
;
36
using
pFlow::sphereInsertion
;
37
using
pFlow::insertionFile__
;
38
using
pFlow::interactionFile__
;
39
using
pFlow::contactSearch
;
40
using
pFlow::interaction
;
41
using
pFlow::commandLine;
42
43
int
main
(
int
argc,
char
* argv[])
44
{
45
46
commandLine cmds(
47
"sphereGranFlow"
,
48
"DEM solver for non-cohesive spherical particles with particle insertion "
49
"mechanism and moving geometry"
);
50
51
bool
isCoupling =
false
;
52
53
if
(!cmds.parse(argc, argv))
return
0;
54
55
// this should be palced in each main
56
#include "
initialize_Control.hpp
"
57
58
#include "
setProperty.hpp
"
59
#include "
setSurfaceGeometry.hpp
"
60
61
62
#include "
createDEMComponents.hpp
"
63
64
REPORT
(0)<<
"\nStart of time loop . . .\n"
<<
endREPORT
;
65
66
do
67
{
68
69
if
(!
sphInsertion
.insertParticles(
70
Control
.time().currentTime(),
71
Control
.time().dt() ) )
72
{
73
fatalError
<<
74
"particle insertion failed in sphereDFlow solver.\n"
;
75
return
1;
76
}
77
78
surfGeometry
.beforeIteration();
79
80
sphInteraction
.beforeIteration();
81
82
sphParticles
.
beforeIteration
();
83
84
85
sphInteraction
.iterate();
86
87
sphParticles
.
iterate
();
88
89
surfGeometry
.iterate();
90
91
sphParticles
.
afterIteration
();
92
93
surfGeometry
.afterIteration();
94
95
96
}
while
(
Control
++);
97
98
REPORT
(0)<<
"\nEnd of time loop.\n"
<<
endREPORT
;
99
100
// this should be palced in each main
101
#include "
finalize.hpp
"
102
103
104
}
105
initialize_Control.hpp
sphParticles
sphereParticles sphParticles(Control, proprties)
endREPORT
#define endREPORT
Definition:
streams.hpp:41
setProperty.hpp
sphInsertion
auto sphInsertion
Definition:
createDEMComponents.hpp:39
pFlow::insertionFile__
const char * insertionFile__
Definition:
vocabs.hpp:40
REPORT
#define REPORT(n)
Definition:
streams.hpp:40
setSurfaceGeometry.hpp
systemControl.hpp
Insertions.hpp
main
int main(int argc, char *argv[])
Definition:
sphereGranFlow.cpp:43
pFlow::interactionFile__
const char * interactionFile__
Definition:
vocabs.hpp:48
pFlow::endl
iOstream & endl(iOstream &os)
Definition:
iOstream.hpp:312
surfGeometry
auto & surfGeometry
Definition:
setSurfaceGeometry.hpp:26
pFlow::sphereParticles::afterIteration
bool afterIteration() override
after iteration step
Definition:
sphereParticles.cpp:133
pFlow::sphereParticles
Class for managing spherical particles.
Definition:
sphereParticles.hpp:44
sphereInteraction.hpp
pFlow::output
Ostream output
geometry.hpp
pFlow::sphereParticles::iterate
bool iterate() override
iterate particles
Definition:
sphereParticles.cpp:104
pFlow::objectFile
Definition:
objectFile.hpp:33
fatalError
#define fatalError
Definition:
error.hpp:36
createDEMComponents.hpp
pFlow::sphereParticles::beforeIteration
bool beforeIteration() override
before iteration step
Definition:
sphereParticles.cpp:84
pFlow::property
property holds the pure properties of materials.
Definition:
property.hpp:40
pFlow::contactSearch
Definition:
contactSearch.hpp:35
pFlow::sphereInsertion
Insertion< sphereShape > sphereInsertion
Definition:
Insertions.hpp:31
sphInteraction
auto & sphInteraction
Definition:
createDEMComponents.hpp:51
sphereParticles.hpp
contactSearch.hpp
property.hpp
readControlDict.hpp
pFlow::interaction
Definition:
interaction.hpp:34
Control
auto & Control
Definition:
initialize_Control.hpp:47
finalize.hpp
solvers
sphereGranFlow
sphereGranFlow.cpp
Generated by
1.8.17