{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 4:Second Law of Thermo Dynamics"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.1;pg no: 113"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.1, Page:113 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\n",
"NOTE=>This question is fully theoritical hence cannot be solve using scilab.\n"
]
}
],
"source": [
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.1, Page:113 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\")\n",
"print(\"NOTE=>This question is fully theoritical hence cannot be solve using scilab.\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.2;pg no: 114"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.2, Page:114 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\n",
"in carnot engine from thermodynamics temperature scale\n",
"Q1/Q2=T1/T2\n",
"W=Q1-Q2=200 KJ\n",
"from above equations Q1 in KJ is given by\n",
"Q1= 349.61\n",
"and Q2 in KJ\n",
"Q2=Q1-200 149.61\n",
"so heat supplied(Q1) in KJ 349.6\n"
]
}
],
"source": [
"#cal of heat supplied\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.2, Page:114 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\")\n",
"T1=(400.+273.);#temperature of source in K\n",
"T2=(15.+273.);#temperature of sink in K\n",
"W=200.;#work done in KJ\n",
"print(\"in carnot engine from thermodynamics temperature scale\")\n",
"print(\"Q1/Q2=T1/T2\")\n",
"print(\"W=Q1-Q2=200 KJ\")\n",
"print(\"from above equations Q1 in KJ is given by\")\n",
"Q1=(200*T1)/(T1-T2)\n",
"print(\"Q1=\"),round(Q1,2)\n",
"print(\"and Q2 in KJ\")\n",
"Q2=Q1-200\n",
"print(\"Q2=Q1-200\"),round(Q2,2)\n",
"print(\"so heat supplied(Q1) in KJ\"),round(Q1,1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.3;pg no: 115"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.3, Page:115 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\n",
"from thermodynamic temperature scale\n",
"Q1/Q2=T1/T2\n",
"so Q1=Q2*(T1/T2)in KJ/s 2.27\n",
"power/work input required(W)=Q1-Q2 in KJ/s \n",
"power required for driving refrigerator=W in KW 0.274\n"
]
}
],
"source": [
"#cal of power required for driving refrigerator\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.3, Page:115 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\")\n",
"T1=315.;#temperature of reservoir 1 in K\n",
"T2=277.;#temperature of reservoir 2 in K\n",
"Q2=2.;#heat extracted in KJ/s\n",
"print(\"from thermodynamic temperature scale\")\n",
"print(\"Q1/Q2=T1/T2\")\n",
"Q1=Q2*(T1/T2)\n",
"print(\"so Q1=Q2*(T1/T2)in KJ/s\"),round(Q1,2)\n",
"print(\"power/work input required(W)=Q1-Q2 in KJ/s \")\n",
"W=Q1-Q2\n",
"print(\"power required for driving refrigerator=W in KW\"),round(W,3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.4;pg no: 115"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.4, Page:115 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\n",
"we can writefor heat engine,Q1/Q2=T1/T2\n",
"so Q2=Q1*(T2/T1) in KJ 545.45\n",
"so We=in KJ 1454.55\n",
"for refrigerator,Q3/Q4=T3/T4 eq 1\n",
"now We-Wr=300\n",
"so Wr=We-300 in KJ 1154.55\n",
"and Wr=Q4-Q3=1154.55 KJ eq 2 \n",
"solving eq1 and eq 2 we get\n",
"Q4=in KJ 8659.13\n",
"and Q3=in KJ 7504.58\n",
"total heat transferred to low teperature reservoir(Q)=in KJ 9204.58\n",
"hence heat transferred to refrigerant=Q3 in KJ 7504.58\n",
"and heat transferred to low temperature reservoir=Q in KJ 9204.58\n"
]
}
],
"source": [
"#cal of heat transferred to refrigerant and low temperature reservoir\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.4, Page:115 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\")\n",
"T1=(827.+273.);#temperature of high temperature reservoir in K\n",
"T2=(27.+273.);#temperature of low temperature reservoir in K\n",
"T3=(-13.+273.);#temperature of reservoir 3 in K\n",
"Q1=2000.;#heat ejected by reservoir 1 in KJ\n",
"print(\"we can writefor heat engine,Q1/Q2=T1/T2\")\n",
"Q2=Q1*(T2/T1)\n",
"print(\"so Q2=Q1*(T2/T1) in KJ\"),round(Q2,2)\n",
"We=Q1-Q2\n",
"print(\"so We=in KJ\"),round(We,2)\n",
"print(\"for refrigerator,Q3/Q4=T3/T4 eq 1\")\n",
"T4=T2;#temperature of low temperature reservoir in K\n",
"print(\"now We-Wr=300\")\n",
"Wr=We-300.\n",
"print(\"so Wr=We-300 in KJ\"),round(Wr,2)\n",
"print(\"and Wr=Q4-Q3=1154.55 KJ eq 2 \")\n",
"print(\"solving eq1 and eq 2 we get\")\n",
"Q4=(1154.55*T4)/(T4-T3)\n",
"print(\"Q4=in KJ\"),round(Q4,2)\n",
"Q3=Q4-Wr\n",
"print(\"and Q3=in KJ\"),round(Q3,2)\n",
"Q=Q2+Q4\n",
"print(\"total heat transferred to low teperature reservoir(Q)=in KJ\"),round(Q,2)\n",
"print(\"hence heat transferred to refrigerant=Q3 in KJ\"),round(Q3,2)\n",
"print(\"and heat transferred to low temperature reservoir=Q in KJ\"),round(Q,2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.5;pg no: 116"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.5, Page:116 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\n",
"COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\n",
"also we know K=Q1/Q2=T1/T2\n",
"so K=T1/T2 1.1\n",
"so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K)) 11.0\n",
"also COP_HP=Q1/W\n",
"W=Q1/COin MJ/Hr 3.03\n",
"or W=1000*W/3600 in KW 3.03\n",
"so minimum power required(W)in KW 3.03\n"
]
}
],
"source": [
"#cal of minimum power required\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.5, Page:116 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\")\n",
"T1=(25+273.15);#temperature of inside of house in K\n",
"T2=(-1+273.15);#outside temperature in K\n",
"Q1=125;#heating load in MJ/Hr\n",
"print(\"COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\")\n",
"print(\"also we know K=Q1/Q2=T1/T2\")\n",
"K=T1/T2\n",
"print(\"so K=T1/T2\"),round(K,2)\n",
"COP_HP=1/(1-(1/K))\n",
"print(\"so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K))\"),round(COP_HP)\n",
"print(\"also COP_HP=Q1/W\")\n",
"W=Q1/COP_HP\n",
"W=1000*W/3600\n",
"print(\"W=Q1/COin MJ/Hr\"),round(W,2)\n",
"print(\"or W=1000*W/3600 in KW\"),round(W,2)\n",
"print(\"so minimum power required(W)in KW \"),round(W,2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.6;pg no: 117"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.6, Page:117 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\n",
"cold storage plant can be considered as refrigerator operating between given temperatures limits\n",
"capacity of plant=heat to be extracted=Q2 in KW\n",
"we know that,one ton of refrigeration as 3.52 KW \n",
"so Q2=Q2*3.52 in KW 140.8\n",
"carnot COP of plant(COP_carnot)= 5.18\n",
"performance is 1/4 of its carnot COP\n",
"COP=COP_carnot/4\n",
"also actual COP=Q2/W\n",
"W=Q2/COP in KW\n",
"hence power required(W)in KW 108.76\n"
]
}
],
"source": [
"#cal of power required\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.6, Page:117 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\")\n",
"T1=(-15.+273.15);#inside temperature in K\n",
"T2=(35.+273.);#atmospheric temperature in K\n",
"Q2=40.;#refrigeration capacity of storage plant in tonnes\n",
"print(\"cold storage plant can be considered as refrigerator operating between given temperatures limits\")\n",
"print(\"capacity of plant=heat to be extracted=Q2 in KW\")\n",
"print(\"we know that,one ton of refrigeration as 3.52 KW \")\n",
"Q2=Q2*3.52\n",
"print(\"so Q2=Q2*3.52 in KW\"),round(Q2,2)\n",
"COP_carnot=1/((T2/T1)-1)\n",
"print(\"carnot COP of plant(COP_carnot)=\"),round(COP_carnot,2)\n",
"print(\"performance is 1/4 of its carnot COP\")\n",
"COP=COP_carnot/4\n",
"print(\"COP=COP_carnot/4\")\n",
"print(\"also actual COP=Q2/W\")\n",
"print(\"W=Q2/COP in KW\")\n",
"W=Q2/COP\n",
"print(\"hence power required(W)in KW\"),round(W,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.7;pg no: 117"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.7, Page:117 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\n",
"highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\n",
"n= 0.79\n",
"or n=n*100 % 78.92\n"
]
}
],
"source": [
"#cal of carnot cycle efficiency for given temperature limits\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.7, Page:117 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\")\n",
"T1=(1150.+273.);#temperature of source in K\n",
"T2=(27.+273.);#temperature of sink in K\n",
"print(\"highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\")\n",
"n=1-(T2/T1)\n",
"print(\"n=\"),round(n,2)\n",
"n=n*100\n",
"print(\"or n=n*100 %\"),round(n,2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.8;pg no: 117"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.8, Page:117 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\n",
"here heat to be removed continuously from refrigerated space(Q)in KJ/s 0.13\n",
"for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\n",
"W=in KW 0.02\n",
"so power required(W)in KW 0.02\n"
]
}
],
"source": [
"#cal of power required\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.8, Page:117 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\")\n",
"T1=(27.+273.);#temperature of source in K\n",
"T2=(-8.+273.);#temperature of sink in K\n",
"Q=7.5;#heat leakage in KJ/min\n",
"Q=Q/60.\n",
"print(\"here heat to be removed continuously from refrigerated space(Q)in KJ/s\"),round(Q,2)\n",
"print(\"for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\")\n",
"W=Q*((T1/T2)-1)\n",
"print(\"W=in KW\"),round(W,2)\n",
"print(\"so power required(W)in KW\"),round(W,2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.9;pg no: 118"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.9, Page:118 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\n",
"here W1:W2:W3=3:2:1\n",
"efficiency of engine,HE1,\n",
"W1/Q1=(1-(T2/1100))\n",
"so Q1=(1100*W1)/(1100-T2)\n",
"for HE2 engine,W2/Q2=(1-(T3/T2))\n",
"for HE3 engine,W3/Q3=(1-(300/T3))\n",
"from energy balance on engine,HE1\n",
"Q1=W1+Q2=>Q2=Q1-W1\n",
"above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\n",
"substituting Q2 in efficiency of HE2\n",
"W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\n",
"W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\n",
"2/3=(T2-T3)/(1100-T2)\n",
"2200-2*T2=3*T2-3*T3\n",
"5*T2-3*T3=2200\n",
"now energy balance on engine HE2 gives,Q2=W2+Q3\n",
"substituting in efficiency of HE2,\n",
"W2/(W2+Q3)=(T2-T3)/T2\n",
"W2*T2=(W2+Q3)*(T2-T3)\n",
"Q3=(W2*T3)/(T2-T3)\n",
"substituting Q3 in efficiency of HE3,\n",
"W3/((W2*T3)/(T2-T3))=(T3-300)/T3\n",
"W3/W2=(T3/(T2-T3))*(T3-300)/T3\n",
"1/2=(T3-300)/(T2-T3)\n",
"3*T3-T2=600\n",
"solving equations of T2 and T3,\n",
"we get,T3=in K 433.33\n",
"and by eq 5,T2 in K 700.0\n",
"so intermediate temperature are 700 K and 433.33 K\n"
]
}
],
"source": [
"#cal of intermediate temperatures\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.9, Page:118 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\")\n",
"T1=1100;#temperature of high temperature reservoir in K\n",
"T4=300;#temperature of low temperature reservoir in K\n",
"print(\"here W1:W2:W3=3:2:1\")\n",
"print(\"efficiency of engine,HE1,\")\n",
"print(\"W1/Q1=(1-(T2/1100))\")\n",
"print(\"so Q1=(1100*W1)/(1100-T2)\")\n",
"print(\"for HE2 engine,W2/Q2=(1-(T3/T2))\")\n",
"print(\"for HE3 engine,W3/Q3=(1-(300/T3))\")\n",
"print(\"from energy balance on engine,HE1\")\n",
"print(\"Q1=W1+Q2=>Q2=Q1-W1\")\n",
"print(\"above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\")\n",
"print(\"substituting Q2 in efficiency of HE2\")\n",
"print(\"W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\")\n",
"print(\"W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\")\n",
"print(\"2/3=(T2-T3)/(1100-T2)\")\n",
"print(\"2200-2*T2=3*T2-3*T3\")\n",
"print(\"5*T2-3*T3=2200\")\n",
"print(\"now energy balance on engine HE2 gives,Q2=W2+Q3\")\n",
"print(\"substituting in efficiency of HE2,\")\n",
"print(\"W2/(W2+Q3)=(T2-T3)/T2\")\n",
"print(\"W2*T2=(W2+Q3)*(T2-T3)\")\n",
"print(\"Q3=(W2*T3)/(T2-T3)\")\n",
"print(\"substituting Q3 in efficiency of HE3,\")\n",
"print(\"W3/((W2*T3)/(T2-T3))=(T3-300)/T3\")\n",
"print(\"W3/W2=(T3/(T2-T3))*(T3-300)/T3\")\n",
"print(\"1/2=(T3-300)/(T2-T3)\")\n",
"print(\"3*T3-T2=600\")\n",
"print(\"solving equations of T2 and T3,\")\n",
"T3=(600.+(2200./5.))/(3.-(3./5.))\n",
"print(\"we get,T3=in K\"),round(T3,2)\n",
"T2=(2200.+3.*T3)/5.\n",
"print(\"and by eq 5,T2 in K\"),round(T2,2)\n",
"print(\"so intermediate temperature are 700 K and 433.33 K\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.10;pg no: 119"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.10, Page:119 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\n",
"efficiency of engine,W/Q1=(800-T)/800\n",
"for refrigerator,COP=Q3/W=280/(T-280)\n",
"it is given that Q1=Q3=Q\n",
"so,from engine,W/Q=(800-T)/800\n",
"from refrigerator,Q/W=280/(T-280)\n",
"from above two(Q/W)may be equated,\n",
"(T-280)/280=(800-T)/800\n",
"so temperature(T)in K 414.81\n",
"efficiency of engine(n)is given as\n",
"n= 0.48\n",
"COP of refrigerator is given as\n",
"COP= 2.08\n"
]
}
],
"source": [
"#cal of COP\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.10, Page:119 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\")\n",
"T1=800.;#temperature of source in K\n",
"T2=280.;#temperature of sink in K\n",
"print(\"efficiency of engine,W/Q1=(800-T)/800\")\n",
"print(\"for refrigerator,COP=Q3/W=280/(T-280)\")\n",
"print(\"it is given that Q1=Q3=Q\")\n",
"print(\"so,from engine,W/Q=(800-T)/800\")\n",
"print(\"from refrigerator,Q/W=280/(T-280)\")\n",
"print(\"from above two(Q/W)may be equated,\")\n",
"print(\"(T-280)/280=(800-T)/800\")\n",
"T=2.*280.*800./(800.+280.)\n",
"print(\"so temperature(T)in K\"),round(T,2)\n",
"print(\"efficiency of engine(n)is given as\")\n",
"n=(800.-T)/800.\n",
"print(\"n=\"),round(n,2)\n",
"print(\"COP of refrigerator is given as\")\n",
"COP=280./(T-280.)\n",
"print(\"COP=\"),round(COP,2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.11;pg no: 120"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.11, Page:120 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\n",
"let thermodynamic properties be denoted with respect to salient states;\n",
"n_carnot=1-T1/T2\n",
"so T1/T2=1-0.5\n",
"so T1/T2=0.5\n",
"or T2=2*T1\n",
"corresponding to state 2,p2*v2=m*R*T2\n",
"so temperature(T2) in K= 585.37\n",
"heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\n",
"Q_23=W_23=p2*v2*log(v3/v2)\n",
"so volume(v3) in m^3= 0.1932\n",
"temperature at state 1,T1 in K= 292.68\n",
"during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\n",
"here expansion constant(y)=Cp/Cv\n",
"so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\n",
"p1 in bar\n",
"thus p1*v1=m*R*T1\n",
"so volume(v1) in m^3= 0.68\n",
"heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\n",
"for isentropic process,dQ=0,dW=dU\n",
"during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\n",
"Q_12=0,\n",
"W_12=-105.51 KJ(-ve work)\n",
"during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\n",
"Q_31=0,\n",
"ANS:\n",
"W_34=+105.51 KJ(+ve work)\n",
"so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\n",
"for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\n",
"for process 3-4,heat transfer=0,work interaction=+105.51 KJ\n",
"for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\n",
"maximum temperature of cycle=585.36 KJ\n",
"minimum temperature of cycle=292.68 KJ\n",
"volume at the end of isothermal expansion=0.1932 m^3\n"
]
}
],
"source": [
"#cal of max and min temp of cycle,volume\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"import math\n",
"print\"Example 4.11, Page:120 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\")\n",
"n_carnot=0.5;#efficiency of carnot power cycle\n",
"m=0.5;#mass of air in kg\n",
"p2=7.*10**5;#final pressure in pa\n",
"v2=0.12;#volume in m^3\n",
"R=287.;#gas constant in J/kg K\n",
"Q_23=40.*1000.;#heat transfer to the air during isothermal expansion in J\n",
"Cp=1.008;#specific heat at constant pressure in KJ/kg K\n",
"Cv=0.721;#specific heat at constant volume in KJ/kg K\n",
"print(\"let thermodynamic properties be denoted with respect to salient states;\")\n",
"print(\"n_carnot=1-T1/T2\")\n",
"print(\"so T1/T2=1-0.5\")\n",
"1-0.5\n",
"print(\"so T1/T2=0.5\")\n",
"print(\"or T2=2*T1\")\n",
"print(\"corresponding to state 2,p2*v2=m*R*T2\")\n",
"T2=p2*v2/(m*R)\n",
"print(\"so temperature(T2) in K=\"),round(T2,2)\n",
"print(\"heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\")\n",
"print(\"Q_23=W_23=p2*v2*log(v3/v2)\")\n",
"v3=v2*math.exp(Q_23/(p2*v2))\n",
"print(\"so volume(v3) in m^3=\"),round(v3,4)\n",
"T1=T2/2\n",
"print(\"temperature at state 1,T1 in K=\"),round(T1,2)\n",
"print(\"during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\")\n",
"print(\"here expansion constant(y)=Cp/Cv\")\n",
"y=Cp/Cv\n",
"print(\"so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\")\n",
"p1=p2/(T2/T1)**(y/(y-1))\n",
"print(\"p1 in bar\")\n",
"p1=p1/10**5\n",
"print(\"thus p1*v1=m*R*T1\")\n",
"v1=m*R*T1/(p1*10**5)\n",
"print(\"so volume(v1) in m^3=\"),round(v1,2) \n",
"print(\"heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\")\n",
"print(\"for isentropic process,dQ=0,dW=dU\")\n",
"print(\"during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\")\n",
"print(\"Q_12=0,\")\n",
"W_12=-m*Cv*(T2-T1)\n",
"print(\"W_12=-105.51 KJ(-ve work)\")\n",
"print(\"during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\")\n",
"print(\"Q_31=0,\")\n",
"T4=T1;\n",
"T3=T2;\n",
"W_34=-m*Cv*(T4-T3)\n",
"print(\"ANS:\")\n",
"print(\"W_34=+105.51 KJ(+ve work)\")\n",
"print(\"so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\")\n",
"print(\"for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\")\n",
"print(\"for process 3-4,heat transfer=0,work interaction=+105.51 KJ\")\n",
"print(\"for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\")\n",
"print(\"maximum temperature of cycle=585.36 KJ\")\n",
"print(\"minimum temperature of cycle=292.68 KJ\")\n",
"print(\"volume at the end of isothermal expansion=0.1932 m^3\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.12;pg no: 122"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.12, Page:122 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\n",
"let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\n",
"thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\n",
"Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\n",
"Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\n",
"substituting Q1_a and Q1_b in eq 1\n",
"4*Q2/3+2*Q3=5000...............eq4\n",
"also from total work output,Q1_a+Q1_b-Q2-Q3=W\n",
"5000-Q2-Q3=840\n",
"so Q2+Q3=5000-840=4160\n",
"Q3=4160-Q2\n",
"sunstituting Q3 in eq 4\n",
"4*Q2/3+2*(4160-Q2)=5000\n",
"so Q2=in KJ 4980.0\n",
"and Q3= in KJ 820.0\n",
"here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\n",
"Q2=4980 KJ,from heat engine\n",
"Q3=820 KJ,to heat engine\n"
]
}
],
"source": [
"#cal of heat from from heat engine and to heat engine\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.12, Page:122 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\")\n",
"W=840.;#work done by reservoir in KJ\n",
"print(\"let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\")\n",
"print(\"thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\")\n",
"print(\"Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\")\n",
"print(\"Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\")\n",
"print(\"substituting Q1_a and Q1_b in eq 1\")\n",
"print(\"4*Q2/3+2*Q3=5000...............eq4\")\n",
"print(\"also from total work output,Q1_a+Q1_b-Q2-Q3=W\")\n",
"print(\"5000-Q2-Q3=840\")\n",
"print(\"so Q2+Q3=5000-840=4160\")\n",
"print(\"Q3=4160-Q2\")\n",
"print(\"sunstituting Q3 in eq 4\")\n",
"print(\"4*Q2/3+2*(4160-Q2)=5000\")\n",
"Q2=(5000.-2.*4160.)/((4./3.)-2.)\n",
"print(\"so Q2=in KJ\"),round(Q2,2)\n",
"Q3=4160.-Q2\n",
"print(\"and Q3= in KJ\"),round(-Q3,2)\n",
"print(\"here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\")\n",
"print(\"Q2=4980 KJ,from heat engine\")\n",
"print(\"Q3=820 KJ,to heat engine\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.13;pg no: 123"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.13, Page:123 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\n",
"arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\n",
"for heat engine\n",
"ne=W/Q1=1-T2/T1\n",
"so (Q1-Q2)/Q1=\n",
"and Q2/Q1=\n",
"Q2=0.2593*Q1\n",
"for heat pump,\n",
"COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\n",
"Q4/Q3=\n",
"Q4=1.27*Q3\n",
"work output from engine =work input to pump\n",
"Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\n",
"so Q4/Q1=\n",
"so Q4=3.484*Q1\n",
"also it is given that Q2+Q4=100\n",
"subtituting Q2 and Q4 as function of Q1 in following expression,\n",
"Q2+Q4=100\n",
"so 0.2539*Q1+3.484*Q1=100\n",
"so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\n",
"Q1=100/(0.2539+3.484)in KJ 26.75\n",
"NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\n"
]
}
],
"source": [
"#cal of energy taken by engine from reservoir\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.13, Page:123 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\")\n",
"T2=(77+273);#temperature of reservoir 2\n",
"T1=(1077+273);#temperature of reservoir 1\n",
"T3=(3+273);#temperature of reservoir 3\n",
"print(\"arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\")\n",
"print(\"for heat engine\")\n",
"print(\"ne=W/Q1=1-T2/T1\")\n",
"print(\"so (Q1-Q2)/Q1=\")\n",
"1-T2/T1\n",
"print(\"and Q2/Q1=\")\n",
"1-0.7407\n",
"print(\"Q2=0.2593*Q1\")\n",
"print(\"for heat pump,\")\n",
"print(\"COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\")\n",
"T4=T2;\n",
"T4/(T4-T3)\n",
"print(\"Q4/Q3=\")\n",
"4.73/3.73\n",
"print(\"Q4=1.27*Q3\")\n",
"print(\"work output from engine =work input to pump\")\n",
"print(\"Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\")\n",
"print(\"so Q4/Q1=\")\n",
"(1-0.2593)/(1-(1/1.27))\n",
"print(\"so Q4=3.484*Q1\")\n",
"print(\"also it is given that Q2+Q4=100\")\n",
"print(\"subtituting Q2 and Q4 as function of Q1 in following expression,\")\n",
"print(\"Q2+Q4=100\")\n",
"print(\"so 0.2539*Q1+3.484*Q1=100\")\n",
"print(\"so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\")\n",
"Q1=100/(0.2539+3.484)\n",
"print(\"Q1=100/(0.2539+3.484)in KJ\"),round(Q1,2)\n",
"print(\"NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.14;pg no: 124"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.14, Page:124 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\n",
"let temperature of sink be T_sink K\n",
"Q_sink_HE+Q_sink_R=3000 ........eq 1\n",
"since complete work output from engine is used to run refrigerator so,\n",
"2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\n",
"by eq 1 and eq 2,we get Q_R in KJ/s 1000.0\n",
"also for heat engine,2000/1500=Q_sink_HE/T_sink\n",
"=>Q_sink_HE=4*T_sink/3\n",
"for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\n",
"substituting Q_sink_HE and Q_sink_R values\n",
"4*T_sink/3+1000*T_sink/288=3000\n",
"so temperature of sink(T_sink)in K\n",
"so T_sink= 750.0\n",
"T_sink in degree celcius 477.0\n"
]
}
],
"source": [
"#cal of T_sink in degree celcius\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.14, Page:124 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\")\n",
"Q_source=2000;#heat supplied by heat engine in KJ/s\n",
"T_source=1500;#temperature of source in K\n",
"T_R=(15+273);#temperature of reservoir in K\n",
"Q_sink=3000;#heat received by sink in KJ/s\n",
"print(\"let temperature of sink be T_sink K\")\n",
"print(\"Q_sink_HE+Q_sink_R=3000 ........eq 1\")\n",
"print(\"since complete work output from engine is used to run refrigerator so,\")\n",
"print(\"2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\")\n",
"Q_R=3000-2000\n",
"print(\"by eq 1 and eq 2,we get Q_R in KJ/s\"),round(Q_R)\n",
"print(\"also for heat engine,2000/1500=Q_sink_HE/T_sink\")\n",
"print(\"=>Q_sink_HE=4*T_sink/3\")\n",
"print(\"for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\")\n",
"print(\"substituting Q_sink_HE and Q_sink_R values\")\n",
"print(\"4*T_sink/3+1000*T_sink/288=3000\")\n",
"print(\"so temperature of sink(T_sink)in K\")\n",
"T_sink=3000/((4/3)+(1000/288))\n",
"print(\"so T_sink=\"),round(T_sink,2)\n",
"T_sink=T_sink-273\n",
"print(\"T_sink in degree celcius\"),round(T_sink,2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.15;pg no: 124"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.15, Page:124 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\n",
"let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\n",
"n=W/Q1= 0.39\n",
"so n=W/Q1=0.3881\n",
"COP of heat pump=T3/(T3-T2)=Q3/(2*W/3) 2.89\n",
"so 2.892=3*Q3/2*W\n",
"Q3/Q1= 0.7483\n",
"so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\n"
]
}
],
"source": [
"#cal of heat transferred to refrigerant and low temperature reservoir\n",
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.15, Page:124 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\")\n",
"T1=(500.+273.);#temperature of source in K\n",
"T2=(200.+273.);#temperature of sink in K\n",
"T3=(450.+273.);#temperature of body in K\n",
"print(\"let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\")\n",
"n=1-(T2/T1)\n",
"print(\"n=W/Q1=\"),round(n,2)\n",
"print(\"so n=W/Q1=0.3881\")\n",
"COP=T3/(T3-T2)\n",
"print(\"COP of heat pump=T3/(T3-T2)=Q3/(2*W/3)\"),round(COP,2)\n",
"print(\"so 2.892=3*Q3/2*W\")\n",
"print(\"Q3/Q1=\"),round(2*COP*n/3,4)\n",
"print(\"so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.16;pg no: 125"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.16, Page:125 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\n",
"NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\n"
]
}
],
"source": [
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.16, Page:125 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\")\n",
"print(\"NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##example 4.17;pg no: 126"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 4.17, Page:126 \n",
" \n",
"\n",
"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\n",
"NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\n"
]
}
],
"source": [
"#intiation of all variables\n",
"# Chapter 4\n",
"print\"Example 4.17, Page:126 \\n \\n\"\n",
"print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\")\n",
"print(\"NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"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.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}