KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
nanoparticle.h
Go to the documentation of this file.
1 //
2 // Author: Miguel Angel Celigueta maceli@cimne.upc.edu
3 //
4 
5 #if !defined(KRATOS_NANOPARTICLE_H_INCLUDED )
6 #define KRATOS_NANOPARTICLE_H_INCLUDED
7 
8 // System includes
9 #include <string>
10 #include <iostream>
11 
12 // Project includes
13 #include "includes/define.h"
14 #include "spheric_particle.h"
15 
16 namespace Kratos
17 {
18 class KRATOS_API(DEM_APPLICATION) NanoParticle : public SphericParticle
19 {
20 public:
21 
24 
28 
30  {
31  mThicknessOverRadius = 0.01; // Hard-coded but should go into node
32  }
33 
34  NanoParticle( IndexType NewId, GeometryType::Pointer pGeometry ):SphericParticle(NewId, pGeometry){mThicknessOverRadius = 0.01;}
35  NanoParticle( IndexType NewId, NodesArrayType const& ThisNodes):SphericParticle(NewId, ThisNodes){mThicknessOverRadius = 0.01;}
36  NanoParticle( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties ):SphericParticle(NewId, pGeometry, pProperties){mThicknessOverRadius = 0.01;}
37 
38  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override
39  {
40  return SphericParticle::Pointer(new NanoParticle(NewId, GetGeometry().Create(ThisNodes), pProperties));
41  }
42 
44  virtual ~NanoParticle();
45 
47  NanoParticle& operator=(NanoParticle const& rOther);
48 
50  virtual std::string Info() const override
51  {
52  std::stringstream buffer;
53  buffer << "NanoParticle" ;
54  return buffer.str();
55  }
56 
58  virtual void PrintInfo(std::ostream& rOStream) const override {rOStream << "NanoParticle";}
59 
61  virtual void PrintData(std::ostream& rOStream) const override {}
62  void Initialize(const ProcessInfo& r_process_info) override;
63 
64  void ComputeAdditionalForces(array_1d<double, 3>& additionally_applied_force,
65  array_1d<double, 3>& additionally_applied_moment,
66  const ProcessInfo& r_current_process_info,
67  const array_1d<double,3>& gravity) override;
68 
69  void MemberDeclarationFirstStep(const ProcessInfo& r_process_info) override;
70 
71  double CalculateVolume() override;
72 
73  double GetInteractionRadius(const int radius_index = 0) override;
74  void SetInteractionRadius(const double radius, const int radius_index = 0) override;
75  void SetDefaultRadiiHierarchy(const double radius) override;
76 
78 
79 protected:
80 
83 
84 private:
85 
86  friend class Serializer;
87 
88  virtual void save(Serializer& rSerializer) const override
89  {
91  }
92 
93  virtual void load(Serializer& rSerializer) override
94  {
96  }
97 
99  NanoParticle(NanoParticle const& rOther)
100  {
101  *this = rOther;
102  }
103 
105 
106 }; // Class NanoParticle
107 
109 inline std::istream& operator >> (std::istream& rIStream, NanoParticle& rThis) {return rIStream;}
110 
112 inline std::ostream& operator << (std::ostream& rOStream, const NanoParticle& rThis) {
113  rThis.PrintInfo(rOStream);
114  rOStream << std::endl;
115  rThis.PrintData(rOStream);
116  return rOStream;
117 }
118 
119 } // namespace Kratos
120 
121 #endif // KRATOS_NANOPARTICLE_H_INCLUDED defined
122 
123 
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::size_t IndexType
Definition: flags.h:74
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Definition: nanoparticle.h:19
double mInteractionRadius
Definition: nanoparticle.h:82
NanoParticle(IndexType NewId, NodesArrayType const &ThisNodes)
Definition: nanoparticle.h:35
double mThicknessOverRadius
Definition: nanoparticle.h:81
NanoParticle()
Definition: nanoparticle.h:29
NanoParticle(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: nanoparticle.h:36
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: nanoparticle.h:61
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: nanoparticle.h:38
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: nanoparticle.h:58
virtual std::string Info() const override
Turn back information as a string.
Definition: nanoparticle.h:50
double GetCationConcentration()
NanoParticle(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: nanoparticle.h:34
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(NanoParticle)
Pointer definition of NanoParticle.
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: spheric_particle.h:31
virtual double GetDensity()
Definition: spheric_particle.cpp:2214
double mRadius
Definition: spheric_particle.h:442
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
float radius
Definition: mesh_to_mdpa_converter.py:18
def load(f)
Definition: ode_solve.py:307