MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SinterNormalSpecies.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2014, 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 SinterNormalSpecies_H
27 #define SinterNormalSpecies_H
28 #include "Species/BaseSpecies.h"
29 #include "Math/ExtendedMath.h"
31 
32 enum class SINTERTYPE : unsigned char {
34  CONSTANT_RATE = 1,
36 };
37 
42 class SinterNormalSpecies : public virtual BaseSpecies
43 {
44 public:
47 
50 
53 
55  virtual ~SinterNormalSpecies();
56 
58  void read(std::istream& is);
59 
61  void write(std::ostream& os) const;
62 
64  std::string getBaseName() const;
65 
66 // Species-specific functions
67 
69  void mix(SinterNormalSpecies* const S, SinterNormalSpecies* const T);
70 
75 
78 
83 
84 //setters and getters
85 
89  void setPlasticParameters(Mdouble loadingStiffness, Mdouble unloadingStiffnessMax, Mdouble cohesionStiffness, Mdouble penetrationDepthMax);
90 
95 
100 
105 
110 
114  void setLoadingStiffness(Mdouble loadingStiffness);
115 
119  void setUnloadingStiffnessMax(Mdouble unloadingStiffnessMax);
120 
124  void setCohesionStiffness(Mdouble cohesionStiffness);
125 
129  void setPenetrationDepthMax(Mdouble penetrationDepthMax);
130 
134  void setDissipation(Mdouble dissipation);
135 
139  Mdouble getDissipation() const;
140 
144  void setSinterAdhesion(Mdouble sinterAdhesion);
145 
149  Mdouble getSinterAdhesion() const;
150 
154  void setInverseSinterViscosity(Mdouble inverseSinterViscosity);
155 
160 
165 
170 
171  void setSinterForceAndTime (Mdouble adhesionForce, Mdouble sinterTime, Mdouble radius);
172 
177  (Mdouble alpha, Mdouble beta, Mdouble atomicVolume /*Omega*/, Mdouble surfaceEnergy /*gamma_s*/,
178  Mdouble thicknessDiffusion /*deltaB*D0B*/, Mdouble activationEnergy /*QB*/, Mdouble temperature /*T*/);
179 
183  void setSinterRate(Mdouble sinterRate);
184 
188  void setSinterType(SINTERTYPE sinterType);
189 
193  Mdouble getSinterRate() const;
194 
195  SINTERTYPE getSinterType() const;
196 
197  std::function<double(double temperature)> getTemperatureDependentSinterRate() const;
198 
199  double getTemperatureDependentSinterRate(double temperature) const;
200 
201  void setTemperatureDependentSinterRate(std::function<double(double temperature)> temperatureDependentSinterRate);
202 
203 
204 private:
207 
210 
213 
216 
219 
224 
229 
234 
241 
245  std::function<double(double temperature)> temperatureDependentSinterRate_ = [this] (double temperature) {return sinterRate_;};
246 };
247 #endif
void setParhamiMcKeeping(Mdouble alpha, Mdouble beta, Mdouble atomicVolume, Mdouble surfaceEnergy, Mdouble thicknessDiffusion, Mdouble activationEnergy, Mdouble temperature)
Sets the sinterAdhesion_ and inverseSinterViscosity_ based on the Parhami-McKeeping parameters...
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
BaseSpecies is the class from which all other species are derived.
Definition: BaseSpecies.h:44
SINTERTYPE sinterType_
sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_M...
SinterNormalSpecies()
The default constructor.
void setDissipation(Mdouble dissipation)
Sets the linear dissipation coefficient of the linear plastic-viscoelastic normal force...
return type specifically for fuctions returning k and disp at once
Definition: Helpers.h:42
void setCohesionStiffness(Mdouble cohesionStiffness)
Sets the cohesive stiffness of the linear plastic-viscoelastic normal force.
void setTemperatureDependentSinterRate(std::function< double(double temperature)> temperatureDependentSinterRate)
Mdouble loadingStiffness_
(normal) spring constant (k_1)
Mdouble cohesionStiffness_
the adhesive spring constant (k^c) for plastic deformations
void read(std::istream &is)
Reads the species properties from an input stream.
void setPenetrationDepthMax(Mdouble penetrationDepthMax)
Sets the maximum penetration depth of the linear plastic-viscoelastic normal force.
void setPlasticParameters(Mdouble loadingStiffness, Mdouble unloadingStiffnessMax, Mdouble cohesionStiffness, Mdouble penetrationDepthMax)
Sets all parameters of the linear plastic-viscoelastic normal force at once.
Mdouble getSinterAdhesion() const
Accesses sinterAdhesion_.
SinterInteraction InteractionType
The correct Interaction type for this FrictionForceSpecies.
Mdouble computeTimeStep(Mdouble mass)
Returns the optimal time step to resolve a collision of two particles of a given mass.
double Mdouble
void setStiffnessAndRestitutionCoefficient(Mdouble k_, Mdouble eps, Mdouble mass)
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P...
void setSinterAdhesion(Mdouble sinterAdhesion)
Sets sinterAdhesion_.
Mdouble penetrationDepthMax_
the depth (relative to the normalized radius) at which k_2^max is used (phi_f)
Mdouble getCollisionTime(Mdouble mass)
Calculates collision time for two copies of a particle of given disp, k, mass.
void setCollisionTimeAndRestitutionCoefficient(Mdouble tc, Mdouble eps, Mdouble mass)
Set k, disp such that is matches a given tc and eps for a collision of two different masses...
#define MERCURY_DEPRECATED
Definition: GeneralDefine.h:37
SINTERTYPE getSinterType() const
void setInverseSinterViscosity(Mdouble inverseSinterViscosity)
Sets inverseSinterViscosity_.
void write(std::ostream &os) const
Writes the species properties to an output stream.
void setSinterRate(Mdouble sinterRate)
Sets sinterRate_.
void setSinterForceAndTime(Mdouble adhesionForce, Mdouble sinterTime, Mdouble radius)
MERCURY_DEPRECATED void setLoadingStiffnessAndDissipation(helpers::KAndDisp new_)
Allows the spring and dissipation constants to be changed simultaneously.
Mdouble dissipation_
linear dissipation coefficient
std::function< double(double temperature)> temperatureDependentSinterRate_
Mdouble getLoadingStiffness() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
Mdouble getCohesionStiffness() const
Returns the cohesive stiffness of the linear plastic-viscoelastic normal force.
virtual ~SinterNormalSpecies()
The default destructor.
void setLoadingStiffness(Mdouble loadingStiffness)
Sets the loading stiffness of the linear plastic-viscoelastic normal force.
std::string getBaseName() const
Used in Species::getName to obtain a unique name for each Species.
Mdouble getPenetrationDepthMax() const
Returns the maximum penetration depth of the linear plastic-viscoelastic normal force.
SinterNormalSpecies contains the parameters used to describe a plastic-cohesive normal force (Stefan ...
std::function< double(double temperature)> getTemperatureDependentSinterRate() const
void setUnloadingStiffnessMax(Mdouble unloadingStiffnessMax)
Sets the maximum unloading stiffness of the linear plastic-viscoelastic normal force.
void mix(SinterNormalSpecies *const S, SinterNormalSpecies *const T)
creates default values for mixed species
Mdouble getUnloadingStiffnessMax() const
Returns the maximum unloading stiffness of the linear plastic-viscoelastic normal force...
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
void setSinterType(SINTERTYPE sinterType)
Sets sinterRate_.
Mdouble getInverseSinterViscosity() const
Accesses inverseSinterViscosity_.
Computes normal forces in case of a linear plastic visco-elastic interaction.
Mdouble getSinterRate() const
Accesses sinterRate_.