summaryrefslogtreecommitdiff
path: root/Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb
diff options
context:
space:
mode:
authorprashantsinalkar2020-04-14 10:19:27 +0530
committerprashantsinalkar2020-04-14 10:23:54 +0530
commit476705d693c7122d34f9b049fa79b935405c9b49 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
downloadall-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.gz
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.bz2
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.zip
Initial commit
Diffstat (limited to 'Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb')
-rw-r--r--Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb489
1 files changed, 489 insertions, 0 deletions
diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb
new file mode 100644
index 0000000..2b7f6cd
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb
@@ -0,0 +1,489 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: General Introduction"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.10: Thermal_efficiency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.10');\n",
+"// Given values\n",
+"m_dot = 3.045; // use of coal, [tonne/h]\n",
+"c = 28; // calorific value of the coal, [MJ/kg]\n",
+"P_out = 4.1; // output of turbine, [MW]\n",
+"// solution\n",
+"m_dot = m_dot*10^3/3600; // [kg/s]\n",
+"P_in = m_dot*c; // power input by coal, [MW]\n",
+"n = P_out/P_in; // thermal efficiency formula\n",
+"mprintf('\n Thermal efficiency of the plant is = %f \n',n);\n",
+"//End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.11: Power_output.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.11');\n",
+"// Given values\n",
+"v = 50; // speed, [km/h]\n",
+"F = 900; // Resistance to the motion of a car\n",
+"// solution\n",
+"v = v*10^3/3600; // [m/s]\n",
+" Power = F*v; // Power formula, [W]\n",
+"mprintf('\n The power output of the engine is = %f kW\n',Power*10^-3);\n",
+" \n",
+" // End\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.12: Power_output.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.12');\n",
+"// Given values\n",
+"V = 230; // volatage, [volts]\n",
+"I = 60; // current, [amps]\n",
+"n_gen = .95; // efficiency of generator\n",
+"n_eng = .92; // efficiency of engine\n",
+"// solution\n",
+"P_gen = V*I; // Power delivered by generator, [W]\n",
+"P_gen=P_gen*10^-3; // [kW]\n",
+"P_in_eng=P_gen/n_gen;//Power input from engine,[kW]\n",
+"P_out_eng=P_in_eng/n_eng;//Power output from engine,[kW]\n",
+"mprintf('\n The power output from the engine is = %f kW\n',P_out_eng);\n",
+"// End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.13: Current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.13');\n",
+"// Given values\n",
+"V = 230; // Voltage, [volts]\n",
+"W = 4; // Power of heater, [kW]\n",
+"// solution\n",
+"// using equation P=VI\n",
+"I = W/V; // current, [K amps]\n",
+"mprintf('\n The current taken by heater is = %f amps \n',I*10^3);\n",
+"// End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.14: Mass_of_coal_burnt.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.14');\n",
+"// Given values\n",
+"P_out = 500; // output of power station, [MW]\n",
+"c = 29.5; // calorific value of coal, [MJ/kg]\n",
+"r=.28; \n",
+"// solution\n",
+"// since P represents only 28 percent of energy available from coal\n",
+"P_coal = P_out/r; // [MW]\n",
+" \n",
+"m_coal = P_coal/c; // Mass of coal used, [kg/s]\n",
+"m_coal = m_coal*3600; // [kg/h]\n",
+"//After one hour\n",
+"m_coal = m_coal*1*10^-3; // [tonne]\n",
+"mprintf('\n Mass of coal burnt by the power station in 1 hour is = %f tonne \n',m_coal);\n",
+"// End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1: Work_done.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear ;\n",
+"clc;\n",
+"disp('Example 1.1');\n",
+"// Given values\n",
+"P = 700; //pressure,[kN/m^2]\n",
+"V1 = .28; //initial volume,[m^3]\n",
+"V2 = 1.68; //final volume,[m^3]\n",
+"//solution\n",
+"W = P*(V2-V1);// // Formula for work done at constant pressure is, [kJ]\n",
+"mprintf('\n The Work done is = %f MJ\n',W*10^-3);\n",
+"//End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2: Volume_of_the_gas.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.2');\n",
+"//Given values\n",
+"P1 = 138; // initial pressure,[kN/m^2]\n",
+"V1 = .112; //initial volume,[m^3]\n",
+"P2 = 690; // final pressure,[kN/m^2]\n",
+"Gama=1.4; // heat capacity ratio\n",
+"// solution\n",
+"// since gas is following, PV^1.4=constant,hence\n",
+"V2 =V1*(P1/P2)^(1/Gama); // final volume, [m^3] \n",
+"mprintf('\n The new volume of the gas is = %f m^3\n',V2)\n",
+"//End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3: Work_done.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.3');\n",
+"// Given values\n",
+"P1 = 2070; // initial pressure, [kN/m^2]\n",
+"V1 = .014; // initial volume, [m^3]\n",
+"P2 = 207; // final pressure, [kN/m^2]\n",
+"n=1.35; // polytropic index\n",
+"// solution\n",
+"// since gas is following PV^n=constant\n",
+"// hence \n",
+"V2 = V1*(P1/P2)^(1/n); // final volume, [m^3]\n",
+"// calculation of workdone\n",
+"W=(P1*V1-P2*V2)/(1.35-1); // using work done formula for polytropic process, [kJ]\n",
+"mprintf('\n The Work done by gas during expansion is = %f kJ\n',W);\n",
+"//End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.4: Final_Pressure_and_work_done.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.4');\n",
+"// Given values\n",
+"P1 = 100; // initial pressure, [kN/m^2]\n",
+"V1 = .056; // initial volume, [m^3]\n",
+"V2 = .007; // final volume, [m^3]\n",
+"// To know P2\n",
+"// since process is hyperbolic so, PV=constant\n",
+"// hence\n",
+"P2 = P1*V1/V2; // final pressure, [kN/m^2]\n",
+"mprintf('\n The final pressure is = %f kN/m^2\n',P2);\n",
+"// calculation of workdone\n",
+"W = P1*V1*log(V2/V1); // formula for work done in this process, [kJ]\n",
+"mprintf('\n Work done on the gas is = %f kJ\n',W);\n",
+"//End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.5: Heat_transfer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.5');\n",
+"// Given values\n",
+"m = 5; // mass, [kg]\n",
+"t1 = 15; // inital temperature, [C]\n",
+"t2 = 100; // final temperature, [C]\n",
+"c = 450; // specific heat capacity, [J/kg K]\n",
+"// solution\n",
+"// using heat transfer equation,[1]\n",
+"Q = m*c*(t2-t1); // [J]\n",
+"mprintf('\n The heat required is = %f kJ\n',Q*10^-3);\n",
+"//End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.6: Heat_transfer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.6');\n",
+"// Given values\n",
+"m_cop = 2; // mass of copper vessel, [kg]\n",
+"m_wat = 6; // mass of water, [kg]\n",
+"c_wat = 4.19; // specific heat capacity of water, [kJ/kg K]\n",
+"t1 = 20; // initial temperature, [C]\n",
+"t2 = 90; // final temperature, [C]\n",
+"// From the table of average specific heat capacities\n",
+"c_cop = .390; // specific heat capacity of copper,[kJ/kg k]\n",
+"// solution\n",
+"Q_cop = m_cop*c_cop*(t2-t1); // heat required by copper vessel, [kJ]\n",
+"Q_wat = m_wat*c_wat*(t2-t1); // heat required by water, [kJ]\n",
+"// since there is no heat loss,so total heat transfer is sum of both\n",
+"Q_total = Q_cop+Q_wat ; // [kJ]\n",
+"mprintf(' \n Required heat transfer to accomplish the change = %f kJ\n',Q_total);\n",
+"//End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.7: Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.7');\n",
+"// Given values\n",
+"m = 10; // mass of iron casting, [kg]\n",
+"t1 = 200; // initial temperature, [C]\n",
+"Q = -715.5; // [kJ], since heat is lost in this process\n",
+"// From the table of average specific heat capacities\n",
+"c = .50; // specific heat capacity of casting iron, [kJ/kg K]\n",
+"// solution\n",
+"// using heat equation\n",
+"// Q = m*c*(t2-t1)\n",
+"t2 = t1+Q/(m*c); // [C]\n",
+"mprintf('\n The final temperature is t2 = %f C\n',t2);\n",
+"// End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.8: Specific_heat_capacity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.8');\n",
+" \n",
+"// Given values\n",
+"m = 4; // mass of the liquid, [kg]\n",
+"t1 = 15; // initial temperature, [C]\n",
+"t2 = 100; // final temperature, [C]\n",
+"Q = 714; // [kJ],required heat to accomplish this change\n",
+"// solution\n",
+"// using heat equation\n",
+"// Q=m*c*(t2-t1)\n",
+"// calculation of c\n",
+"c=Q/(m*(t2-t1)); // heat capacity, [kJ/kg K] \n",
+"mprintf('\n The specific heat capacity of the liquid is c = %f kJ/kg K\n',c);\n",
+"//End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.9: Power_output_and_energy_rejected.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 1.9');\n",
+"// Given values\n",
+"m_dot = 20.4; // mass flowrate of petrol, [kg/h]\n",
+"c = 43; // calorific value of petrol, [MJ/kg]\n",
+"n = .2; // Thermal efficiency of engine\n",
+"// solution\n",
+"m_dot = 20.4/3600; // [kg/s]\n",
+"c = 43*10^6; // [J/kg]\n",
+"// power output\n",
+"P_out = n*m_dot*c; // [W]\n",
+"mprintf('\n The power output of the engine is = %f kJ\n',P_out*10^-3);\n",
+" \n",
+"// power rejected\n",
+"P_rej = m_dot*c*(1-n); // [W]\n",
+"P_rej = P_rej*60*10^-6; // [MJ/min]\n",
+"mprintf('\n The energy rejected by the engine is = %f MJ/min \n',P_rej);\n",
+"//End"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}