MercuryDPM
Beta
|
LinearViscoelasticNormalSpecies contains the parameters used to describe a linear elastic-dissipative normal force. More...
#include <LinearViscoelasticNormalSpecies.h>
Public Types | |
typedef LinearViscoelasticInteraction | InteractionType |
The correct Interaction type for this FrictionForceSpecies. More... | |
Public Member Functions | |
LinearViscoelasticNormalSpecies () | |
The default constructor. More... | |
LinearViscoelasticNormalSpecies (const LinearViscoelasticNormalSpecies &p) | |
The default copy constructor. More... | |
virtual | ~LinearViscoelasticNormalSpecies () |
The default destructor. More... | |
void | read (std::istream &is) |
Reads the species properties from an input stream. More... | |
void | write (std::ostream &os) const |
Writes the species properties to an output stream. More... | |
std::string | getBaseName () const |
Used in Species::getName to obtain a unique name for each Species. More... | |
Mdouble | getMaximumVelocity (Mdouble radius, Mdouble mass) |
Calculates the maximum velocity allowed for a collision of two copies of P (for higher velocities particles could pass through each other) More... | |
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. More... | |
void | setCollisionTimeAndRestitutionCoefficient (Mdouble tc, Mdouble eps, Mdouble mass) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of equal mass m. More... | |
void | setCollisionTimeAndRestitutionCoefficient (Mdouble collisionTime, Mdouble restitutionCoefficient, Mdouble mass1, Mdouble mass2) |
Set k, disp such that is matches a given tc and eps for a collision of two different masses. More... | |
Mdouble | getCollisionTime (Mdouble mass) |
Calculates collision time for two copies of a particle of given disp, k, mass. More... | |
Mdouble | getRestitutionCoefficient (Mdouble mass) |
Calculates restitution coefficient for two copies of given disp, k, mass. More... | |
void | mix (LinearViscoelasticNormalSpecies *const SBase, LinearViscoelasticNormalSpecies *const TBase) |
creates default values for mixed species More... | |
void | setStiffness (Mdouble new_k) |
Allows the spring constant to be changed. More... | |
Mdouble | getStiffness () const |
Allows the spring constant to be accessed. More... | |
void | setDissipation (Mdouble dissipation) |
Allows the normal dissipation to be changed. More... | |
Mdouble | getDissipation () const |
Allows the normal dissipation to be accessed. More... | |
MERCURY_DEPRECATED void | setStiffnessAndDissipation (helpers::KAndDisp new_) |
Allows the spring and dissipation constants to be changed simultaneously. More... | |
Public Member Functions inherited from BaseSpecies | |
BaseSpecies () | |
The default constructor. More... | |
BaseSpecies (const BaseSpecies &p) | |
The copy constructor. More... | |
virtual | ~BaseSpecies () |
The default destructor. More... | |
virtual BaseSpecies * | copy () const =0 |
Creates a deep copy of the object from which it is called. More... | |
void | setHandler (SpeciesHandler *handler) |
Sets the pointer to the handler to which this species belongs. More... | |
SpeciesHandler * | getHandler () const |
Returns the pointer to the handler to which this species belongs. More... | |
Mdouble | average (Mdouble a, Mdouble b) |
defines the average of two variables by the harmonic mean. More... | |
virtual void | mixAll (BaseSpecies *const S, BaseSpecies *const T)=0 |
creates default values for mixed species More... | |
virtual Mdouble | getInteractionDistance () const =0 |
returns the largest separation distance at which adhesive short-range forces can occur. More... | |
virtual bool | getUseAngularDOFs () const =0 |
Returns true if torques (i.e. angular degrees of freedom) have to be calculated. More... | |
virtual BaseInteraction * | getNewInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)=0 |
returns new Interaction object. More... | |
Public Member Functions inherited from BaseObject | |
BaseObject () | |
Default constructor. More... | |
BaseObject (const BaseObject &p) | |
Copy constructor, copies all the objects BaseObject contains. More... | |
virtual | ~BaseObject () |
virtual destructor More... | |
virtual std::string | getName () const =0 |
A purely virtual function. More... | |
virtual void | moveInHandler (const unsigned int index) |
Except that it is virtual, it does the same thing as setIndex() does. More... | |
void | setIndex (const unsigned int index) |
Allows one to assign an index to an object in the handler/container. More... | |
void | setId (const unsigned int id) |
Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More... | |
unsigned int | getIndex () const |
Returns the index of the object in the handler. More... | |
unsigned int | getId () const |
Returns the unique identifier of any particular object. More... | |
Private Attributes | |
Mdouble | stiffness_ |
(normal) spring constant More... | |
Mdouble | dissipation_ |
(normal) viscosity More... | |
LinearViscoelasticNormalSpecies contains the parameters used to describe a linear elastic-dissipative normal force.
See LinearViscoelasticNormalInteraction::computeForce for a description of the force law.
Definition at line 36 of file LinearViscoelasticNormalSpecies.h.
The correct Interaction type for this FrictionForceSpecies.
Definition at line 40 of file LinearViscoelasticNormalSpecies.h.
LinearViscoelasticNormalSpecies::LinearViscoelasticNormalSpecies | ( | ) |
The default constructor.
Definition at line 34 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_, and stiffness_.
LinearViscoelasticNormalSpecies::LinearViscoelasticNormalSpecies | ( | const LinearViscoelasticNormalSpecies & | p | ) |
The default copy constructor.
[in] | the | species that is copied |
Definition at line 46 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_, and stiffness_.
|
virtual |
The default destructor.
Definition at line 55 of file LinearViscoelasticNormalSpecies.cc.
std::string LinearViscoelasticNormalSpecies::getBaseName | ( | ) | const |
Used in Species::getName to obtain a unique name for each Species.
Definition at line 84 of file LinearViscoelasticNormalSpecies.cc.
Calculates collision time for two copies of a particle of given disp, k, mass.
Definition at line 135 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_, constants::pi, mathsFunc::square(), and stiffness_.
Referenced by getRestitutionCoefficient().
Mdouble LinearViscoelasticNormalSpecies::getDissipation | ( | ) | const |
Allows the normal dissipation to be accessed.
Definition at line 129 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_.
Referenced by LinearViscoelasticInteraction::computeNormalForce(), and mix().
Calculates the maximum velocity allowed for a collision of two copies of P (for higher velocities particles could pass through each other)
Definition at line 168 of file LinearViscoelasticNormalSpecies.cc.
References stiffness_.
Calculates restitution coefficient for two copies of given disp, k, mass.
Definition at line 162 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_, and getCollisionTime().
Mdouble LinearViscoelasticNormalSpecies::getStiffness | ( | ) | const |
Allows the spring constant to be accessed.
Definition at line 102 of file LinearViscoelasticNormalSpecies.cc.
References stiffness_.
Referenced by LinearViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::getElasticEnergy(), mix(), SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(), and SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficientNoDispt().
void LinearViscoelasticNormalSpecies::mix | ( | LinearViscoelasticNormalSpecies *const | S, |
LinearViscoelasticNormalSpecies *const | T | ||
) |
creates default values for mixed species
For all parameters we assume that the harmonic mean of the parameters of the original two species is a sensible default.
[in] | S,T | the two species whose properties are mixed to create the new species |
Definition at line 214 of file LinearViscoelasticNormalSpecies.cc.
References BaseSpecies::average(), dissipation_, getDissipation(), getStiffness(), and stiffness_.
|
virtual |
Reads the species properties from an input stream.
[in] | input | stream (typically the restart file) |
Implements BaseObject.
Definition at line 74 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_, and stiffness_.
void LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient | ( | Mdouble | tc, |
Mdouble | eps, | ||
Mdouble | mass | ||
) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of equal mass m.
Sets k, disp such that it matches a given tc and eps for a collision of two copies of equal mass m
[in] | tc | collision time |
[in] | eps | restitution coefficient |
[in] | mass | effective particle mass, \(\frac{2}{1/m1+1/m2}\) |
Definition at line 191 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_, constants::pi, mathsFunc::square(), and stiffness_.
Referenced by SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(), SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficientNoDispt(), and setCollisionTimeAndRestitutionCoefficient().
void LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient | ( | Mdouble | collisionTime, |
Mdouble | restitutionCoefficient, | ||
Mdouble | mass1, | ||
Mdouble | mass2 | ||
) |
Set k, disp such that is matches a given tc and eps for a collision of two different masses.
Recall the resitution constant is a function of k, disp and the mass of each particle in the collision See also 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. Recall the resitution constant is a function of k, disp and the mass of each particle in the collision See also setCollisionTimeAndRestitutionCoefficient(Mdouble tc, Mdouble eps, Mdouble mass)
[in] | collision | time |
Definition at line 203 of file LinearViscoelasticNormalSpecies.cc.
References setCollisionTimeAndRestitutionCoefficient().
void LinearViscoelasticNormalSpecies::setDissipation | ( | Mdouble | dissipation | ) |
Allows the normal dissipation to be changed.
Definition at line 115 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_.
Referenced by setStiffnessAndDissipation().
void LinearViscoelasticNormalSpecies::setStiffness | ( | Mdouble | new_k | ) |
Allows the spring constant to be changed.
Definition at line 90 of file LinearViscoelasticNormalSpecies.cc.
References stiffness_.
Referenced by setStiffnessAndDissipation().
void LinearViscoelasticNormalSpecies::setStiffnessAndDissipation | ( | helpers::KAndDisp | new_ | ) |
Allows the spring and dissipation constants to be changed simultaneously.
Definition at line 108 of file LinearViscoelasticNormalSpecies.cc.
References helpers::KAndDisp::disp, helpers::KAndDisp::k, setDissipation(), and setStiffness().
void LinearViscoelasticNormalSpecies::setStiffnessAndRestitutionCoefficient | ( | Mdouble | stiffness, |
Mdouble | eps, | ||
Mdouble | mass | ||
) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P.
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P
[in] | stiffness | stiffness |
[in] | eps | restitution coefficient |
[in] | mass | effective particle mass, \(\frac{2}{1/m1+1/m2}\) |
Definition at line 179 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_, constants::sqr_pi, mathsFunc::square(), and stiffness_.
|
virtual |
Writes the species properties to an output stream.
[out] | output | stream (typically the restart file) |
Implements BaseObject.
Definition at line 65 of file LinearViscoelasticNormalSpecies.cc.
References dissipation_, and stiffness_.
|
private |
(normal) viscosity
Definition at line 108 of file LinearViscoelasticNormalSpecies.h.
Referenced by getCollisionTime(), getDissipation(), getRestitutionCoefficient(), LinearViscoelasticNormalSpecies(), mix(), read(), setCollisionTimeAndRestitutionCoefficient(), setDissipation(), setStiffnessAndRestitutionCoefficient(), and write().
|
private |
(normal) spring constant
Definition at line 107 of file LinearViscoelasticNormalSpecies.h.
Referenced by getCollisionTime(), getMaximumVelocity(), getStiffness(), LinearViscoelasticNormalSpecies(), mix(), read(), setCollisionTimeAndRestitutionCoefficient(), setStiffness(), setStiffnessAndRestitutionCoefficient(), and write().