MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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...
 

Detailed Description

template<class NormalForceInteraction>
class ThermalInteraction< NormalForceInteraction >

Definition at line 36 of file ThermalInteraction.h.

Member Typedef Documentation

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

Definition at line 39 of file ThermalInteraction.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 69 of file ThermalInteraction.h.

71  : BaseInteraction(P, I, timeStamp), NormalForceInteraction(P, I, timeStamp)
72 {}
Stores information about interactions between two interactable objects; often particles but could be ...
template<class NormalForceInteraction >
ThermalInteraction< NormalForceInteraction >::ThermalInteraction ( )

Default Constructor.

Definition at line 75 of file ThermalInteraction.h.

77 {}
Stores information about interactions between two interactable objects; often particles but could be ...
template<class NormalForceInteraction >
ThermalInteraction< NormalForceInteraction >::ThermalInteraction ( const ThermalInteraction< NormalForceInteraction > &  p)

Copy constructor.

Definition at line 80 of file ThermalInteraction.h.

82 {}
Stores information about interactions between two interactable objects; often particles but could be ...
template<class NormalForceInteraction >
ThermalInteraction< NormalForceInteraction >::~ThermalInteraction ( )
virtual

Destructor.

Definition at line 85 of file ThermalInteraction.h.

86 {}

Member Function Documentation

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

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

Definition at line 89 of file ThermalInteraction.h.

References ThermalParticle::addTemperature(), ThermalSpecies< NormalForceSpecies >::getHeatCapacity(), BaseParticle::getInvMass(), ThermalParticle::getTemperature(), ThermalSpecies< NormalForceSpecies >::getThermalConductivity(), and constants::pi.

90 {
91  NormalForceInteraction::computeNormalForce();
92  Mdouble radius = 2.0 * NormalForceInteraction::getEffectiveRadius();
93  Mdouble contactArea = constants::pi * radius * NormalForceInteraction::getOverlap();
94  const SpeciesType* species = static_cast<const SpeciesType*>(NormalForceInteraction::getBaseSpecies()->getNormalForce());
95  ThermalParticle* pParticle = dynamic_cast<ThermalParticle*>(NormalForceInteraction::getP());
96  ThermalParticle* iParticle = dynamic_cast<ThermalParticle*>(NormalForceInteraction::getI());
97  // if both p and i are particles
98  if (pParticle && iParticle)
99  {
100  /* heat transfer rate Q=m*c*dT/dt */
101  Mdouble heatTransfer = species->getThermalConductivity()
102  * (pParticle->getTemperature() - iParticle->getTemperature())
103  * contactArea / NormalForceInteraction::getDistance();
104  /* m*dT = Q/c*dt */
105  Mdouble mdT = heatTransfer / species->getHeatCapacity()
106  * NormalForceInteraction::getHandler()->getDPMBase()->getTimeStep();
107  pParticle->addTemperature(-mdT * pParticle->getInvMass());
108  iParticle->addTemperature(mdT * iParticle->getInvMass());
109  }
110 }
double Mdouble
Definition: GeneralDefine.h:34
Mdouble getTemperature() const
Mdouble getInvMass() const override
Returns the inverse of the particle's mass.
Definition: BaseParticle.h:293
const Mdouble pi
Definition: ExtendedMath.h:45
void addTemperature(Mdouble temperature)
ThermalSpecies< typename NormalForceInteraction::SpeciesType > SpeciesType

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