solver sphereGranFlow without particles insertion
This commit is contained in:
parent
3ada371198
commit
4c36418ec8
|
@ -4,4 +4,4 @@ add_subdirectory(iterateSphereParticles)
|
||||||
|
|
||||||
add_subdirectory(iterateGeometry)
|
add_subdirectory(iterateGeometry)
|
||||||
|
|
||||||
#add_subdirectory(sphereGranFlow)
|
add_subdirectory(sphereGranFlow)
|
||||||
|
|
|
@ -19,11 +19,11 @@ Licence:
|
||||||
-----------------------------------------------------------------------------*/
|
-----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
//
|
//
|
||||||
REPORT(0)<<"\nReading sphere particles . . ."<<endREPORT;
|
REPORT(0)<<"\nReading sphere particles . . ."<<END_REPORT;
|
||||||
sphereParticles sphParticles(Control, proprties);
|
sphereParticles sphParticles(Control, proprties);
|
||||||
|
|
||||||
//
|
//
|
||||||
REPORT(0)<<"\nCreating particle insertion object . . ."<<endREPORT;
|
REPORT(0)<<"\nCreating particle insertion object . . ."<<END_REPORT;
|
||||||
/*auto& sphInsertion =
|
/*auto& sphInsertion =
|
||||||
Control.caseSetup().emplaceObject<sphereInsertion>(
|
Control.caseSetup().emplaceObject<sphereInsertion>(
|
||||||
objectFile(
|
objectFile(
|
||||||
|
@ -36,12 +36,12 @@ REPORT(0)<<"\nCreating particle insertion object . . ."<<endREPORT;
|
||||||
sphParticles.shapes()
|
sphParticles.shapes()
|
||||||
);*/
|
);*/
|
||||||
|
|
||||||
auto sphInsertion = sphereInsertion(
|
/*auto sphInsertion = sphereInsertion(
|
||||||
Control.caseSetup().path()+insertionFile__,
|
Control.caseSetup().path()+insertionFile__,
|
||||||
sphParticles,
|
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(
|
auto interactionPtr = interaction::create(
|
||||||
Control,
|
Control,
|
||||||
sphParticles,
|
sphParticles,
|
||||||
|
|
|
@ -30,30 +30,22 @@ Licence:
|
||||||
* (https://github.com/PhasicFlow/phasicFlow/tree/main/tutorials/sphereGranFlow) folder.
|
* (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 "property.hpp"
|
||||||
#include "geometry.hpp"
|
#include "geometry.hpp"
|
||||||
#include "sphereParticles.hpp"
|
#include "sphereParticles.hpp"
|
||||||
#include "Insertions.hpp"
|
#include "interaction.hpp"
|
||||||
#include "systemControl.hpp"
|
//#include "Insertions.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 "readControlDict.hpp"
|
||||||
|
|
||||||
|
using namespace pFlow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DEM solver for simulating granular flow of cohesion-less particles.
|
* DEM solver for simulating granular flow of cohesion-less particles.
|
||||||
*
|
*
|
||||||
|
@ -73,52 +65,58 @@ bool isCoupling = false;
|
||||||
if(!cmds.parse(argc, argv)) return 0;
|
if(!cmds.parse(argc, argv)) return 0;
|
||||||
|
|
||||||
// this should be palced in each main
|
// this should be palced in each main
|
||||||
|
processors::initProcessors(argc, argv);
|
||||||
|
initialize_pFlowProcessors();
|
||||||
#include "initialize_Control.hpp"
|
#include "initialize_Control.hpp"
|
||||||
|
|
||||||
#include "setProperty.hpp"
|
#include "setProperty.hpp"
|
||||||
#include "setSurfaceGeometry.hpp"
|
#include "setSurfaceGeometry.hpp"
|
||||||
|
|
||||||
|
|
||||||
#include "createDEMComponents.hpp"
|
#include "createDEMComponents.hpp"
|
||||||
|
|
||||||
REPORT(0)<<"\nStart of time loop . . .\n"<<endREPORT;
|
REPORT(0)<<"\nStart of time loop . . .\n"<<END_REPORT;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
||||||
if(! sphInsertion.insertParticles(
|
/*if(! sphInsertion.insertParticles(
|
||||||
Control.time().currentTime(),
|
Control.time().currentTime(),
|
||||||
Control.time().dt() ) )
|
Control.time().dt() ) )
|
||||||
{
|
{
|
||||||
fatalError<<
|
fatalError<<
|
||||||
"particle insertion failed in sphereDFlow solver.\n";
|
"particle insertion failed in sphereDFlow solver.\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
// set force to zero
|
||||||
surfGeometry.beforeIteration();
|
surfGeometry.beforeIteration();
|
||||||
|
|
||||||
sphInteraction.beforeIteration();
|
|
||||||
|
|
||||||
|
// set force to zero, predict, particle deletion and etc.
|
||||||
sphParticles.beforeIteration();
|
sphParticles.beforeIteration();
|
||||||
|
|
||||||
|
sphInteraction.beforeIteration();
|
||||||
|
|
||||||
|
sphInteraction.iterate();
|
||||||
|
|
||||||
sphInteraction.iterate();
|
surfGeometry.iterate();
|
||||||
|
|
||||||
sphParticles.iterate();
|
sphParticles.iterate();
|
||||||
|
|
||||||
surfGeometry.iterate();
|
sphInteraction.afterIteration();
|
||||||
|
|
||||||
|
surfGeometry.afterIteration();
|
||||||
|
|
||||||
sphParticles.afterIteration();
|
sphParticles.afterIteration();
|
||||||
|
|
||||||
surfGeometry.afterIteration();
|
|
||||||
|
|
||||||
|
|
||||||
}while(Control++);
|
}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
|
// this should be palced in each main
|
||||||
#include "finalize.hpp"
|
#include "finalize.hpp"
|
||||||
|
processors::finalizeProcessors();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue