MercuryDPM  Trunk
 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...
 
 ~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 *S, LiquidBridgeWilletSpecies *T)
 creates default values for mixed species More...
 
void setInteractionDistance ()
 
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 BaseForce
BaseSpeciesgetBaseSpecies () const
 
void setBaseSpecies (BaseSpecies *baseSpecies)
 

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 37 of file LiquidBridgeWilletSpecies.h.

Member Typedef Documentation

Constructor & Destructor Documentation

LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies ( )

The default constructor.

Definition at line 30 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, contactAngle_, liquidBridgeVolume_, setInteractionDistance(), and surfaceTension_.

31 {
34  surfaceTension_ = 0;
35  contactAngle_ = 0;
37 #ifdef DEBUG_CONSTRUCTOR
38  std::cout<<"LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies() finished"<<std::endl;
39 #endif
40 }
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 45 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, contactAngle_, liquidBridgeVolume_, and surfaceTension_.

46 {
51 #ifdef DEBUG_CONSTRUCTOR
52  std::cout<<"LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies(const LiquidBridgeWilletSpecies &p) finished"<<std::endl;
53 #endif
54 }
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 ( )

The default destructor.

Definition at line 56 of file LiquidBridgeWilletSpecies.cc.

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

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

89 {
90  return "LiquidBridgeWillet";
91 }
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 172 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_.

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

173 {
174  return contactAngle_;
175 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Mdouble LiquidBridgeWilletSpecies::getLiquidBridgeVolume ( ) const

used to access the Volume of the liquid bridge.

Returns
the volume of the liquid bridge.

Definition at line 132 of file LiquidBridgeWilletSpecies.cc.

References liquidBridgeVolume_.

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

133 {
134  return liquidBridgeVolume_;
135 }
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 154 of file LiquidBridgeWilletSpecies.cc.

References surfaceTension_.

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

155 {
156  return surfaceTension_;
157 }
Mdouble surfaceTension_
surface tension of the liquid
void LiquidBridgeWilletSpecies::mix ( LiquidBridgeWilletSpecies S,
LiquidBridgeWilletSpecies 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 98 of file LiquidBridgeWilletSpecies.cc.

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

99 {
103 }
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.
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
Mdouble surfaceTension_
surface tension of the liquid
void LiquidBridgeWilletSpecies::read ( std::istream &  is)

Reads the species properties from an input stream.

Parameters
[in]inputstream (typically the restart file)

Definition at line 76 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_, liquidBridgeVolume_, setInteractionDistance(), and surfaceTension_.

77 {
78  std::string dummy;
79  is >> dummy >> liquidBridgeVolume_;
80  is >> dummy >> surfaceTension_;
81  is >> dummy >> contactAngle_;
83 }
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 162 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_, logger, and setInteractionDistance().

163 {
164  logger.assert(contactAngle >= 0,"Error in setContactAngle");
165  contactAngle_ = contactAngle;
167 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void LiquidBridgeWilletSpecies::setInteractionDistance ( )
Returns
the maximum separation distance below which adhesive forces can occur (needed for contact detection)

Definition at line 106 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, contactAngle_, BaseForce::getBaseSpecies(), and BaseSpecies::setInteractionDistance().

Referenced by LiquidBridgeWilletSpecies(), read(), setContactAngle(), and setLiquidBridgeVolume().

107 {
109 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
BaseSpecies * getBaseSpecies() const
Definition: BaseForce.h:35
void setInteractionDistance(Mdouble interactionDistance)
Sets BaseSpecies::interactionDistance_.
Definition: BaseSpecies.cc:156
Mdouble cbrtLiquidBridgeVolume_
Cube root of the liquid bridge.
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 114 of file LiquidBridgeWilletSpecies.cc.

References cbrtLiquidBridgeVolume_, liquidBridgeVolume_, and setInteractionDistance().

Referenced by mix().

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

References surfaceTension_.

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

Writes the species properties to an output stream.

Parameters
[out]outputstream (typically the restart file)

Definition at line 66 of file LiquidBridgeWilletSpecies.cc.

References contactAngle_, liquidBridgeVolume_, and surfaceTension_.

67 {
68  os << " liquidBridgeVolume " << liquidBridgeVolume_;
69  os << " surfaceTension " << surfaceTension_;
70  os << " contactAngle " << contactAngle_;
71 }
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 112 of file LiquidBridgeWilletSpecies.h.

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

Mdouble LiquidBridgeWilletSpecies::contactAngle_
private

contact angle between particle and liquid bridge surface

Definition at line 117 of file LiquidBridgeWilletSpecies.h.

Referenced by getContactAngle(), LiquidBridgeWilletSpecies(), mix(), read(), setContactAngle(), setInteractionDistance(), 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 104 of file LiquidBridgeWilletSpecies.h.

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

Mdouble LiquidBridgeWilletSpecies::surfaceTension_
private

surface tension of the liquid

Definition at line 122 of file LiquidBridgeWilletSpecies.h.

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


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