MercuryDPM  Alpha
 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, Mdouble timeStamp)
 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,
Mdouble  timeStamp 
)

Constructor.

Definition at line 76 of file ThermalInteraction.h.

77  : BaseInteraction(P, I, timeStamp), NormalForceInteraction(P, I, timeStamp)
78 
79 {}
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 82 of file ThermalInteraction.h.

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

Destructor.

Definition at line 87 of file ThermalInteraction.h.

88 {}

Member Function Documentation

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

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

Definition at line 97 of file ThermalInteraction.h.

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

98 {
99  NormalForceInteraction::computeNormalForce();
100  Mdouble radius = 2.0*NormalForceInteraction::getEffectiveRadius();
101  Mdouble contactArea = constants::pi*radius*NormalForceInteraction::getOverlap();
102  const SpeciesType* species = dynamic_cast<const SpeciesType*>(NormalForceInteraction::getBaseSpecies());
103  ThermalParticle* pParticle = dynamic_cast<ThermalParticle*>(NormalForceInteraction::getP());
104  ThermalParticle* iParticle = dynamic_cast<ThermalParticle*>(NormalForceInteraction::getI());
105  // if both p and i are particles
106  if (pParticle && iParticle) {
107  /* heat transfer rate Q=m*c*dT/dt */
108  Mdouble heatTransfer = species->getThermalConductivity()
109  * (pParticle->getTemperature() - iParticle->getTemperature())
110  * contactArea / NormalForceInteraction::getDistance();
111  /* m*dT = Q/c*dt */
112  Mdouble mdT = heatTransfer / species->getHeatCapacity()
113  * NormalForceInteraction::getHandler()->getDPMBase()->getTimeStep();
114  pParticle->addTemperature(-mdT*pParticle->getInvMass());
115  iParticle->addTemperature( mdT*iParticle->getInvMass());
116  }
117 }
double Mdouble
Mdouble getTemperature() const
Mdouble getInvMass() const
Returns the particle's invMass_.
const Mdouble pi
Definition: ExtendedMath.h:42
void addTemperature(Mdouble temperature)
ThermalSpecies< typename NormalForceInteraction::SpeciesType > SpeciesType

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