41#include "params/ThermalCapacitor.hh"
42#include "params/ThermalModel.hh"
43#include "params/ThermalReference.hh"
44#include "params/ThermalResistor.hh"
57 :
SimObject(
p), _temperature(
p.temperature), node(NULL)
72 :
SimObject(
p), _resistance(
p.resistance), node1(NULL), node2(NULL)
107 :
SimObject(
p), _capacitance(
p.capacitance), node1(NULL), node2(NULL)
161 node_equation = node_equation +
eq;
163 ls[
i] = node_equation;
167 std::vector <double> temps = ls.
solve();
185 ref->node->temp = ref->_temperature;
186 ref->node->isref =
true;
190 dom->getNode()->temp = dom->initialTemperature();
196 if (ref->node ==
n) {
246 temp = std::max(temp,
n->temp);
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
This class describes a linear equation with constant coefficients.
std::vector< double > solve() const
Abstract superclass for simulation objects.
The class stores temperatures in Kelvin and provides helper methods to convert to/from Celsius.
constexpr double toKelvin() const
static Temperature fromKelvin(double _value)
A ThermalCapacitor is used to model a thermal capacitance between two thermal domains.
ThermalCapacitor(const Params &p)
ThermalCapacitor.
LinearEquation getEquation(ThermalNode *tn, unsigned n, double step) const override
ThermalCapacitorParams Params
const double _capacitance
A ThermalDomain is used to group objects under that operate under the same temperature.
void addResistor(ThermalResistor *r)
std::vector< ThermalDomain * > domains
std::vector< ThermalEntity * > entities
void addReference(ThermalReference *r)
std::vector< ThermalNode * > nodes
std::vector< ThermalResistor * > resistors
void startup() override
startup() is the final initialization call before simulation.
std::vector< ThermalCapacitor * > capacitors
std::vector< ThermalNode * > eq_nodes
ThermalModelParams Params
void addDomain(ThermalDomain *d)
ThermalModel(const Params &p)
ThermalModel.
Temperature getTemperature() const
const double _step
Step in seconds for thermal updates.
void addCapacitor(ThermalCapacitor *c)
EventFunctionWrapper stepEvent
Stepping event to update the model values.
std::vector< ThermalReference * > references
A ThermalNode is used to connect thermal entities, such as resistors, capacitors, references and doma...
A ThermalReference is a thermal domain with fixed temperature.
ThermalReference(const Params &p)
ThermalReference.
ThermalReferenceParams Params
LinearEquation getEquation(ThermalNode *tn, unsigned n, double step) const override
A ThermalResistor is used to model a thermal resistance between two thermal domains.
ThermalResistor(const Params &p)
ThermalResistor.
LinearEquation getEquation(ThermalNode *tn, unsigned n, double step) const override
ThermalResistorParams Params
ClockedObject declaration and implementation.
void schedule(Event &event, Tick when)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.
Declaration of Statistics objects.
const std::string & name()