PhasicFlow
v0.1
www.cemf.ir
sphereGranFlow.cpp
Go to the documentation of this file.
1
2
/*------------------------------- phasicFlow ---------------------------------
3
O C enter of
4
O O E ngineering and
5
O O M ultiscale modeling of
6
OOOOOOO F luid flow
7
------------------------------------------------------------------------------
8
Copyright (C): www.cemf.ir
9
email: hamid.r.norouzi AT gmail.com
10
------------------------------------------------------------------------------
11
Licence:
12
This file is part of phasicFlow code. It is a free software for simulating
13
granular and multiphase flows. You can redistribute it and/or modify it under
14
the terms of GNU General Public License v3 or any other later versions.
15
16
phasicFlow is distributed to help others in their research in the field of
17
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
18
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
20
-----------------------------------------------------------------------------*/
33
#include "
property.hpp
"
34
#include "
geometry.hpp
"
35
#include "
sphereParticles.hpp
"
36
#include "
Insertions.hpp
"
37
#include "
systemControl.hpp
"
38
#include "
contactSearch.hpp
"
39
#include "
sphereInteraction.hpp
"
40
#include "commandLine.hpp"
41
#include "
readControlDict.hpp
"
42
43
using
pFlow::output
;
44
using
pFlow::endl
;
45
using
pFlow::property
;
46
using
pFlow::sphereParticles
;
47
using
pFlow::objectFile
;
48
using
pFlow::sphereInsertion
;
49
using
pFlow::insertionFile__
;
50
using
pFlow::interactionFile__
;
51
using
pFlow::contactSearch
;
52
using
pFlow::interaction
;
53
using
pFlow::commandLine;
54
55
56
63
int
main
(
int
argc,
char
* argv[])
64
{
65
66
commandLine cmds(
67
"sphereGranFlow"
,
68
"DEM solver for non-cohesive spherical particles with particle insertion "
69
"mechanism and moving geometry"
);
70
71
bool
isCoupling =
false
;
72
73
if
(!cmds.parse(argc, argv))
return
0;
74
75
// this should be palced in each main
76
#include "
initialize_Control.hpp
"
77
78
#include "
setProperty.hpp
"
79
#include "
setSurfaceGeometry.hpp
"
80
81
82
#include "
createDEMComponents.hpp
"
83
84
REPORT
(0)<<
"\nStart of time loop . . .\n"
<<
endREPORT
;
85
86
do
87
{
88
89
if
(!
sphInsertion
.insertParticles(
90
Control
.time().currentTime(),
91
Control
.time().dt() ) )
92
{
93
fatalError
<<
94
"particle insertion failed in sphereDFlow solver.\n"
;
95
return
1;
96
}
97
98
surfGeometry
.beforeIteration();
99
100
sphInteraction
.beforeIteration();
101
102
sphParticles
.
beforeIteration
();
103
104
105
sphInteraction
.iterate();
106
107
sphParticles
.
iterate
();
108
109
surfGeometry
.iterate();
110
111
sphParticles
.
afterIteration
();
112
113
surfGeometry
.afterIteration();
114
115
116
}
while
(
Control
++);
117
118
REPORT
(0)<<
"\nEnd of time loop.\n"
<<
endREPORT
;
119
120
// this should be palced in each main
121
#include "
finalize.hpp
"
122
123
124
}
125
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[])
DEM solver for simulating granular flow of cohesion-less particles.
Definition:
sphereGranFlow.cpp:63
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