41 #include "params/ThermalCapacitor.hh" 42 #include "params/ThermalReference.hh" 43 #include "params/ThermalResistor.hh" 53 :
SimObject(p), _temperature(p->temperature), node(NULL)
58 ThermalReferenceParams::create()
86 :
SimObject(p), _resistance(p->resistance), node1(NULL), node2(NULL)
91 ThermalResistorParams::create()
144 ThermalCapacitorParams::create()
200 ThermalModelParams::create()
228 node_equation = node_equation +
eq;
230 ls[
i] = node_equation;
252 ref->node->temp = ref->_temperature;
253 ref->node->isref =
true;
257 dom->getNode()->temp = dom->initialTemperature();
262 for (
auto ref : references)
263 if (ref->node ==
n) {
300 temp = std::max(temp,
n->temp);
LinearEquation getEquation(ThermalNode *tn, unsigned n, double step) const override
void unserialize(CheckpointIn &cp) override
Unserialize an object.
ThermalReference(const Params *p)
ThermalReference.
void addReference(ThermalReference *r)
ThermalResistorParams Params
void addDomain(ThermalDomain *d)
void serialize(CheckpointOut &cp) const override
Serialize an object.
ThermalCapacitorParams Params
ClockedObjectParams Params
Parameters of ClockedObject.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void serialize(CheckpointOut &cp) const override
Serialize an object.
LinearEquation getEquation(ThermalNode *tn, unsigned n, double step) const override
Declaration of Statistics objects.
ThermalModel(const Params *p)
ThermalModel.
#define UNSERIALIZE_SCALAR(scalar)
Tick curTick()
The current simulated tick.
A ThermalCapacitor is used to model a thermal capacitance between two thermal domains.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
std::vector< ThermalNode * > eq_nodes
ClockedObject declaration and implementation.
A ThermalDomain is used to group objects under that operate under the same temperature.
std::vector< ThermalNode * > nodes
std::vector< ThermalDomain * > domains
LinearEquation getEquation(ThermalNode *tn, unsigned n, double step) const override
void schedule(Event &event, Tick when)
void serialize(CheckpointOut &cp) const override
Serialize an object.
#define SERIALIZE_SCALAR(scalar)
EventFunctionWrapper stepEvent
Stepping event to update the model values.
A ThermalNode is used to connect thermal entities, such as resistors, capacitors, references and doma...
virtual const std::string name() const
void addResistor(ThermalResistor *r)
std::vector< ThermalReference * > references
std::ostream CheckpointOut
A ThermalReference is a thermal domain with fixed temperature.
std::vector< ThermalResistor * > resistors
This class describes a linear equation with constant coefficients.
void addCapacitor(ThermalCapacitor *c)
ThermalCapacitor(const Params *p)
ThermalCapacitor.
double _step
Step in seconds for thermal updates.
A ThermalResistor is used to model a thermal resistance between two thermal domains.
void startup() override
startup() is the final initialization call before simulation.
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::vector< ThermalEntity * > entities
Abstract superclass for simulation objects.
std::vector< ThermalCapacitor * > capacitors
ThermalReferenceParams Params
ThermalResistor(const Params *p)
ThermalResistor.