26 #ifndef THERMALSPECIES_H
27 #define THERMALSPECIES_H
33 template<
class NormalForceSpecies>
51 void write(std::ostream& os)
const;
54 void read(std::istream& is);
83 template<
class NormalForceSpecies>
91 template<
class NormalForceSpecies>
99 template<
class NormalForceSpecies>
103 template<
class NormalForceSpecies>
106 NormalForceSpecies::write(os);
107 os <<
" heatCapacity " << heatCapacity_;
108 os <<
" thermalConductivity " << thermalConductivity_;
111 template<
class NormalForceSpecies>
115 NormalForceSpecies::read(is);
116 is >> dummy >> heatCapacity_;
117 is >> dummy >> thermalConductivity_;
120 template<
class NormalForceSpecies>
123 return "Thermal" + NormalForceSpecies::getBaseName();
127 template<
class NormalForceSpecies>
130 return heatCapacity_;
133 template<
class NormalForceSpecies>
136 logger.assert_always(heatCapacity > 0,
137 "[ThermalSpecies<>::setHeatCapacity(%)] value has to be positive",
139 heatCapacity_ = heatCapacity;
142 template<
class NormalForceSpecies>
145 return thermalConductivity_;
148 template<
class NormalForceSpecies>
151 logger.assert_always(thermalConductivity >= 0,
152 "[ThermalSpecies<>::setThermalConductivity(%)] value has to be positive",
153 thermalConductivity);
154 thermalConductivity_ = thermalConductivity;
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:60
Defines a contact force parallel to the contact normal.
Definition: ThermalInteraction.h:37
Definition: ThermalSpecies.h:35
void read(std::istream &is)
Reads the species properties from an input stream.
Definition: ThermalSpecies.h:112
void write(std::ostream &os) const
Writes the species properties to an output stream.
Definition: ThermalSpecies.h:104
Mdouble heatCapacity_
The heat capacity.
Definition: ThermalSpecies.h:75
Mdouble thermalConductivity_
The thermal conductivity.
Definition: ThermalSpecies.h:80
ThermalInteraction< typename NormalForceSpecies::InteractionType > InteractionType
The correct Interaction type for this FrictionForceSpecies.
Definition: ThermalSpecies.h:39
std::string getBaseName() const
Used in Species::getName to obtain a unique name for each Species.
Definition: ThermalSpecies.h:121
void setThermalConductivity(Mdouble thermalConductivity)
Allows heatCapacity_ to be changed.
Definition: ThermalSpecies.h:149
void setHeatCapacity(Mdouble heatCapacity)
Allows heatCapacity_ to be changed.
Definition: ThermalSpecies.h:134
virtual ~ThermalSpecies()
The default destructor.
Definition: ThermalSpecies.h:100
Mdouble getThermalConductivity() const
Allows heatCapacity_ to be accessed.
Definition: ThermalSpecies.h:143
ThermalSpecies()
The default constructor.
Definition: ThermalSpecies.h:84
Mdouble getHeatCapacity() const
Allows heatCapacity_ to be accessed.
Definition: ThermalSpecies.h:128