diff --git a/notebooks/03-arrays.ipynb b/notebooks/03-arrays.ipynb index f2dd948..5d06fb5 100644 --- a/notebooks/03-arrays.ipynb +++ b/notebooks/03-arrays.ipynb @@ -65,6 +65,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "slideshow": { "slide_type": "slide" } @@ -92,6 +93,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "scrolled": true, "slideshow": { "slide_type": "slide" @@ -123,6 +125,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "slideshow": { "slide_type": "slide" } @@ -149,6 +152,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "scrolled": false }, "outputs": [], @@ -160,6 +164,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "scrolled": true }, "outputs": [], @@ -171,6 +176,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "scrolled": false, "slideshow": { "slide_type": "slide" @@ -184,7 +190,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "print('sum =', np.sum(mole_frac)) # another way to sum using numpy built-in function np.sum()" @@ -194,6 +202,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "slideshow": { "slide_type": "slide" } @@ -223,7 +232,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Vector magnitude'''\n", @@ -250,7 +261,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Vector View (Shared Data)'''\n", @@ -269,7 +282,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Vector View (Shared Data)'''\n", @@ -302,7 +317,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Vector Copy'''\n", @@ -335,6 +352,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "slideshow": { "slide_type": "slide" } @@ -358,7 +376,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Not a matrix'''\n", @@ -379,6 +399,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "slideshow": { "slide_type": "slide" } @@ -394,7 +415,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''More on using \"array()\" to create a 2-D \"np.ndarray\"'''\n", @@ -415,6 +438,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "scrolled": false, "slideshow": { "slide_type": "slide" @@ -439,6 +463,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "scrolled": false }, "outputs": [], @@ -464,7 +489,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "print('mass_cc upper left quadrant =\\n', mass_cc[0:3,0:3])" @@ -473,7 +500,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "print('mass_cc upper right quadrant =\\n', mass_cc[0:3,3:])" @@ -482,7 +511,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Zeros matrix'''\n", @@ -494,7 +525,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Identity matrix: I (\"square\"; i.e.: m x m or m rows and m columns)'''\n", @@ -506,7 +539,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Diagonal matrix (square; m x m or rows and m columns)'''\n", @@ -518,7 +553,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Visualize a matrix as image'''\n", @@ -543,6 +580,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "slideshow": { "slide_type": "slide" } @@ -573,7 +611,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Access elements of the 3-D array; use triple indexing, e.g., variable_name[i,j,k]'''\n", @@ -585,7 +625,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Views of the 3-D array'''\n", @@ -598,7 +640,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''3D Array of Random Numbers'''\n", @@ -612,7 +656,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "help(plt.subplot)" @@ -621,7 +667,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Visualize a 3-D Data Block'''\n", @@ -661,6 +709,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "scrolled": true }, "outputs": [], @@ -683,7 +732,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "help(plt.imshow)" @@ -693,6 +744,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": true, "scrolled": true }, "outputs": [], @@ -720,7 +772,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Visualize Data Slice in 3D'''\n", @@ -733,7 +787,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Image Reading into a Python Session'''\n", @@ -744,7 +800,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''3-D Block Visualization of Color Images'''\n", @@ -766,7 +824,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Vertical Slice (View)'''\n", @@ -786,7 +846,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Indicate the Vertical Slice Position'''\n", @@ -800,7 +862,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Change Color of the Vertical Line'''\n", @@ -815,7 +879,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Create a View of the Data'''\n", @@ -828,7 +894,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Mask the 100x100 Data'''\n", @@ -846,7 +914,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Red Mask the 100x100 Data'''\n", @@ -868,7 +938,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''View the Original Block'''\n", @@ -887,7 +959,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Reload Block Data'''\n", @@ -905,7 +979,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Coarsening the Data'''\n", @@ -919,7 +995,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''More Coarsening of the Data'''\n", @@ -933,7 +1011,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Reload the Vertical Slice (View)'''\n", @@ -951,7 +1031,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Corsening the Vertical Slice (View)'''\n", @@ -982,7 +1064,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Zeros'''\n", @@ -994,7 +1078,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Ones'''\n", @@ -1006,7 +1092,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Identity (square)'''\n", @@ -1023,7 +1111,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Help on Diagonal usage'''\n", @@ -1034,7 +1124,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Empty (not really)'''\n", @@ -1050,7 +1142,7 @@ "metadata": { "kernelspec": { "display_name": "Python 3", - "language": "python", + "language": "python3", "name": "python3" }, "language_info": { @@ -1063,7 +1155,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.1" + "version": "3.6.5" }, "latex_envs": { "LaTeX_envs_menu_present": true, diff --git a/notebooks/13-nonlinear-root-finding.ipynb b/notebooks/13-nonlinear-root-finding.ipynb index 702b103..6a10be3 100644 --- a/notebooks/13-nonlinear-root-finding.ipynb +++ b/notebooks/13-nonlinear-root-finding.ipynb @@ -56,7 +56,7 @@ "metadata": {}, "source": [ "## Introduction\n", - "Newton's method for computing roots of a single non-linear equation, $f(x)=0$, is described in the course notes OneNote [ChEn-3170-nonlinalg-a](https://studentuml-my.sharepoint.com/:o:/g/personal/valmor_dealmeida_uml_edu/El7oNQ3QOR9Br59guJvS0SkBzt1vnDhQ_79tDR58GC-HtQ?e=MT5fBL).\n", + "Newton's method for computing roots of a single non-linear equation, $f(x)=0$, is described in the course notes OneNote [ChEn-3170-nonlinalg-a](https://studentuml-my.sharepoint.com/:o:/g/personal/valmor_dealmeida_uml_edu/El7oNQ3QOR9Br59guJvS0SkBzt1vnDhQ_79tDR58GC-HtQ?e=MT5fBL),\n", "\n", "\\begin{equation*}\n", "\\text{A} + \\text{B} \\overset{K_x}{\\longleftrightarrow} \\text{C} ,\n", @@ -1295,7 +1295,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.2" + "version": "3.7.1" }, "latex_envs": { "LaTeX_envs_menu_present": true, diff --git a/notebooks/19-cstr-cooling-coil.ipynb b/notebooks/19-cstr-cooling-coil.ipynb index 25fce02..5f88a08 100644 --- a/notebooks/19-cstr-cooling-coil.ipynb +++ b/notebooks/19-cstr-cooling-coil.ipynb @@ -120,7 +120,9 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Parameters'''\n", @@ -210,7 +212,9 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Stoichiometric matrix'''\n", @@ -287,7 +291,9 @@ { "cell_type": "code", "execution_count": 3, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''ODE RHS function for integrator'''\n", @@ -350,7 +356,9 @@ { "cell_type": "code", "execution_count": 4, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Create the CSTR run function'''\n", @@ -393,7 +401,9 @@ { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''Evolve the CSTR'''\n", @@ -448,7 +458,7 @@ "\n", "ax1.set_xlabel(r'Time [$\\tau$] ($\\tau=$%4.1f min)'%tau,fontsize=16)\n", "ax1.set_ylabel(r'$c_A$ [mol/L]',fontsize=16,color='blue')\n", - "ax1.tick_params(axis='y', labelcolor='blue', labelsize=14)\n", + "ax1.tick_params(axis='ykk', labelcolor='blue', labelsize=14)\n", "ax1.tick_params(axis='x', labelsize=14)\n", "ax1.legend(loc='best',fontsize=12)\n", "ax1.grid(True)\n", @@ -672,7 +682,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [] } @@ -680,7 +692,7 @@ "metadata": { "kernelspec": { "display_name": "Python 3", - "language": "python", + "language": "python3", "name": "python3" }, "language_info": { @@ -693,7 +705,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.1" + "version": "3.6.5" }, "latex_envs": { "LaTeX_envs_menu_present": true,