Files
heatsink_emulator_wip/main.c

35 lines
758 B
C

/*
* main.c
*
* Created on: 14 Oct 2025
* Author: Christian L. V. Madsen (OZ1CM)
*/
#include "cm_heatsink_emulator/cm_heatsink_emulator.h"
#define POWER 600 // Watts
#define AMBIENT_TEMPERATURE 25 // degC
#define C_TH 32688.36649 // Thermal capacity
cm_heatsink_thermalElement_t thermElements[3] = {
{
.label = "LED To NTC",
.R_th = 0.002021944
},{
.label = "NTC To Heat sink",
.R_th = 0.015981191
},{
.label = "Heat sink To Ambient",
.R_th = 0.121949843
},
};
cm_heatsinkEmul_t thermEmul;
int main(void ){
// Init Thermal emulator
cm_heatsinkEmul_init(&thermEmul, thermElements, 1/*(sizeof(thermElements) / sizeof(thermElements[0]))*/, POWER, AMBIENT_TEMPERATURE);
cm_heatsinkEmul_getRespon(&thermEmul, 0.1);
}