//+---------------------------------------------------+
//|  PExprt THERMAL MODEL FOR MAGNETIC COMPONENT      |
//|         SIMPLORER(R) V6 LANGUAGE VERSION          |
//|   GENERATED BY PExprt (C) UPM-Ansoft 1992-2004    |
//|                    Version 6.0.12                 |
//+---------------------------------------------------+


MODELDEF HalfBridgePlanar_177_th 
{
//----Electrical and Real Ports definition

PORT real out: TempMax = TempMax;

PORT real in : AvgCoreLosses = AvgCoreLosses;

PORT real in : AvgWireLosses = AvgWireLosses;

//--- 1D Thermal model description for SIMPLORER---

//---Power sources for different losses---

//---CoreLosses---

INTERN I GPcore N1:=GND,N2:=Pcore (IS:=AvgCoreLosses, PARTDERIV:=1);

INTERN R Rcore N1:=Pcore,N2:=GND (R:=1.0e+000);

//---Power sources for different windings---

//---Winding 1

INTERN I GPwind1 N1:=GND,N2:=Pwind1 (IS:=Pwind1, PARTDERIV:=1);

INTERN EQU {Pwind1:=AvgWireLosses*7.39673e-008/(7.39673e-008+1.26785e-007+1.26785e-007);}

INTERN R Rwind1  N1:=Pwind1, N2:=GND (R:=1.0e+000);

//---Winding 2

INTERN I GPwind2 N1:=GND,N2:=Pwind2 (IS:=Pwind2, PARTDERIV:=1);

INTERN EQU {Pwind2:=AvgWireLosses*1.26785e-007/(7.39673e-008+1.26785e-007+1.26785e-007);}

INTERN R Rwind2  N1:=Pwind2, N2:=GND (R:=1.0e+000);

//---Winding 3

INTERN I GPwind3 N1:=GND,N2:=Pwind3 (IS:=Pwind3, PARTDERIV:=1);

INTERN EQU {Pwind3:=AvgWireLosses*1.26785e-007/(7.39673e-008+1.26785e-007+1.26785e-007);}

INTERN R Rwind3  N1:=Pwind3, N2:=GND (R:=1.0e+000);

//---Temperature node for magnetic component

INTERN I GTempMax N1:=GND, N2:=TempMaxprev (IS:=(AvgCoreLosses*19.3992+Pwind1*-1039.6+Pwind2*21.2268+Pwind3*1097.38), PARTDERIV:=1);

INTERN R RTempMax N1:=TempMaxprev, N2:=GND (R:=1.0e+006);

INTERN VM SensTmax N1:=TempMaxprev, N2:=GND;

INTERN EQU {SensT:=SensTmax.V/(t+1.0e-012);}

INTERN E ETempOut N1:=GND, N2:=TempMax (EMF:=SensT,PARTDERIV:=1);

INTERN R RTempMaxOut N1:= TempMax, N2:= GND (R:=1.0e+000);

INTERN C CavgTempMax N1:=TempMaxprev, N2:= GND (C:=1.0e+000, V0:=);

INTERN VM SensTmaxOut N1:= TempMax, N2:= GND;

INTERN EQU {TempMax:=SensTmaxOut.V;}

//---End of the Thermal Model of The Magnetic Component
}