MeltableInteraction Class Reference

#include <MeltableInteraction.h>

+ Inheritance diagram for MeltableInteraction:

Public Member Functions

 MeltableInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
 
 MeltableInteraction (const MeltableInteraction &p)=default
 
 MeltableInteraction ()=default
 
void read (std::istream &is) override
 Interaction read function, which accepts an std::istream as input. More...
 
void write (std::ostream &os) const override
 Interaction print function, which accepts an std::ostream as input. More...
 
void computeNormalForce ()
 
void actionsAfterTimeStep () override
 
Mdouble getElasticEnergy () const override
 Returns a Mdouble which is the current about of Elastic energy in the interaction. More...
 
std::string getBaseName () const
 
const MeltableNormalSpeciesgetMeltableNormalSpecies () const
 
Mdouble getBondingOverlap () const
 
void setBondingOverlap (Mdouble bondingOverlap)
 
void addBondingOverlap (Mdouble bondingOverlap)
 
Mdouble getNeckRadius () const
 
void addNeckRadius2 (Mdouble diffNeckRadius2)
 
Mdouble getOverlapGrowthRate () const
 
- Public Member Functions inherited from BaseInteraction
 BaseInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
 A constructor takes the BaseInteractable objects which are interacting (come into contact) and time the interaction starts. More...
 
 BaseInteraction ()
 
 BaseInteraction (const BaseInteraction &p)
 Copy constructor. More...
 
 ~BaseInteraction () override
 The destructor. It removes this interactions from the objects that were interacting, and writes the time to a file when needed. More...
 
virtual void actionsOnErase ()
 If an interaction needs to do something before it gets erased, add it here. E.g. Liquid bridges rupture at the end of their lifetime, and the liquid bridge volume has to be redistributed. The reason this action is not done in the destructor is that this action should not be taken when erasing ghost interactions. More...
 
virtual void computeForce ()
 Virtual function that contains the force law between the two objects interacting. More...
 
void writeToFStat (std::ostream &os, Mdouble time) const
 Writes forces data to the FStat file. More...
 
std::string getName () const override
 Virtual function which allows interactions to be named. More...
 
void setDistance (Mdouble distance)
 Sets the interaction distance between the two interacting objects. More...
 
void setNormal (Vec3D normal)
 Sets the normal vector between the two interacting objects. More...
 
void setOverlap (Mdouble overlap)
 Set the overlap between the two interacting object. More...
 
void setContactPoint (Vec3D contactPoint)
 Set the location of the contact point between the two interacting objects. More...
 
void setTimeStamp (unsigned timeStamp)
 Updates the time step of the interacting. Note, time steps used to find completed interactions. More...
 
void setSpecies (const BaseSpecies *species)
 Set the Species of the interaction; note this can either be a Species or MixedSpecies. More...
 
void setP (BaseInteractable *P)
 Sets the first object involved in the interaction (normally a particle). More...
 
void setI (BaseInteractable *I)
 Sets the second object involved in the interaction (often particle or wall). More...
 
void importP (BaseInteractable *P)
 Sets the first object involved in the interaction (normally a particle). More...
 
void importI (BaseInteractable *I)
 Sets the second object involved in the interaction (often particle or wall). More...
 
Vec3D getIP () const
 
Vec3D getIC () const
 
Vec3D getCP () const
 
void setLagrangeMultiplier (Mdouble multiplier)
 
Mdouble getLagrangeMultiplier ()
 
void setHandler (InteractionHandler *handler)
 Sets the pointer to the interaction hander which is storing this interaction. More...
 
InteractionHandlergetHandler () const
 Gets a point to the interaction handlers to which this interaction belongs. More...
 
const Vec3DgetForce () const
 Gets the current force (vector) between the two interacting objects. More...
 
const Vec3DgetTorque () const
 Gets the current torque (vector) between the two interacting objects. More...
 
const Vec3DgetNormal () const
 Gets the normal vector between the two interacting objects. More...
 
const Vec3DgetContactPoint () const
 Gets constant reference to contact point (vector). More...
 
Mdouble getOverlap () const
 Returns a Mdouble with the current overlap between the two interacting objects. More...
 
Mdouble getOverlapVolume () const
 Returns the overlap volume between two interacting objects. More...
 
Mdouble getContactRadius () const
 Returns a Mdouble with the current contact between the two interacting objects. More...
 
void removeFromHandler ()
 Removes this interaction from its interaction hander. More...
 
void copySwitchPointer (const BaseInteractable *original, BaseInteractable *ghost) const
 This copies the interactions of the original particle and replaces the original with the ghost copy. More...
 
void gatherContactStatistics ()
 
BaseInteractablegetP ()
 Returns a pointer to first object involved in the interaction (normally a particle). More...
 
BaseInteractablegetI ()
 Returns a pointer to the second object involved in the interaction (often a wall or a particle). More...
 
const BaseInteractablegetP () const
 Returns a constant pointer to the first object involved in the interaction. More...
 
const BaseInteractablegetI () const
 Returns a constant pointer to the second object involved in the interaction. More...
 
Mdouble getTimeStamp () const
 Returns an Mdouble which is the time stamp of the interaction. More...
 
virtual void integrate (Mdouble timeStep)
 integrates variables of the interaction which need to be integrate e.g. the tangential overlap. More...
 
virtual Mdouble getTangentialOverlap () const
 get the length of the current tangential overlap More...
 
Mdouble getDistance () const
 Returns an Mdouble which is the norm (length) of distance vector. More...
 
const Vec3DgetRelativeVelocity () const
 Returns a constant reference to a vector of relative velocity. More...
 
Mdouble getNormalRelativeVelocity () const
 Returns a double which is the norm (length) of the relative velocity vector. More...
 
Mdouble getAbsoluteNormalForce () const
 Returns the absolute value of the norm (length) of the Normal force vector. More...
 
virtual BaseInteractioncopy () const =0
 Makes a copy of the interaction and returns a pointer to the copy. More...
 
void setFStatData (std::fstream &fstat, BaseParticle *P, BaseWall *I)
 
void setFStatData (std::fstream &fstat, BaseParticle *P, BaseParticle *I)
 
unsigned int getMultiContactIdentifier () const
 
void setMultiContactIdentifier (unsigned int multiContactIdentifier_)
 
virtual void rotateHistory (Matrix3D &rotationMatrix)
 When periodic particles are used, some interactions need certain history properties rotated (e.g. tangential springs). This is the function for that. More...
 
virtual unsigned getNumberOfFieldsVTK () const
 
virtual std::string getTypeVTK (unsigned i) const
 
virtual std::string getNameVTK (unsigned i) const
 
virtual std::vector< MdoublegetFieldVTK (unsigned i) const
 
void addForce (Vec3D force)
 add an force increment to the total force. More...
 
void addTorque (Vec3D torque)
 add a torque increment to the total torque. More...
 
void setForce (Vec3D force)
 set total force (this is used by the normal force, tangential forces are added use addForce) More...
 
void setTorque (Vec3D torque)
 set the total force (this is used by the normal force, tangential torques are added use addTorque) More...
 
const BaseSpeciesgetBaseSpecies () const
 Return a constant point to BaseSpecies of the interaction. More...
 
virtual void createMPIType ()
 
virtual void * createMPIInteractionDataArray (unsigned int numberOfInteractions) const
 
virtual void deleteMPIInteractionDataArray (void *dataArray)
 
virtual void getMPIInteraction (void *historyDataArray, unsigned int index) const
 copies the history interactions into the data array More...
 
virtual void getInteractionDetails (void *interactionDataArray, unsigned int index, unsigned int &identificationP, unsigned int &identificationI, bool &isWallInteraction, unsigned &timeStamp)
 
virtual void setMPIInteraction (void *interactionDataArray, unsigned int index, bool resetPointers)
 
void setBasicMPIInteractionValues (int P, int I, unsigned timeStamp, Vec3D force, Vec3D torque, bool isWallInteraction, bool resetPointers)
 
void setIdentificationP (unsigned int identification)
 
void setIdentificationI (int identification)
 
void setWallInteraction (bool flag)
 
unsigned int getIdentificationP ()
 
int getIdentificationI ()
 
bool isWallInteraction ()
 
virtual bool isBonded () const
 
- Public Member Functions inherited from BaseObject
 BaseObject ()=default
 Default constructor. More...
 
 BaseObject (const BaseObject &p)=default
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()=default
 virtual destructor More...
 
virtual void moveInHandler (unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (unsigned long 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...
 
void setGroupId (unsigned groupId)
 
unsigned getGroupId () const
 

Private Attributes

Mdouble bondingOverlap_ = 0.0
 
Mdouble neckRadius2_ = constants::NaN
 

Additional Inherited Members

- Protected Member Functions inherited from BaseInteraction
virtual const Vec3D getTangentialForce () const
 
Mdouble getEffectiveRadius () const
 Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More...
 
Mdouble getEffectiveMass () const
 Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More...
 
void setRelativeVelocity (Vec3D relativeVelocity)
 set the relative velocity of the current of the interactions. More...
 
void setNormalRelativeVelocity (Mdouble normalRelativeVelocit)
 set the normal component of the relative velocity. More...
 
void setAbsoluteNormalForce (Mdouble absoluteNormalForce)
 the absolute values of the norm (length) of the normal force More...
 
virtual Mdouble getElasticEnergyAtEquilibrium (Mdouble adhesiveForce) const
 
virtual void reverseHistory ()
 When periodic particles some interaction need certain history properties reversing. This is the function for that. More...
 
void writeInteraction (std::ostream &os, bool created) const
 Writes information about a interaction to the interaction file. More...
 

Constructor & Destructor Documentation

◆ MeltableInteraction() [1/3]

MeltableInteraction::MeltableInteraction ( BaseInteractable P,
BaseInteractable I,
unsigned  timeStamp 
)
inline
20  : BaseInteraction(P, I, timeStamp) {}
BaseInteraction()
Definition: BaseInteraction.cc:43
#define I
Definition: main.h:127
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77

◆ MeltableInteraction() [2/3]

MeltableInteraction::MeltableInteraction ( const MeltableInteraction p)
default

◆ MeltableInteraction() [3/3]

MeltableInteraction::MeltableInteraction ( )
default

Member Function Documentation

◆ actionsAfterTimeStep()

void MeltableInteraction::actionsAfterTimeStep ( )
overridevirtual

Reimplemented from BaseInteraction.

119 {
120  // bonding radius
121  auto pParticle = dynamic_cast<const MeltableParticle*>(getP());
122  auto iParticle = dynamic_cast<const MeltableParticle*>(getI());
123 
124  // calculate the bonding overlap
125  const Mdouble solidRadiusP = pParticle->getSolidRadius();
126  const Mdouble solidRadiusI = iParticle?iParticle->getSolidRadius():solidRadiusP;
127  const Mdouble moltenLayerThicknessP = pParticle->getRadius() - solidRadiusP;
128  const Mdouble moltenLayerThicknessI = iParticle?iParticle->getRadius() - solidRadiusI:0.0;
129  const Mdouble solidOverlap = getOverlap() - moltenLayerThicknessP - moltenLayerThicknessI;
130  const Mdouble timeStep = getHandler()->getDPMBase()->getTimeStep();
131  if (solidOverlap >= 0) {
132  Mdouble meltRate = pParticle->getMeltRate(solidRadiusP)
133  + (iParticle?iParticle->getMeltRate(solidRadiusI):0.0);
134  if (meltRate < 0) {
135  addBondingOverlap(-meltRate*timeStep);
136  }
137  } else {
138  setBondingOverlap(0.0);
139  }
140 
141  // calculate neck radius
142  using mathsFunc::square;
143  const Mdouble radius = 2.0*getEffectiveRadius();
144  const Mdouble dOverlap = timeStep*getOverlapGrowthRate();
145  if (moltenLayerThicknessP==0 and moltenLayerThicknessI==0) {
146  if (getBondingOverlap()>0) {
147  addNeckRadius2(radius*dOverlap);
148  }
149  } else {
150  addNeckRadius2(2.0*radius*dOverlap);
151  }
152 }
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
Definition: BaseHandler.h:733
Mdouble getEffectiveRadius() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap)
Definition: BaseInteraction.cc:774
BaseInteractable * getI()
Returns a pointer to the second object involved in the interaction (often a wall or a particle).
Definition: BaseInteraction.h:264
BaseInteractable * getP()
Returns a pointer to first object involved in the interaction (normally a particle).
Definition: BaseInteraction.h:253
InteractionHandler * getHandler() const
Gets a point to the interaction handlers to which this interaction belongs.
Definition: BaseInteraction.cc:247
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
Definition: BaseInteraction.h:219
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1241
void addBondingOverlap(Mdouble bondingOverlap)
Definition: MeltableInteraction.h:55
void setBondingOverlap(Mdouble bondingOverlap)
Definition: MeltableInteraction.h:50
Mdouble getOverlapGrowthRate() const
Definition: MeltableInteraction.h:68
Mdouble getBondingOverlap() const
Definition: MeltableInteraction.h:45
void addNeckRadius2(Mdouble diffNeckRadius2)
Definition: MeltableInteraction.h:64
Definition: MeltableParticle.h:15
radius
Definition: UniformPSDSelfTest.py:15
T square(const T val)
squares a number
Definition: ExtendedMath.h:86

References addBondingOverlap(), addNeckRadius2(), getBondingOverlap(), BaseHandler< T >::getDPMBase(), BaseInteraction::getEffectiveRadius(), BaseInteraction::getHandler(), BaseInteraction::getI(), BaseInteraction::getOverlap(), getOverlapGrowthRate(), BaseInteraction::getP(), DPMBase::getTimeStep(), UniformPSDSelfTest::radius, setBondingOverlap(), and mathsFunc::square().

◆ addBondingOverlap()

void MeltableInteraction::addBondingOverlap ( Mdouble  bondingOverlap)
inline
56  {
57  bondingOverlap_ += bondingOverlap;
58  }
Mdouble bondingOverlap_
Definition: MeltableInteraction.h:73

References bondingOverlap_.

Referenced by actionsAfterTimeStep().

◆ addNeckRadius2()

void MeltableInteraction::addNeckRadius2 ( Mdouble  diffNeckRadius2)
inline
64  {
65  neckRadius2_ = std::max(neckRadius2_+diffNeckRadius2,0.0);
66  }
Mdouble neckRadius2_
Definition: MeltableInteraction.h:75
#define max(a, b)
Definition: datatypes.h:23

References max, and neckRadius2_.

Referenced by actionsAfterTimeStep().

◆ computeNormalForce()

void MeltableInteraction::computeNormalForce ( )
24  {
25 
26  setRelativeVelocity(getP()->getVelocityAtContact(getContactPoint()) - getI()->getVelocityAtContact(getContactPoint()));
28 
29  using mathsFunc::square;
30  using constants::pi;
31 
32  auto pParticle = dynamic_cast<MeltableParticle*>(getP());
33  auto iParticle = dynamic_cast<MeltableParticle*>(getI());
34  logger.assert_debug(pParticle || iParticle,"Particles need to be of type MeltableParticle");
35 
36  double normalForce = 0;
37  // In case two particles in contacts
38  if (getOverlap() >= 0)
39  {
41  // Thermal conduction
42  // pi*a^2/|rij|
43  //Mdouble neckRadius = std::min(sqrt(2.0*harmonicMeanRadius * getOverlap()),
44  // constants::cbrt_2*harmonicMeanRadius);
45  if (std::isnan(neckRadius2_)) {
47  }
48  Mdouble contactAreaOverDist = pi * neckRadius2_ / getDistance();
49  double iTemperature = iParticle
50  ? iParticle->getTemperature()
51  : (species->getWallTemperature()<0 ? pParticle->getTemperature() : species->getWallTemperature());
52  double thermalConductionP_ = species->getThermalConductivityCoefficient() * contactAreaOverDist * (iTemperature - pParticle->getTemperature());
53  pParticle->addHeat(thermalConductionP_);
54  if (iParticle) iParticle->addHeat(-thermalConductionP_);
55 
56  // solid radius
57  Mdouble solidRadiusP = pParticle->getSolidRadius();
58  Mdouble solidRadiusI = iParticle?iParticle->getSolidRadius():solidRadiusP;
59  Mdouble meanSolidRadius = 0.5*(solidRadiusP+solidRadiusI);
60  Mdouble moltenLayerThicknessP = pParticle->getRadius() - solidRadiusP;
61  Mdouble moltenLayerThicknessI = iParticle?iParticle->getRadius() - solidRadiusI:0.0;
62  Mdouble solidOverlap = getOverlap() - moltenLayerThicknessP - moltenLayerThicknessI;
63  Mdouble solidContactRadius = sqrt(meanSolidRadius * solidOverlap - 0.25*solidOverlap*solidOverlap);
64 
65  // temperature dependent elastic modulus:
66  //Mdouble tempDependentElasticModulus = (effectiveElasticModulus / 2.0) * (1 + tanh(-(species->getMeltingTemperature() - aveTemp) / (species->getDeltaT())));
67 
68  // if melt -> vis + surfaceTension forces
69  if (moltenLayerThicknessI> 0 | moltenLayerThicknessP > 0)
70  {
71  const Mdouble harmonicMeanRadius = 2.0*getEffectiveRadius();
72  const Mdouble neckRadius = getNeckRadius();
73  //neckRadius = std::sqrt(harmonicMeanRadius*getOverlap());
74  const Mdouble meanTemperature = (pParticle->getTemperature() + iTemperature) / 2.0;
75  const Mdouble jagotaTerm = harmonicMeanRadius / getDistance(); //1.0;
76  const Mdouble viscosity = species->getRefViscosity()
77  * mathsFunc::exp(species->getActivationEnergy() / (constants::R * meanTemperature));
78  const Mdouble viscousForce = 3.0 * pi * viscosity * neckRadius * jagotaTerm * getNormalRelativeVelocity();
79  const Mdouble surfaceTensionForce = (3.0/2.0) * 0.83 * pi * species->getSurfaceTension() * neckRadius;
80  normalForce -= viscousForce;
81  normalForce -= surfaceTensionForce;
82  //std::cout << viscousForce << " " << surfaceTensionForce << std::endl;
83  }
84 
85  // 1. solid-solid
86  if (solidOverlap > 0) {
87  const Mdouble effectiveElasticModulus = species->getEffectiveElasticModulus();
88  const Mdouble bondingContactRadius = sqrt(meanSolidRadius * getBondingOverlap());//-0.25*getBondingOverlap()*getBondingOverlap());
89  if (solidOverlap > getBondingOverlap()) {
90  //Calculate the damping coefficient as: d = 2*eta*sqrt(m_eff * stiffness)
91  Mdouble stiffness = 2.0 * effectiveElasticModulus * solidContactRadius;
92  Mdouble dissipationCoefficient =
93  2.0 * species->getDissipation() * sqrt(2.0 * getEffectiveMass() * stiffness);
94  Mdouble elasticForce = 4.0 / 3.0 * effectiveElasticModulus
95  * (solidContactRadius * solidOverlap - bondingContactRadius * getBondingOverlap());
96  Mdouble dampingForce = dissipationCoefficient * getNormalRelativeVelocity();
97  normalForce += elasticForce - dampingForce;
98  //std::cout << "s " << solidOverlap << " " << elasticForce << " " << dampingForce << std::endl;
99  }
100  else {
101  //Calculate the damping coefficient as: d = 2*eta*sqrt(m_eff * stiffness)
102  Mdouble stiffness = 2.0 * effectiveElasticModulus * bondingContactRadius;
103  Mdouble dissipationCoefficient = 2.0 * species->getDissipation()
104  * sqrt(2.0 * getEffectiveMass() * stiffness);
105  Mdouble elasticForce = 2.0 * effectiveElasticModulus
106  * bondingContactRadius * (solidOverlap - getBondingOverlap());
107  Mdouble dampingForce = dissipationCoefficient * getNormalRelativeVelocity();
108  normalForce += elasticForce - dampingForce;
109  //std::cout << "s " << elasticForce << " " << dampingForce << std::endl;
110  }
111  }
112  }
113  setAbsoluteNormalForce(std::abs(normalForce));
114  setForce(getNormal() * normalForce);
115  setTorque(Vec3D(0.0, 0.0, 0.0));
116 }
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
const Vec3D & getRelativeVelocity() const
Returns a constant reference to a vector of relative velocity.
Definition: BaseInteraction.cc:554
Mdouble getEffectiveMass() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap)
Definition: BaseInteraction.cc:792
void setAbsoluteNormalForce(Mdouble absoluteNormalForce)
the absolute values of the norm (length) of the normal force
Definition: BaseInteraction.cc:651
const Vec3D & getContactPoint() const
Gets constant reference to contact point (vector).
Definition: BaseInteraction.h:213
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Definition: BaseInteraction.h:205
Mdouble getDistance() const
Returns an Mdouble which is the norm (length) of distance vector.
Definition: BaseInteraction.cc:520
Mdouble getNormalRelativeVelocity() const
Returns a double which is the norm (length) of the relative velocity vector.
Definition: BaseInteraction.cc:565
void setRelativeVelocity(Vec3D relativeVelocity)
set the relative velocity of the current of the interactions.
Definition: BaseInteraction.cc:630
void setNormalRelativeVelocity(Mdouble normalRelativeVelocit)
set the normal component of the relative velocity.
Definition: BaseInteraction.cc:641
void setForce(Vec3D force)
set total force (this is used by the normal force, tangential forces are added use addForce)
Definition: BaseInteraction.cc:608
void setTorque(Vec3D torque)
set the total force (this is used by the normal force, tangential torques are added use addTorque)
Definition: BaseInteraction.cc:619
const MeltableNormalSpecies * getMeltableNormalSpecies() const
Definition: MeltableInteraction.cc:183
Mdouble getNeckRadius() const
Definition: MeltableInteraction.h:60
Definition: MeltableNormalSpecies.h:13
Mdouble getActivationEnergy() const
Definition: MeltableNormalSpecies.cc:256
Mdouble getWallTemperature() const
Definition: MeltableNormalSpecies.h:121
Mdouble getRefViscosity() const
Definition: MeltableNormalSpecies.cc:280
Mdouble getThermalConductivityCoefficient() const
Definition: MeltableNormalSpecies.cc:119
Mdouble getDissipation() const
Definition: MeltableNormalSpecies.cc:95
Mdouble getSurfaceTension() const
Definition: MeltableNormalSpecies.cc:268
Mdouble getEffectiveElasticModulus() const
Definition: MeltableNormalSpecies.h:131
Definition: Kernel/Math/Vector.h:30
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:56
#define isnan(X)
Definition: main.h:109
const Mdouble R
Definition: ExtendedMath.h:29
const Mdouble pi
Definition: ExtendedMath.h:23
Mdouble exp(Mdouble Exponent)
Definition: ExtendedMath.cc:63

References abs(), Vec3D::dot(), mathsFunc::exp(), MeltableNormalSpecies::getActivationEnergy(), getBondingOverlap(), BaseInteraction::getContactPoint(), MeltableNormalSpecies::getDissipation(), BaseInteraction::getDistance(), MeltableNormalSpecies::getEffectiveElasticModulus(), BaseInteraction::getEffectiveMass(), BaseInteraction::getEffectiveRadius(), BaseInteraction::getI(), getMeltableNormalSpecies(), getNeckRadius(), BaseInteraction::getNormal(), BaseInteraction::getNormalRelativeVelocity(), BaseInteraction::getOverlap(), BaseInteraction::getP(), MeltableNormalSpecies::getRefViscosity(), BaseInteraction::getRelativeVelocity(), MeltableNormalSpecies::getSurfaceTension(), MeltableNormalSpecies::getThermalConductivityCoefficient(), MeltableNormalSpecies::getWallTemperature(), isnan, logger, neckRadius2_, constants::pi, constants::R, BaseInteraction::setAbsoluteNormalForce(), BaseInteraction::setForce(), BaseInteraction::setNormalRelativeVelocity(), BaseInteraction::setRelativeVelocity(), BaseInteraction::setTorque(), sqrt(), and mathsFunc::square().

◆ getBaseName()

std::string MeltableInteraction::getBaseName ( ) const
inline
36  {
37  return "Meltable";
38  }

◆ getBondingOverlap()

Mdouble MeltableInteraction::getBondingOverlap ( ) const
inline
46  {
47  return bondingOverlap_;
48  }

References bondingOverlap_.

Referenced by actionsAfterTimeStep(), and computeNormalForce().

◆ getElasticEnergy()

Mdouble MeltableInteraction::getElasticEnergy ( ) const
overridevirtual

Returns a Mdouble which is the current about of Elastic energy in the interaction.

The children of this class will implement this function; however, it is blank. This function will contain the calculation for th elastic energy. Note, it is not virtual as it is not called from within this class.

Todo:

Reimplemented from BaseInteraction.

155 {
157  // CALCULATE FOR THE MODEL:
158  //
159 /* if (getOverlap() >= 0)
160  {
161  //return 8. / 15. * getSpecies()->getElasticModulus() * std::sqrt(getEffectiveRadius() * getOverlap()) * mathsFunc::square(getOverlap());
162  //
163  if ((getSolidOverlap() > getBondingOverlap() & getSolidOverlap() > 0))
164  {
165  return ((4.0 / 3.0) * (2.0 / 5.0) * getSpecies()->getElasticModulus() * getSolidContactRadius() * mathsFunc::square(getSolidOverlap()))
166  - ((4.0 / 3.0) * getSpecies()->getElasticModulus() * getBondingContactRadius() * getBondingOverlap() * getSolidOverlap());
167  }
168  else if (getSolidOverlap() <= getBondingOverlap() & getSolidOverlap() > 0)
169  {
170  return ((4.0 / 3.0) * (3.0 / 4.0) * getSpecies()->getElasticModulus() * getBondingContactRadius() * mathsFunc::square(getSolidOverlap()))
171  - ((4.0 / 3.0) * (3.0 / 2.0) * getSpecies()->getElasticModulus() * getBondingContactRadius() * getBondingOverlap() * getSolidOverlap());
172  }
173  else
174  return 0.0;
175  }
176  else
177  {
178  return 0.0;
179  }*/
180 return 0.0;
181 }

◆ getMeltableNormalSpecies()

const MeltableNormalSpecies * MeltableInteraction::getMeltableNormalSpecies ( ) const

Returns the type of normal species required for this kind of interaction

184 {
185  return dynamic_cast<const MeltableNormalSpecies*>(getBaseSpecies()); //downcast
186 }
const BaseSpecies * getBaseSpecies() const
Return a constant point to BaseSpecies of the interaction.
Definition: BaseInteraction.cc:663

References BaseInteraction::getBaseSpecies().

Referenced by computeNormalForce().

◆ getNeckRadius()

Mdouble MeltableInteraction::getNeckRadius ( ) const
inline
60  {
61  return std::sqrt(neckRadius2_);
62  };

References neckRadius2_, and sqrt().

Referenced by computeNormalForce().

◆ getOverlapGrowthRate()

Mdouble MeltableInteraction::getOverlapGrowthRate ( ) const
inline
68  {
69  return Vec3D::dot(getI()->getVelocity()-getP()->getVelocity(),getNormal());
70  }

References Vec3D::dot(), BaseInteraction::getI(), BaseInteraction::getNormal(), and BaseInteraction::getP().

Referenced by actionsAfterTimeStep().

◆ read()

void MeltableInteraction::read ( std::istream &  is)
overridevirtual

Interaction read function, which accepts an std::istream as input.

BaseInteaction read functions. Reads in all the information about an interaction. Note, this can be from any istream but would normally be a file See also BaseInteaction::write

Parameters
[in]isstd::istream to which the information is read from.

Reimplemented from BaseInteraction.

17 {
19  std::string dummy;
20  is >> dummy >> bondingOverlap_;
21  is >> dummy >> neckRadius2_;
22 }
void read(std::istream &is) override
Interaction read function, which accepts an std::istream as input.
Definition: BaseInteraction.cc:165
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286

References bondingOverlap_, neckRadius2_, BaseInteraction::read(), and oomph::Global_string_for_annotation::string().

◆ setBondingOverlap()

void MeltableInteraction::setBondingOverlap ( Mdouble  bondingOverlap)
inline
51  {
52  bondingOverlap_ = bondingOverlap;
53  }

References bondingOverlap_.

Referenced by actionsAfterTimeStep().

◆ write()

void MeltableInteraction::write ( std::ostream &  os) const
overridevirtual

Interaction print function, which accepts an std::ostream as input.

BaseInteaction write function. Writes out all the information required to recreate this interaction. To write this interaction to the screen call write(std::cout). See also BaseInteraction::read

Parameters
[in]osstd::ostream to which the information is written. Note, is any ostram is can be file or screen.
Todo:
should we output id's here? os << " id " << getId() << " particleIds " << P_->getId() << " " << I_->getId();

Reimplemented from BaseInteraction.

10 {
12  os << " bondingOverlap " << bondingOverlap_;
13  os << " neckRadius2 " << neckRadius2_;
14 }
void write(std::ostream &os) const override
Interaction print function, which accepts an std::ostream as input.
Definition: BaseInteraction.cc:137

References bondingOverlap_, neckRadius2_, and BaseInteraction::write().

Member Data Documentation

◆ bondingOverlap_

Mdouble MeltableInteraction::bondingOverlap_ = 0.0
private

◆ neckRadius2_

Mdouble MeltableInteraction::neckRadius2_ = constants::NaN
private

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