ThermalInteraction< NormalForceInteraction > Class Template Reference

#include <ThermalInteraction.h>

+ Inheritance diagram for ThermalInteraction< NormalForceInteraction >:

Public Types

typedef ThermalSpecies< typename NormalForceInteraction::SpeciesType > SpeciesType
 

Public Member Functions

 ThermalInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
 Constructor. More...
 
 ThermalInteraction ()
 Default Constructor. More...
 
 ThermalInteraction (const ThermalInteraction &p)
 Copy constructor. More...
 
virtual ~ThermalInteraction ()
 Destructor. More...
 
void computeNormalForce ()
 Computes the normal forces due to linear plastic visco elastic interaction. More...
 

Member Typedef Documentation

◆ SpeciesType

template<class NormalForceInteraction >
typedef ThermalSpecies<typename NormalForceInteraction::SpeciesType> ThermalInteraction< NormalForceInteraction >::SpeciesType

Constructor & Destructor Documentation

◆ ThermalInteraction() [1/3]

template<class NormalForceInteraction >
ThermalInteraction< NormalForceInteraction >::ThermalInteraction ( BaseInteractable P,
BaseInteractable I,
unsigned  timeStamp 
)

Constructor.

50  : BaseInteraction(P, I, timeStamp), NormalForceInteraction(P, I, timeStamp)
51 {}
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
#define I
Definition: main.h:127
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77

◆ ThermalInteraction() [2/3]

template<class NormalForceInteraction >
ThermalInteraction< NormalForceInteraction >::ThermalInteraction

Default Constructor.

◆ ThermalInteraction() [3/3]

template<class NormalForceInteraction >
ThermalInteraction< NormalForceInteraction >::ThermalInteraction ( const ThermalInteraction< NormalForceInteraction > &  p)

Copy constructor.

61 {}
float * p
Definition: Tutorial_Map_using.cpp:9

◆ ~ThermalInteraction()

template<class NormalForceInteraction >
ThermalInteraction< NormalForceInteraction >::~ThermalInteraction
virtual

Destructor.

65 {}

Member Function Documentation

◆ computeNormalForce()

template<class NormalForceInteraction >
void ThermalInteraction< NormalForceInteraction >::computeNormalForce

Computes the normal forces due to linear plastic visco elastic interaction.

Compute temperature change due to heat conduction between particles

70 {
71  NormalForceInteraction::computeNormalForce();
72  Mdouble radius = 2.0 * NormalForceInteraction::getEffectiveRadius();
73  Mdouble contactArea = constants::pi * radius * std::max(0.0,NormalForceInteraction::getOverlap());
74  const SpeciesType* species = static_cast<const SpeciesType*>(NormalForceInteraction::getBaseSpecies()->getNormalForce());
75  ThermalParticle* pParticle = dynamic_cast<ThermalParticle*>(NormalForceInteraction::getP());
76  ThermalParticle* iParticle = dynamic_cast<ThermalParticle*>(NormalForceInteraction::getI());
77  // if both p and i are particles
78  if (pParticle && iParticle)
79  {
80  /* compute heat transfer rate due to heat conduction, Q=cond*dTemp*area/dist */
81  Mdouble heatTransfer = species->getThermalConductivity()
82  * (pParticle->getTemperature() - iParticle->getTemperature())
83  * contactArea / NormalForceInteraction::getDistance();
84  /* m*dT = Q/c*dt */
85  Mdouble mdT = heatTransfer / species->getHeatCapacity()
86  * NormalForceInteraction::getHandler()->getDPMBase()->getTimeStep();
87  pParticle->addTemperature(-mdT * pParticle->getInvMass());
88  iParticle->addTemperature(mdT * iParticle->getInvMass());
89  }
90 }
ThermalSpecies< typename NormalForceInteraction::SpeciesType > SpeciesType
Definition: ThermalInteraction.h:18
Definition: ThermalParticle.h:15
void addTemperature(Mdouble temperature)
Definition: ThermalParticle.h:91
Mdouble getTemperature() const
Definition: ThermalParticle.h:80
#define max(a, b)
Definition: datatypes.h:23
radius
Definition: UniformPSDSelfTest.py:15
const Mdouble pi
Definition: ExtendedMath.h:23

References Thermal< Particle >::addTemperature(), ThermalSpecies< NormalForceSpecies >::getHeatCapacity(), Thermal< Particle >::getTemperature(), ThermalSpecies< NormalForceSpecies >::getThermalConductivity(), max, constants::pi, and UniformPSDSelfTest::radius.


The documentation for this class was generated from the following file: