JKRAdhesiveSpecies Class Reference

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

#include <JKRAdhesiveSpecies.h>

+ Inheritance diagram for JKRAdhesiveSpecies:

Public Types

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

Public Member Functions

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

Private Attributes

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

Detailed Description

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

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

Member Typedef Documentation

◆ InteractionType

The correct Interaction type for this AdhesiveForceSpecies.

Constructor & Destructor Documentation

◆ JKRAdhesiveSpecies() [1/2]

JKRAdhesiveSpecies::JKRAdhesiveSpecies ( )

The default constructor.

9 {
10  //adhesionForceMax_ = 0;
12  surfaceEnergy_ = 0.0;
13 #ifdef DEBUG_CONSTRUCTOR
14  std::cout<<"JKRAdhesiveSpecies::JKRAdhesiveSpecies() finished"<<std::endl;
15 #endif
16 }
Mdouble surfaceEnergy_
adhesion force at zero overlap
Definition: JKRAdhesiveSpecies.h:71
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Definition: JKRAdhesiveSpecies.h:66

References adhesionStiffness_, and surfaceEnergy_.

◆ JKRAdhesiveSpecies() [2/2]

JKRAdhesiveSpecies::JKRAdhesiveSpecies ( const JKRAdhesiveSpecies s)

The default constructor.

Parameters
[in]sthe species that is copied
22 {
23  //adhesionForceMax_ = s.adhesionForceMax_;
24  adhesionStiffness_ = s.adhesionStiffness_;
25  surfaceEnergy_ = s.surfaceEnergy_;
26 #ifdef DEBUG_CONSTRUCTOR
27  std::cout<<"JKRAdhesiveSpecies::JKRAdhesiveSpecies(const JKRAdhesiveSpecies &p) finished"<<std::endl;
28 #endif
29 }
RealScalar s
Definition: level1_cplx_impl.h:130

References adhesionStiffness_, s, and surfaceEnergy_.

◆ ~JKRAdhesiveSpecies()

JKRAdhesiveSpecies::~JKRAdhesiveSpecies ( )

The default constructor.

32 {
33 #ifdef DEBUG_DESTRUCTOR
34  std::cout<<"JKRAdhesiveSpecies::~JKRAdhesiveSpecies() finished"<<std::endl;
35 #endif
36 }

Member Function Documentation

◆ getAdhesionStiffness()

Mdouble JKRAdhesiveSpecies::getAdhesionStiffness ( ) const

Allows the spring constant to be accessed.

95 {
96  return adhesionStiffness_;
97 }

References adhesionStiffness_.

Referenced by JKRAdhesiveInteraction::computeAdhesionForce().

◆ getBaseName()

std::string JKRAdhesiveSpecies::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")
63 {
64  return "JKRAdhesive";
65 }

◆ getSurfaceEnergy()

Mdouble JKRAdhesiveSpecies::getSurfaceEnergy ( ) const
119 {
120  return surfaceEnergy_;
121 }

References surfaceEnergy_.

Referenced by JKRAdhesiveInteraction::computeAdhesionForce().

◆ mix()

void JKRAdhesiveSpecies::mix ( JKRAdhesiveSpecies S,
JKRAdhesiveSpecies 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
73 {
74  //adhesionForceMax_ = average(S->getAdhesionForceMax(), T->getAdhesionForceMax());
75  adhesionStiffness_ = BaseSpecies::average(S->getAdhesionStiffness(), T->getAdhesionStiffness());
76 }
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:89
@ S
Definition: quadtree.h:62

References adhesionStiffness_, BaseSpecies::average(), and oomph::QuadTreeNames::S.

◆ read()

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

Reads the species properties from an input stream.

Parameters
[in]isinput stream (typically the restart file)
52 {
53  std::string dummy;
54  //is >> dummy >> adhesionForceMax_;
55  is >> dummy >> adhesionStiffness_;
56  is >> dummy >> surfaceEnergy_;
57 }
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286

References adhesionStiffness_, oomph::Global_string_for_annotation::string(), and surfaceEnergy_.

◆ setAdhesionStiffness()

void JKRAdhesiveSpecies::setAdhesionStiffness ( Mdouble  new_k0)

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

Allows the spring constant to be changed.

Allows the spring constant to be changed

87 {
88  logger.assert_debug(adhesionStiffness >= 0,"Error in setAdhesionStiffness");
89  adhesionStiffness_ = adhesionStiffness;
90  //setInteractionDistance();
91 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.

References adhesionStiffness_, and logger.

◆ setSurfaceEnergy()

void JKRAdhesiveSpecies::setSurfaceEnergy ( Mdouble  surfaceEnergy)

Allows the spring constant to be changed.

Allows the spring constant to be accessed

114 {
115  surfaceEnergy_ = surfaceEnergy;
116 }

References surfaceEnergy_.

◆ write()

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

Writes the species properties to an output stream.

Parameters
[out]osoutput stream (typically the restart file)
42 {
43  //os << " adhesionForceMax " << adhesionForceMax_;
44  os << " adhesionStiffness " << adhesionStiffness_;
45  os << " surfaceEnergy " << surfaceEnergy_;
46 }

References adhesionStiffness_, and surfaceEnergy_.

Member Data Documentation

◆ adhesionStiffness_

Mdouble JKRAdhesiveSpecies::adhesionStiffness_
private

stiffness of linear adhesion force

Referenced by getAdhesionStiffness(), JKRAdhesiveSpecies(), mix(), read(), setAdhesionStiffness(), and write().

◆ surfaceEnergy_

Mdouble JKRAdhesiveSpecies::surfaceEnergy_
private

adhesion force at zero overlap

Referenced by getSurfaceEnergy(), JKRAdhesiveSpecies(), read(), setSurfaceEnergy(), and write().


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