summaryrefslogtreecommitdiff
path: root/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/4-Evaluating_Properties.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/4-Evaluating_Properties.ipynb')
-rw-r--r--Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/4-Evaluating_Properties.ipynb328
1 files changed, 328 insertions, 0 deletions
diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/4-Evaluating_Properties.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/4-Evaluating_Properties.ipynb
new file mode 100644
index 0000000..4781d2e
--- /dev/null
+++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/4-Evaluating_Properties.ipynb
@@ -0,0 +1,328 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Evaluating Properties"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: 10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.10\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"m1=2;\n",
+"m2=8;\n",
+"T1=350;\n",
+"T2=300;\n",
+"P1=0.7;//bar\n",
+"P2=1.2;//bar\n",
+"Tf=315;//K\n",
+"cv=0.745;//heat capacity\n",
+"pf=(m1+m2)*Tf/(m1*T1/P1+m2*T2/P2);\n",
+"disp(pf,'final pressure in bar');\n",
+"Q=m1*cv*(Tf-T1)+m2*cv*(Tf-T2);\n",
+"disp(Q,'heat transfer into the system in kJ');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: 11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.11\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"P2=5.0;\n",
+"P1=1.0;\n",
+"n=1.3;\n",
+"T1=530;\n",
+"R=1.986;\n",
+"u2=131.88;\n",
+"u1=90.33;\n",
+"T2=T1*(P2/P1)^(.3/n);\n",
+"k1=R*(T2-T1)/(1-n)/28.97;//k1=W/m\n",
+"disp(k1,'W/m in Btu/lb');\n",
+"k2=k1+u2-u1;//k2=Q/m\n",
+"disp(k2,'Q/m in Btu/lb');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: 1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.1\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"V=0.5;//volume\n",
+"P1=1;//pressure\n",
+"P2=0.5;\n",
+"vf1=1.0432/1000;\n",
+"vf2=1.0582/1000;\n",
+"x=0.5;\n",
+"T1=99.63;\n",
+"v1=vf1+0.5*(1.694-vf1);\n",
+"v2=v1;\n",
+"T2=111.4;//from table\n",
+"disp(T2,'temperature in degree celcius');\n",
+"m=V/v1;\n",
+"mg1=x*m;\n",
+"disp(mg1,'mass of vapor in kg');\n",
+"x2=(v1-vf2)/(1.159-vf2);\n",
+"mg2=x2*m;\n",
+"disp(mg2,'mass of vapor in kg');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: 2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.2\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"m=0.1;\n",
+"v1=2.2661;\n",
+"P2=20;//pressure\n",
+"v2=2.6704;\n",
+"V1=m*v1;\n",
+"disp(V1,'volume in ft^3');\n",
+"V2=m*v2;\n",
+"disp(V2,'volume in ft^3');\n",
+"W=P2*(V2-V1)*144/778;\n",
+"disp(W,'Work done in Btu');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: 3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.3\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"V=10.0;//ft^3\n",
+"v1=26.8;//ft^3/lb\n",
+"u1=1077.6;//btu/lb\n",
+"u2=1161.6;//Btu/lb;\n",
+"m=V/v1;\n",
+"W=-m*(u2-u1);\n",
+"disp(W,'Work done in Btu');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: 4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.4\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"P=10;//pressure\n",
+"v2=0.1944;//volume\n",
+"v1=0.3066;//volume\n",
+"uf3=631.68;\n",
+"v3=0.1944;\n",
+"vg3=0.3928;\n",
+"vf3=1.0905/1000;\n",
+"x3=(v3-vf3)/(vg3-vf3);\n",
+"u3=uf3+x3*(2559.5-uf3);\n",
+"k1=P*(v2-v1)*100;//k=W/m\n",
+"k2=u3-2957.3+k1;//k2=Q/m\n",
+"disp(k2,'Q/m in kJ/kg');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: 6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.6\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"Tr1=793.0/647.3;\n",
+"Pr1=22.0/22.09;\n",
+"Rbar=8314.0;\n",
+"M=18.02;\n",
+"T1=793.0;\n",
+"P1=20.0e6;\n",
+"pr2=0.69;\n",
+"v1=0.83*Rbar/M/P1*T1;\n",
+"disp(v1,'Specific weight in m^3/kg');\n",
+"vrdash=v1*22.09e6/Rbar*M/647.3;\n",
+"Tr2=673/647.3;\n",
+"P2=22.09e6*pr2;\n",
+"disp(P2/10^6,'Pressure in Mpa');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: 7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.7\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"p2=2;//pressure\n",
+"p1=1;//pressure\n",
+"T1=540;//temperature\n",
+"Rbar=1545;\n",
+"M=28.97;\n",
+"P1=14.7*144;\n",
+"T2=p2/p1*T1;\n",
+"disp(T2,'temperature in degreeR');\n",
+"v3=Rbar/M*T2/P1;\n",
+"disp(v3,'specific volume in ft^3/lb');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: 8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.8\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"Q=-20;\n",
+"m=2;\n",
+"u2=143.98;\n",
+"u1=92.04;\n",
+"W=Q-m*(u2-u1);\n",
+"disp(W,'work done on the system in Btu');\n",
+"clear()"
+ ]
+ }
+],
+"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
+}