LiquidMigrationLSSpecies Class Reference

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

#include <LiquidMigrationLSSpecies.h>

+ Inheritance diagram for LiquidMigrationLSSpecies:

Public Types

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

Public Member Functions

 LiquidMigrationLSSpecies ()
 The default constructor. More...
 
 LiquidMigrationLSSpecies (const LiquidMigrationLSSpecies &s)
 The default copy constructor. More...
 
 ~LiquidMigrationLSSpecies ()
 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 (LiquidMigrationLSSpecies *S, LiquidMigrationLSSpecies *T)
 creates default values for mixed species More...
 
void setInteractionDistance ()
 returns the largest separation distance at which adhesive short-range forces can occur. More...
 
void setLiquidBridgeVolumeMax (Mdouble liquidBridgeVolume)
 Returns a pointer to the adhesive force interaction LiquidMigrationLSInteraction. More...
 
Mdouble getLiquidBridgeVolumeMax () const
 used to access the Volume of the liquid bridge. More...
 
void setLiquidBridgeVolumeMin (Mdouble)
 used to set the Volume of the liquid bridge. More...
 
Mdouble getLiquidBridgeVolumeMin () const
 used to access the Volume of the liquid bridge. More...
 
void setDistributionCoefficient (Mdouble distributionCoefficient)
 used to set the distribution coefficient of the liquid. More...
 
Mdouble getDistributionCoefficient () const
 used to access the surface tension of the liquid. 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 (in radians) More...
 
Mdouble getContactAngle () const
 used to access the contact angle between particle and liquid bridge surface. More...
 
void setViscosity (Mdouble viscosity)
 used to set the Viscosity of the liquid. More...
 
Mdouble getViscosity () const
 used to access the Viscosity of the liquid. More...
 
- Public Member Functions inherited from BaseForce
BaseSpeciesgetBaseSpecies () const
 
void setBaseSpecies (BaseSpecies *baseSpecies)
 

Private Attributes

Mdouble liquidBridgeVolumeMax_
 Max volume a liquid bridge gets during formation; any excess remains in the liquid film of the particle. More...
 
Mdouble liquidBridgeVolumeMin_
 Minimum volume needed to form a liquid bridge. More...
 
Mdouble distributionCoefficient_
 distribution coefficient of the liquid More...
 
Mdouble contactAngle_
 contact angle between particle and liquid bridge surface More...
 
Mdouble surfaceTension_
 surface tension of the liquid More...
 
Mdouble viscosity_
 viscosity of the liquid More...
 

Detailed Description

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

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

Member Typedef Documentation

◆ InteractionType

The correct Interaction type for this AdhesiveForceSpecies.

Constructor & Destructor Documentation

◆ LiquidMigrationLSSpecies() [1/2]

LiquidMigrationLSSpecies::LiquidMigrationLSSpecies ( )

The default constructor.

30 {
31  liquidBridgeVolumeMax_ = 0.0; //std::numeric_limits<double>::infinity();
34  surfaceTension_ = 0.0;
35  contactAngle_ = 0.0;
36  viscosity_ = 0.0;
37 
38 #ifdef DEBUG_CONSTRUCTOR
39  logger(INFO, "LiquidMigrationLSSpecies::LiquidMigrationLSSpecies() finished");
40 #endif
41 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ INFO
Mdouble liquidBridgeVolumeMin_
Minimum volume needed to form a liquid bridge.
Definition: LiquidMigrationLSSpecies.h:144
Mdouble viscosity_
viscosity of the liquid
Definition: LiquidMigrationLSSpecies.h:167
Mdouble distributionCoefficient_
distribution coefficient of the liquid
Definition: LiquidMigrationLSSpecies.h:152
Mdouble liquidBridgeVolumeMax_
Max volume a liquid bridge gets during formation; any excess remains in the liquid film of the partic...
Definition: LiquidMigrationLSSpecies.h:139
Mdouble surfaceTension_
surface tension of the liquid
Definition: LiquidMigrationLSSpecies.h:162
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Definition: LiquidMigrationLSSpecies.h:157

References contactAngle_, distributionCoefficient_, INFO, liquidBridgeVolumeMax_, liquidBridgeVolumeMin_, logger, surfaceTension_, and viscosity_.

◆ LiquidMigrationLSSpecies() [2/2]

LiquidMigrationLSSpecies::LiquidMigrationLSSpecies ( const LiquidMigrationLSSpecies s)

The default copy constructor.

Parameters
[in]thespecies that is copied
47 {
54 
55 #ifdef DEBUG_CONSTRUCTOR
56  logger(INFO, "LiquidMigrationLSSpecies::LiquidMigrationLSSpecies(const LiquidMigrationLSSpecies &p) finished");
57 #endif
58 }

References contactAngle_, distributionCoefficient_, INFO, liquidBridgeVolumeMax_, liquidBridgeVolumeMin_, logger, surfaceTension_, and viscosity_.

◆ ~LiquidMigrationLSSpecies()

LiquidMigrationLSSpecies::~LiquidMigrationLSSpecies ( )

The default destructor.

61 {
62 #ifdef DEBUG_DESTRUCTOR
63  logger(INFO, "LiquidMigrationLSSpecies::~LiquidMigrationLSSpecies() finished");
64 #endif
65 }

References INFO, and logger.

Member Function Documentation

◆ getBaseName()

std::string LiquidMigrationLSSpecies::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")
98 {
99  return "LiquidMigrationLS";
100 }

◆ getContactAngle()

Mdouble LiquidMigrationLSSpecies::getContactAngle ( ) const

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

Returns
the contact angle between particle and liquid bridge surface.
226 {
227  return contactAngle_;
228 }

References contactAngle_.

Referenced by LiquidMigrationLSInteraction::computeAdhesionForce(), LiquidMigrationLSInteraction::getHalfFillingAngle(), LiquidMigrationLSInteraction::getRuptureDistance(), and mix().

◆ getDistributionCoefficient()

Mdouble LiquidMigrationLSSpecies::getDistributionCoefficient ( ) const

used to access the surface tension of the liquid.

Returns
the distribution coefficient of the liquid.
178 {
180 }

References distributionCoefficient_.

Referenced by mix(), and LiquidMigrationLSInteraction::rupture().

◆ getLiquidBridgeVolumeMax()

Mdouble LiquidMigrationLSSpecies::getLiquidBridgeVolumeMax ( ) const

used to access the Volume of the liquid bridge.

Returns
the maximum volume of the liquid bridge.
148 {
149  return liquidBridgeVolumeMax_;
150 }

References liquidBridgeVolumeMax_.

Referenced by LiquidMigrationLSInteraction::form(), mix(), and LiquidMigrationLSInteraction::rupture().

◆ getLiquidBridgeVolumeMin()

Mdouble LiquidMigrationLSSpecies::getLiquidBridgeVolumeMin ( ) const

used to access the Volume of the liquid bridge.

Returns
the minimum volume of the liquid bridge.
156 {
157  return liquidBridgeVolumeMin_;
158 }

References liquidBridgeVolumeMin_.

Referenced by LiquidMigrationLSInteraction::form(), and mix().

◆ getSurfaceTension()

Mdouble LiquidMigrationLSSpecies::getSurfaceTension ( ) const

used to access the surface tension of the liquid.

Returns
the surface tension of the liquid.
201 {
202  return surfaceTension_;
203 }

References surfaceTension_.

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

◆ getViscosity()

Mdouble LiquidMigrationLSSpecies::getViscosity ( ) const

used to access the Viscosity of the liquid.

Returns
the the viscosity of the liquid.
250 {
251  return viscosity_;
252 }

References viscosity_.

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

◆ mix()

void LiquidMigrationLSSpecies::mix ( LiquidMigrationLSSpecies S,
LiquidMigrationLSSpecies 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
108 {
115 }
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
Mdouble getSurfaceTension() const
used to access the surface tension of the liquid.
Definition: LiquidMigrationLSSpecies.cc:200
Mdouble getViscosity() const
used to access the Viscosity of the liquid.
Definition: LiquidMigrationLSSpecies.cc:249
void setLiquidBridgeVolumeMax(Mdouble liquidBridgeVolume)
Returns a pointer to the adhesive force interaction LiquidMigrationLSInteraction.
Definition: LiquidMigrationLSSpecies.cc:126
void setLiquidBridgeVolumeMin(Mdouble)
used to set the Volume of the liquid bridge.
Definition: LiquidMigrationLSSpecies.cc:137
Mdouble getLiquidBridgeVolumeMin() const
used to access the Volume of the liquid bridge.
Definition: LiquidMigrationLSSpecies.cc:155
Mdouble getDistributionCoefficient() const
used to access the surface tension of the liquid.
Definition: LiquidMigrationLSSpecies.cc:177
Mdouble getContactAngle() const
used to access the contact angle between particle and liquid bridge surface.
Definition: LiquidMigrationLSSpecies.cc:225
Mdouble getLiquidBridgeVolumeMax() const
used to access the Volume of the liquid bridge.
Definition: LiquidMigrationLSSpecies.cc:147

References BaseSpecies::average(), contactAngle_, distributionCoefficient_, getContactAngle(), getDistributionCoefficient(), getLiquidBridgeVolumeMax(), getLiquidBridgeVolumeMin(), getSurfaceTension(), getViscosity(), setLiquidBridgeVolumeMax(), setLiquidBridgeVolumeMin(), surfaceTension_, and viscosity_.

◆ read()

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

Reads the species properties from an input stream.

Parameters
[in]inputstream (typically the restart file)
84 {
85  std::string dummy;
86  is >> dummy >> liquidBridgeVolumeMax_;
87  helpers::readOptionalVariable(is,"liquidBridgeVolumeMin",liquidBridgeVolumeMin_);
88  is >> dummy >> distributionCoefficient_;
89  is >> dummy >> surfaceTension_;
90  is >> dummy >> contactAngle_;
91  is >> dummy >> viscosity_;
92 }
bool readOptionalVariable(std::istream &is, const std::string &name, T &variable)
Reads optional variables in the restart file.
Definition: FileIOHelpers.h:82

References contactAngle_, distributionCoefficient_, liquidBridgeVolumeMax_, liquidBridgeVolumeMin_, helpers::readOptionalVariable(), surfaceTension_, and viscosity_.

◆ setContactAngle()

void LiquidMigrationLSSpecies::setContactAngle ( Mdouble  contactAngle)

used to set the contact angle between particle and liquid bridge surface (in radians)

Parameters
[in]contactAnglethe contact angle between particle and liquid bridge surface.
209 {
210  if (contactAngle >= 0)
211  {
212  contactAngle_ = contactAngle;
214  }
215  else
216  {
217  logger(ERROR, "Error in setContactAngle, contactAngle should be >= 0");
218  exit(-1);
219  }
220 }
@ ERROR
void setInteractionDistance()
returns the largest separation distance at which adhesive short-range forces can occur.
Definition: LiquidMigrationLSSpecies.cc:118

References contactAngle_, ERROR, logger, and setInteractionDistance().

◆ setDistributionCoefficient()

void LiquidMigrationLSSpecies::setDistributionCoefficient ( Mdouble  distributionCoefficient)

used to set the distribution coefficient of the liquid.

Parameters
[in]distributionCoefficientthe distribution coefficient of the liquid.
164 {
165  if (distributionCoefficient >= 0 && distributionCoefficient <= 1.0)
166  distributionCoefficient_ = distributionCoefficient;
167  else
168  {
169  logger(ERROR, "Error in setDistributionCoefficient, DistributionCoefficient should be between 0 and 1");
170  exit(-1);
171  }
172 }

References distributionCoefficient_, ERROR, and logger.

◆ setInteractionDistance()

void LiquidMigrationLSSpecies::setInteractionDistance ( )

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

Returns
the maximum separation distance below which adhesive forces can occur (needed for contact detection)
119 {
120  getBaseSpecies()->setInteractionDistance((1.0 + 0.5 * contactAngle_) * (cbrt(liquidBridgeVolumeMax_) + 0.1 * pow(liquidBridgeVolumeMax_, 2.0/3.0)));
121 }
BaseSpecies * getBaseSpecies() const
Definition: BaseForce.h:35
void setInteractionDistance(Mdouble interactionDistance)
Definition: BaseSpecies.cc:156

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

Referenced by setContactAngle(), and setLiquidBridgeVolumeMax().

◆ setLiquidBridgeVolumeMax()

void LiquidMigrationLSSpecies::setLiquidBridgeVolumeMax ( Mdouble  liquidBridgeVolumeMax)

Returns a pointer to the adhesive force interaction LiquidMigrationLSInteraction.

used to set the Volume of the liquid bridge.

Parameters
[in]liquidBridgeVolumethe maximum volume of the liquid bridge.
127 {
128  logger.assert_always(liquidBridgeVolumeMax>=0,
129  "Error in setLiquidBridgeVolumeMax: liquidBridgeVolumeMax=%", liquidBridgeVolumeMax);
130  liquidBridgeVolumeMax_ = liquidBridgeVolumeMax;
132 }

References liquidBridgeVolumeMax_, logger, and setInteractionDistance().

Referenced by mix().

◆ setLiquidBridgeVolumeMin()

void LiquidMigrationLSSpecies::setLiquidBridgeVolumeMin ( Mdouble  liquidBridgeVolumeMin)

used to set the Volume of the liquid bridge.

Parameters
[in]liquidBridgeVolumethe minimum volume of the liquid bridge, the criterion value of the summation of the liquid film volumes for the liquid bridge forming.
138 {
139  logger.assert_always(liquidBridgeVolumeMin>=0,
140  "Error in setLiquidBridgeVolumeMin: liquidBridgeVolumeMin=%", liquidBridgeVolumeMin);
141  liquidBridgeVolumeMin_ = liquidBridgeVolumeMin;
142 }

References liquidBridgeVolumeMin_, and logger.

Referenced by mix().

◆ setSurfaceTension()

void LiquidMigrationLSSpecies::setSurfaceTension ( Mdouble  surfaceTension)

used to set the surface tension of the liquid.

Parameters
[in]surfaceTensionthe surface tension of the liquid.
187 {
188  if (surfaceTension >= 0)
189  surfaceTension_ = surfaceTension;
190  else
191  {
192  logger(ERROR, "Error in setSurfaceTension, surfaceTension should be >= 0");
193  exit(-1);
194  }
195 }

References ERROR, logger, and surfaceTension_.

◆ setViscosity()

void LiquidMigrationLSSpecies::setViscosity ( Mdouble  viscosity)

used to set the Viscosity of the liquid.

Parameters
[in]viscositythe viscosity of the liquid.
234 {
235  if (viscosity >= 0)
236  {
237  viscosity_ = viscosity;
238  }
239  else
240  {
241  logger(ERROR, "Error in setViscosity, viscosity should be >= 0");
242  exit(-1);
243  }
244 }

References ERROR, logger, and viscosity_.

◆ write()

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

Writes the species properties to an output stream.

Parameters
[out]outputstream (typically the restart file)
71 {
72  os << " liquidBridgeVolumeMax " << liquidBridgeVolumeMax_;
73  if (liquidBridgeVolumeMin_) os << " liquidBridgeVolumeMin " << liquidBridgeVolumeMin_;
74  os << " distributionCoefficient " << distributionCoefficient_;
75  os << " surfaceTension " << surfaceTension_;
76  os << " contactAngle " << contactAngle_;
77  os << " viscosity_ " << viscosity_;
78 }

References contactAngle_, distributionCoefficient_, liquidBridgeVolumeMax_, liquidBridgeVolumeMin_, surfaceTension_, and viscosity_.

Member Data Documentation

◆ contactAngle_

Mdouble LiquidMigrationLSSpecies::contactAngle_
private

contact angle between particle and liquid bridge surface

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

◆ distributionCoefficient_

Mdouble LiquidMigrationLSSpecies::distributionCoefficient_
private

distribution coefficient of the liquid

This is a variable that determines the fraction of the liquid that is to be distributed to the neighboring contacts of the particles after a liquid bridge rupture.

Referenced by getDistributionCoefficient(), LiquidMigrationLSSpecies(), mix(), read(), setDistributionCoefficient(), and write().

◆ liquidBridgeVolumeMax_

Mdouble LiquidMigrationLSSpecies::liquidBridgeVolumeMax_
private

Max volume a liquid bridge gets during formation; any excess remains in the liquid film of the particle.

Referenced by getLiquidBridgeVolumeMax(), LiquidMigrationLSSpecies(), read(), setInteractionDistance(), setLiquidBridgeVolumeMax(), and write().

◆ liquidBridgeVolumeMin_

Mdouble LiquidMigrationLSSpecies::liquidBridgeVolumeMin_
private

Minimum volume needed to form a liquid bridge.

Referenced by getLiquidBridgeVolumeMin(), LiquidMigrationLSSpecies(), read(), setLiquidBridgeVolumeMin(), and write().

◆ surfaceTension_

Mdouble LiquidMigrationLSSpecies::surfaceTension_
private

surface tension of the liquid

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

◆ viscosity_

Mdouble LiquidMigrationLSSpecies::viscosity_
private

viscosity of the liquid

Referenced by getViscosity(), LiquidMigrationLSSpecies(), mix(), read(), setViscosity(), and write().


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