revision: v0.14
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.

Member Typedef Documentation

◆ InteractionType

The correct Interaction type for this AdhesiveForceSpecies.

Constructor & Destructor Documentation

◆ ReversibleAdhesiveSpecies() [1/2]

ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies ( )

The default constructor.

31 {
34  //interaction distance not yet determined
35 #ifdef DEBUG_CONSTRUCTOR
36  std::cout<<"ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies() finished"<<std::endl;
37 #endif
38 }

References adhesionForceMax_, and adhesionStiffness_.

◆ ReversibleAdhesiveSpecies() [2/2]

ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies ( const ReversibleAdhesiveSpecies s)

The default constructor.

Parameters
[in]sthe species that is copied
44 {
47 #ifdef DEBUG_CONSTRUCTOR
48  std::cout<<"ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies(const ReversibleAdhesiveSpecies &p) finished"<<std::endl;
49 #endif
50 }

References adhesionForceMax_, and adhesionStiffness_.

◆ ~ReversibleAdhesiveSpecies()

ReversibleAdhesiveSpecies::~ReversibleAdhesiveSpecies ( )

The default constructor.

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

Member Function Documentation

◆ getAdhesionForceMax()

Mdouble ReversibleAdhesiveSpecies::getAdhesionForceMax ( ) const

◆ getAdhesionStiffness()

Mdouble ReversibleAdhesiveSpecies::getAdhesionStiffness ( ) const

◆ getBaseName()

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")
82 {
83  return "ReversibleAdhesive";
84 }

◆ mix()

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

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

◆ read()

void ReversibleAdhesiveSpecies::read ( std::istream &  is)

Reads the species properties from an input stream.

Parameters
[in]isinput stream (typically the restart file)
72 {
73  std::string dummy;
74  is >> dummy >> adhesionForceMax_;
75  is >> dummy >> adhesionStiffness_;
76 }

References adhesionForceMax_, and adhesionStiffness_.

◆ setAdhesionForceMax()

void ReversibleAdhesiveSpecies::setAdhesionForceMax ( Mdouble  new_f0)

Allows the spring constant to be changed.

120 {
121  logger.assert_debug(adhesionForceMax >= 0,"Error in setAdhesionForceMax");
122  adhesionForceMax_ = adhesionForceMax;
124 }

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

◆ setAdhesionStiffness()

void ReversibleAdhesiveSpecies::setAdhesionStiffness ( Mdouble  new_k0)

Allows the spring constant to be changed.

106 {
107  logger.assert_debug(adhesionStiffness >= 0,"Error in setAdhesionStiffness");
108  adhesionStiffness_ = adhesionStiffness;
110 }

References adhesionStiffness_, logger, and setInteractionDistance().

◆ setInteractionDistance()

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)
99 {
100  logger.assert_debug(adhesionStiffness_ != 0.0,"ReversibleAdhesiveSpecies::getInteractionDistance(): adhesionStiffness cannot be zero");
102 }

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

Referenced by setAdhesionForceMax(), and setAdhesionStiffness().

◆ write()

void ReversibleAdhesiveSpecies::write ( std::ostream &  os) const

Writes the species properties to an output stream.

Parameters
[out]osoutput stream (typically the restart file)
63 {
64  os << " adhesionForceMax " << adhesionForceMax_;
65  os << " adhesionStiffness " << adhesionStiffness_;
66 }

References adhesionForceMax_, and adhesionStiffness_.

Member Data Documentation

◆ adhesionForceMax_

Mdouble ReversibleAdhesiveSpecies::adhesionForceMax_
private

◆ adhesionStiffness_

Mdouble ReversibleAdhesiveSpecies::adhesionStiffness_
private

The documentation for this class was generated from the following files:
ReversibleAdhesiveSpecies::setInteractionDistance
void setInteractionDistance()
returns the largest separation distance at which adhesive short-range forces can occur.
Definition: ReversibleAdhesiveSpecies.cc:98
BaseSpecies::setInteractionDistance
void setInteractionDistance(Mdouble interactionDistance)
Definition: BaseSpecies.cc:156
logger
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
ReversibleAdhesiveSpecies::getAdhesionForceMax
Mdouble getAdhesionForceMax() const
Allows the spring constant to be accessed.
Definition: ReversibleAdhesiveSpecies.cc:127
BaseSpecies::average
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
ReversibleAdhesiveSpecies::adhesionStiffness_
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Definition: ReversibleAdhesiveSpecies.h:84
ReversibleAdhesiveSpecies::getAdhesionStiffness
Mdouble getAdhesionStiffness() const
Allows the spring constant to be accessed.
Definition: ReversibleAdhesiveSpecies.cc:113
ReversibleAdhesiveSpecies::adhesionForceMax_
Mdouble adhesionForceMax_
adhesion force at zero overlap
Definition: ReversibleAdhesiveSpecies.h:87
BaseForce::getBaseSpecies
BaseSpecies * getBaseSpecies() const
Definition: BaseForce.h:35