{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter3 Fabrication and Thermal characteristics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3.1, Pg.no 10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "value of junction temperature= 72.5 c\n"
     ]
    }
   ],
   "source": [
    "import math \n",
    "Xa=50    #Ambient temperature\n",
    "P=150     #on state power loss in Watts\n",
    "Rjc=0.02   #junction case thermal resistance\n",
    "Rcs=0.05   #case sink thermal resistance\n",
    "Rsa=0.08   #sink atmosphere thermal resistance\n",
    "Xj=Xa+P*(Rjc+Rcs+Rsa)   #junction temperature \n",
    "Xj=round(Xj,1)\n",
    "print 'value of junction temperature=',Xj,'c'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3.2,Pg.no 10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "value of time period of one cycle= 248 s\n",
      "value of junction temperature= 54.75 c\n",
      "power required to cool down= 325 watts\n",
      "value of maximum junction temperature= 106.01 c\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import exp\n",
    "Xa=50      #Ambient temperature\n",
    "P20=25      #on state power loss at 20%load in Watts\n",
    "P200=350    #on state power loss at 200%load in Watts\n",
    "Rjc=0.02    #junction case thermal resistance\n",
    "Rcs=0.05    #case sink thermal resistance\n",
    "Rsa=0.12    #sink atmosphere thermal resistance at 20% load cycle\n",
    "T1=60       #time period for the supply of 200% load\n",
    "T=((200**2-202)*T1)/(100**2-20**2)    #time period of one cycle\n",
    "print 'value of time period of one cycle=',T,'s'\n",
    "Ts=140    #thermal time constant for heat sink\n",
    "Xj20=Xa+P20*(Rjc+Rcs+Rsa)      #junction temperature\n",
    "print 'value of junction temperature=',Xj20,'c'\n",
    "P=P200 -P20     #power required to cool down from 200 %load cycle to 20% load cycle\n",
    "print 'power required to cool down=',P,'watts'\n",
    "Rsa200=((Rsa)*(1-exp(-T1/Ts)))/(1-exp(-T/Ts))    #sink atmosphere thermal resistance at 200% load cycle\n",
    "Xj200=Xj20+(P*(Rjc+Rcs+Rsa200))     #maximum junction temperature\n",
    "Xj200=round(Xj200,2)\n",
    "print 'value of maximum junction temperature=',Xj200,'c'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3.3 ,Pg.no11"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "value of junction temperature= 62.0 c\n"
     ]
    }
   ],
   "source": [
    "import math \n",
    "Xa=35    #Ambient temperature\n",
    "P=150    #on state power loss in Watts\n",
    "Rjc=0.01  #junction case thermal resistance\n",
    "Rcs=0.08   #case sink thermal resistance\n",
    "Rsa=0.09   #sink atmosphere thermal resistance\n",
    "Xj=Xa+P*(Rjc+Rcs+Rsa)   #junction temperature\n",
    "print 'value of junction temperature=',Xj,'c'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3.4,Pg.no 12"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "value of on state power loss= 416.67 watts\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "Xa=45     #Ambient temperature \n",
    "Rjs=0.1    #junction sink thermal resistance \n",
    "Rsa=0.08   #sink atmosphere thermal resistance \n",
    "Xj=120      #junction temperature\n",
    "P=(Xj-Xa)/(Rjs+Rsa)      #on state power loss\n",
    "P=round(P,2)\n",
    "print 'value of on state power loss=',P,'watts'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3.5,Pg.no 12"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "value of case sink thermal resistance= -0.115 c/w\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "Xa=40        #Ambient temperature\n",
    "P=300        #on state power loss in Watts\n",
    "Rjc=0.015    #junction case thermal resistance\n",
    "Rsa=0.1      #sink atmosphere thermal resistance\n",
    "Xj=105       #junction temperature\n",
    "Rcs=((Xj-Xa)/(P))-(Rjc+Rsa)   #case sink thermal resistance\n",
    "print  'value of case sink thermal resistance=',Rcs,'c/w'"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
