LiquidMigrationLSInteraction.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2023, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #ifndef LiquidMigrationLSInteraction_H
27 #define LiquidMigrationLSInteraction_H
28 
30 #include "Math/Vector.h"
31 #include "ParticleHandler.h"
32 #include "InteractionHandler.h"
33 
34 class BaseParticle;
35 
37 
38 class BaseInteractable;
39 
45 {
46 public:
51 
56 
57  //used for mpi
59 
64 
69 
70  void actionsOnErase() override;
71 
72  void actionsAfterTimeStep() override;
73 
77  void computeAdhesionForce();
78 
82  void read(std::istream& is) override;
83 
87  void write(std::ostream& os) const override;
88 
93  Mdouble getElasticEnergy() const override;
94 
98  const LiquidMigrationLSSpecies* getSpecies() const;
99 
103  std::string getBaseName() const;
104 
106 
107  void setLiquidBridgeVolume(Mdouble liquidBridgeVolume);
108 
109  void addLiquidBridgeVolume(Mdouble liquidBridgeVolume);
110 
111  bool getWasInContact() const;
112 
113  void setWasInContact(bool wasInContact);
114 
115  void rupture();
116 
117  void form();
118 
120 
122 
124 
125  int getNumberOfContacts(BaseInteractable* interactable);
126 
130  unsigned getNumberOfFieldsVTK() const override;
131 
132  std::string getTypeVTK(unsigned i) const override;
133 
134  std::string getNameVTK(unsigned i) const override;
135 
136  std::vector<Mdouble> getFieldVTK(unsigned i) const override;
137 
139 
141 
142 private:
148 
150 };
151 
152 #endif
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:55
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:60
Definition: BaseParticle.h:54
Container to store Interaction objects.
Definition: InteractionHandler.h:45
Defines the liquid bridge LS interaction between two particles or walls.
Definition: LiquidMigrationLSInteraction.h:45
Mdouble liquidBridgeVolume_
Definition: LiquidMigrationLSInteraction.h:149
bool getWasInContact() const
Definition: LiquidMigrationLSInteraction.cc:512
void actionsAfterTimeStep() override
test if particle needs to be ruptured
Definition: LiquidMigrationLSInteraction.cc:175
void write(std::ostream &os) const override
Interaction print function, which accepts an std::ostream as input.
Definition: LiquidMigrationLSInteraction.cc:95
void read(std::istream &is) override
Interaction read function, which accepts an std::istream as input.
Definition: LiquidMigrationLSInteraction.cc:105
void computeAdhesionForce()
Computes the adhesive forces for liquid bridge LS type of interaction.
Definition: LiquidMigrationLSInteraction.cc:122
~LiquidMigrationLSInteraction() override
Destructor.
Definition: LiquidMigrationLSInteraction.cc:80
LiquidMigrationLSInteraction()
Definition: LiquidMigrationLSInteraction.cc:54
bool wasInContact_
A history parameter to store if the particles were in contact or not. Useful to compute adhesive forc...
Definition: LiquidMigrationLSInteraction.h:147
unsigned getNumberOfFieldsVTK() const override
Definition: LiquidMigrationLSInteraction.cc:539
std::string getNameVTK(unsigned i) const override
Definition: LiquidMigrationLSInteraction.cc:549
Mdouble getHalfFillingAngle()
Definition: LiquidMigrationLSInteraction.cc:528
void rupture()
Definition: LiquidMigrationLSInteraction.cc:288
static Mdouble getTotalLiquidFilmVolume(ParticleHandler &)
Definition: LiquidMigrationLSInteraction.cc:560
int getNumberOfContacts(BaseInteractable *interactable)
Definition: LiquidMigrationLSInteraction.cc:275
Mdouble getElasticEnergy() const override
Returns the amount of Elastic energy involved in an interaction. Basically used in case you want to w...
Definition: LiquidMigrationLSInteraction.cc:474
std::string getBaseName() const
Returns the name of the interaction, see Interaction.h.
Definition: LiquidMigrationLSInteraction.cc:492
static Mdouble getTotalLiquidBridgeVolume(InteractionHandler &)
Definition: LiquidMigrationLSInteraction.cc:574
Mdouble getLimitingDistance()
Definition: LiquidMigrationLSInteraction.cc:534
const LiquidMigrationLSSpecies * getSpecies() const
Returns a pointer to the adhesive force species LiquidMigrationLSSpecies.
Definition: LiquidMigrationLSInteraction.cc:483
void setLiquidBridgeVolume(Mdouble liquidBridgeVolume)
Definition: LiquidMigrationLSInteraction.cc:502
Mdouble getLiquidBridgeVolume() const
Definition: LiquidMigrationLSInteraction.cc:497
void form()
Definition: LiquidMigrationLSInteraction.cc:193
std::string getTypeVTK(unsigned i) const override
Definition: LiquidMigrationLSInteraction.cc:544
LiquidMigrationLSSpecies SpeciesType
An alias name for LiquidMigrationLSSpecies data type.
Definition: LiquidMigrationLSInteraction.h:50
void setWasInContact(bool wasInContact)
Definition: LiquidMigrationLSInteraction.cc:517
std::vector< Mdouble > getFieldVTK(unsigned i) const override
Definition: LiquidMigrationLSInteraction.cc:555
Mdouble getRuptureDistance()
Definition: LiquidMigrationLSInteraction.cc:522
void addLiquidBridgeVolume(Mdouble liquidBridgeVolume)
Definition: LiquidMigrationLSInteraction.cc:507
void actionsOnErase() override
If an interaction needs to do something before it gets erased, add it here. E.g. Liquid bridges ruptu...
Definition: LiquidMigrationLSInteraction.cc:87
LiquidMigrationLSSpecies contains the parameters used to describe a short-range force caused by liqui...
Definition: LiquidMigrationLSSpecies.h:38
Container to store all BaseParticle.
Definition: ParticleHandler.h:48
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51