MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HeaterBoundary.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2020, 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
void set3D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength)
Vec3D specificHeatStrength_
The specific heat strengths have units of energy (mass)^{-1} (time)^{-1) = m^2 s^{-3} For isotropic h...
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
Definition: DPMBase.h:72
double Mdouble
Definition: GeneralDefine.h:34
void set2D(Vec3D posMin, Vec3D posMax, Mdouble specificHeatStrength)
void checkBoundaryAfterParticlesMove(ParticleHandler &pH) override
Runs at the end of each time step.
HeaterBoundary * copy() const override
Used to create a copy of the object NB: purely virtual function.
This is a class that generates random numbers i.e. named the Random Number Generator (RNG)...
Definition: RNG.h:52
void setStrength3D(Mdouble specificHeatStrength)
Mdouble getDistance(const Vec3D &position) const
Returns a negative value if and only if the position is inside the boundary (and therefore the partic...
void setStrength(Vec3D specificHeatStrength)
void set(Vec3D posMin, Vec3D posMax, Vec3D specificHeatStrength)
void setStrength2D(Mdouble specificHeatStrength)
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH)
Checks if a given particle is inside the HeaterBoundary. If so, heats it.
~HeaterBoundary() override
Container to store all BaseParticle.
std::string getName() const override
Mdouble getVolume() const
Returns the volume of the HeaterBoundary cuboid.
void read(std::istream &is) override
Reads some boundary properties from an std::istream.
void write(std::ostream &os) const override
Writes the boundary properties to an std::ostream.
Definition: Vector.h:49
Supplies a 'constant heat flux' to a cuboidal region (specified by two corner points) by adding a ran...