LiquidBridgeBagheriSpecies Class Reference

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

#include <LiquidBridgeBagheriSpecies.h>

+ Inheritance diagram for LiquidBridgeBagheriSpecies:

Public Types

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

Public Member Functions

 LiquidBridgeBagheriSpecies ()
 The default constructor. More...
 
 LiquidBridgeBagheriSpecies (const LiquidBridgeBagheriSpecies &s)
 The default copy constructor. More...
 
 ~LiquidBridgeBagheriSpecies ()
 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 (LiquidBridgeBagheriSpecies *S, LiquidBridgeBagheriSpecies *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...
 
void setMeanRadius (Mdouble meanRadius)
 used to access the mean radius of the particle. More...
 
Mdouble getMeanRadius () const
 used to access the mean radius of the particle. 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...
 
Mdouble meanRadius_
 mean radius of the particles More...
 

Detailed Description

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

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

Member Typedef Documentation

◆ InteractionType

The correct Interaction type for this AdhesiveForceSpecies.

Constructor & Destructor Documentation

◆ LiquidBridgeBagheriSpecies() [1/2]

LiquidBridgeBagheriSpecies::LiquidBridgeBagheriSpecies ( )

The default constructor.

10 {
13  surfaceTension_ = 0;
14  contactAngle_ = 0;
15 #ifdef DEBUG_CONSTRUCTOR
16  std::cout<<"LiquidBridgeBagheriSpecies::LiquidBridgeBagheriSpecies() finished"<<std::endl;
17 #endif
18 }
Mdouble contactAngle_
contact angle between particle and liquid bridge surface
Definition: LiquidBridgeBagheriSpecies.h:105
Mdouble liquidBridgeVolume_
Volume of the liquid bridge.
Definition: LiquidBridgeBagheriSpecies.h:92
Mdouble cbrtLiquidBridgeVolume_
Cube root of the liquid bridge.
Definition: LiquidBridgeBagheriSpecies.h:100
Mdouble surfaceTension_
surface tension of the liquid
Definition: LiquidBridgeBagheriSpecies.h:110

References cbrtLiquidBridgeVolume_, contactAngle_, liquidBridgeVolume_, and surfaceTension_.

◆ LiquidBridgeBagheriSpecies() [2/2]

LiquidBridgeBagheriSpecies::LiquidBridgeBagheriSpecies ( const LiquidBridgeBagheriSpecies s)

The default copy constructor.

Parameters
[in]thespecies that is copied
24 {
25  liquidBridgeVolume_ = s.liquidBridgeVolume_;
26  cbrtLiquidBridgeVolume_ = s.cbrtLiquidBridgeVolume_;
27  surfaceTension_ = s.surfaceTension_;
28  contactAngle_ = s.contactAngle_;
29 
30 #ifdef DEBUG_CONSTRUCTOR
31  std::cout<<"LiquidBridgeBagheriSpecies::LiquidBridgeBagheriSpecies(const LiquidBridgeBagheriSpecies &p) finished"<<std::endl;
32 #endif
33 }
RealScalar s
Definition: level1_cplx_impl.h:130

References cbrtLiquidBridgeVolume_, contactAngle_, liquidBridgeVolume_, s, and surfaceTension_.

◆ ~LiquidBridgeBagheriSpecies()

LiquidBridgeBagheriSpecies::~LiquidBridgeBagheriSpecies ( )

The default destructor.

36 {
37 #ifdef DEBUG_DESTRUCTOR
38  std::cout<<"LiquidBridgeBagheriSpecies::~LiquidBridgeBagheriSpecies() finished"<<std::endl;
39 #endif
40 }

Member Function Documentation

◆ getBaseName()

std::string LiquidBridgeBagheriSpecies::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")
69 {
70  return "LiquidBridgeBagheri";
71 }

◆ getContactAngle()

Mdouble LiquidBridgeBagheriSpecies::getContactAngle ( ) const

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

Returns
the contact angle between particle and liquid bridge surface.
145 {
146  return contactAngle_;
147 }

References contactAngle_.

Referenced by LiquidBridgeBagheriInteraction::computeAdhesionForce().

◆ getLiquidBridgeVolume()

Mdouble LiquidBridgeBagheriSpecies::getLiquidBridgeVolume ( ) const

used to access the Volume of the liquid bridge.

Returns
the volume of the liquid bridge.
108 {
109  return liquidBridgeVolume_;
110 }

References liquidBridgeVolume_.

Referenced by LiquidBridgeBagheriInteraction::computeAdhesionForce().

◆ getMeanRadius()

Mdouble LiquidBridgeBagheriSpecies::getMeanRadius ( ) const

used to access the mean radius of the particle.

◆ getSurfaceTension()

Mdouble LiquidBridgeBagheriSpecies::getSurfaceTension ( ) const

used to access the surface tension of the liquid.

Returns
the surface tension of the liquid.
125 {
126  return surfaceTension_;
127 }

References surfaceTension_.

Referenced by LiquidBridgeBagheriInteraction::computeAdhesionForce().

◆ mix()

void LiquidBridgeBagheriSpecies::mix ( LiquidBridgeBagheriSpecies S,
LiquidBridgeBagheriSpecies 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
79 {
80  liquidBridgeVolume_ = BaseSpecies::average(S->getLiquidBridgeVolume(), T->getLiquidBridgeVolume());
82  surfaceTension_ = BaseSpecies::average(S->getSurfaceTension(), T->getSurfaceTension());
83  contactAngle_ = BaseSpecies::average(S->getContactAngle(), T->getContactAngle());
85 }
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:89
void setInteractionDistance()
Definition: LiquidBridgeBagheriSpecies.cc:88
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T cbrt(const T &x)
Definition: MathFunctions.h:1320
@ S
Definition: quadtree.h:62

References BaseSpecies::average(), Eigen::numext::cbrt(), cbrtLiquidBridgeVolume_, contactAngle_, liquidBridgeVolume_, oomph::QuadTreeNames::S, setInteractionDistance(), and surfaceTension_.

◆ read()

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

Reads the species properties from an input stream.

Parameters
[in]inputstream (typically the restart file)
56 {
57  std::string dummy;
58  is >> dummy >> liquidBridgeVolume_;
60  is >> dummy >> surfaceTension_;
61  is >> dummy >> contactAngle_;
63 }
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286

References Eigen::numext::cbrt(), cbrtLiquidBridgeVolume_, contactAngle_, liquidBridgeVolume_, setInteractionDistance(), oomph::Global_string_for_annotation::string(), and surfaceTension_.

◆ setContactAngle()

void LiquidBridgeBagheriSpecies::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.
133 {
134  // Only allow contact angles which are valid according to https://doi.org/10.1007/s40571-024-00772-5
135  // i.e. angles smaller than 50 degrees
136  logger.assert_debug(contactAngle >= 0 && contactAngle <= constants::pi * 5.0 / 18.0, "LiquidBridgeBagheriSpecies::setContactAngle: Contact angle must be in the range [0, 5/18 pi]");
137  contactAngle_ = contactAngle;
139 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
const Mdouble pi
Definition: ExtendedMath.h:23

References contactAngle_, logger, constants::pi, and setInteractionDistance().

◆ setInteractionDistance()

void LiquidBridgeBagheriSpecies::setInteractionDistance ( )
virtual
Returns
the maximum separation distance below which adhesive forces can occur (needed for contact detection)

Reimplemented from BaseAdhesiveForce.

89 {
91 }
BaseSpecies * getBaseSpecies() const
Definition: BaseForce.h:15
void setInteractionDistance(Mdouble interactionDistance)
Definition: BaseSpecies.cc:135

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

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

◆ setLiquidBridgeVolume()

void LiquidBridgeBagheriSpecies::setLiquidBridgeVolume ( Mdouble  liquidBridgeVolume)

used to set the Volume of the liquid bridge.

Parameters
[in]liquidBridgeVolumethe volume of the liquid bridge.
97 {
98  logger.assert_always(liquidBridgeVolume >= 0, "Error in setLiquidBridgeVolume(%), liquidBridgeVolume should be >= 0", liquidBridgeVolume);
99  liquidBridgeVolume_ = liquidBridgeVolume;
100  cbrtLiquidBridgeVolume_ = cbrt(liquidBridgeVolume);
102 }

References Eigen::numext::cbrt(), cbrtLiquidBridgeVolume_, liquidBridgeVolume_, logger, and setInteractionDistance().

◆ setMeanRadius()

void LiquidBridgeBagheriSpecies::setMeanRadius ( Mdouble  meanRadius)

used to access the mean radius of the particle.

◆ setSurfaceTension()

void LiquidBridgeBagheriSpecies::setSurfaceTension ( Mdouble  surfaceTension)

used to set the surface tension of the liquid.

Parameters
[in]surfaceTensionthe surface tension of the liquid.
116 {
117  logger.assert_always(surfaceTension >= 0, "Error in setSurfaceTension(%), surfaceTension should be >= 0", surfaceTension);
118  surfaceTension_ = surfaceTension;
119 }

References logger, and surfaceTension_.

◆ write()

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

Writes the species properties to an output stream.

Parameters
[out]outputstream (typically the restart file)
46 {
47  os << " liquidBridgeVolume " << liquidBridgeVolume_;
48  os << " surfaceTension " << surfaceTension_;
49  os << " contactAngle " << contactAngle_;
50 }

References contactAngle_, liquidBridgeVolume_, and surfaceTension_.

Member Data Documentation

◆ cbrtLiquidBridgeVolume_

Mdouble LiquidBridgeBagheriSpecies::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 LiquidBridgeBagheriSpecies(), mix(), read(), setInteractionDistance(), and setLiquidBridgeVolume().

◆ contactAngle_

Mdouble LiquidBridgeBagheriSpecies::contactAngle_
private

contact angle between particle and liquid bridge surface

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

◆ liquidBridgeVolume_

Mdouble LiquidBridgeBagheriSpecies::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(), LiquidBridgeBagheriSpecies(), mix(), read(), setLiquidBridgeVolume(), and write().

◆ meanRadius_

Mdouble LiquidBridgeBagheriSpecies::meanRadius_
private

mean radius of the particles

◆ surfaceTension_

Mdouble LiquidBridgeBagheriSpecies::surfaceTension_
private

surface tension of the liquid

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


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