43 #ifdef DEBUG_CONSTRUCTOR
44 std::cout<<
"HertzianViscoelasticNormalSpecies::HertzianViscoelasticNormalSpecies() finished"<<std::endl;
56 #ifdef DEBUG_CONSTRUCTOR
57 std::cout<<
"HertzianViscoelasticNormalSpecies::HertzianViscoelasticNormalSpecies(const HertzianViscoelasticNormalSpecies &p) finished"<<std::endl;
63 #ifdef DEBUG_DESTRUCTOR
64 std::cout<<
"HertzianViscoelasticNormalSpecies::~HertzianViscoelasticNormalSpecies() finished"<<std::endl;
92 return "HertzianViscoelastic";
98 if (elasticModulus >= 0)
102 logger(
ERROR,
"setEffectiveElasticModulus(%) argument has to be non-negative!", elasticModulus);
112 if (elasticModulus < 0.0)
114 "[HertzianViscoelasticNormalSpecies::setEffectiveElasticModulusAndRestitutionCoefficient] elasticModulus % should be nonnegative",
117 else if (rest < 0.0 || rest > 1.0)
119 "[HertzianViscoelasticNormalSpecies::setEffectiveElasticModulusAndRestitutionCoefficient] rest % should be between 0 and 1 (inclusive)",
141 if (elasticModulus < 0.0)
143 "[HertzianViscoelasticNormalSpecies::setEffectiveElasticModulusAndRestitutionCoefficient] elasticModulus % should be nonnegative",
146 else if (poissonRatio < 0.0 || poissonRatio > 1.0)
148 "[HertzianViscoelasticNormalSpecies::setEffectiveElasticModulusAndRestitutionCoefficient] poissonRatio % should be between 0 and 1 (inclusive)",
154 logger.assert_debug(mindlin,
"Please define HertzianViscoelasticMindlinSpecies to use this setter");
155 mindlin->setEffectiveShearModulus(elasticModulus / 2 * (1 + poissonRatio));
162 if (elasticModulus < 0.0)
164 "[HertzianViscoelasticNormalSpecies::setEffectiveElasticModulusAndEffectiveShearModulus] elasticModulus % should be nonnegative",
167 else if (shearModulus < 0.0)
169 "[HertzianViscoelasticNormalSpecies::setEffectiveElasticModulusAndEffectiveShearModulus] shearModulus % should be nonnegative",
175 logger.assert_debug(mindlin,
"Please define HertzianViscoelasticMindlinSpecies to use this setter");
176 mindlin->setEffectiveShearModulus(shearModulus);
189 if (dissipation >= 0)
195 logger(
ERROR,
"setDissipation(%) argument has to be non-negative!", dissipation);
285 Mdouble relativeVelocity)
const
BaseSpecies * getBaseSpecies() const
void setEffectiveElasticModulusAndPoissonRatio(Mdouble elasticModulus, Mdouble poissonRatio)
Allows the elastic modulus and the poisson ratio to be changed in order to compute the shear modulus...
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here...
void setEffectiveElasticModulusAndEffectiveShearModulus(Mdouble elasticModulus, Mdouble shearModulus)
Allows the elastic modulus and the shear modulus to be changed in order to compute the poisson ratio...
Mdouble elasticModulus_
The effective elastic modulus.
Mdouble getCollisionTime(Mdouble particleDiameter, Mdouble particleDensity, Mdouble relativeVelocity) const
Used in Species::getName to obtain a unique name for each Species.
void read(std::istream &is)
Reads the species properties from an input stream.
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Mdouble log(Mdouble Power)
MindlinSpecies contains the parameters used to describe sliding friction.
BaseFrictionForce * getFrictionForce() const
HertzianViscoelasticNormalSpecies()
The default constructor.
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
void setEffectiveElasticModulus(Mdouble elasticModulus)
Allows the spring constant to be changed.
void mix(HertzianViscoelasticNormalSpecies *SBase, HertzianViscoelasticNormalSpecies *TBase)
Calculates collision time for two copies of a particle of given disp, k, mass.
void setEffectiveElasticModulusAndRestitutionCoefficient(Mdouble elasticModulus, Mdouble rest)
Allows the spring constant to be changed.
Mdouble getEffectiveElasticModulus() const
Allows the spring constant to be accessed.
Mdouble dissipation_
normal dissipation constant
std::string getBaseName() const
Used in Species::getName to obtain a unique name for each Species.
Defines the basic properties that a interactable object can have.
T square(const T val)
squares a number
void write(std::ostream &os) const
Writes the species properties to an output stream.
HertzianViscoelasticNormalSpecies contains the parameters used to describe a Hertzian normal force (T...
~HertzianViscoelasticNormalSpecies()
The default destructor.