HorizontalScrew.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef HorizontalScrew_H
6 #define HorizontalScrew_H
7 
8 #include "Walls/BaseWall.h"
9 #include "Math/Vector.h"
10 
17 class HorizontalScrew : public BaseWall
18 {
19 public:
20 
25 
29  HorizontalScrew(const HorizontalScrew& other);
30 
34  HorizontalScrew(Vec3D start, Mdouble l, Mdouble minR, Mdouble lowerR, Mdouble diffR, Mdouble n, Mdouble omega, Mdouble thickness, const ParticleSpecies* s);
35 
40 
44  HorizontalScrew* copy() const final;
45 
49  bool getDistanceAndNormal(const BaseParticle& P, Mdouble& distance, Vec3D& normal_return) const final;
50 
54  Mdouble getLength() const;
55 
59  Vec3D getStart() const;
60 
64  void move_time(Mdouble dt);
65 
69  void read(std::istream& is) override;
70 
74  void write(std::ostream& os) const override;
75 
79  std::string getName() const final;
80 
81  void writeVTK (VTKContainer& vtk) const override;
82 
83  void setBlades(const Mdouble bladeWidth, const Mdouble bladeLength,const std::vector<Mdouble> bladeMounts);
84 
85 private:
97  Mdouble minR_; // min max radius
98  Mdouble lowerR_; // max Radius at the base
99  Mdouble diffR_; // max radius at the top
127  std::vector<Mdouble> bladeMounts_;
128 };
129 
130 #endif
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Definition: BaseParticle.h:33
Basic class for walls.
Definition: BaseWall.h:28
This function defines an Archimedes' screw in the z-direction from a (constant) starting point,...
Definition: HorizontalScrew.h:18
HorizontalScrew()
Default constructor: make a screw with default parameters.
Definition: HorizontalScrew.cc:16
std::string getName() const final
Returns the name of the object, here the string "HorizontalScrew".
Definition: HorizontalScrew.cc:310
Mdouble bladeLength_
The length of a blade (in the q-coordinate, which is a linear mapping from start.Z<z<start....
Definition: HorizontalScrew.h:123
Vec3D getStart() const
Returns the starting position of the HorizontalScrew.
Definition: HorizontalScrew.cc:245
void read(std::istream &is) override
Reads a HorizontalScrew from an input stream, for example a restart file.
Definition: HorizontalScrew.cc:261
Mdouble diffR_
Definition: HorizontalScrew.h:99
Mdouble thickness_
The thickness of the HorizontalScrew.
Definition: HorizontalScrew.h:115
Vec3D start_
The centre of the lower end of the screw.
Definition: HorizontalScrew.h:89
Mdouble omega_
Rotation speed in rev/s.
Definition: HorizontalScrew.h:107
void write(std::ostream &os) const override
Writes this HorizontalScrew to an output stream, for example a restart file.
Definition: HorizontalScrew.cc:288
Mdouble offset_
The angle that describes how much the HorizontalScrew has turned, going from 0 to 1 for a rotation.
Definition: HorizontalScrew.h:111
~HorizontalScrew()
Default destructor.
Definition: HorizontalScrew.cc:82
HorizontalScrew * copy() const final
Copy this screw and return a pointer to the copy.
Definition: HorizontalScrew.cc:90
Mdouble n_
The number of revelations.
Definition: HorizontalScrew.h:103
Mdouble minR_
The outer radius of the HorizontalScrew.
Definition: HorizontalScrew.h:97
Mdouble l_
The length of the HorizontalScrew.
Definition: HorizontalScrew.h:93
Mdouble lowerR_
Definition: HorizontalScrew.h:98
void writeVTK(VTKContainer &vtk) const override
Definition: HorizontalScrew.cc:322
Mdouble bladeWidth_
The maximum radial width of a blade (in r).
Definition: HorizontalScrew.h:119
std::vector< Mdouble > bladeMounts_
The starting point of a blade (in the q-coordinate, which is a linear mapping from start....
Definition: HorizontalScrew.h:127
Mdouble getLength() const
Returns the length of the HorizontalScrew.
Definition: HorizontalScrew.cc:240
void move_time(Mdouble dt)
Rotate the HorizontalScrew for a period dt, so that the offset_ changes with omega_*dt.
Definition: HorizontalScrew.cc:253
void setBlades(const Mdouble bladeWidth, const Mdouble bladeLength, const std::vector< Mdouble > bladeMounts)
Definition: HorizontalScrew.cc:315
bool getDistanceAndNormal(const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const final
Compute the distance from the HorizontalScrew for a given BaseParticle and return if there is a colli...
Definition: HorizontalScrew.cc:106
Definition: ParticleSpecies.h:16
Definition: Kernel/Math/Vector.h:30
RealScalar s
Definition: level1_cplx_impl.h:130
Vector::Scalar omega(const Vector &t, const Vector &s, RealScalar angle)
Definition: IDRS.h:36
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
void start(const unsigned &i)
(Re-)start i-th timer
Definition: oomph_utilities.cc:243
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
Definition: BaseWall.h:17