Seems to calculate correctly now, but i need to plot to verify operation!
This commit is contained in:
@@ -12,7 +12,14 @@
|
||||
|
||||
typedef struct {
|
||||
char label[32];
|
||||
float R_th; // In Kelvin/Watt or Celsius/Watt (you can mix!)
|
||||
union{
|
||||
float R_th; // In Kelvin/Watt or Celsius/Watt (you can mix!)
|
||||
float R_th_MinFan; // In case you need to emulate a fan
|
||||
};
|
||||
float R_th_MaxFan; // In case you need to emulate a fan
|
||||
|
||||
// Dynamic
|
||||
float temperature;
|
||||
|
||||
}cm_heatsink_thermalElement_t;
|
||||
|
||||
@@ -26,12 +33,13 @@ typedef struct {
|
||||
float C_th; // Thermal capacity
|
||||
|
||||
// Dynamic
|
||||
float heatsinkTemperature;
|
||||
float prev_time;
|
||||
float fan_speed;
|
||||
|
||||
}cm_heatsinkEmul_t;
|
||||
|
||||
float cm_heatsinkEmul_getRespon(cm_heatsinkEmul_t *inst, float dt);
|
||||
int cm_heatsinkEmul_init(cm_heatsinkEmul_t *inst, cm_heatsink_thermalElement_t *elements, int elements_Count, float power, float ambientTemp);
|
||||
|
||||
int cm_heatsinkEmul_iterate(cm_heatsinkEmul_t *inst, float dtime);
|
||||
float cm_heatsinkEmul_getElementTemp(cm_heatsinkEmul_t *inst, int element_idx);
|
||||
int cm_heatsinkEmul_init(cm_heatsinkEmul_t *inst, cm_heatsink_thermalElement_t *elements, int elements_Count, float C_th, float power, float ambientTemp);
|
||||
|
||||
#endif /* CM_HEATSINK_EMULATOR_H_ */
|
||||
|
||||
Reference in New Issue
Block a user