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.

Member Typedef Documentation

◆ InteractionType

The correct Interaction type for this AdhesiveForceSpecies.

Constructor & Destructor Documentation

◆ LiquidBridgeWilletSpecies() [1/2]

LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies ( )

The default constructor.

31 {
34  surfaceTension_ = 0;
35  contactAngle_ = 0;
37 #ifdef DEBUG_CONSTRUCTOR
38  std::cout<<"LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies() finished"<<std::endl;
39 #endif
40 }
void setInteractionDistance()
Definition: LiquidBridgeWilletSpecies.cc:106
Mdouble liquidBridgeVolume_
Volume of the liquid bridge.
Definition: LiquidBridgeWilletSpecies.h:104
Mdouble surfaceTension_
surface tension of the liquid
Definition: LiquidBridgeWilletSpecies.h:122
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Definition: LiquidBridgeWilletSpecies.h:117
Mdouble cbrtLiquidBridgeVolume_
Cube root of the liquid bridge.
Definition: LiquidBridgeWilletSpecies.h:112

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

◆ LiquidBridgeWilletSpecies() [2/2]

LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies ( const LiquidBridgeWilletSpecies s)

The default copy constructor.

Parameters
[in]thespecies that is copied
46 {
51 #ifdef DEBUG_CONSTRUCTOR
52  std::cout<<"LiquidBridgeWilletSpecies::LiquidBridgeWilletSpecies(const LiquidBridgeWilletSpecies &p) finished"<<std::endl;
53 #endif
54 }

References cbrtLiquidBridgeVolume_, contactAngle_, liquidBridgeVolume_, and surfaceTension_.

◆ ~LiquidBridgeWilletSpecies()

LiquidBridgeWilletSpecies::~LiquidBridgeWilletSpecies ( )

The default destructor.

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

Member Function Documentation

◆ getBaseName()

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")
89 {
90  return "LiquidBridgeWillet";
91 }

◆ getContactAngle()

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.
171 {
172  return contactAngle_;
173 }

References contactAngle_.

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

◆ getLiquidBridgeVolume()

Mdouble LiquidBridgeWilletSpecies::getLiquidBridgeVolume ( ) const

used to access the Volume of the liquid bridge.

Returns
the volume of the liquid bridge.
132 {
133  return liquidBridgeVolume_;
134 }

References liquidBridgeVolume_.

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

◆ getSurfaceTension()

Mdouble LiquidBridgeWilletSpecies::getSurfaceTension ( ) const

used to access the surface tension of the liquid.

Returns
the surface tension of the liquid.
153 {
154  return surfaceTension_;
155 }

References surfaceTension_.

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

◆ mix()

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
99 {
103 }
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
Mdouble getLiquidBridgeVolume() const
used to access the Volume of the liquid bridge.
Definition: LiquidBridgeWilletSpecies.cc:131
Mdouble getContactAngle() const
used to access the contact angle between particle and liquid bridge surface.
Definition: LiquidBridgeWilletSpecies.cc:170
Mdouble getSurfaceTension() const
used to access the surface tension of the liquid.
Definition: LiquidBridgeWilletSpecies.cc:152
void setLiquidBridgeVolume(Mdouble liquidBridgeVolume)
used to set the Volume of the liquid bridge.
Definition: LiquidBridgeWilletSpecies.cc:114

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

◆ read()

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

Reads the species properties from an input stream.

Parameters
[in]inputstream (typically the restart file)
77 {
78  std::string dummy;
79  is >> dummy >> liquidBridgeVolume_;
80  is >> dummy >> surfaceTension_;
81  is >> dummy >> contactAngle_;
83 }

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

◆ setContactAngle()

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.
161 {
162  logger.assert_debug(contactAngle >= 0,"Error in setContactAngle");
163  contactAngle_ = contactAngle;
165 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.

References contactAngle_, logger, and setInteractionDistance().

◆ setInteractionDistance()

void LiquidBridgeWilletSpecies::setInteractionDistance ( )
Returns
the maximum separation distance below which adhesive forces can occur (needed for contact detection)
107 {
109 }
BaseSpecies * getBaseSpecies() const
Definition: BaseForce.h:35
void setInteractionDistance(Mdouble interactionDistance)
Definition: BaseSpecies.cc:156

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

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

◆ setLiquidBridgeVolume()

void LiquidBridgeWilletSpecies::setLiquidBridgeVolume ( Mdouble  liquidBridgeVolume)

used to set the Volume of the liquid bridge.

Parameters
[in]liquidBridgeVolumethe volume of the liquid bridge.
115 {
116  if (liquidBridgeVolume >= 0)
117  {
118  liquidBridgeVolume_ = liquidBridgeVolume;
119  cbrtLiquidBridgeVolume_ = cbrt(liquidBridgeVolume);
121  }
122  else
123  {
124  logger(ERROR, "Error in setLiquidBridgeVolume(%)", liquidBridgeVolume);
125  }
126 }
@ ERROR

References cbrtLiquidBridgeVolume_, ERROR, liquidBridgeVolume_, logger, and setInteractionDistance().

Referenced by mix().

◆ setSurfaceTension()

void LiquidBridgeWilletSpecies::setSurfaceTension ( Mdouble  surfaceTension)

used to set the surface tension of the liquid.

Parameters
[in]surfaceTensionthe surface tension of the liquid.
140 {
141  if (surfaceTension >= 0)
142  surfaceTension_ = surfaceTension;
143  else
144  {
145  logger(ERROR, "Error in setSurfaceTension");
146  }
147 }

References ERROR, logger, and surfaceTension_.

◆ write()

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

Writes the species properties to an output stream.

Parameters
[out]outputstream (typically the restart file)
67 {
68  os << " liquidBridgeVolume " << liquidBridgeVolume_;
69  os << " surfaceTension " << surfaceTension_;
70  os << " contactAngle " << contactAngle_;
71 }

References contactAngle_, liquidBridgeVolume_, and surfaceTension_.

Member Data Documentation

◆ cbrtLiquidBridgeVolume_

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.

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

◆ contactAngle_

Mdouble LiquidBridgeWilletSpecies::contactAngle_
private

contact angle between particle and liquid bridge surface

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

◆ liquidBridgeVolume_

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.

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

◆ surfaceTension_

Mdouble LiquidBridgeWilletSpecies::surfaceTension_
private

surface tension of the liquid

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


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