MercuryDPM  Beta
 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)=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 {
31  liquidBridgeVolume_ = std::numeric_limits<double>::quiet_NaN();
32  cbrtLiquidBridgeVolume_ = std::numeric_limits<double>::quiet_NaN();
33  surfaceTension_ = std::numeric_limits<double>::quiet_NaN();
34  contactAngle_ = std::numeric_limits<double>::quiet_NaN();
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 contactAngle_, liquidBridgeVolume_, setLiquidBridgeVolume(), and surfaceTension_.

44 {
48 #ifdef DEBUG_CONSTRUCTOR
49  std::cout<<"LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies(const LiquidBridgeWilletSpecies &p) finished"<<std::endl;
50 #endif
51 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Mdouble liquidBridgeVolume_
Volume of the liquid bridge.
void setLiquidBridgeVolume(Mdouble liquidBridgeVolume)
used to set the Volume of the liquid bridge.
Mdouble surfaceTension_
surface tension of the liquid
LiquidBridgeWilletSpecies::~LiquidBridgeWilletSpecies ( )
virtual

The default destructor.

Definition at line 53 of file LiquidBridgeWilletSpecies.cc.

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

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 84 of file LiquidBridgeWilletSpecies.cc.

85 {
86  return "LiquidBridgeWillet";
87 }
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 173 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_.

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

174 {
175  return contactAngle_;
176 }
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 104 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, and contactAngle_.

105 {
106  return (1.0+0.5*contactAngle_)*cbrtLiquidBridgeVolume_;
107 }
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 129 of file LiquidBridgeWilletSpecies.cc.

References liquidBridgeVolume_.

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

130 {
131  return liquidBridgeVolume_;
132 }
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 151 of file LiquidBridgeWilletSpecies.cc.

References surfaceTension_.

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

152 {
153  return surfaceTension_;
154 }
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 94 of file LiquidBridgeWilletSpecies.cc.

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

95 {
99 }
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 73 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_, liquidBridgeVolume_, and surfaceTension_.

74 {
75  std::string dummy;
76  is >> dummy >> liquidBridgeVolume_;
77  is >> dummy >> surfaceTension_;
78  is >> dummy >> contactAngle_;
79 }
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 159 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_.

160 {
161  if (contactAngle >= 0)
162  contactAngle_ = contactAngle;
163  else
164  {
165  std::cerr << "Error in setContactAngle" << std::endl;
166  exit(-1);
167  }
168 }
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 112 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, and liquidBridgeVolume_.

Referenced by LiquidBridgeWilletSpecies(), and mix().

113 {
114  if (liquidBridgeVolume >= 0)
115  {
116  liquidBridgeVolume_ = liquidBridgeVolume;
117  cbrtLiquidBridgeVolume_ = cbrt(liquidBridgeVolume);
118  }
119  else
120  {
121  std::cerr << "Error in setLiquidBridgeVolume" << std::endl;
122  exit(-1);
123  }
124 }
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 137 of file LiquidBridgeWilletSpecies.cc.

References surfaceTension_.

138 {
139  if (surfaceTension >= 0)
140  surfaceTension_ = surfaceTension;
141  else
142  {
143  std::cerr << "Error in setSurfaceTension" << std::endl;
144  exit(-1);
145  }
146 }
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 63 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_, liquidBridgeVolume_, and surfaceTension_.

64  {
65  os << " liquidBridgeVolume " << liquidBridgeVolume_;
66  os << " surfaceTension " << surfaceTension_;
67  os << " contactAngle " << contactAngle_;
68 }
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: