HeaterBoundary.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 HEATERBOUNDARY_H
6 #define HEATERBOUNDARY_H
7 
8 #include "DPMBase.h"
9 #include "BaseBoundary.h"
10 #include "Math/Vector.h"
11 #include "Math/RNG.h"
12 
13 class DPMBase;
14 
15 class ParticleHandler;
16 
17 class BaseParticle;
18 
19 class RNG;
20 
29 {
30 public:
32 
33  HeaterBoundary(const HeaterBoundary& other);
34 
35  ~HeaterBoundary() override;
36 
37  HeaterBoundary* copy() const override;
38 
39  void set(Vec3D posMin, Vec3D posMax, Vec3D specificHeatStrength);
40 
41  void set2D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength);
42 
43  void set3D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength);
44 
45  void setStrength(Vec3D specificHeatStrength);
46 
47  void setStrength2D(Mdouble specificHeatStrength);
48 
49  void setStrength3D(Mdouble specificHeatStrength);
50 
54  inline Mdouble getVolume() const;
55 
60  Mdouble getDistance(const Vec3D& position) const;
61 
66 
72 
76  void read(std::istream& is) override;
77 
81  void write(std::ostream& os) const override;
82 
83  std::string getName() const override;
84 
85 private:
87 
93 
94 };
95 
96 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseBoundary.h:28
Definition: BaseParticle.h:33
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:56
Supplies a 'constant heat flux' to a cuboidal region (specified by two corner points) by adding a ran...
Definition: HeaterBoundary.h:29
void set2D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength)
Definition: HeaterBoundary.cc:41
HeaterBoundary * copy() const override
Used to create a copy of the object NB: purely virtual function.
Definition: HeaterBoundary.cc:28
void set(Vec3D posMin, Vec3D posMax, Vec3D specificHeatStrength)
Definition: HeaterBoundary.cc:33
HeaterBoundary()
Definition: HeaterBoundary.cc:9
Mdouble getVolume() const
Returns the volume of the HeaterBoundary cuboid.
Definition: HeaterBoundary.cc:74
Mdouble getDistance(const Vec3D &position) const
Returns a negative value if and only if the position is inside the boundary (and therefore the partic...
Definition: HeaterBoundary.cc:82
~HeaterBoundary() override
Definition: HeaterBoundary.cc:23
Vec3D specificHeatStrength_
The specific heat strengths have units of energy (mass)^{-1} (time)^{-1) = m^2 s^{-3} For isotropic h...
Definition: HeaterBoundary.h:92
Vec3D posMin_
Definition: HeaterBoundary.h:86
void setStrength(Vec3D specificHeatStrength)
Definition: HeaterBoundary.cc:55
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH)
Checks if a given particle is inside the HeaterBoundary. If so, heats it.
Definition: HeaterBoundary.cc:110
void setStrength3D(Mdouble specificHeatStrength)
Definition: HeaterBoundary.cc:67
void read(std::istream &is) override
Reads some boundary properties from an std::istream.
Definition: HeaterBoundary.cc:135
Vec3D posMax_
Definition: HeaterBoundary.h:86
void setStrength2D(Mdouble specificHeatStrength)
Definition: HeaterBoundary.cc:60
void set3D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength)
Definition: HeaterBoundary.cc:48
std::string getName() const override
Definition: HeaterBoundary.cc:160
void checkBoundaryAfterParticlesMove(ParticleHandler &pH) override
Runs at the end of each time step.
Definition: HeaterBoundary.cc:100
void write(std::ostream &os) const override
Writes the boundary properties to an std::ostream.
Definition: HeaterBoundary.cc:148
Container to store pointers to all particles.
Definition: ParticleHandler.h:28
This is a class that generates random numbers i.e. named the Random Number Generator (RNG).
Definition: RNG.h:32
Definition: Kernel/Math/Vector.h:30
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286