MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LiquidBridgeWilletSpecies Class Reference

LiquidBridgeWilletSpecies contains the parameters used to describe a short-range force caused by liquid bridges. More...

#include <LiquidBridgeWilletSpecies.h>

+ Inheritance diagram for LiquidBridgeWilletSpecies:

Public Types

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

Public Member Functions

 LiquidBridgeWilletSpecies ()
 The default constructor. More...
 
 LiquidBridgeWilletSpecies (const LiquidBridgeWilletSpecies &s)
 The default copy constructor. More...
 
virtual ~LiquidBridgeWilletSpecies ()
 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...
 
void mix (LiquidBridgeWilletSpecies *const S, LiquidBridgeWilletSpecies *const T)
 creates default values for mixed species More...
 
Mdouble getInteractionDistance () const
 returns the largest separation distance at which adhesive short-range forces can occur. More...
 
void setLiquidBridgeVolume (Mdouble liquidBridgeVolume)
 used to set the Volume of the liquid bridge. More...
 
Mdouble getLiquidBridgeVolume () const
 used to access the Volume of the liquid bridge. More...
 
void setSurfaceTension (Mdouble surfaceTension)
 used to set the surface tension of the liquid. More...
 
Mdouble getSurfaceTension () const
 used to access the surface tension of the liquid. More...
 
void setContactAngle (Mdouble contactAngle)
 used to set the contact angle between particle and liquid bridge surface. More...
 
Mdouble getContactAngle () const
 used to access the contact angle between particle and liquid bridge surface. 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 BaseSpeciescopy () 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...
 
SpeciesHandlergetHandler () 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 bool getUseAngularDOFs () const =0
 Returns true if torques (i.e. angular degrees of freedom) have to be calculated. More...
 
virtual BaseInteractiongetNewInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp) const =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 liquidBridgeVolume_
 Volume of the liquid bridge. More...
 
Mdouble cbrtLiquidBridgeVolume_
 Cube root of the liquid bridge. More...
 
Mdouble contactAngle_
 contact angle between particle and liquid bridge surface More...
 
Mdouble surfaceTension_
 surface tension of the liquid More...
 

Detailed Description

LiquidBridgeWilletSpecies contains the parameters used to describe a short-range force caused by liquid bridges.

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

Definition at line 36 of file LiquidBridgeWilletSpecies.h.

Member Typedef Documentation

Constructor & Destructor Documentation

LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies ( )

The default constructor.

Definition at line 29 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, contactAngle_, liquidBridgeVolume_, and surfaceTension_.

30 {
33  surfaceTension_ = 0;
34  contactAngle_ = 0;
35 #ifdef DEBUG_CONSTRUCTOR
36  std::cout<<"LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies() finished"<<std::endl;
37 #endif
38 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Mdouble liquidBridgeVolume_
Volume of the liquid bridge.
Mdouble surfaceTension_
surface tension of the liquid
Mdouble cbrtLiquidBridgeVolume_
Cube root of the liquid bridge.
LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies ( const LiquidBridgeWilletSpecies s)

The default copy constructor.

Parameters
[in]thespecies that is copied

Definition at line 43 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, contactAngle_, liquidBridgeVolume_, and surfaceTension_.

44 {
49 #ifdef DEBUG_CONSTRUCTOR
50  std::cout<<"LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies(const LiquidBridgeWilletSpecies &p) finished"<<std::endl;
51 #endif
52 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Mdouble liquidBridgeVolume_
Volume of the liquid bridge.
Mdouble surfaceTension_
surface tension of the liquid
Mdouble cbrtLiquidBridgeVolume_
Cube root of the liquid bridge.
LiquidBridgeWilletSpecies::~LiquidBridgeWilletSpecies ( )
virtual

The default destructor.

Definition at line 54 of file LiquidBridgeWilletSpecies.cc.

55 {
56 #ifdef DEBUG_DESTRUCTOR
57  std::cout<<"LiquidBridgeWilletSpecies::~LiquidBridgeWilletSpecies() finished"<<std::endl;
58 #endif
59 }

Member Function Documentation

std::string LiquidBridgeWilletSpecies::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 85 of file LiquidBridgeWilletSpecies.cc.

86 {
87  return "LiquidBridgeWillet";
88 }
Mdouble LiquidBridgeWilletSpecies::getContactAngle ( ) const

used to access the contact angle between particle and liquid bridge surface.

Returns
the contact angle between particle and liquid bridge surface.

Definition at line 174 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_.

Referenced by LiquidBridgeWilletInteraction::computeAdhesionForce(), and mix().

175 {
176  return contactAngle_;
177 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Mdouble LiquidBridgeWilletSpecies::getInteractionDistance ( ) const
virtual

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

Returns
the maximum separation distance between particles below which the adhesive force is active.

Implements BaseSpecies.

Definition at line 105 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, and contactAngle_.

106 {
107  return (1.0+0.5*contactAngle_)*cbrtLiquidBridgeVolume_;
108 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Mdouble cbrtLiquidBridgeVolume_
Cube root of the liquid bridge.
Mdouble LiquidBridgeWilletSpecies::getLiquidBridgeVolume ( ) const

used to access the Volume of the liquid bridge.

Returns
the volume of the liquid bridge.

Definition at line 130 of file LiquidBridgeWilletSpecies.cc.

References liquidBridgeVolume_.

Referenced by LiquidBridgeWilletInteraction::computeAdhesionForce(), and mix().

131 {
132  return liquidBridgeVolume_;
133 }
Mdouble liquidBridgeVolume_
Volume of the liquid bridge.
Mdouble LiquidBridgeWilletSpecies::getSurfaceTension ( ) const

used to access the surface tension of the liquid.

Returns
the surface tension of the liquid.

Definition at line 152 of file LiquidBridgeWilletSpecies.cc.

References surfaceTension_.

Referenced by LiquidBridgeWilletInteraction::computeAdhesionForce(), and mix().

153 {
154  return surfaceTension_;
155 }
Mdouble surfaceTension_
surface tension of the liquid
void LiquidBridgeWilletSpecies::mix ( LiquidBridgeWilletSpecies *const  S,
LiquidBridgeWilletSpecies *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.

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

Definition at line 95 of file LiquidBridgeWilletSpecies.cc.

References BaseSpecies::average(), contactAngle_, getContactAngle(), getLiquidBridgeVolume(), getSurfaceTension(), setLiquidBridgeVolume(), and surfaceTension_.

96 {
100 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Mdouble getContactAngle() const
used to access the contact angle between particle and liquid bridge surface.
Mdouble getLiquidBridgeVolume() const
used to access the Volume of the liquid bridge.
Mdouble getSurfaceTension() const
used to access the surface tension of the liquid.
void setLiquidBridgeVolume(Mdouble liquidBridgeVolume)
used to set the Volume of the liquid bridge.
Mdouble average(Mdouble a, Mdouble b)
defines the average of two variables by the harmonic mean.
Definition: BaseSpecies.cc:85
Mdouble surfaceTension_
surface tension of the liquid
void LiquidBridgeWilletSpecies::read ( std::istream &  is)
virtual

Reads the species properties from an input stream.

Parameters
[in]inputstream (typically the restart file)

Implements BaseObject.

Definition at line 74 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_, liquidBridgeVolume_, and surfaceTension_.

75 {
76  std::string dummy;
77  is >> dummy >> liquidBridgeVolume_;
78  is >> dummy >> surfaceTension_;
79  is >> dummy >> contactAngle_;
80 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Mdouble liquidBridgeVolume_
Volume of the liquid bridge.
Mdouble surfaceTension_
surface tension of the liquid
void LiquidBridgeWilletSpecies::setContactAngle ( Mdouble  contactAngle)

used to set the contact angle between particle and liquid bridge surface.

Parameters
[in]contactAnglethe contact angle between particle and liquid bridge surface.

Definition at line 160 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_.

161 {
162  if (contactAngle >= 0)
163  contactAngle_ = contactAngle;
164  else
165  {
166  std::cerr << "Error in setContactAngle" << std::endl;
167  exit(-1);
168  }
169 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
void LiquidBridgeWilletSpecies::setLiquidBridgeVolume ( Mdouble  liquidBridgeVolume)

used to set the Volume of the liquid bridge.

Parameters
[in]liquidBridgeVolumethe volume of the liquid bridge.

Definition at line 113 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, and liquidBridgeVolume_.

Referenced by mix().

114 {
115  if (liquidBridgeVolume >= 0)
116  {
117  liquidBridgeVolume_ = liquidBridgeVolume;
118  cbrtLiquidBridgeVolume_ = cbrt(liquidBridgeVolume);
119  }
120  else
121  {
122  std::cerr << "Error in setLiquidBridgeVolume(" << liquidBridgeVolume << ")" << std::endl;
123  exit(-1);
124  }
125 }
Mdouble liquidBridgeVolume_
Volume of the liquid bridge.
Mdouble cbrtLiquidBridgeVolume_
Cube root of the liquid bridge.
void LiquidBridgeWilletSpecies::setSurfaceTension ( Mdouble  surfaceTension)

used to set the surface tension of the liquid.

Parameters
[in]surfaceTensionthe surface tension of the liquid.

Definition at line 138 of file LiquidBridgeWilletSpecies.cc.

References surfaceTension_.

139 {
140  if (surfaceTension >= 0)
141  surfaceTension_ = surfaceTension;
142  else
143  {
144  std::cerr << "Error in setSurfaceTension" << std::endl;
145  exit(-1);
146  }
147 }
Mdouble surfaceTension_
surface tension of the liquid
void LiquidBridgeWilletSpecies::write ( std::ostream &  os) const
virtual

Writes the species properties to an output stream.

Parameters
[out]outputstream (typically the restart file)

Implements BaseObject.

Definition at line 64 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_, liquidBridgeVolume_, and surfaceTension_.

65  {
66  os << " liquidBridgeVolume " << liquidBridgeVolume_;
67  os << " surfaceTension " << surfaceTension_;
68  os << " contactAngle " << contactAngle_;
69 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Mdouble liquidBridgeVolume_
Volume of the liquid bridge.
Mdouble surfaceTension_
surface tension of the liquid

Member Data Documentation

Mdouble LiquidBridgeWilletSpecies::cbrtLiquidBridgeVolume_
private

Cube root of the liquid bridge.

This is a slave variable of liquidBridgeVolume_ (i.e. it is always set together) but is useful, because the cube root has to be calculated to obtain the liquid bridge adhesive force.

Definition at line 114 of file LiquidBridgeWilletSpecies.h.

Referenced by getInteractionDistance(), LiquidBridgeWilletSpecies(), and setLiquidBridgeVolume().

Mdouble LiquidBridgeWilletSpecies::contactAngle_
private

contact angle between particle and liquid bridge surface

Definition at line 119 of file LiquidBridgeWilletSpecies.h.

Referenced by getContactAngle(), getInteractionDistance(), LiquidBridgeWilletSpecies(), mix(), read(), setContactAngle(), and write().

Mdouble LiquidBridgeWilletSpecies::liquidBridgeVolume_
private

Volume of the liquid bridge.

Currently, this is a Species property (i.e. all particles have the same liquid bridge volume), but this should probably become a Particle or Interaction property.

Definition at line 106 of file LiquidBridgeWilletSpecies.h.

Referenced by getLiquidBridgeVolume(), LiquidBridgeWilletSpecies(), read(), setLiquidBridgeVolume(), and write().

Mdouble LiquidBridgeWilletSpecies::surfaceTension_
private

surface tension of the liquid

Definition at line 124 of file LiquidBridgeWilletSpecies.h.

Referenced by getSurfaceTension(), LiquidBridgeWilletSpecies(), mix(), read(), setSurfaceTension(), and write().


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