www.cemf.ir
geometry.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 __geometry_hpp__
22 #define __geometry_hpp__
23 
24 
25 #include "virtualConstructor.hpp"
26 #include "demComponent.hpp"
27 #include "property.hpp"
28 #include "multiTriSurface.hpp"
29 #include "triSurfaceFields.hpp"
30 //#include "Fields.hpp"
31 //#include "Vectors.hpp"
32 
33 
34 
35 namespace pFlow
36 {
37 
38 
44 class geometry
45 :
46  public multiTriSurface,
47  public demComponent
48 {
49 private:
50 
51  // - Protected members
52 
54  const property& wallProperty_;
55 
58  "motionComponentName",
59  "motionComponentName"};
60 
63  "materialName",
64  "materialName"};
65 
68 
71 
74 
77 
78 
79  bool readWholeObject_ = true;
80 
81  // - Protected member functions
82 
85  bool createPropertyId();
86 
88  void zeroForce();
89 
90 public:
91 
93  TypeInfo("geometry");
94 
95  // - Constructors
96 
98  geometry(systemControl& control, const property& prop);
99 
101  const property& prop,
102  multiTriSurface& surf,
103  const wordVector& motionCompName,
104  const wordVector& materialName,
105  const dictionary& motionDict);
106 
108  /*geometry(systemControl& control,
109  const property& prop,
110  const multiTriSurface& triSurface,
111  const wordVector& motionCompName,
112  const wordVector& propName
113  );
114 
117  geometry(systemControl& control,
118  const property& prop,
119  const dictionary& dict,
120  const multiTriSurface& triSurface,
121  const wordVector& motionCompName,
122  const wordVector& propName);*/
123 
125  ~geometry()override = default;
126 
129  (
130  geometry,
132  (
134  const property& prop
135  ),
136  (control, prop)
137  );
138 
141  (
142  geometry,
143  dictionary,
144  (
146  const property& prop,
147  multiTriSurface& surf,
148  const wordVector& motionCompName,
149  const wordVector& materialName,
150  const dictionary& motionDic),
151  (control, prop, surf, motionCompName, materialName, motionDic)
152  );
153 
154  //- Methods
155  inline
156  const auto& motionComponentName()const
157  {
158  return motionComponentName_;
159  }
160 
162  inline
164  {
165  return contactForceWall_;
166  }
167 
169  inline
170  const auto& contactForceWall() const
171  {
172  return contactForceWall_;
173  }
174 
176  inline
177  const auto& propertyId()const
178  {
179  return propertyId_;
180  }
181 
183  inline const auto& wallProperty()const
184  {
185  return wallProperty_;
186  }
187 
189  virtual
190  word motionModelTypeName()const = 0;
191 
193  virtual
194  const uint32Field_D& triMotionIndex() const =0;
195 
197  virtual
198  const uint32Field_D& pointMotionIndex()const = 0;
199 
200 
201  bool beforeIteration() override;
202 
205  bool iterate() override;
206 
208  bool afterIteration() override;
209 
210  //- IO
211 
212  bool read(iIstream& is, const IOPattern& iop) override;
213 
215  bool write( iOstream& os, const IOPattern& iop )const override;
216 
217 
218 
219  //- Static members
220 
221  static
224  const property& prop);
225 
226  static
229  const property& prop,
230  multiTriSurface& surf,
231  const wordVector& motionCompName,
232  const wordVector& materialName,
233  const dictionary& motionDic);
234 
235 };
236 
237 }
238 
239 #endif
pFlow::geometry::materialName_
wordField_H materialName_
Material name of each wall surface
Definition: geometry.hpp:62
pFlow::geometry::motionComponentName
const auto & motionComponentName() const
Definition: geometry.hpp:156
pFlow::geometry::contactForceWall_
realx3TriSurfaceField_D contactForceWall_
Contact force on each triangle in the set of wall surfaces.
Definition: geometry.hpp:70
triSurfaceFields.hpp
pFlow::demComponent::control
const auto & control() const
Const ref to systemControl.
Definition: demComponent.hpp:88
pFlow::geometry::pointMotionIndex
virtual const uint32Field_D & pointMotionIndex() const =0
Motion model index of points.
pFlow::geometry::create
static uniquePtr< geometry > create(systemControl &control, const property &prop)
Definition: geometry.cpp:336
pFlow::geometry::motionModelTypeName
virtual word motionModelTypeName() const =0
The name of motion model.
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::systemControl
Definition: systemControl.hpp:41
pFlow::geometry::createPropertyId
bool createPropertyId()
Find property id of each triangle based on the supplied material name and the surface wall that the t...
Definition: geometry.cpp:26
pFlow::geometry::wallProperty_
const property & wallProperty_
Const reference to physical property of materials.
Definition: geometry.hpp:54
pFlow::Field< word, HostSpace >
pFlow::geometry::triMotionIndex
virtual const uint32Field_D & triMotionIndex() const =0
Motion model index of triangles.
pFlow::geometry::normalStressWall_
realx3TriSurfaceField_D normalStressWall_
Stress on each triangle in the set of wall surfaces.
Definition: geometry.hpp:73
pFlow::geometry::~geometry
~geometry() override=default
Construct from components.
pFlow
Definition: demGeometry.hpp:27
pFlow::geometry::contactForceWall
const auto & contactForceWall() const
Access to contact force.
Definition: geometry.hpp:170
pFlow::multiTriSurface
Definition: multiTriSurface.hpp:32
pFlow::geometry::readWholeObject_
bool readWholeObject_
Definition: geometry.hpp:79
pFlow::geometry::afterIteration
bool afterIteration() override
This is called in time loop, after iterate.
Definition: geometry.cpp:275
pFlow::geometry::create_vCtor
create_vCtor(geometry, systemControl,(systemControl &control, const property &prop),(control, prop))
Virtual constructor.
pFlow::triSurfaceField< uint32 >
pFlow::geometry::propertyId
const auto & propertyId() const
Property ide of triangles.
Definition: geometry.hpp:177
pFlow::iIstream
Interface class for any input stream
Definition: iIstream.hpp:37
multiTriSurface.hpp
pFlow::geometry::wallProperty
const auto & wallProperty() const
Access to property.
Definition: geometry.hpp:183
pFlow::demComponent
A base class for every main component of DEM system.
Definition: demComponent.hpp:42
pFlow::geometry::propertyId_
uint32TriSurfaceField_D propertyId_
Property id of each triangle in the set of wall surfaces.
Definition: geometry.hpp:67
pFlow::IOPattern
Definition: IOPattern.hpp:32
pFlow::geometry::contactForceWall
auto & contactForceWall()
Access to contact force.
Definition: geometry.hpp:163
pFlow::geometry::beforeIteration
bool beforeIteration() override
This is called in time loop, before iterate.
Definition: geometry.cpp:264
virtualConstructor.hpp
pFlow::geometry::read
bool read(iIstream &is, const IOPattern &iop) override
Definition: geometry.cpp:301
pFlow::geometry::iterate
bool iterate() override
This is called in time loop.
Definition: geometry.cpp:270
pFlow::geometry::zeroForce
void zeroForce()
Initialize contact force to zero.
Definition: geometry.cpp:64
pFlow::property
property holds the pure properties of materials.
Definition: property.hpp:37
demComponent.hpp
pFlow::geometry::TypeInfo
TypeInfo("geometry")
Type info.
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::geometry::shearStressWall_
realx3TriSurfaceField_D shearStressWall_
Stress on each triangle in the set of wall surfaces.
Definition: geometry.hpp:76
property.hpp
pFlow::Vector< word >
pFlow::iOstream
Interface class for any output stream.
Definition: iOstream.hpp:59
pFlow::geometry::write
bool write(iOstream &os, const IOPattern &iop) const override
write
Definition: geometry.cpp:315
pFlow::dictionary
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
Definition: dictionary.hpp:67
pFlow::geometry::geometry
geometry(systemControl &control, const property &prop)
Construct from controlSystem and property, for reading from file.
Definition: geometry.cpp:70
pFlow::geometry::motionComponentName_
wordField_H motionComponentName_
The name of motion component of each wall surface.
Definition: geometry.hpp:57