# PhasicFlow: solvers/sphereGranFlow/sphereGranFlow.cpp Source File

sphereGranFlow.cpp
Go to the documentation of this file.
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#include "property.hpp"
#include "geometry.hpp"
#include "sphereParticles.hpp"
#include "Insertions.hpp"
#include "systemControl.hpp"
#include "contactSearch.hpp"
#include "sphereInteraction.hpp"
#include "commandLine.hpp"
#include "readControlDict.hpp"
using pFlow::output;
using pFlow::endl;
using pFlow::property;
using pFlow::sphereParticles;
using pFlow::objectFile;
using pFlow::sphereInsertion;
using pFlow::insertionFile__;
using pFlow::interactionFile__;
using pFlow::contactSearch;
using pFlow::interaction;
using pFlow::commandLine;
int main( int argc, char* argv[])
{
commandLine cmds(
"sphereGranFlow",
"DEM solver for non-cohesive spherical particles with particle insertion "
"mechanism and moving geometry");
bool isCoupling = false;
if(!cmds.parse(argc, argv)) return 0;
// this should be palced in each main
#include "initialize_Control.hpp"
#include "setProperty.hpp"
#include "setSurfaceGeometry.hpp"
#include "createDEMComponents.hpp"
REPORT(0)<<"\nStart of time loop . . .\n"<<endREPORT;
do
{
if(! sphInsertion.insertParticles(
Control.time().currentTime(),
Control.time().dt() ) )
{
fatalError<<
"particle insertion failed in sphereDFlow solver.\n";
return 1;
}
surfGeometry.beforeIteration();
sphInteraction.beforeIteration();
sphParticles.beforeIteration();
sphInteraction.iterate();
sphParticles.iterate();
surfGeometry.iterate();
sphParticles.afterIteration();
surfGeometry.afterIteration();
}while(Control++);
REPORT(0)<<"\nEnd of time loop.\n"<<endREPORT;
// this should be palced in each main
#include "finalize.hpp"
}
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::commandLine
Definition: commandLine.hpp:36
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
pFlow::commandLine::parse
bool parse(int argc, char **argv)
Definition: commandLine.cpp:50
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
commandLine.hpp
pFlow::interaction
Definition: interaction.hpp:34
Control
auto & Control
Definition: initialize_Control.hpp:47
finalize.hpp