26 #ifndef LiquidFilmParticle_H
27 #define LiquidFilmParticle_H
34 template<
class Particle>
86 void write(std::ostream& os)
const override
101 void read(std::istream& is)
override;
130 std::vector<Mdouble>
getFieldVTK(
unsigned i)
const override;
149 template<
class Particle>
154 is >> dummy >> liquidVolume_;
156 if (dummy ==
"invInertia")
158 is >> dummy >> liquidVolume_;
162 template<
class Particle>
166 return "liquidFilmVolume";
168 return "liquidBridgeVolume";
170 return "fullLiquidVolume";
173 template<
class Particle>
177 return std::vector<Mdouble>(1, liquidVolume_);
179 Mdouble fullLiquidVolume = (
i==2)?0:liquidVolume_;
180 for (
auto k : this->getInteractions()) {
183 if (j && j->getLiquidBridgeVolume()) {
184 fullLiquidVolume += 0.5*j->getLiquidBridgeVolume();
189 if (j && j->getLiquidBridgeVolume()) {
190 fullLiquidVolume += 0.5 * j->getLiquidBridgeVolume();
195 return std::vector<Mdouble>(1, fullLiquidVolume);
LiquidFilm< SphericalParticle > LiquidFilmParticle
Definition: LiquidFilmParticle.h:199
Definition: LiquidFilmParticle.h:36
void setLiquidVolume(Mdouble liquidVolume)
Definition: LiquidFilmParticle.h:108
~LiquidFilm() override=default
Particle destructor, needs to be implemented and checked if it removes tangential spring information.
std::vector< Mdouble > getFieldVTK(unsigned i) const override
Definition: LiquidFilmParticle.h:174
LiquidFilm()
Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1.
Definition: LiquidFilmParticle.h:42
Mdouble getLiquidVolume() const
Definition: LiquidFilmParticle.h:103
LiquidFilm(const LiquidFilm &p)
Particle copy constructor, which accepts as input a reference to a Particle. It creates a copy of thi...
Definition: LiquidFilmParticle.h:56
LiquidFilm * copy() const override
Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism.
Definition: LiquidFilmParticle.h:75
std::string getName() const override
Definition: LiquidFilmParticle.h:96
void read(std::istream &is) override
Definition: LiquidFilmParticle.h:150
Mdouble liquidVolume_
Definition: LiquidFilmParticle.h:136
std::string getTypeVTK(unsigned i) const override
Definition: LiquidFilmParticle.h:123
void addLiquidVolume(Mdouble liquidVolume)
Definition: LiquidFilmParticle.h:113
void write(std::ostream &os) const override
Definition: LiquidFilmParticle.h:86
std::string getNameVTK(unsigned i) const override
Definition: LiquidFilmParticle.h:163
bool isSphericalParticle() const override
Definition: LiquidFilmParticle.h:132
unsigned getNumberOfFieldsVTK() const override
Definition: LiquidFilmParticle.h:118
Defines the liquid bridge LS interaction between two particles or walls.
Definition: LiquidMigrationLSInteraction.h:45
Defines the liquid bridge willet interaction between two particles or walls.
Definition: LiquidMigrationWilletInteraction.h:45
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51