www.cemf.ir
InsertionRegion.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 __InsertionRegion_hpp__
22 #define __InsertionRegion_hpp__
23 
24 #include "insertionRegion.hpp"
25 #include "dictionary.hpp"
26 #include "pointStructure.hpp"
27 #include "insertion.hpp"
28 #include "collisionCheck.hpp"
29 #include "pStructSelector.hpp"
30 #include "fieldSelector.hpp"
31 
32 
33 
34 namespace pFlow
35 {
36 
41 template<typename ShapeType>
43  : public insertionRegion
44 {
45 private:
46 
48  const ShapeType& shapes_;
49 
50  static bool checkForContact(
51  const realx3Vector& pos,
52  const realVector& diams,
53  const realx3& p,
54  const real& d
55  );
56 
57 public:
58 
60  TypeInfoTemplateNV11("insertionRegion", ShapeType);
61 
62  // - Constructors
63 
66  const word& name,
67  const insertion& instn,
68  const ShapeType& shapes
69  );
70 
71  ~InsertionRegion() = default;
72 
73  // - Methods
74 
79  bool insertParticles(
80  uint32 iter,
81  real t,
82  real dt,
83  wordVector& names,
84  realx3Vector& pos,
85  bool& insertionOccured
86  );
87 
88  // bool read(const dictionary& dict);
89 
90  // bool write(dictionary& dict)const;
91 };
92 
93 } // pFlow
94 
95 #include "InsertionRegion.cpp"
96 
97 #endif
pFlow::InsertionRegion::shapes_
const ShapeType & shapes_
Ref to Shapes.
Definition: InsertionRegion.hpp:48
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::InsertionRegion::TypeInfoTemplateNV11
TypeInfoTemplateNV11("insertionRegion", ShapeType)
Type info.
insertion.hpp
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::InsertionRegion::checkForContact
static bool checkForContact(const realx3Vector &pos, const realVector &diams, const realx3 &p, const real &d)
Definition: InsertionRegion.cpp:23
pFlow::InsertionRegion
This manages insertion of particles from a region based on the ShapeType.
Definition: InsertionRegion.hpp:42
pFlow::insertionRegion
This class defines all the necessary enteties for defining an insertion region.
Definition: insertionRegion.hpp:86
pFlow
Definition: demGeometry.hpp:27
pStructSelector.hpp
pFlow::insertionRegion::name
const auto & name() const
Const ref to name of the region.
Definition: insertionRegion.hpp:151
pFlow::InsertionRegion::~InsertionRegion
~InsertionRegion()=default
collisionCheck.hpp
pFlow::InsertionRegion::InsertionRegion
InsertionRegion(const word &name, const insertion &instn, const ShapeType &shapes)
Construct from dictionary.
Definition: InsertionRegion.cpp:41
dictionary.hpp
insertionRegion.hpp
InsertionRegion.cpp
fieldSelector.hpp
pFlow::InsertionRegion::insertParticles
bool insertParticles(uint32 iter, real t, real dt, wordVector &names, realx3Vector &pos, bool &insertionOccured)
Insert particles at current time t Check if currentTime is the right moment for particle insertion.
Definition: InsertionRegion.cpp:54
pFlow::triple< real >
pFlow::Vector< realx3 >
pointStructure.hpp
pFlow::insertion
Base class for particle insertion.
Definition: insertion.hpp:35