26 #ifndef THERMALSPECIES_H
27 #define THERMALSPECIES_H
31 template<
class NormalForceSpecies>
49 void write(std::ostream& os)
const;
52 void read(std::istream& is);
81 template<
class NormalForceSpecies>
89 template<
class NormalForceSpecies>
97 template<
class NormalForceSpecies>
101 template<
class NormalForceSpecies>
104 NormalForceSpecies::write(os);
105 os <<
" heatCapacity " << heatCapacity_;
106 os <<
" thermalConductivity " << thermalConductivity_;
109 template<
class NormalForceSpecies>
113 NormalForceSpecies::read(is);
114 is >> dummy >> heatCapacity_;
115 is >> dummy >> thermalConductivity_;
118 template<
class NormalForceSpecies>
121 return "Thermal" + NormalForceSpecies::getBaseName();
125 template<
class NormalForceSpecies>
128 return heatCapacity_;
131 template<
class NormalForceSpecies>
134 logger.assert_always(heatCapacity>0,
135 "[ThermalSpecies<>::setHeatCapacity(%)] value has to be positive",
137 heatCapacity_ = heatCapacity;
140 template<
class NormalForceSpecies>
143 return thermalConductivity_;
146 template<
class NormalForceSpecies>
149 logger.assert_always(thermalConductivity>=0,
150 "[ThermalSpecies<>::setThermalConductivity(%)] value has to be positive",
151 thermalConductivity);
152 thermalConductivity_ = thermalConductivity;
void write(std::ostream &os) const
Writes the species properties to an output stream.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
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.