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;
void write(std::ostream &os) const
Writes the species properties to an output stream.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here...
Defines a contact force parallel to the contact normal.
Mdouble thermalConductivity_
The thermal conductivity.
Stores information about interactions between two interactable objects; often particles but could be ...
void setThermalConductivity(Mdouble thermalConductivity)
Allows heatCapacity_ to be changed.
void read(std::istream &is)
Reads the species properties from an input stream.
void setHeatCapacity(Mdouble heatCapacity)
Allows heatCapacity_ to be changed.
ThermalInteraction< typename NormalForceSpecies::InteractionType > InteractionType
The correct Interaction type for this FrictionForceSpecies.
Mdouble getHeatCapacity() const
Allows heatCapacity_ to be accessed.
virtual ~ThermalSpecies()
The default destructor.
std::string getBaseName() const
Used in Species::getName to obtain a unique name for each Species.
Mdouble getThermalConductivity() const
Allows heatCapacity_ to be accessed.
ThermalSpecies()
The default constructor.
Mdouble heatCapacity_
The heat capacity.