summaryrefslogtreecommitdiff
path: root/1544/CH1
diff options
context:
space:
mode:
Diffstat (limited to '1544/CH1')
-rwxr-xr-x1544/CH1/EX1.1/Ch01Ex1.sce30
-rwxr-xr-x1544/CH1/EX1.10/Ch01Ex10.sce15
-rwxr-xr-x1544/CH1/EX1.11/Ch01Ex11.sce13
-rwxr-xr-x1544/CH1/EX1.12/Ch01Ex12.sce13
-rwxr-xr-x1544/CH1/EX1.13/Ch01Ex13.sce17
-rwxr-xr-x1544/CH1/EX1.14/Ch01Ex14.sce11
-rwxr-xr-x1544/CH1/EX1.15/Ch01Ex15.sce13
-rwxr-xr-x1544/CH1/EX1.16/Ch01Ex16.sce11
-rwxr-xr-x1544/CH1/EX1.17/Ch01Ex17.sce12
-rwxr-xr-x1544/CH1/EX1.18/Ch01Ex18.sce13
-rwxr-xr-x1544/CH1/EX1.19/Ch01Ex19.sce12
-rwxr-xr-x1544/CH1/EX1.2/Ch01Ex2.sce20
-rwxr-xr-x1544/CH1/EX1.20/Ch01Ex20.sce12
-rwxr-xr-x1544/CH1/EX1.3/Ch01Ex3.sce10
-rwxr-xr-x1544/CH1/EX1.4/Ch01Ex4.sce10
-rwxr-xr-x1544/CH1/EX1.5/Ch01Ex5.sce10
-rwxr-xr-x1544/CH1/EX1.6/Ch01Ex6.sce10
-rwxr-xr-x1544/CH1/EX1.7/Ch01Ex7.sce10
-rwxr-xr-x1544/CH1/EX1.8/Ch01Ex8.sce10
-rwxr-xr-x1544/CH1/EX1.9/Ch01Ex9.sce19
20 files changed, 271 insertions, 0 deletions
diff --git a/1544/CH1/EX1.1/Ch01Ex1.sce b/1544/CH1/EX1.1/Ch01Ex1.sce
new file mode 100755
index 000000000..3b529e9ca
--- /dev/null
+++ b/1544/CH1/EX1.1/Ch01Ex1.sce
@@ -0,0 +1,30 @@
+// Scilab code Ex1.1: Pg 3 (2008)
+clc; clear;
+I =.000018; // Electric current, A
+V = 15000; // Electric potential, V
+P = 250000000 // Electric Power, W
+// Display standard form
+printf("\nStandard form:");
+printf("\n==============");
+printf("\n%f A = %3.1e A", I, I);
+printf("\n%5.0f V = %3.1e V", V, V);
+printf("\n%9.0f W = %3.1e W", P, P);
+// Display scientific notation
+printf("\n\nScientific form:");
+printf("\n================");
+printf("\n%f A = %2d micro-ampere", I, I/1e-06);
+printf("\n%5.0f V = %2d kilo-volt", V, V/1e+03);
+printf("\n%9.0f W = %3d mega-watt", P, P/1e+06);
+
+// Result
+// Standard form:
+// ==============
+// 0.000018 A = 1.8e-005 A
+// 15000 V = 1.5e+004 V
+// 250000000 W = 2.5e+008 W
+
+// Scientific form:
+// ================
+// 0.000018 A = 18 micro-ampere
+// 15000 V = 15 kilo-volt
+// 250000000 W = 250 mega-watt
diff --git a/1544/CH1/EX1.10/Ch01Ex10.sce b/1544/CH1/EX1.10/Ch01Ex10.sce
new file mode 100755
index 000000000..d6d1b4921
--- /dev/null
+++ b/1544/CH1/EX1.10/Ch01Ex10.sce
@@ -0,0 +1,15 @@
+// Scilab code Ex1.10: Pg 16 (2008)
+clc; clear;
+E = 12; // E.m.f, V
+I = 5; // Electric current, A
+V = 11.5; // Terminal potential difference, V
+// Using relation V = E - I*r, solving for r
+r = ( E - V )/I; // Internal resistance of battery, ohm
+// From Ohm's law, V = I*R, then solving for R
+R = V/I; // Resistance, ohms
+printf("\nThe internal resistance of battery = %3.1f ohm", r)
+printf("\nThe resistance of external circuit = %3.1f ohm", R)
+
+// Result
+// The internal resistance of battery = 0.1 ohm
+// The resistance of external circuit = 2.3 ohm
diff --git a/1544/CH1/EX1.11/Ch01Ex11.sce b/1544/CH1/EX1.11/Ch01Ex11.sce
new file mode 100755
index 000000000..74e26a204
--- /dev/null
+++ b/1544/CH1/EX1.11/Ch01Ex11.sce
@@ -0,0 +1,13 @@
+// Scilab code Ex1.11:Pg 17 (2008)
+clc; clear;
+I = 200e-03; // Electric current, A
+t = 300; // Time for which current flows, s
+R = 750; // Resistance, ohms
+// Using Ohm's law, V = I*R
+V = I*R; // Electric potential difference, V
+W = I^2*R*t; // Energy dissipated, joule
+printf("\nThe potential difference developed across the resistor = %3d V\nThe energy dissipated across the resistor = %4.0f J or %1d kJ", V, W, W*1e-03)
+
+// Result
+// The potential difference developed across the resistor = 150 V
+// The energy dissipated across the resistor = 9000 J or 9 kJ
diff --git a/1544/CH1/EX1.12/Ch01Ex12.sce b/1544/CH1/EX1.12/Ch01Ex12.sce
new file mode 100755
index 000000000..fd8acc281
--- /dev/null
+++ b/1544/CH1/EX1.12/Ch01Ex12.sce
@@ -0,0 +1,13 @@
+// Scilab code Ex1.12: Pg 18 (2008)
+clc; clear;
+R = 680; // Resistance, ohms
+P = 85e-03; // Electric power, W
+// Using P = V^2/R, solving for V
+V = sqrt( P*R ); // Potential difference, V
+// Using P = I^2*R, solving for I
+I = sqrt( P/R ); // Electric current, A
+printf("\nThe potential difference developed across the resistance = %3.1f V\nThe current flowing through the resistor = %5.2f mA", V, I/1e-03)
+
+// Result
+// The potential difference developed across the resistance = 7.6 V
+// The current flowing through the resistor = 11.18 mA
diff --git a/1544/CH1/EX1.13/Ch01Ex13.sce b/1544/CH1/EX1.13/Ch01Ex13.sce
new file mode 100755
index 000000000..04fe822e5
--- /dev/null
+++ b/1544/CH1/EX1.13/Ch01Ex13.sce
@@ -0,0 +1,17 @@
+// Scilab code Ex1.13:Pg 19 (2008)
+clc; clear;
+I = 1.4; // Electric current, A
+t = 900; // Time for which current flows, s
+W = 200000; // Energy dissipated, J
+// Using relation W = V*I*t, solving for V
+V = W/( I*t ); // Potential difference, V
+// Using relation P = V*I
+P = V*I; // Electric power, W
+// From Ohm's law, V = I*R, solving for R
+R = V/I; // Resistance, ohm
+printf("\nThe potential difference developed = %5.1f V\nThe power dissipated = %5.1f W\nThe resistance of the circuit = %5.1f ohm", V, P, R)
+
+// Result
+// The potential difference developed = 158.7 V
+// The power dissipated = 222.2 W
+// The resistance of the circuit = 113.4 ohm
diff --git a/1544/CH1/EX1.14/Ch01Ex14.sce b/1544/CH1/EX1.14/Ch01Ex14.sce
new file mode 100755
index 000000000..19b5fa174
--- /dev/null
+++ b/1544/CH1/EX1.14/Ch01Ex14.sce
@@ -0,0 +1,11 @@
+// Scilab code Ex1.14: Pg 20 (2008)
+clc; clear;
+P = 12.5; // Power of the machine, kW
+t = 8.5; // Time for which the machine is operated, h
+W = P*t; // Electric energy, kWh
+// Cost per unit = 7.902 p, therefore calulating the cost of 106.25 units
+cost = ( W*7.902 ); // Cost for operating machine, p
+printf("\nThe cost of operating the machine = %4.2f pounds", cost*1e-02)
+
+// Result
+// The cost of operating the machine = 8.40 pounds
diff --git a/1544/CH1/EX1.15/Ch01Ex15.sce b/1544/CH1/EX1.15/Ch01Ex15.sce
new file mode 100755
index 000000000..f0bc4cfd6
--- /dev/null
+++ b/1544/CH1/EX1.15/Ch01Ex15.sce
@@ -0,0 +1,13 @@
+// Scilab code Ex1.15: Pg 20 (2008)
+clc; clear;
+Total_bill = 78.75; // pounds
+Standing_charge = 15.00; // pounds
+Units_used = 750; // kWh
+Cost_per_unit = ( Total_bill - Standing_charge )/Units_used; // p
+Cost_of_energy_used = 67.50; // pounds
+Total_bill = Cost_of_energy_used + Standing_charge; // pounds
+printf("\nThe cost per unit = %5.3f pounds or %3.1f p\nTotal bill = %5.2f pounds",Cost_per_unit,Cost_per_unit/1e-02,Total_bill);
+
+// Result
+// The cost per unit = 0.085 Pounds or 8.5 p
+// Total bill = 82.50 pounds
diff --git a/1544/CH1/EX1.16/Ch01Ex16.sce b/1544/CH1/EX1.16/Ch01Ex16.sce
new file mode 100755
index 000000000..3362cac5a
--- /dev/null
+++ b/1544/CH1/EX1.16/Ch01Ex16.sce
@@ -0,0 +1,11 @@
+// Scilab code Ex1.16: Pg 22 (2008)
+clc; clear;
+l = 200; // Length of Cu wire, metre
+rho = 2e-08; // Resistivity of Cu, ohm-metre
+A = 8e-07; // Cross sectional area of Cu wire, metre square
+// Using relation R = ( rho*l )/A
+R = ( rho*l )/A; // Resistance, ohm
+printf("\nThe resistance of the coil = %1d ohm", R)
+
+// Result
+// The resistance of the coil = 5 ohm
diff --git a/1544/CH1/EX1.17/Ch01Ex17.sce b/1544/CH1/EX1.17/Ch01Ex17.sce
new file mode 100755
index 000000000..c7ce803de
--- /dev/null
+++ b/1544/CH1/EX1.17/Ch01Ex17.sce
@@ -0,0 +1,12 @@
+// Scilab code Ex1.17: Pg 22 (2008)
+clc; clear;
+l = 250; // Length of Cu wire, metre
+d = 5e-04; // Diameter of Cu wire, metre
+rho = 1.8e-08; // Resistivity of Cu wire, ohm-metre
+A = ( %pi*d^2 )/4; // Cross sectional area of Cu wire, metre square
+// Using relation R = rho*l/A
+R = rho*l/A; // Resistance, ohm
+printf("\nThe resistance of the coil = %5.2f ohm", R)
+
+// Result
+// The resistance of the coil = 22.92 ohm
diff --git a/1544/CH1/EX1.18/Ch01Ex18.sce b/1544/CH1/EX1.18/Ch01Ex18.sce
new file mode 100755
index 000000000..2c7dc8906
--- /dev/null
+++ b/1544/CH1/EX1.18/Ch01Ex18.sce
@@ -0,0 +1,13 @@
+// Scilab code Ex1.18: Pg 23 (2008)
+
+clc; clear;
+R_1 = 250; // Resistance of field coil, ohm
+Theta_1 = 15; // Initial temperature of motor, degree celcius
+Theta_2 = 45; // Final temperature of motor, degree celcius
+Alpha = 4.28e-03; // Temperature coefficient of resistance, per degree celcius
+// Using relation, R_1/R_2 = ( 1 + Alpha*Theta_1 )/( 1 + Alpha*Theta_2 ), solving for R_2
+R_2 = R_1 * (( 1 + Alpha*Theta_2 )/( 1 + Alpha*Theta_1 )); // Resistance, ohms
+printf("\nThe resistance of field coil at %2d degree celcius = %5.1f ohm",Theta_2, R_2)
+
+// Result
+// The resistance of field coil at 45 degree celcius = 280.2 ohm
diff --git a/1544/CH1/EX1.19/Ch01Ex19.sce b/1544/CH1/EX1.19/Ch01Ex19.sce
new file mode 100755
index 000000000..40cc0f81a
--- /dev/null
+++ b/1544/CH1/EX1.19/Ch01Ex19.sce
@@ -0,0 +1,12 @@
+// Scilab code Ex1.19: Pg 24 (2008)
+
+clc; clear;
+R_0 = 350; // Resistance, ohms
+Theta_1 = 60; // Temperature, degree celcius
+Alpha = 4.26e-03; // Temperature coefficient, per degree celcius
+// Using relation R_1 = R_0 * ( 1 + Alpha*Theta_1 )
+R_1 = R_0 * ( 1 + Alpha*Theta_1 ); // Resistance, ohms
+printf("\nThe resistance of the wire at %2d degree celcius = %5.1f ohm",Theta_1, R_1)
+
+// Result
+// The resistance of the wire at 60 degree celcius = 439.5 ohm
diff --git a/1544/CH1/EX1.2/Ch01Ex2.sce b/1544/CH1/EX1.2/Ch01Ex2.sce
new file mode 100755
index 000000000..f389dce03
--- /dev/null
+++ b/1544/CH1/EX1.2/Ch01Ex2.sce
@@ -0,0 +1,20 @@
+// Scilab code Ex1.2: Pg.4 (2008)
+clc; clear;
+I = 25e-05; // Electric Current,A
+P = 3e+04; // Electric Power, W
+W = 850000; // Work done, J
+V = 0.0016; // Electric Potential, V
+printf("\n\nScientific (Engineering) notation:");
+printf("\n===================================");
+printf("\n%2e A = %3d micro-ampere = %3.2f mA", I, I/1e-06, I/1e-03);
+printf("\n%1.0e W = %3d micro-watt", P, P/1e-06);
+printf("\n%6d J = %3d kJ = %3.2f MJ", W, W/1e+03, W/1e+06);
+printf("\n%5.4f V = %3.1f milli-volt", V, V/1e-03);
+
+// Result
+// Scientific (Engineering) notation:
+// ===================================
+//2.500000e-004 A = 250 micro-ampere = 0.25 mA
+// 3e+004 W = -64771072 micro-watt
+// 850000 J = 850 kJ = 0.85 MJ
+// 0.0016 V = 1.6 milli-volt
diff --git a/1544/CH1/EX1.20/Ch01Ex20.sce b/1544/CH1/EX1.20/Ch01Ex20.sce
new file mode 100755
index 000000000..bda517791
--- /dev/null
+++ b/1544/CH1/EX1.20/Ch01Ex20.sce
@@ -0,0 +1,12 @@
+// Scilab code Ex1.20: Pg. 24 (2008)
+clc; clear;
+R_1 = 120; // Resistance, ohms
+Theta_1 = 16; // Temperature, degree celcius
+Theta_2 = 32; // Temperature, degree celcius
+Alpha = -4.8e-04; // Temperature coefficient, per degree celcius
+// Using relation, R_1/R_2 = ( 1 + Alpha*Theta_1 )/( 1 + Alpha*Theta_2 ), solving for R_2
+R_2 = R_1 * (( 1 + Alpha*Theta_2 )/( 1 + Alpha*Theta_1 )); // Resistance, ohm
+printf("\nThe resistance of carbon resistor at %2d degree celcius = %5.1f ohm",Theta_2, R_2)
+
+// Result
+// The resistance of field coil at 32 degree celcius = 119.1 ohm
diff --git a/1544/CH1/EX1.3/Ch01Ex3.sce b/1544/CH1/EX1.3/Ch01Ex3.sce
new file mode 100755
index 000000000..f60139a48
--- /dev/null
+++ b/1544/CH1/EX1.3/Ch01Ex3.sce
@@ -0,0 +1,10 @@
+// Scilab code Ex1.3: Pg.5 (2008)
+clc; clear;
+m = 750/1e+03; // Mass of the body, kg
+F = 2; // Force acting on the mass, N
+// Since F = m * a, (Newton's Second Law of motion), solving for a
+a = F/m; // Acceleration produced in the body, metre per second square
+printf("\nThe acceleration produced in the body = %5.3f metre per second square", a)
+
+// Result
+// The acceleration produced in the body = 2.667 metre per second square
diff --git a/1544/CH1/EX1.4/Ch01Ex4.sce b/1544/CH1/EX1.4/Ch01Ex4.sce
new file mode 100755
index 000000000..69e696dfa
--- /dev/null
+++ b/1544/CH1/EX1.4/Ch01Ex4.sce
@@ -0,0 +1,10 @@
+// Scilab code Ex1.4: Pg.9 (2008)
+clc; clear;
+Q = 35e-03; // Electric charge, C
+t = 20e-03; // Time for transference of charge between two points, s
+// Since Q = I * t, solving for I
+I = Q/t; // Electric current flowing between the two points, A
+printf("\nThe value of electric current flowing = %4.2f A", I);
+
+// Result
+// The value of electric current flowing = 1.75 A
diff --git a/1544/CH1/EX1.5/Ch01Ex5.sce b/1544/CH1/EX1.5/Ch01Ex5.sce
new file mode 100755
index 000000000..7c215acbc
--- /dev/null
+++ b/1544/CH1/EX1.5/Ch01Ex5.sce
@@ -0,0 +1,10 @@
+// Scilab code Ex1.5: Pg.9 (2008)
+clc; clear;
+I = 120e-06; // Electric current, A
+t = 15; // Time for transference of charge between two points, s
+// Since I = Q/t, solving for Q
+Q = I*t; // Electric chrage transferred, C
+printf("\nThe value of electric charge transferred = %3.1f mC", Q/1e-03);
+
+// Result
+// The value of electric charge transferred = 1.8 mC
diff --git a/1544/CH1/EX1.6/Ch01Ex6.sce b/1544/CH1/EX1.6/Ch01Ex6.sce
new file mode 100755
index 000000000..bb379a2f3
--- /dev/null
+++ b/1544/CH1/EX1.6/Ch01Ex6.sce
@@ -0,0 +1,10 @@
+// Scilab code Ex1.6: Pg.10 (2008)
+clc; clear;
+Q = 80; // Electric charge, C
+I = 0.5; // Electric current, A
+// Since Q = I*t, solving for t
+t = Q/I; // Time for transference of charge between two points, s
+printf("\nThe duration of time for which the current flowed = %3d s", t);
+
+// Result
+// The duration of time for which the current flowed = 160 s
diff --git a/1544/CH1/EX1.7/Ch01Ex7.sce b/1544/CH1/EX1.7/Ch01Ex7.sce
new file mode 100755
index 000000000..08d6a47d4
--- /dev/null
+++ b/1544/CH1/EX1.7/Ch01Ex7.sce
@@ -0,0 +1,10 @@
+// Scilab code Ex1.7: Pg.13 (2008)
+clc; clear;
+I = 5.5e-03; // Electric current, A
+R = 33000; // Resistance, ohms
+// From Ohm's law, V = I*R
+V = I*R; // Potential difference across resistor, V
+printf("\nThe potential difference developed across resistor = %5.1f V",V)
+
+// Result
+// The potential difference developed across resistor = 181.5 V
diff --git a/1544/CH1/EX1.8/Ch01Ex8.sce b/1544/CH1/EX1.8/Ch01Ex8.sce
new file mode 100755
index 000000000..85c9d3db5
--- /dev/null
+++ b/1544/CH1/EX1.8/Ch01Ex8.sce
@@ -0,0 +1,10 @@
+// Scilab code Ex1.8: Pg 14 (2008)
+clc; clear;
+V = 24; // Potential difference,V
+R = 15; // Resistance, ohms
+// From Ohm's law, V = I*R, then solving for I
+I = V/R; // Electric current, A
+printf("\nThe current flowing through the resistor = %3.1f A", I)
+
+// Result
+// The current flowing through the resistor = 1.6 A
diff --git a/1544/CH1/EX1.9/Ch01Ex9.sce b/1544/CH1/EX1.9/Ch01Ex9.sce
new file mode 100755
index 000000000..675b06b7d
--- /dev/null
+++ b/1544/CH1/EX1.9/Ch01Ex9.sce
@@ -0,0 +1,19 @@
+// Scilab code Ex1.9: Pg 16 (2008)
+clc; clear;
+E = 6; // E.m.f of battery, V
+r = 0.15; // Internal resistance of battery, ohm
+I_1 = .5; // Electric current, A
+I_2 = 2; // Electric current, A
+I_3 = 10; // Electric current, A
+// Using relation V = E - I*R and substituting the values of I_1, I_2 and I_3 one by one in it
+V_1 = E - I_1*r; // Terminal potential difference, V
+V_2 = E - I_2*r; // Terminal potential difference, V
+V_3 = E - I_3*r; // Terminal potential difference, V
+printf("\nThe terminal potential difference developed across resistor for a current of %3.1f A = %5.3f V",I_1,V_1)
+printf("\nThe terminal potential difference developed across resistor for a current of %1d A = %3.1f V",I_2,V_2)
+printf("\nThe terminal potential difference developed across resistor for a current of %2d A = %3.1f V",I_3,V_3);
+
+// Result
+// The terminal potential difference developed across resistor for a current of 0.5 A = 5.925 V
+// The terminal potential difference developed across resistor for a current of 2 A = 5.7 V
+// The terminal potential difference developed across resistor for a current of 10 A = 4.5 V