SPHNormalSpecies.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 SPHNormalSpecies_H
6 #define SPHNormalSpecies_H
7 
9 #include "Math/ExtendedMath.h"
11 #include "Math/Helpers.h"
12 
18 {
19 public:
22 
25 
28 
31 
33  void read(std::istream& is);
34 
36  void write(std::ostream& os) const;
37 
39  std::string getBaseName() const;
40 
41 // Species-specific functions
42 
45 
48 
50  void setRestitutionCoefficient(double eps, Mdouble mass);
51 
54 
57 
61  void setCollisionTimeAndRestitutionCoefficient(Mdouble collisionTime, Mdouble restitutionCoefficient, Mdouble mass1,
62  Mdouble mass2);
63 
67  Mdouble getCollisionTime(Mdouble mass) const;
68 
73 
75  void mix(SPHNormalSpecies* SBase, SPHNormalSpecies* TBase);
76 
77 //setters and getters
78 
80  void setStiffness(Mdouble new_k);
81 
83  Mdouble getStiffness() const;
84 
85  void setDissipation(Mdouble dissipation);
86 
88  Mdouble getDissipation() const;
89 
93 
94 private:
97 };
98 
99 #endif
#define MERCURYDPM_DEPRECATED
Definition: GeneralDefine.h:16
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseNormalForce.h:11
Definition: BaseParticle.h:33
Enables the use of SPH particles within MercuryDPM.
Definition: SPHInteraction.h:19
SPHNormalSpecies contains the parameters used to describe a SPH model.
Definition: SPHNormalSpecies.h:18
Mdouble getMaximumVelocity(Mdouble radius, Mdouble mass) const
Calculates the maximum velocity allowed for a collision of two copies of P (for higher velocities par...
Definition: SPHNormalSpecies.cc:155
~SPHNormalSpecies()
The default destructor.
Definition: SPHNormalSpecies.cc:37
Mdouble getStiffness() const
Allows the spring constant to be accessed.
Definition: SPHNormalSpecies.cc:84
std::string getBaseName() const
Used in Species::getName to obtain a unique name for each Species.
Definition: SPHNormalSpecies.cc:66
Mdouble dissipation_
(normal) viscosity
Definition: SPHNormalSpecies.h:96
SPHInteraction InteractionType
The correct Interaction type for this FrictionForceSpecies.
Definition: SPHNormalSpecies.h:21
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: SPHNormalSpecies.cc:97
void read(std::istream &is)
Reads the species properties from an input stream.
Definition: SPHNormalSpecies.cc:56
void setCollisionTimeAndRestitutionCoefficient(Mdouble tc, Mdouble eps, BaseParticle *p)
Sets k, disp such that it matches a given tc and eps for a collision of two copies of particle p.
Definition: SPHNormalSpecies.cc:190
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: SPHNormalSpecies.cc:72
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.
Definition: SPHNormalSpecies.cc:166
SPHNormalSpecies()
The default constructor.
Definition: SPHNormalSpecies.cc:14
Mdouble stiffness_
(normal) spring constant
Definition: SPHNormalSpecies.h:95
Mdouble getRestitutionCoefficient(Mdouble mass) const
Calculates restitution coefficient for two copies of given disp, k, mass.
Definition: SPHNormalSpecies.cc:149
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Definition: SPHNormalSpecies.cc:111
Mdouble getCollisionTime(Mdouble mass) const
Calculates collision time for two copies of a particle of given disp, k, mass.
Definition: SPHNormalSpecies.cc:118
void write(std::ostream &os) const
Writes the species properties to an output stream.
Definition: SPHNormalSpecies.cc:47
MERCURYDPM_DEPRECATED void setStiffnessAndDissipation(helpers::KAndDisp new_)
Allows the spring and dissipation constants to be changed simultaneously.
Definition: SPHNormalSpecies.cc:90
void mix(SPHNormalSpecies *SBase, SPHNormalSpecies *TBase)
creates default values for mixed species
Definition: SPHNormalSpecies.cc:241
void setRestitutionCoefficient(double eps, Mdouble mass)
Sets disp to obtain a restitution coefficient eps for a collision of two particles of mass m.
Definition: SPHNormalSpecies.cc:178
double eps
Definition: crbond_bessel.cc:24
radius
Definition: UniformPSDSelfTest.py:15
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
return type specifically for fuctions returning k and disp at once
Definition: FormulaHelpers.h:17