HeatFluidCoupledParticle.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef HeatFluidCoupledParticle_H
6 #define HeatFluidCoupledParticle_H
7 
8 #include "ThermalParticle.h"
9 #include "LiquidFilmParticle.h"
10 
23 template<class Particle>
24 class HeatFluidCoupled : public Thermal<LiquidFilm<Particle>>
25 {
26 public:
31  HeatFluidCoupled() = default;
32 
44  HeatFluidCoupled(const HeatFluidCoupled& p) = default;
45 
50  ~HeatFluidCoupled() override = default;
51 
57  HeatFluidCoupled* copy() const override
58  {
59  return new HeatFluidCoupled<Particle>(*this);
60  }
61 
66  std::string getName() const override
67  {
68  return "HeatFluidCoupled" + Particle::getName();
69  }
71  unsigned getNumberOfFieldsVTK() const override { return 5; }
72 
74  std::string getTypeVTK(unsigned) const override { return "Float32"; }
75 
77  std::string getNameVTK(unsigned i) const override {
78  if (i==0)
79  return "fullLiquidVolume";
80  else if (i==1)
81  return "liquidFilmVolume";
82  else if (i==2)
83  return "liquidBridgeVolume";
84  else if (i==3)
85  return "totalEvaporatedLiquidVolume";
86  else /* i=4 */
87  return "temperature";
88  }
89 
91  std::vector<Mdouble> getFieldVTK(unsigned i) const override {
92  if (i==0)
93  return { this->getFullLiquidVolume() };
94  else if (i==1)
95  return { this->liquidVolume_ };
96  else if (i==2)
97  return { this->getLiquidBridgeVolume() };
98  else if (i==3)
99  return { this->totalEvaporatedLiquidVolume_ };
100  else /* i=4 */
101  return { this->temperature_ };
102  }
103 
105  void actionsAfterTimeStep() override {
106  this->getSpecies()->actionsAfterTimeStep(this);
107  }
108 };
109 
112 #endif
int i
Definition: BiCGSTAB_step_by_step.cpp:9
std::string getName(int argc, char *argv[])
Definition: CombineParallelDataFiles.cpp:16
HeatFluidCoupled< SphericalParticle > HeatFluidCoupledParticle
Template specialisation of HeatFluidCoupled<Particle> for spherical particles.
Definition: HeatFluidCoupledParticle.h:111
float * p
Definition: Tutorial_Map_using.cpp:9
Class of particles that store both temperature and liquid volume, which is adapted for the CFD-DEM st...
Definition: HeatFluidCoupledParticle.h:25
void actionsAfterTimeStep() override
The actionAfterTimeStep is defined in the species, as we cannot extract the species properties of a H...
Definition: HeatFluidCoupledParticle.h:105
std::vector< Mdouble > getFieldVTK(unsigned i) const override
Tells the vtkWriter the value of each field written for this particle type.
Definition: HeatFluidCoupledParticle.h:91
HeatFluidCoupled * copy() const override
HeatFluidCoupled copy method. Use copy constructor of this HeatFluidCoupled to create a copy on the h...
Definition: HeatFluidCoupledParticle.h:57
unsigned getNumberOfFieldsVTK() const override
Tells the vtkWriter how many fields should be written for this particle type.
Definition: HeatFluidCoupledParticle.h:71
HeatFluidCoupled(const HeatFluidCoupled &p)=default
HeatFluidCoupled copy constructor, which accepts as input a reference to a HeatFluidCoupled....
std::string getName() const override
Returns the name of the object; in this case "HeatFluidCoupledParticle".
Definition: HeatFluidCoupledParticle.h:66
HeatFluidCoupled()=default
HeatFluidCoupled constructor creates a HeatFluidCoupled at (0,0,0) with radius, mass and inertia equa...
std::string getTypeVTK(unsigned) const override
Tells the vtkWriter the type of each field written for this particle type.
Definition: HeatFluidCoupledParticle.h:74
std::string getNameVTK(unsigned i) const override
Tells the vtkWriter the name of each field written for this particle type.
Definition: HeatFluidCoupledParticle.h:77
~HeatFluidCoupled() override=default
HeatFluidCoupled destructor, needs to be implemented and checked if it removes tangential spring info...
Mdouble getLiquidBridgeVolume() const
Definition: LiquidFilmParticle.h:215
Mdouble totalEvaporatedLiquidVolume_
Definition: LiquidFilmParticle.h:153
Mdouble liquidVolume_
Definition: LiquidFilmParticle.h:153
Mdouble getFullLiquidVolume() const
Definition: LiquidFilmParticle.h:99
Definition: ThermalParticle.h:15
Mdouble temperature_
Definition: ThermalParticle.h:120
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286