summaryrefslogtreecommitdiff
path: root/Thermodynamics_by_C_P_Arora/11-THERMODYNAMIC_PROPERTY_RELATIONS.ipynb
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Thermodynamics_by_C_P_Arora/11-THERMODYNAMIC_PROPERTY_RELATIONS.ipynb
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.gz
all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.bz2
all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Thermodynamics_by_C_P_Arora/11-THERMODYNAMIC_PROPERTY_RELATIONS.ipynb')
-rw-r--r--Thermodynamics_by_C_P_Arora/11-THERMODYNAMIC_PROPERTY_RELATIONS.ipynb265
1 files changed, 265 insertions, 0 deletions
diff --git a/Thermodynamics_by_C_P_Arora/11-THERMODYNAMIC_PROPERTY_RELATIONS.ipynb b/Thermodynamics_by_C_P_Arora/11-THERMODYNAMIC_PROPERTY_RELATIONS.ipynb
new file mode 100644
index 0000000..589b0a3
--- /dev/null
+++ b/Thermodynamics_by_C_P_Arora/11-THERMODYNAMIC_PROPERTY_RELATIONS.ipynb
@@ -0,0 +1,265 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: THERMODYNAMIC PROPERTY RELATIONS"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1: MERECTS_BOILER_EXPERIMENT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"p1=150; p2=200; p3=250; p4=300; p5=350; p6=400; p7=450; p8=500; p9=550; p10=600; p11=650; p12=700; p13=750; p14=800; p15=850; p16=900; // Pressures of merect's boiler experiment in kPa\n",
+"t1=111.4; t2=120.2; t3=127.4; t4=133.6; t5=138.9; t6=143.6; t7=147.9; t8=151.9; t9=155.5; t10=158.9; t11=162; t12=165; t13=167.8; t14=170.4; t15=173; t16=175.4; // Temperatures of merect's boiler experiment in degree celcius\n",
+"n=16; // Total number of readings taken\n",
+"// Values of constant A & B\n",
+"s_y= log10 (p1*p2*p3*p4*p5*p6*p7*p8*p9*p10*p11*p12*p13*p14*p15*p16);\n",
+"s_x=1/(t1+273)+1/(t2+273)+1/(t3+273)+1/(t4+273)+1/(t5+273)+1/(t6+273)+1/(t7+273)+1/(t8+273)+1/(t9+273)+1/(t10+273)+1/(t11+273)+1/(t12+273)+1/(t13+273)+1/(t14+273)+1/(t15+273)+1/(t16+273);\n",
+"s_xy=((log10 (p1))*1/(t1+273))+ ((log10 (p2))*1/(t2+273))+ ((log10 (p3))*1/(t3+273))+ ((log10 (p4))*1/(t4+273))+ ((log10 (p5))*1/(t5+273))+ ((log10 (p6))*1/(t6+273))+ ((log10 (p7))*1/(t7+273))+ ((log10 (p8))*1/(t8+273))+ ((log10 (p9))*1/(t9+273))+ ((log10 (p10))*1/(t10+273))+ ((log10 (p11))*1/(t11+273)) + ((log10 (p12))*1/(t12+273)) + ((log10 (p13))*1/(t13+273)) + ((log10 (p14))*1/(t14+273)) + ((log10 (p15))*1/(t15+273)) + ((log10 (p16))*1/(t16+273));\n",
+"s_x2=(1/(273+t1))^2+(1/(273+t2))^2+(1/(273+t3))^2+(1/(273+t4))^2+(1/(273+t5))^2+(1/(273+t6))^2+(1/(273+t7))^2+(1/(273+t8))^2+(1/(273+t9))^2+(1/(273+t10))^2+(1/(273+t11))^2+(1/(273+t12))^2+(1/(273+t13))^2+(1/(273+t14))^2+(1/(273+t15))^2+(1/(273+t16))^2;\n",
+"B= ((n*s_xy)-(s_x*s_y))/((n*s_x2)-((s_x)^2)); // Constant B\n",
+"A=((s_y)-(B*s_x))/n; // Constant A\n",
+"disp (B,'B =',A,'A =','Values of constant A & B');\n",
+"// The latent heat of vapourization\n",
+"T=150; // The latent heat of vapourization at this temperature in degree celcius\n",
+"d_T=20; d_p=258.7;// Temperature and pressure difference\n",
+"vg=0.3928; vf=0.0011; // specific volume in m^3/kg\n",
+"hfg=(T+273)*(vg-vf)*d_p/d_T; // Clapeyron equztion\n",
+"disp ('kJ/kg',hfg,'The latent heat of vapourization at 150 oC =');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3: ENTHALPY_CALCULATION_USING_R_K_EQUATION.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"p5=6000; // Pressure of superheated steam in kPa\n",
+"T5=723.15; // Temperature of superheated steam in kelvin\n",
+"p1=0.6113; // Pressure at reference state in kPa\n",
+"T1=273.16; // Temperature at reference state in kelvin\n",
+"hfg1=2501.3; // Latent heat of vapourization of water at reference state in kJ/kg\n",
+"R_1=8.3143; // Universal gas constant of air in kJ/kmol K\n",
+"// The critical state properties of water\n",
+"pc=2.09; // pressure in MPa\n",
+"Tc=647.3; // Temperature in kelvin\n",
+"h1=0; // Reference state in kJ/kg\n",
+"h2=h1+hfg1; // specific enthalpy in kJ/kg \n",
+"// At point 2\n",
+"p2=p1; T2=T1;\n",
+"z=0.9986;\n",
+"r=18.015;\n",
+"A2=(0.4278/(pc*10^4))*(Tc/T2)^2.5; // Constants\n",
+"B=(0.0867/(pc*10^4))*(Tc/T2); // Constants\n",
+"h2_h3=R_1*(T2/r)*(((-3/2)*(A2/B)*log (1+(B*p2/z)))+z-1); // Enthalpy difference between state 2 & 3\n",
+"// At point 5\n",
+"z1=0.9373;\n",
+"A2=(0.4278/(pc*10^4))*(Tc/T5)^2.5; // Constants\n",
+"B=(0.0867/(pc*10^4))*(Tc/T5); // Constants\n",
+"h5_h4=R_1*(T5/r)*(((-3/2)*(A2/B)*log (1+(B*p5/z1)))+z1-1); // Enthalpy difference between state 5 & 4\n",
+"a=1.6198;b=6.6*10^-4; // Constants\n",
+"h4_h3=a*(T5-T1)+b*(T5^2-T1^2)/2; // Enthalpy difference between state 3 & 4\n",
+"h5=h2-h2_h3+h5_h4+h4_h3; // Specific enthalpy at state 5 \n",
+"disp ('kJ/kg',h5,'Specific enthalpy at state 5 = ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.4: ENTHALPY_CALCULATION_FROM_GENERALIZED_CHARTS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"T2=373; // Temperature of CO2 gas in kelvin\n",
+"p2=100; // Pressure of CO2 gas in atm\n",
+"T1=0; // Reference state temperature in kelvin\n",
+"// The crictical constants for CO2 are \n",
+"Tc=304.2; // Temperature in kelvin\n",
+"Pc=72.9; // Pressure in atm\n",
+"zc=0.275;\n",
+"// Refer figure 11.7 for state definition\n",
+"h1_0=((-3.74*T2)+((30.53/(100^0.5))*((T2^1.5)/1.5))-((4.1/100)*((T2^2)/2))+((0.024/(100^2))*((T2^3)/3)));\n",
+"Tr=T2/Tc; Pr=p2/Pc; // Reduced properties\n",
+"// From generalized chart figure 11.6\n",
+"hR_Tc=10.09;\n",
+"h1_2=hR_Tc*Tc;\n",
+"M=44; // Molecular weight\n",
+"h10=h1_0/M; h12=h1_2/M;\n",
+"h373=h10-h12; // The required enthalpy of CO2 gas at 373 K and 100 atm\n",
+"disp ('kJ/kg',h373,'The required enthalpy of CO2 gas at 373 K and 100 atm = ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.5: CALCULATIONS_FOR_REVERSIBLE_ISOTHERMAL_COMPRESSION_FROM_GENERALIZED_CAHRTS.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"p1=11; // Initial pressure in bar\n",
+"T1=40; // Initial temperature in degree celcius\n",
+"p2=60; // Final pressure in bar\n",
+"R_1=8.3143; // Universal gas constant in kJ/kmol K\n",
+"// The crictical properties for natural gas \n",
+"Tc=161; // Temperature in kelvin\n",
+"Pc=46.4; // Pressure in bar\n",
+"// Reduced properties are\n",
+"Pr1=p1/Pc; Pr2=p2/Pc;\n",
+"Tr1=(T1+273)/Tc;\n",
+"// T2=T1, The ideal gas enthalpy h2*=h1*=h1\n",
+"h21=-47.5; // From generalized enthalpy departure chart\n",
+"M=16; // Molecular weight\n",
+"Sp2_1=(R_1/M)*log (p2/p1)// for the difference in ideal gas entropies\n",
+"Sp2_Sp_2=-0.1125; Sp_2_Sp_1=-2.1276; // Entropies in kJ/kg K\n",
+"s2_s1=(Sp2_Sp_2)+(Sp_2_Sp_1);\n",
+"q=(T1+273)*s2_s1; // Heat transfer\n",
+"w=q-h21; // Work of compression\n",
+"disp ('kJ/kg',w,'Work of compression = ','kJ/kg',q,'Heat transfer = ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.8: CALCULATIONS_FOR_COOLING_IN_A_THROTTLING_PROCESS_USING_GENERALIZED_CHART.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"p1=10; // Initial pressure in MPa\n",
+"T1=263; // Initial temperature in Kelvin\n",
+"p2=1.5; // Final pressure in MPa\n",
+"R_1=8.3143; // Universal gas constant in kJ/kmol K\n",
+"M=28; // Molecular mass\n",
+"// The crictical properties for nitrogen gas \n",
+"Tc=126.2; // Temperature in kelvin\n",
+"Pc=3.39; // Pressure in MPa\n",
+"// Reduced properties are\n",
+"Pr1=p1/Pc; Pr2=p2/Pc;\n",
+"Tr1=T1/Tc;\n",
+"// From the generalized chart for enthalpy departure at Pr1 & Tr1\n",
+"h_11=8.7*Tc/M;\n",
+"// The solution involves iteration procedure. Assume T2 and check if h2_h1=0\n",
+"// First approximation T2=200 K\n",
+"T2=200; // In K\n",
+"Tr2=T2/Tc;\n",
+"Cpr=1.046;\n",
+"h_21=Cpr*(T2-T1);\n",
+"// From the generalized chart for enthalpy departure at Pr1 & Tr1\n",
+"h_22=1*Tc/M;\n",
+"h2_h1=h_11-T2+T1-h_22;\n",
+"// Second approximation \n",
+"T2=190; // In K\n",
+"Tr2=T2/Tc;\n",
+"Cpr=1.046;\n",
+"h_21=Cpr*(T2-T1);\n",
+"// From the generalized chart for enthalpy departure at Pr1 & Tr1\n",
+"h_22=1.5*Tc/M;\n",
+"h2_h1=h_11-T2+T1-h_22;\n",
+"disp ('Here also h2-h1 != 0. Therefore the temperature is dropping.Thus Joule-Thomson coefficient is positive.There is cooling in this process');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.9: CALCULATIONS_OF_LATENT_HEAT_BY_SIMILARITY_METHOD.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"Tcammonia=405.9;\n",
+"Tcwater=647.3;\n",
+"Tr=0.576; // Condition of similarity\n",
+"Twater=Tcwater*Tr; // At reduced temperature Temperature of water\n",
+"Tammonia=Tcammonia*Tr;//At reduced temperature Temperature of ammonia\n",
+"// From steam table at Twater\n",
+"hfgwater=2257;// specific enthalpy in kJ/kg \n",
+"hfgammonia=Tcammonia/Tcwater *hfgwater; // Latent heat of vaporization of ammonia\n",
+"disp ('kJ/kg',hfgammonia,'Latent heat of vaporization of ammonia =');"
+ ]
+ }
+],
+"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
+}