43 #include "params/ThermalCapacitor.hh"
44 #include "params/ThermalReference.hh"
45 #include "params/ThermalResistor.hh"
55 :
SimObject(p), _temperature(p->temperature), node(NULL)
60 ThermalReferenceParams::create()
88 :
SimObject(p), _resistance(p->resistance), node1(NULL), node2(NULL)
93 ThermalResistorParams::create()
141 :
SimObject(p), _capacitance(p->capacitance), node1(NULL), node2(NULL)
146 ThermalCapacitorParams::create()
202 ThermalModelParams::create()
230 node_equation = node_equation +
eq;
232 ls[
i] = node_equation;
254 ref->node->temp = ref->_temperature;
255 ref->node->isref =
true;
259 dom->getNode()->temp = dom->initialTemperature();
264 for (
auto ref : references)
265 if (ref->node ==
n) {
302 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.
EventWrapper< ThermalModel,&ThermalModel::doStep > stepEvent
Stepping event to update the model values.
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 serialize(CheckpointOut &cp) const override
Serialize an object.
#define SERIALIZE_SCALAR(scalar)
A ThermalNode is used to connect thermal entities, such as resistors, capacitors, references and doma...
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.
void schedule(Event &event, Tick when)
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
A ThermalModel is the element which ties all thermal objects together and provides the thermal solver...
ThermalResistor(const Params *p)
ThermalResistor.