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 "vocabs.hpp"
34 #include "phasicFlowKokkos.hpp"
35 #include "systemControl.hpp"
36 #include "commandLine.hpp"
37 #include "property.hpp"
38 #include "geometry.hpp"
39 #include "sphereParticles.hpp"
40 #include "interaction.hpp"
41 #include "Insertions.hpp"
42 
43 //#include "readControlDict.hpp"
44 
51 int main( int argc, char* argv[])
52 {
53 
55  "sphereGranFlow",
56  "DEM solver for non-cohesive spherical particles with particle insertion "
57  "mechanism and moving geometry");
58 
59 bool isCoupling = false;
60 
61 if(!cmds.parse(argc, argv)) return 0;
62 
63 // this should be palced in each main
66 #include "initialize_Control.hpp"
67 
68  #include "setProperty.hpp"
69  #include "setSurfaceGeometry.hpp"
70 
71  #include "createDEMComponents.hpp"
72 
73  REPORT(0)<<"\nStart of time loop . . .\n"<<END_REPORT;
74 
75  do
76  {
77 
78  if(! sphInsertion.insertParticles(
79  Control.time().currentIter(),
80  Control.time().currentTime(),
81  Control.time().dt() ) )
82  {
83  fatalError<<
84  "particle insertion failed in sphereDFlow solver.\n";
85  return 1;
86  }
87 
88  // set force to zero
89  surfGeometry.beforeIteration();
90 
91  // set force to zero, predict, particle deletion and etc.
93 
94  sphInteraction.beforeIteration();
95 
96  sphInteraction.iterate();
97 
98  surfGeometry.iterate();
99 
101 
102  sphInteraction.afterIteration();
103 
104  surfGeometry.afterIteration();
105 
107 
108 
109  }while(Control++);
110 
111  REPORT(0)<<"\nEnd of time loop.\n"<<END_REPORT;
112 
113 // this should be palced in each main
114 #include "finalize.hpp"
116 
117 
118 }
119 
initialize_Control.hpp
pFlow::processors::initProcessors
static void initProcessors(int argc, char *argv[])
Initialize MPI processors.
Definition: processors.cpp:42
setProperty.hpp
REPORT
#define REPORT(n)
Definition: streams.hpp:39
setSurfaceGeometry.hpp
pFlow::processors::finalizeProcessors
static void finalizeProcessors()
Finalize MPI processors.
Definition: processors.cpp:88
systemControl.hpp
Insertions.hpp
main
int main(int argc, char *argv[])
DEM solver for simulating granular flow of cohesion-less particles.
Definition: sphereGranFlow.cpp:51
pFlow::commandLine
Definition: commandLine.hpp:36
createDEMComponents.hpp
interaction.hpp
surfGeometry
auto & surfGeometry
Definition: setSurfaceGeometry.hpp:26
sphInsertion
auto sphInsertion
Definition: createDEMComponents.hpp:39
phasicFlowKokkos.hpp
pFlow::commandLine::parse
bool parse(int argc, char **argv)
Definition: commandLine.cpp:50
pFlow::particles::afterIteration
bool afterIteration() override
This is called in time loop, after iterate.
Definition: particles.cpp:110
geometry.hpp
pFlow::sphereParticles::iterate
bool iterate() override
iterate particles
Definition: sphereParticles.cpp:537
pFlow::initialize_pFlowProcessors
void initialize_pFlowProcessors()
Definition: pFlowProcessors.cpp:10
END_REPORT
#define END_REPORT
Definition: streams.hpp:40
fatalError
#define fatalError
Report a fatal error and exit the applicaiton.
Definition: error.hpp:70
sphInteraction
auto & sphInteraction
Definition: createDEMComponents.hpp:50
pFlow::sphereParticles::beforeIteration
bool beforeIteration() override
before iteration step
Definition: sphereParticles.cpp:515
sphereParticles.hpp
property.hpp
vocabs.hpp
sphParticles
pFlow::sphereParticles sphParticles(Control, proprties)
commandLine.hpp
Control
auto & Control
Definition: initialize_Control.hpp:47
finalize.hpp