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.
thermal_spheric_continuum_particle.h
Go to the documentation of this file.
1 // Kratos Multi-Physics - ThermalDEM Application
2 //
3 // License: BSD License
4 // Kratos default license: kratos/license.txt
5 //
6 // Main authors: Ferran Arrufat
7 //
8 
9 /*
10  By Rafael Rangel (2022):
11  This class was brought from the DEMApp and was originally called thermal_spheric_particle.
12  It was a template class that could derive from spheric_particle or spheric_continuum_particle.
13  Since a thermal_spheric_particle is already implemented, this class is no longer a template and
14  derive only from the spheric_continuum_particle.
15  Its original implementation was mantained to serve as a base class for sintering_spheric_continuum_particle,
16  as it was before.
17  HOWEVER, THE THERMAL BEHAVIOR IMPLEMENTED HERE CAN BE BETTER SIMULATED WITH THE NEW THERMAL SPHERIC PARTICLE.
18 */
19 
20 #if !defined(KRATOS_THERMAL_SPHERIC_CONTINUUM_PARTICLE_H_INCLUDED)
21 #define KRATOS_THERMAL_SPHERIC_CONTINUUM_PARTICLE_H_INCLUDED
22 
23 // System includes
24 #include <string>
25 #include <iostream>
26 
27 // External includes
28 #include "includes/define.h"
30 #include "custom_utilities/AuxiliaryFunctions.h"
31 #include "utilities/openmp_utils.h"
34 
35 // Project includes
37 
38 namespace Kratos
39 {
40  class KRATOS_API(THERMAL_DEM_APPLICATION) ThermalSphericContinuumParticle : public SphericContinuumParticle
41  {
42  public:
43 
44  // Pointer definition
46 
50 
51  typedef Node NodeType;
53  typedef std::size_t IndexType;
56 
57  // Constructor
59  ThermalSphericContinuumParticle(IndexType NewId, GeometryType::Pointer pGeometry) : SphericContinuumParticle(NewId, pGeometry){};
60  ThermalSphericContinuumParticle(IndexType NewId, NodesArrayType const& ThisNodes) : SphericContinuumParticle(NewId, ThisNodes){};
61  ThermalSphericContinuumParticle(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties) : SphericContinuumParticle(NewId, pGeometry, pProperties){};
62 
63  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override {
64  return Element::Pointer(new ThermalSphericContinuumParticle(NewId, GetGeometry().Create(ThisNodes), pProperties));
65  };
66 
67  // Destructor
69 
70  // Public methods
71  void Initialize (const ProcessInfo& r_process_info) override;
72  const double& GetTemperature (void);
73  void SetTemperature (const double temperature);
74  const double& GetAmbientTemperature (void);
75  virtual void ComputeContactArea (const double rmin, double indentation, double& calculation_area);
76  void ComputeConductiveHeatFlux (const ProcessInfo& r_process_info);
77  void ComputeConvectiveHeatFlux (const ProcessInfo& r_process_info);
78  void CalculateRightHandSide (const ProcessInfo& r_current_process_info, double dt, const array_1d<double,3>& gravity) override;
79  void FinalizeSolutionStep (const ProcessInfo& r_process_info) override;
80  void UpdateTemperature (const ProcessInfo& r_process_info);
81  void RelativeDisplacementAndVelocityOfContactPointDueToOtherReasons (const ProcessInfo& r_process_info, double DeltDisp[3], double RelVel[3], double OldLocalCoordSystem[3][3], double LocalCoordSystem[3][3], SphericParticle* neighbour_iterator) override;
82  void UpdateTemperatureDependentRadius (const ProcessInfo& r_process_info);
83  void UpdateNormalRelativeDisplacementAndVelocityDueToThermalExpansion (const ProcessInfo& r_process_info, double& thermalDeltDisp, double& thermalRelVel, ThermalSphericContinuumParticle* element2);
84 
85  // Turn back information as a string
86  virtual std::string Info() const override {
87  std::stringstream buffer;
88  buffer << "ThermalSphericContinuumParticle";
89  return buffer.str();
90  }
91 
92  // Print object information
93  virtual void PrintInfo(std::ostream& rOStream) const override { rOStream << "ThermalSphericContinuumParticle"; }
94  virtual void PrintData(std::ostream& rOStream) const override {}
95 
96  protected:
97 
98  // Neighbor information
103 
104  private:
105 
106  // Serializer
107  friend class Serializer;
108 
109  virtual void save(Serializer& rSerializer) const override {
111  }
112 
113  virtual void load(Serializer& rSerializer) override {
115  }
116 
117  }; // Class ThermalSphericContinuumParticle
118 }// namespace Kratos
119 
120 #endif // KRATOS_THERMAL_SPHERIC_CONTINUUM_PARTICLE_H_INCLUDED defined
std::size_t IndexType
Definition: flags.h:74
Geometry base class.
Definition: geometry.h:71
typename TContainerType::iterator ptr_iterator
Definition: global_pointers_vector.h:85
This class defines the node.
Definition: node.h:65
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
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: spheric_continuum_particle.h:26
Definition: spheric_particle.h:31
Definition: thermal_spheric_continuum_particle.h:41
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition: thermal_spheric_continuum_particle.h:52
double mPreviousTemperature
Definition: thermal_spheric_continuum_particle.h:102
GlobalPointersVector< Element > ParticleWeakVectorType
Definition: thermal_spheric_continuum_particle.h:47
ThermalSphericContinuumParticle()
Definition: thermal_spheric_continuum_particle.h:58
GlobalPointersVector< Element >::iterator ParticleWeakIteratorType
Definition: thermal_spheric_continuum_particle.h:49
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: thermal_spheric_continuum_particle.h:63
Geometry< Node > GeometryType
Definition: thermal_spheric_continuum_particle.h:54
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: thermal_spheric_continuum_particle.h:93
std::size_t IndexType
Definition: thermal_spheric_continuum_particle.h:53
ThermalSphericContinuumParticle(IndexType NewId, NodesArrayType const &ThisNodes)
Definition: thermal_spheric_continuum_particle.h:60
ThermalSphericContinuumParticle(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: thermal_spheric_continuum_particle.h:59
ParticleWeakVectorType::ptr_iterator ParticleWeakIteratorType_ptr
Definition: thermal_spheric_continuum_particle.h:48
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: thermal_spheric_continuum_particle.h:94
virtual std::string Info() const override
Turn back information as a string.
Definition: thermal_spheric_continuum_particle.h:86
double mConductiveHeatFlux
Definition: thermal_spheric_continuum_particle.h:99
double mThermalConductivity
Definition: thermal_spheric_continuum_particle.h:100
double mSpecificHeat
Definition: thermal_spheric_continuum_particle.h:101
Node NodeType
Definition: thermal_spheric_continuum_particle.h:51
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(ThermalSphericContinuumParticle)
ThermalSphericContinuumParticle(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: thermal_spheric_continuum_particle.h:61
Properties PropertiesType
Definition: thermal_spheric_continuum_particle.h:55
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
dt
Definition: DEM_benchmarks.py:173
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
float temperature
Definition: face_heat.py:58
def load(f)
Definition: ode_solve.py:307