www.cemf.ir
sphereInteraction.hpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 
21 #ifndef __sphereInteraction_hpp__
22 #define __sphereInteraction_hpp__
23 
24 #include "interaction.hpp"
25 #include "sphereParticles.hpp"
28 #include "boundariesMask.hpp"
29 #include "MPITimer.hpp"
30 //#include "unsortedContactList.hpp"
31 
32 
33 
34 namespace pFlow
35 {
36 
37 template<
38  typename contactForceModel,
39  typename geometryMotionModel,
40  template <class, class, class> class contactListType>
42 :
43  public interaction
44 {
45 public:
46 
47  using GeometryMotionModel = geometryMotionModel;
48 
49  using ContactForceModel = contactForceModel;
50 
51  using MotionModel = typename geometryMotionModel::MotionModel;
52 
53  using ModelStorage = typename ContactForceModel::contactForceStorage;
54 
56 
57  using IdType = uint32;
58 
59  using IndexType = uint32;
60 
61  using ContactListType =
62  contactListType<ModelStorage, DefaultExecutionSpace, IdType>;
63 
64  //using BoundaryContactListType = unsortedContactList<ModelStorage, DefaultExecutionSpace, IdType>;
65 
66 
67 
68 private:
69 
72 
75 
78 
81 
84 
87 
90 
93 
94 
97 
100 
103 
106 
108 
109 
110 
112 
114 
115  bool sphereWallInteraction();
116 
118  using rpPPInteraction =
119  Kokkos::RangePolicy<Kokkos::IndexType<uint32>, Kokkos::Schedule<Kokkos::Dynamic>>;
120 
123 
124 public:
125 
127 
131  const particles& prtcl,
132  const geometry& geom);
133 
134 
136  add_vCtor
137  (
138  interaction,
141  );
142 
144  bool beforeIteration() override;
145 
148  bool iterate() override;
149 
151  bool afterIteration() override;
152 
154  bool hearChanges(
155  real t,
156  real dt,
157  uint32 iter,
158  const message& msg,
159  const anyList& varList)override;
160 
161 
162 };
163 
164 
165 }
166 
167 #include "sphereInteraction.cpp"
168 
169 #endif //__sphereInteraction_hpp__
pFlow::sphereInteraction::sphereWallInteraction
bool sphereWallInteraction()
Definition: sphereInteraction.cpp:85
pFlow::sphereInteraction::boundaryInteractionTimer_
Timer boundaryInteractionTimer_
timer for boundary interaction time
Definition: sphereInteraction.hpp:102
pFlow::sphereInteraction::beforeIteration
bool beforeIteration() override
This is called in time loop, before iterate. (overriden from demComponent)
Definition: sphereInteraction.cpp:156
pFlow::sphereInteraction::geometryMotion_
const GeometryMotionModel & geometryMotion_
const reference to geometry
Definition: sphereInteraction.hpp:71
pFlow::message
Definition: message.hpp:33
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::sphereInteraction::MotionModel
typename geometryMotionModel::MotionModel MotionModel
Definition: sphereInteraction.hpp:51
pFlow::sphereInteraction::afterIteration
bool afterIteration() override
This is called in time loop, after iterate. (overriden from demComponent)
Definition: sphereInteraction.cpp:337
pFlow::demComponent::control
const auto & control() const
Const ref to systemControl.
Definition: demComponent.hpp:88
pFlow::sphereInteraction::ContactListType
contactListType< ModelStorage, DefaultExecutionSpace, IdType > ContactListType
Definition: sphereInteraction.hpp:62
pFlow::sphereInteraction::IdType
uint32 IdType
Definition: sphereInteraction.hpp:57
pFlow::sphereInteraction::createSphereInteraction
bool createSphereInteraction()
Definition: sphereInteraction.cpp:22
pFlow::sphereInteraction::TypeInfoTemplate13
TypeInfoTemplate13("sphereInteraction", ContactForceModel, MotionModel, ContactListType)
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::sphereInteraction::GeometryMotionModel
geometryMotionModel GeometryMotionModel
Definition: sphereInteraction.hpp:47
pFlow::sphereInteraction::boundaryInteraction_
BoundaryListType boundaryInteraction_
particle-particle and particle-wall interactions at boundaries
Definition: sphereInteraction.hpp:77
pFlow::systemControl
Definition: systemControl.hpp:41
interaction.hpp
pFlow::sphereInteraction::rpPWInteraction
rpPPInteraction rpPWInteraction
range policy for p-w interaction execution
Definition: sphereInteraction.hpp:122
pFlow::sphereInteraction::sphereInteraction
sphereInteraction(systemControl &control, const particles &prtcl, const geometry &geom)
Constructor from components.
Definition: sphereInteraction.cpp:127
pFlow::sphereInteraction::ppInteractionTimer_
Timer ppInteractionTimer_
timer for particle-particle interaction computations
Definition: sphereInteraction.hpp:96
pFlow::sphereInteraction::activeBoundaries_
boundariesMask< 6 > activeBoundaries_
a mask for active boundaries (boundaries with intreaction)
Definition: sphereInteraction.hpp:80
pFlow::sphereInteraction::pwContactList_
uniquePtr< ContactListType > pwContactList_
contact list for particle-wall interactions (keeps the history)
Definition: sphereInteraction.hpp:92
pFlow
Definition: demGeometry.hpp:27
pFlow::sphereInteraction::ContactForceModel
contactForceModel ContactForceModel
Definition: sphereInteraction.hpp:49
pFlow::sphereParticles
Class for managing spherical particles.
Definition: sphereParticles.hpp:42
pFlow::sphereInteraction::ppContactList_
uniquePtr< ContactListType > ppContactList_
contact list for particle-particle interactoins (keeps the history)
Definition: sphereInteraction.hpp:89
pFlow::sphereInteraction::IndexType
uint32 IndexType
Definition: sphereInteraction.hpp:59
pFlow::sphereInteraction::contactSearch_
uniquePtr< contactSearch > contactSearch_
contact search object for pp and pw interactions
Definition: sphereInteraction.hpp:83
pFlow::anyList
Definition: anyList.hpp:35
pFlow::particles
Definition: particles.hpp:33
pFlow::sphereInteraction::add_vCtor
add_vCtor(interaction, sphereInteraction, systemControl)
Add virtual constructor.
pFlow::sphereInteraction::sphParticles_
const sphereParticles & sphParticles_
const reference to particles
Definition: sphereInteraction.hpp:74
sphereInteractionKernels.hpp
sphereInteraction.cpp
pFlow::Timer
Definition: Timer.hpp:33
pFlow::sphereInteraction
Definition: sphereInteraction.hpp:41
pFlow::sphereInteraction::ModelStorage
typename ContactForceModel::contactForceStorage ModelStorage
Definition: sphereInteraction.hpp:53
MPITimer.hpp
pFlow::boundariesMask< 6 >
boundarySphereInteractionList.hpp
pFlow::sphereInteraction::rpPPInteraction
Kokkos::RangePolicy< Kokkos::IndexType< uint32 >, Kokkos::Schedule< Kokkos::Dynamic > > rpPPInteraction
range policy for p-p interaction execution
Definition: sphereInteraction.hpp:119
pFlow::sphereInteraction::contactListMangementTimer_
Timer contactListMangementTimer_
timer for managing contact lists (only inernal points)
Definition: sphereInteraction.hpp:105
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
pFlow::geometry
Base class for geometry for managing tri-surfaces, geometry motion, and surface physical properties.
Definition: geometry.hpp:44
pFlow::sphereInteraction::pwInteractionTimer_
Timer pwInteractionTimer_
timer for particle-wall interaction computations
Definition: sphereInteraction.hpp:99
boundariesMask.hpp
pFlow::sphereInteraction::iterate
bool iterate() override
This is called in time loop.
Definition: sphereInteraction.cpp:162
sphereParticles.hpp
pFlow::sphereInteraction::hearChanges
bool hearChanges(real t, real dt, uint32 iter, const message &msg, const anyList &varList) override
Check for changes in the point structures. (overriden from observer)
Definition: sphereInteraction.cpp:344
pFlow::sphereInteraction::forceModel_
uniquePtr< ContactForceModel > forceModel_
contact force model
Definition: sphereInteraction.hpp:86
pFlow::demComponent::dt
real dt() const
Time step of integration.
Definition: demComponent.cpp:33
pFlow::boundarySphereInteractionList< ContactForceModel, GeometryMotionModel >
pFlow::sphereInteraction::contactListMangementBoundaryTimer_
Timer contactListMangementBoundaryTimer_
Definition: sphereInteraction.hpp:107
pFlow::interaction
Definition: interaction.hpp:38
pFlow::sphereInteraction::sphereSphereInteraction
bool sphereSphereInteraction()
Definition: sphereInteraction.cpp:53