HeaterBoundary.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2023, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #ifndef HEATERBOUNDARY_H
27 #define HEATERBOUNDARY_H
28 
29 #include "DPMBase.h"
30 #include "BaseBoundary.h"
31 #include "Math/Vector.h"
32 #include "Math/RNG.h"
33 
34 class DPMBase;
35 
36 class ParticleHandler;
37 
38 class BaseParticle;
39 
40 class RNG;
41 
50 {
51 public:
53 
54  HeaterBoundary(const HeaterBoundary& other);
55 
56  ~HeaterBoundary() override;
57 
58  HeaterBoundary* copy() const override;
59 
60  void set(Vec3D posMin, Vec3D posMax, Vec3D specificHeatStrength);
61 
62  void set2D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength);
63 
64  void set3D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength);
65 
66  void setStrength(Vec3D specificHeatStrength);
67 
68  void setStrength2D(Mdouble specificHeatStrength);
69 
70  void setStrength3D(Mdouble specificHeatStrength);
71 
75  inline Mdouble getVolume() const;
76 
81  Mdouble getDistance(const Vec3D& position) const;
82 
87 
93 
97  void read(std::istream& is) override;
98 
102  void write(std::ostream& os) const override;
103 
104  std::string getName() const override;
105 
106 private:
108 
114 
115 };
116 
117 #endif
Definition: BaseBoundary.h:49
Definition: BaseParticle.h:54
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:77
Supplies a 'constant heat flux' to a cuboidal region (specified by two corner points) by adding a ran...
Definition: HeaterBoundary.h:50
void set2D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength)
Definition: HeaterBoundary.cc:62
HeaterBoundary * copy() const override
Used to create a copy of the object NB: purely virtual function.
Definition: HeaterBoundary.cc:49
void set(Vec3D posMin, Vec3D posMax, Vec3D specificHeatStrength)
Definition: HeaterBoundary.cc:54
HeaterBoundary()
Definition: HeaterBoundary.cc:30
Mdouble getVolume() const
Returns the volume of the HeaterBoundary cuboid.
Definition: HeaterBoundary.cc:95
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:103
~HeaterBoundary() override
Definition: HeaterBoundary.cc:44
Vec3D specificHeatStrength_
The specific heat strengths have units of energy (mass)^{-1} (time)^{-1) = m^2 s^{-3} For isotropic h...
Definition: HeaterBoundary.h:113
Vec3D posMin_
Definition: HeaterBoundary.h:107
void setStrength(Vec3D specificHeatStrength)
Definition: HeaterBoundary.cc:76
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH)
Checks if a given particle is inside the HeaterBoundary. If so, heats it.
Definition: HeaterBoundary.cc:131
void setStrength3D(Mdouble specificHeatStrength)
Definition: HeaterBoundary.cc:88
void read(std::istream &is) override
Reads some boundary properties from an std::istream.
Definition: HeaterBoundary.cc:156
Vec3D posMax_
Definition: HeaterBoundary.h:107
void setStrength2D(Mdouble specificHeatStrength)
Definition: HeaterBoundary.cc:81
void set3D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength)
Definition: HeaterBoundary.cc:69
std::string getName() const override
Definition: HeaterBoundary.cc:181
void checkBoundaryAfterParticlesMove(ParticleHandler &pH) override
Runs at the end of each time step.
Definition: HeaterBoundary.cc:121
void write(std::ostream &os) const override
Writes the boundary properties to an std::ostream.
Definition: HeaterBoundary.cc:169
Container to store all BaseParticle.
Definition: ParticleHandler.h:48
This is a class that generates random numbers i.e. named the Random Number Generator (RNG).
Definition: RNG.h:53
Definition: Vector.h:51