www.cemf.ir
boundarySphereInteraction.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 #ifndef __boundarySphereInteraction_hpp__
21 #define __boundarySphereInteraction_hpp__
22 
23 #include "virtualConstructor.hpp"
24 #include "generalBoundary.hpp"
25 #include "sortedContactList.hpp"
26 #include "sphereParticles.hpp"
27 
28 namespace pFlow
29 {
30 
31 template<typename contactForceModel,typename geometryMotionModel>
33 :
34  public generalBoundary
35 {
36 public:
37 
40 
41  using GeometryMotionModel = geometryMotionModel;
42 
43  using ContactForceModel = contactForceModel;
44 
45  using MotionModel = typename geometryMotionModel::MotionModel;
46 
47  using ModelStorage = typename ContactForceModel::contactForceStorage;
48 
49  using IdType = uint32;
50 
51  using IndexType = uint32;
52 
53  using ContactListType =
55 
56 private:
57 
59 
62 
64 
66 
67 protected:
68 
69  void allocatePPPairs();
70 
71  void allocatePWPairs();
72 
73 public:
74 
75  TypeInfoTemplate12("boundarySphereInteraction", ContactForceModel, MotionModel);
76 
78  const boundaryBase& boundary,
79  const sphereParticles& sphPrtcls,
80  const GeometryMotionModel& geomMotion);
81 
83  (
86  (
87  const boundaryBase& boundary,
88  const sphereParticles& sphPrtcls,
89  const GeometryMotionModel& geomMotion
90  ),
91  (boundary, sphPrtcls, geomMotion)
92  );
93 
94  add_vCtor
95  (
99  );
100 
101  ~boundarySphereInteraction()override=default;
102 
103  const auto& sphParticles()const
104  {
105  return sphParticles_;
106  }
107 
108  const auto& geometryMotion()const
109  {
110  return geometryMotion_;
111  }
112 
114  {
115  return ppPairs_();
116  }
117 
118  const ContactListType& ppPairs()const
119  {
120  return ppPairs_();
121  }
122 
124  {
125  return pwPairs_();
126  }
127 
128  const ContactListType& pwPairs()const
129  {
130  return pwPairs_();
131  }
132 
133  bool ppPairsAllocated()const
134  {
135  if( ppPairs_)return true;
136  return false;
137  }
138 
139  bool pwPairsAllocated()const
140  {
141  if( pwPairs_)return true;
142  return false;
143  }
144 
145  virtual
147  real dt,
148  const ContactForceModel& cfModel,
149  uint32 step)
150  {
151  // for default boundary, no thing to be done
152  return false;
153  }
154 
155 
156 
157  bool hearChanges
158  (
159  real t,
160  real dt,
161  uint32 iter,
162  const message& msg,
163  const anyList& varList
164  ) override
165  {
166 
167  pOutput<<"Function (hearChanges in boundarySphereInteractions)is not implmented Message "<<
168  msg <<endl<<" name "<< this->boundaryName() <<" type "<< this->type()<<endl;;
169  //notImplementedFunction;
170  return true;
171  }
172 
173  static
175  const boundaryBase& boundary,
176  const sphereParticles& sphPrtcls,
177  const GeometryMotionModel& geomMotion
178  );
179 
180 };
181 
182 }
183 
185 
186 #endif //__boundarySphereInteraction_hpp__
pFlow::pOutput
processorOstream pOutput
pFlow::boundarySphereInteraction::TypeInfoTemplate12
TypeInfoTemplate12("boundarySphereInteraction", ContactForceModel, MotionModel)
pFlow::boundarySphereInteraction::create
static uniquePtr< BoundarySphereInteractionType > create(const boundaryBase &boundary, const sphereParticles &sphPrtcls, const GeometryMotionModel &geomMotion)
Definition: boundarySphereInteraction.cpp:50
pFlow::message
Definition: message.hpp:33
pFlow::boundarySphereInteraction::pwPairs
const ContactListType & pwPairs() const
Definition: boundarySphereInteraction.hpp:128
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::boundarySphereInteraction::pwPairsAllocated
bool pwPairsAllocated() const
Definition: boundarySphereInteraction.hpp:139
pFlow::boundarySphereInteraction::ContactForceModel
contactForceModel ContactForceModel
Definition: boundarySphereInteraction.hpp:43
pFlow::boundarySphereInteraction::add_vCtor
add_vCtor(BoundarySphereInteractionType, BoundarySphereInteractionType, boundaryBase)
pFlow::boundarySphereInteraction::IdType
uint32 IdType
Definition: boundarySphereInteraction.hpp:49
pFlow::boundarySphereInteraction::allocatePWPairs
void allocatePWPairs()
Definition: boundarySphereInteraction.cpp:30
boundarySphereInteraction.cpp
pFlow::boundarySphereInteraction::IndexType
uint32 IndexType
Definition: boundarySphereInteraction.hpp:51
pFlow::boundarySphereInteraction
Definition: boundarySphereInteraction.hpp:32
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
sortedContactList.hpp
pFlow::boundarySphereInteraction::~boundarySphereInteraction
~boundarySphereInteraction() override=default
pFlow::boundarySphereInteraction::allocatePPPairs
void allocatePPPairs()
Definition: boundarySphereInteraction.cpp:23
pFlow::endl
iOstream & endl(iOstream &os)
Add newline and flush stream.
Definition: iOstream.hpp:341
pFlow
Definition: demGeometry.hpp:27
pFlow::sphereParticles
Class for managing spherical particles.
Definition: sphereParticles.hpp:42
pFlow::generalBoundary::type
const word & type() const
Definition: generalBoundary.hpp:132
pFlow::boundarySphereInteraction::boundarySphereInteraction
boundarySphereInteraction(const boundaryBase &boundary, const sphereParticles &sphPrtcls, const GeometryMotionModel &geomMotion)
Definition: boundarySphereInteraction.cpp:38
pFlow::anyList
Definition: anyList.hpp:35
pFlow::boundarySphereInteraction::sphParticles_
const sphereParticles & sphParticles_
const reference to sphere particles
Definition: boundarySphereInteraction.hpp:61
pFlow::boundarySphereInteraction::pwPairs_
uniquePtr< ContactListType > pwPairs_
Definition: boundarySphereInteraction.hpp:65
pFlow::boundarySphereInteraction::sphereSphereInteraction
virtual bool sphereSphereInteraction(real dt, const ContactForceModel &cfModel, uint32 step)
Definition: boundarySphereInteraction.hpp:146
pFlow::boundarySphereInteraction::GeometryMotionModel
geometryMotionModel GeometryMotionModel
Definition: boundarySphereInteraction.hpp:41
pFlow::boundarySphereInteraction::sphParticles
const auto & sphParticles() const
Definition: boundarySphereInteraction.hpp:103
pFlow::boundarySphereInteraction::ppPairs
ContactListType & ppPairs()
Definition: boundarySphereInteraction.hpp:113
virtualConstructor.hpp
pFlow::boundaryBase
Definition: boundaryBase.hpp:42
pFlow::boundarySphereInteraction::create_vCtor
create_vCtor(BoundarySphereInteractionType, boundaryBase,(const boundaryBase &boundary, const sphereParticles &sphPrtcls, const GeometryMotionModel &geomMotion),(boundary, sphPrtcls, geomMotion))
pFlow::boundarySphereInteraction::ppPairs
const ContactListType & ppPairs() const
Definition: boundarySphereInteraction.hpp:118
pFlow::boundarySphereInteraction::pwPairs
ContactListType & pwPairs()
Definition: boundarySphereInteraction.hpp:123
pFlow::sortedContactList
Definition: sortedContactList.hpp:30
pFlow::uniquePtr< ContactListType >
generalBoundary.hpp
pFlow::generalBoundary::boundary
const auto & boundary() const
Definition: generalBoundary.hpp:108
sphereParticles.hpp
pFlow::boundarySphereInteraction::geometryMotion
const auto & geometryMotion() const
Definition: boundarySphereInteraction.hpp:108
pFlow::boundarySphereInteraction::MotionModel
typename geometryMotionModel::MotionModel MotionModel
Definition: boundarySphereInteraction.hpp:45
pFlow::boundarySphereInteraction::hearChanges
bool hearChanges(real t, real dt, uint32 iter, const message &msg, const anyList &varList) override
Definition: boundarySphereInteraction.hpp:158
pFlow::boundarySphereInteraction::ppPairsAllocated
bool ppPairsAllocated() const
Definition: boundarySphereInteraction.hpp:133
pFlow::boundarySphereInteraction::ModelStorage
typename ContactForceModel::contactForceStorage ModelStorage
Definition: boundarySphereInteraction.hpp:47
pFlow::boundarySphereInteraction::geometryMotion_
const GeometryMotionModel & geometryMotion_
Definition: boundarySphereInteraction.hpp:58
pFlow::boundarySphereInteraction::ppPairs_
uniquePtr< ContactListType > ppPairs_
Definition: boundarySphereInteraction.hpp:63
pFlow::generalBoundary
Definition: generalBoundary.hpp:38
pFlow::generalBoundary::boundaryName
const word & boundaryName() const
Definition: generalBoundary.hpp:126