MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ReversibleAdhesiveSpecies Class Reference

ReversibleAdhesiveSpecies contains the parameters used to describe a linear reversible short-range force. More...

#include <ReversibleAdhesiveSpecies.h>

+ Inheritance diagram for ReversibleAdhesiveSpecies:

Public Types

typedef
ReversibleAdhesiveInteraction 
InteractionType
 The correct Interaction type for this AdhesiveForceSpecies. More...
 

Public Member Functions

 ReversibleAdhesiveSpecies ()
 The default constructor. More...
 
 ReversibleAdhesiveSpecies (const ReversibleAdhesiveSpecies &s)
 The default constructor. More...
 
 ~ReversibleAdhesiveSpecies ()
 The default constructor. 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...
 
void mix (ReversibleAdhesiveSpecies *S, ReversibleAdhesiveSpecies *T)
 creates default values for mixed species More...
 
void setInteractionDistance ()
 returns the largest separation distance at which adhesive short-range forces can occur. More...
 
void setAdhesionStiffness (Mdouble new_k0)
 Allows the spring constant to be changed. More...
 
Mdouble getAdhesionStiffness () const
 Allows the spring constant to be accessed. More...
 
void setAdhesionForceMax (Mdouble new_f0)
 Allows the spring constant to be changed. More...
 
Mdouble getAdhesionForceMax () const
 Allows the spring constant to be accessed. More...
 
- Public Member Functions inherited from BaseForce
BaseSpeciesgetBaseSpecies () const
 
void setBaseSpecies (BaseSpecies *baseSpecies)
 

Private Attributes

Mdouble adhesionStiffness_
 stiffness of linear adhesion force More...
 
Mdouble adhesionForceMax_
 adhesion force at zero overlap More...
 

Detailed Description

ReversibleAdhesiveSpecies contains the parameters used to describe a linear reversible short-range force.

See ReversibleAdhesiveInteraction::computeForce for a description of the force law.

Definition at line 37 of file ReversibleAdhesiveSpecies.h.

Member Typedef Documentation

Constructor & Destructor Documentation

ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies ( )

The default constructor.

Definition at line 30 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, and adhesionStiffness_.

31 {
34  //interaction distance not yet determined
35 #ifdef DEBUG_CONSTRUCTOR
36  std::cout<<"ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies() finished"<<std::endl;
37 #endif
38 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies ( const ReversibleAdhesiveSpecies s)

The default constructor.

Parameters
[in]sthe species that is copied

Definition at line 43 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, and adhesionStiffness_.

44 {
47 #ifdef DEBUG_CONSTRUCTOR
48  std::cout<<"ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies(const ReversibleAdhesiveSpecies &p) finished"<<std::endl;
49 #endif
50 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
ReversibleAdhesiveSpecies::~ReversibleAdhesiveSpecies ( )

The default constructor.

Definition at line 52 of file ReversibleAdhesiveSpecies.cc.

53 {
54 #ifdef DEBUG_DESTRUCTOR
55  std::cout<<"ReversibleAdhesiveSpecies::~ReversibleAdhesiveSpecies() finished"<<std::endl;
56 #endif
57 }

Member Function Documentation

Mdouble ReversibleAdhesiveSpecies::getAdhesionForceMax ( ) const

Allows the spring constant to be accessed.

Definition at line 127 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_.

Referenced by IrreversibleAdhesiveInteraction::computeAdhesionForce(), ReversibleAdhesiveInteraction::computeAdhesionForce(), IrreversibleAdhesiveInteraction::getElasticEnergy(), and mix().

128 {
129  return adhesionForceMax_;
130 }
Mdouble adhesionForceMax_
adhesion force at zero overlap
Mdouble ReversibleAdhesiveSpecies::getAdhesionStiffness ( ) const

Allows the spring constant to be accessed.

Definition at line 113 of file ReversibleAdhesiveSpecies.cc.

References adhesionStiffness_.

Referenced by IrreversibleAdhesiveInteraction::computeAdhesionForce(), ReversibleAdhesiveInteraction::computeAdhesionForce(), IrreversibleAdhesiveInteraction::getElasticEnergy(), and mix().

114 {
115  return adhesionStiffness_;
116 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
std::string ReversibleAdhesiveSpecies::getBaseName ( ) const

Used in Species::getName to obtain a unique name for each Species.

Returns
a string containing the name of the species (minus the word "Species")

Definition at line 81 of file ReversibleAdhesiveSpecies.cc.

82 {
83  return "ReversibleAdhesive";
84 }
void ReversibleAdhesiveSpecies::mix ( ReversibleAdhesiveSpecies S,
ReversibleAdhesiveSpecies 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.

Parameters
[in]S,Tthe two species whose properties are mixed to create the new species

Definition at line 91 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, adhesionStiffness_, BaseSpecies::average(), getAdhesionForceMax(), and getAdhesionStiffness().

92 {
95 }
Mdouble getAdhesionForceMax() const
Allows the spring constant to be accessed.
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
Mdouble getAdhesionStiffness() const
Allows the spring constant to be accessed.
void ReversibleAdhesiveSpecies::read ( std::istream &  is)

Reads the species properties from an input stream.

Parameters
[in]isinput stream (typically the restart file)

Definition at line 71 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, and adhesionStiffness_.

72 {
73  std::string dummy;
74  is >> dummy >> adhesionForceMax_;
75  is >> dummy >> adhesionStiffness_;
76 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
void ReversibleAdhesiveSpecies::setAdhesionForceMax ( Mdouble  new_f0)

Allows the spring constant to be changed.

Definition at line 119 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, adhesionStiffness_, logger, and setInteractionDistance().

120 {
121  logger.assert(adhesionForceMax >= 0,"Error in setAdhesionForceMax");
122  adhesionForceMax_ = adhesionForceMax;
124 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void setInteractionDistance()
returns the largest separation distance at which adhesive short-range forces can occur.
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
void ReversibleAdhesiveSpecies::setAdhesionStiffness ( Mdouble  new_k0)

Allows the spring constant to be changed.

Definition at line 105 of file ReversibleAdhesiveSpecies.cc.

References adhesionStiffness_, logger, and setInteractionDistance().

106 {
107  logger.assert(adhesionStiffness >= 0,"Error in setAdhesionStiffness");
108  adhesionStiffness_ = adhesionStiffness;
110 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void setInteractionDistance()
returns the largest separation distance at which adhesive short-range forces can occur.
Mdouble adhesionStiffness_
stiffness of linear adhesion force
void ReversibleAdhesiveSpecies::setInteractionDistance ( )

returns the largest separation distance at which adhesive short-range forces can occur.

Returns
the maximum separation distance below which adhesive forces can occur (needed for contact detection)

Definition at line 98 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, adhesionStiffness_, BaseForce::getBaseSpecies(), logger, and BaseSpecies::setInteractionDistance().

Referenced by setAdhesionForceMax(), and setAdhesionStiffness().

99 {
100  logger.assert(adhesionStiffness_ != 0.0,"ReversibleAdhesiveSpecies::getInteractionDistance(): adhesionStiffness cannot be zero");
102 }
BaseSpecies * getBaseSpecies() const
Definition: BaseForce.h:35
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void setInteractionDistance(Mdouble interactionDistance)
Sets BaseSpecies::interactionDistance_.
Definition: BaseSpecies.cc:156
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
void ReversibleAdhesiveSpecies::write ( std::ostream &  os) const

Writes the species properties to an output stream.

Parameters
[out]osoutput stream (typically the restart file)

Definition at line 62 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, and adhesionStiffness_.

63 {
64  os << " adhesionForceMax " << adhesionForceMax_;
65  os << " adhesionStiffness " << adhesionStiffness_;
66 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap

Member Data Documentation

Mdouble ReversibleAdhesiveSpecies::adhesionForceMax_
private

adhesion force at zero overlap

Definition at line 87 of file ReversibleAdhesiveSpecies.h.

Referenced by getAdhesionForceMax(), mix(), read(), ReversibleAdhesiveSpecies(), setAdhesionForceMax(), setInteractionDistance(), and write().

Mdouble ReversibleAdhesiveSpecies::adhesionStiffness_
private

The documentation for this class was generated from the following files: