summaryrefslogtreecommitdiff
path: root/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb')
-rw-r--r--Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb308
1 files changed, 308 insertions, 0 deletions
diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb
new file mode 100644
index 0000000..1243fb1
--- /dev/null
+++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb
@@ -0,0 +1,308 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Using Entropy"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10: 10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 7.10\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"h1=390.88;\n",
+"h2s=285.27;\n",
+"k=74.0;//Wcvdot/mdot\n",
+"ks=h1-h2s;//(Wcvdot/mdot)s\n",
+"nt=k/ks*100;\n",
+"disp(nt,'efficiency in %');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: 1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 7.1\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"P=1.014;\n",
+"vg=1.673;\n",
+"vf=1.0435/1000;\n",
+"T=373.15;//temperature\n",
+"sg=7.3549;\n",
+"sf=1.3069;\n",
+"k=P*(vg-vf)*10^5/1000;\n",
+"disp(k,'W/m in kJ/kg');\n",
+"k1=T*(sg-sf);\n",
+"disp(k1,'Q/m in kJ/kg');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.13: 13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 7.13\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"T1=293;//kelvin\n",
+"p2=5;//atm\n",
+"p1=1;//atm\n",
+"n=1.3;\n",
+"h2=426.35;\n",
+"h1=293.17;\n",
+"T2=T1*(p2/p1)^((n-1)/n);\n",
+"k=-n*8.314/28.97*(T2-T1)/(n-1);//Wcvdot/mdot\n",
+"disp(k,'Wcvdot/mdot in kJ/kg');\n",
+"k1=k+h2-h1;\n",
+"disp(k1,'Qcvdot/mdot in kJ/kg');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: 2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 7.2\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"k=-2087.56;//from table t2\n",
+"disp(k,'W/m in kJ/kg');\n",
+"k1=6.048;//from table t2\n",
+"disp(k1,'sigma/m in kJ/kg/K');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: 4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 7.4\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"Qdot=-1.2;\n",
+"Tb=300.0;\n",
+"Tf=293.0;\n",
+"sigmadot=-Qdot/Tb;\n",
+"disp(sigmadot,'heat transfer rate in kW/K');\n",
+"sigmadot1=-Qdot/Tb;\n",
+"disp(sigmadot1,'heat transfer rate in kW/K');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: 5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 7.5\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"k1=540.0;//Wcv/m\n",
+"h2=2676.1;\n",
+"h1=3230.9;\n",
+"V2=100;\n",
+"V1=160;\n",
+"s2=7.3549;\n",
+"s1=6.9212;\n",
+"k2=k1+(h2-h1)+(V2^2/2-V1^2/2)/1000;\n",
+"disp(k2,'Qcvdot/mdot in kJ/kg');\n",
+"k3=-k2/350+(s2-s1);\n",
+"disp(k3,'sigmacvdot/mdot in kJ/kg/K');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: 6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 7.6\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"T2=635;//temperature\n",
+"T1=530;//temperature\n",
+"T3=460;//temperature\n",
+"P2=1;//pressure\n",
+"P3=1;//pressure\n",
+"P1=5.1;//pressure\n",
+"cp=0.24;\n",
+"R=1.986/28.97;\n",
+"k1=-105;//T1-T2\n",
+"k2=70;//T1-T3\n",
+"a=0.4*k1+0.6*k2;\n",
+"disp(a,'since mass is conserved thus value is ');\n",
+"k=0.4*(cp*log(T2/T1)-R*log(P2/P1))+0.6*(cp*log(T3/T1)-R*log(P3/P1));\n",
+"disp(k,'sigmacvdot/m1dot in Btu/lb/R');\n",
+"disp('thus second law of thermodynamics is also conserved');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8: 8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 7.8\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"p1=1;//pressure\n",
+"pr2=21.18;\n",
+"pr1=1.3860;\n",
+"k=1.39;\n",
+"T2=1160;//temperature\n",
+"T1=540;//temperature\n",
+"p=p1*pr2/pr1;\n",
+"disp(p,'pressure in atm');\n",
+"p2=p1*(T2/T1)^(k/(k-1));\n",
+"disp(p2,'Pressure final in atm');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9: 9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 7.9\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"h1=3105.6;\n",
+"h2s=2743.0;\n",
+"nt=0.75;//effeiciency\n",
+"k=nt*(h1-h2s);\n",
+"disp(k,'Wcvdot/mdot in kJ/kg');\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
+}