solver sphereGranFlow without particles insertion

This commit is contained in:
Hamidreza Norouzi 2024-03-24 03:57:16 -07:00
parent 3ada371198
commit 4c36418ec8
3 changed files with 35 additions and 37 deletions

View File

@ -4,4 +4,4 @@ add_subdirectory(iterateSphereParticles)
add_subdirectory(iterateGeometry)
#add_subdirectory(sphereGranFlow)
add_subdirectory(sphereGranFlow)

View File

@ -19,11 +19,11 @@ Licence:
-----------------------------------------------------------------------------*/
//
REPORT(0)<<"\nReading sphere particles . . ."<<endREPORT;
REPORT(0)<<"\nReading sphere particles . . ."<<END_REPORT;
sphereParticles sphParticles(Control, proprties);
//
REPORT(0)<<"\nCreating particle insertion object . . ."<<endREPORT;
REPORT(0)<<"\nCreating particle insertion object . . ."<<END_REPORT;
/*auto& sphInsertion =
Control.caseSetup().emplaceObject<sphereInsertion>(
objectFile(
@ -36,12 +36,12 @@ REPORT(0)<<"\nCreating particle insertion object . . ."<<endREPORT;
sphParticles.shapes()
);*/
auto sphInsertion = sphereInsertion(
/*auto sphInsertion = sphereInsertion(
Control.caseSetup().path()+insertionFile__,
sphParticles,
sphParticles.shapes());
sphParticles.shapes());*/
REPORT(0)<<"\nCreating interaction model for sphere-sphere contact and sphere-wall contact . . ."<<endREPORT;
REPORT(0)<<"\nCreating interaction model for sphere-sphere contact and sphere-wall contact . . ."<<END_REPORT;
auto interactionPtr = interaction::create(
Control,
sphParticles,

View File

@ -30,30 +30,22 @@ Licence:
* (https://github.com/PhasicFlow/phasicFlow/tree/main/tutorials/sphereGranFlow) folder.
*/
#include "vocabs.hpp"
#include "phasicFlowKokkos.hpp"
#include "systemControl.hpp"
#include "commandLine.hpp"
#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;
#include "interaction.hpp"
//#include "Insertions.hpp"
//#include "readControlDict.hpp"
using namespace pFlow;
/**
* DEM solver for simulating granular flow of cohesion-less particles.
*
@ -73,52 +65,58 @@ bool isCoupling = false;
if(!cmds.parse(argc, argv)) return 0;
// this should be palced in each main
processors::initProcessors(argc, argv);
initialize_pFlowProcessors();
#include "initialize_Control.hpp"
#include "setProperty.hpp"
#include "setSurfaceGeometry.hpp"
#include "createDEMComponents.hpp"
REPORT(0)<<"\nStart of time loop . . .\n"<<endREPORT;
REPORT(0)<<"\nStart of time loop . . .\n"<<END_REPORT;
do
{
if(! sphInsertion.insertParticles(
/*if(! sphInsertion.insertParticles(
Control.time().currentTime(),
Control.time().dt() ) )
{
fatalError<<
"particle insertion failed in sphereDFlow solver.\n";
return 1;
}
}*/
// set force to zero
surfGeometry.beforeIteration();
sphInteraction.beforeIteration();
// set force to zero, predict, particle deletion and etc.
sphParticles.beforeIteration();
sphInteraction.beforeIteration();
sphInteraction.iterate();
sphInteraction.iterate();
surfGeometry.iterate();
sphParticles.iterate();
surfGeometry.iterate();
sphInteraction.afterIteration();
surfGeometry.afterIteration();
sphParticles.afterIteration();
surfGeometry.afterIteration();
}while(Control++);
REPORT(0)<<"\nEnd of time loop.\n"<<endREPORT;
REPORT(0)<<"\nEnd of time loop.\n"<<END_REPORT;
// this should be palced in each main
#include "finalize.hpp"
processors::finalizeProcessors();
}