{
"metadata": {
"name": "",
"signature": "sha256:8e01926cf42f8b82c73cff46263ef90c672622041c85ff2d1b1ef7a3962ce2cc"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 8: D.C. Transients"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.1, 253"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"C = 8e-06; # Value of capacitance of capacitor, farad\n",
"R = 0.5e+06; # Value of series resistor, ohm\n",
"E = 200; # Value of d.c. voltage supply, volt\n",
"\n",
"#Calculations&Results\n",
"# Part (a)\n",
"tau = C*R; # Time constant of the R-C circuit while charging, s\n",
"print \"The circuit time constant while charging = %1d s\"%tau\n",
"\n",
"# Part (b)\n",
"I_0 = E/R; # Initial charging current through capacitor, A\n",
"print \"The initial charging current through capacitor = %3d micro-ampere\"%(I_0/1e-06);\n",
"\n",
"# Part (c)\n",
"t = 4; # Time after the supply is connected, s\n",
"v_C = 0.632*E; # p.d. across the capacitor 4s after the supply is connected, V\n",
"v_R = E - v_C; # p.d. across the resistor 4s after the supply is connected, V\n",
"print \"The p.d. across resistor and capacitor %d s after the supply is connected = %5.1f V and %4.1f V respectively\"%(t, v_C, v_R);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The circuit time constant while charging = 4 s\n",
"The initial charging current through capacitor = 400 micro-ampere\n",
"The p.d. across resistor and capacitor 4 s after the supply is connected = 126.4 V and 73.6 V respectively\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.2, Page 255"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"C = 0.5e-06; # Value of capacitance of capacitor, farad\n",
"R1 = 220e+03; # Value of series resistor, ohm\n",
"R2 = 110e+03; # Value of parallel resistor, ohm\n",
"E = 150; # Value of d.c. voltage supply, volt\n",
"\n",
"#Calculations&Results\n",
"# Part (a)\n",
"tau = C*R1; # Time constant of the R1-C circuit while charging, s\n",
"print \"The circuit time constant while charging = %4.2f s\"%tau\n",
"I_0 = E/R1; # Initial charging current through capacitor, A\n",
"print \"The initial charging current through capacitor = %3d micro-ampere\"%(I_0/1e-06)\n",
"\n",
"# Part (b)\n",
"tau = C*(R1+R2); # Time constant of the R1-C-R2 circuit while discharging, s\n",
"print \"The circuit time constant while discharging = %4.2f s\"%tau\n",
"I_0 = E/(R1 + R2); # Initial discharging current through capacitor, ampere\n",
"i = 0.368*I_0; # Discharge current after one time constant, ampere\n",
"V_R2 = i*R2; # Potential difference across R2 after one time constant, volt\n",
"print \"The p.d. across R2 after one time constant while discharging = %4.1f volt\"%V_R2\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The circuit time constant while charging = 0.11 s\n",
"The initial charging current through capacitor = 681 micro-ampere\n",
"The circuit time constant while discharging = 0.16 s\n",
"The p.d. across R2 after one time constant while discharging = 18.4 volt\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.3, Page 258"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"E = 110.; # Value of d.c. voltage supply, volt\n",
"L = 1.5; # Inductor value, henry\n",
"R = 220; # Value of series resistor, ohm\n",
"\n",
"#Calculations&Results\n",
"# Part (a)\n",
"di_dt = E/L; # The initial rate of change of current through inductor, H\n",
"print \"The initial rate of change of current through inductor = %5.2f A/s\"%di_dt\n",
"\n",
"# Part (b)\n",
"I = E/R; # The final steady current, A\n",
"print \"The final steady current through inductor = %3.1f A\"%I\n",
"\n",
"# Part (c)\n",
"tau = L/R; # The time taken for the current to reach its fi nal steady value, s\n",
"print \"The time taken for the current to reach its final steady value = %4.1f ms\"%(5*tau/1e-03);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The initial rate of change of current through inductor = 73.33 A/s\n",
"The final steady current through inductor = 0.5 A\n",
"The time taken for the current to reach its final steady value = 34.1 ms\n"
]
}
],
"prompt_number": 3
}
],
"metadata": {}
}
]
}