Chapter I: Hands-on experience in SCILAB operations

Size: px
Start display at page:

Download "Chapter I: Hands-on experience in SCILAB operations"

Transcription

1 Chapter I: Hands-on experience in SCILAB operations Introduction to SCILAB SCILAB is a numerical mathematical equation solver which involves a powerful open computing environment for engineering and scientific applications. SCILAB includes hundreds of mathematical functions with the possibility to add interactive functions from various languages. SCILAB is available free of cost and can download from When you start up SCILAB, you can see a console window. The user enters SCILAB commands at the prompt (--->). Tutorial #1: Simple operations using SCILAB Objective: To learn the SCILAB syntax like arithmetic operation, built-in functions, creating matrices, simple matrix operations, polynomials, graph generation and programming commands and solve simple problem in chemical engineering using SCILAB. (a) Arithmetic operation and built-in functions: Type the following commands in the SCILAB platform and fill the answer in the appropriate space in the table below ->2+3 ans = 5. ->a = 2 -->sqrt(4) exp(2.3025) -->cos(a) ->a = 5; b = 10; c = 15; -->disp([a b c]) -->2/3 -->b = 3 -->log(10) -->a = 4 -->%pi -->a = 10, b = 20, c = 30 -->2^3 -->c = a+b -->log10(10) -->sin(a) sin(%pi/4)

2 (b) Creating matrices and simple matrix operations ->a = [1 2 3] -->x = [1 2 3]; y = [ ]; -->a = [x y] --> c = a + b -->e = a*b (matrix multiplication) -->a = [1;2;3] -->a = [1 2 3;4 5 6;7 8 9] -->d = a - b -->f = [3 1 2; 1 5 3; 2 3 6] -->a = [1 2 3]' -->b = a' -->g = inv(f)

3 -->f*g -->a.*b -->a.+b -->c = eye(3,3) -->a.-b -->det(f) -->a^2 (matrix multiplication) -->a = zeros(3,2) -->c = eye(3,3)*10 -->log(a) -->a.^2 (elements by elments) -->b = ones(4,3) -->y = rand(2,2) -->y = [1:5;6:10;11:15] -->y(6) ->a = [] -->size(y) -->length(y) -->y(1) -->y(2) -->y(3,2) ->y(1,5) -->1:5 ->a = [1:5] ->c = [0:2:10] -->size(a) ->a = [1 2 3;4 5 6] -->b = a(2,2) -->a(2,2) = 100

4 (c) Submatrices -->a = int(rand(5,8)*100) -->c = a(1:2:$,1:2:$) -->b = a(3:4,2:5) ->d = a(:,$:-1:1) (reverse the order of column) -->a(3:4,2:5) = zeros(2,4) -->a = rand(5,3) -->c = a(:,2:3) -->s = sum(a,'r') -->a(3:4,2:5) = b(1:2,1:4) -->p = sum(a,'c') -->a(:,3:$) -->m = mean(a,1) -->sd = stdev(a,1)

5 Instructions: Submit the answers to these questions along with chapter correction The answer should write or print on A4 sheets Write or print the answer after check your answer using SCILAB platform Answer all the questions 1. What is the command to clear the screen? 2. When do you think it is useful to use the semicolon (;)? 3. What is the size of an empty matrix a = []? 4. What is the command to extract the diagonal elements of a square matrix into a vector? 5. Extract the off-diagonal terms of a square matrix into a vector 6. Extract the last column of a matrix and store it in matrix b 7. Replace the even numbered columns of matrix a having size 3x5 with ones 8. What is the sub-matrix of a extracted by the following command a (1:3,$-2:$)? 9. Assuming a to be a 5x8 matrix, are the following valid commands? If so, what do they do? If not, what is the correct command? a. A(1:, 5) b. A(:, 5) c. a(1:3,$-1:$) d. a(:$,3:6) 10. What are the commands used for the following functions? a. Identity matrix b. Diagonal matrix c. Determinant of square matrix d. Square root of each element of a matrix Inferences: The following SYNTAX of SCILAB practiced and understood the operations a. Arithmetic operation and build in functions b. Creating matrices and simple matrix operations c. Sub-matrices

6 Tutorial #2: Polynomial operations, Graph generation, and Programming language SCILAB has support for operations on polynomials. You can create polynomials, find their roots and perform operations on them such as addition, subtraction, multiplication, and division. The graph generated can do in the SCILAB platform which can be enhanced and annotated. You can add grid lines, labels, a legend for the different lines, etc. Three-dimensional plots of surfaces can plot with the plot3d() functions. The programming language offers many features of a high-level language, such as looping (for, while), conditional execution (if-then-else, select) and functions. a. Polynomial operations -->p1 = poly([3,2],'x') ->p4 = p1 * p2 -->roots(p6) (or) -->p1 = poly([3,2],'x','r') -->p2 = poly([6-5 1],'x','c') ->p5 = p1/p2 -->coeff(p1) -->x = poly(0,'x') -->p = (1+2*x+3*x^2)/(4+5*x+6*x^2) -->roots(p2) -->derivat(p1) -->x = poly(0,'x') -->numer(p) -->denom(p) -->p3 = p1+p2 -->p6 = 6-5*x + x^2

7 b. Plotting x-y and 3D graphs ->x = [0:%pi/16:2*%pi]'; -->y = [cos(x) sin(x)]; -->plot2d(x,y) ->u = linspace(-%pi/2,%pi/2,40); -->v = linspace(0,2*%pi,20); -->x = cos(u)'*cos(v); -->y = cos(u)'*sin(v); -->z = sin(u)'*ones(v); -->plot3d(x,y,z); -->x = [0:%pi/32:2*%pi]'; -->y(:,1) = cos(x); -->y(:,2) = sin(x); -->y(:,3) = cos(x)+sin(x); -->plot(x,y); -- >xtitle('triginometricfunctions',' x','f(x)'); >legend('cos(x)','sin(x)','cos(x) +sin(x)',1,%f); -->clf(); -->subplot(121); -->plot3d3(x,y,z); subplot(122); -->plot3d2(x,y,z); ->x= [0:%pi/16:2*%pi]'; size(x) ans = >z = sin(x)*ones(x)'; -->plot3d(x,x,z); -->x(:,1) = [ ]'; -->x(:,2) = [ ]'; -->p = [ ]'; -->t = [ ]'; -->y(:,1) = [ ]'; -->y(:,2) = [ ]'; -->clf(); -->subplot(221); -->plot(x,p); -->subplot(222); -->plot(y,t); -->subplot(223); -->plot(y(:,1),y(:,2));

8 c. SCILAB Programming Language ->for i=1:10 -->disp(i) -->end ->x = 10; -->if x<0 then disp('negative') -->elseif x==0 then disp('zero') -->else disp('positive') -->end -->a = int(rand(3,4)*100); -->a ==0 -->disp(a) -->a <20 -->find(a < 20) I planted a Christmas tree in 2005 measuring 1.2 m. It grows to 30 cm per year. I decided to cut it when it exceeds 7 m. In what year will I cut the tree? ->h = 1.2; -->y = 2005; -->while h<7 -->h = h+0.3; -->y = y+1; -->end -->disp(y) -->function y = f(x); -->y = 36/(8+exp(-x)); -->endfunction -->f(10) -->f(12) -->f(1) -->function y = g(x); -->y = 4*x/9+4; -->endfunction -->g(12.5) Solving linear equations -->A = [1 2 3;4 5 6]; -->B = [1;1]; -->X = A\B Numerical Integration Find a numerical approximation to t dt and compare it to the analytical solution. Construct a grid over the range of t, dense enough to make the integrand approximately constant over each interval, and use the function sum. -->dt = 0.001; -->f = 0; -->for t = 0:dt:1 -->y = 1/(sqrt(t^2+2)); -->f = f+y; -->end -->val = f*dt

9 Instructions: Submit the answers to these questions along with chapter correction. The answer should write or print on A4 sheets. Write or print the answer after check your answer using SCILAB platform. Answer all the questions 1. A mixture of phenol and water forms two separate liquid phases one rich in phenol, and other rich in water, the composition of the layer is 70% and 9% (by weight) phenol respectively. If 500 kg of phenol and 700 kg of water are mixed and layer allowed to separate, what will be the weight of two layers. (Hint: make two simultaneous equations and solve these equations using SCILAB ) moles of benzene (A) and toluene (B) mixture containing 50 mole% of benzene is subjected to a differential distillation at 1 atm. Pressure till the composition of the benzene in their residue is 33%. Calculate the total moles of the distillate. The equilibrium relationship between liquid and vapor phase is: x y = 1 + x ( 1) α = 2.1, x is the mole fraction of benzene in liquid and y is the mole fraction of benzene in the vapor. 3. Calculate the volume occupied by one mole of n-octane vapor at K where the saturated pressure is Mpa. Assume the n-octane follows the Vander Waal s equation of state. The Vander Waal s constant a and b are pa(m 3 /mol) 2 and 2.37 x 10-4 m 3 /mol respectively. 4. Solve the system of equations x 1 + x 2 = 2 x 2 + x 3 = 3 x 1 + x 3 = 4 5. Find the roots of the equations: (a) p(x) = x 3 + 2x 2 +3x+4 = 0 and (b) p(x) = x 4 +3x 3 +5x 2 +7x The enthalpy of the binary liquid system of species 1 and 2 at fixed temperature T and pressure P is represented by the equation. H = 400x x 2 +x 1 x 2 (40x 1 +20x 2 ), where H is in J/mol and x 1 is mole fraction of species 1 and x 2 is the mole fraction of species 2. Determine the enthalpy of the binary mixture

10 for 0.1 x and also plot the enthalpy of binary mixture (H) as function of mole fraction of species 1 (x 1 ). Inferences: The following SYNTAX of SCILAB practiced and understood the operations a. Polynomial operations. b. Plotting x-y and 3D graphs. c. SCILAB Programming Language.

11 Tutorial #3: Polynomial Curve Fitting The function polyfit() can be written in SCIPAD and then loaded into SCILAB workspace: function[a, yf]=polyfit(x, y, n) xx=zeros(length(x),n+1) fori=1:n+1 xx(:,i)=x.^(i-1); end X=xx'*xx; b=xx'*y; a=inv(x)*b; yf=xx*a; endfunction To test the above polyfit() function, the steady state temperature distribution within a plane wall 1 m thick with a thermal conductivity of 8 W/m K is measured as a function of position as shown in table below. Z (m) T ( C) >exec('c:\users\sky\documents\polyfit.sci', -1) -->z = [ ]'; -->T = [ ]'; -->[a,yf] = polyfit(z,t,4)

12 Instructions: Submit the answers to these questions along with chapter correction. The answer should write or print on A4 sheets. Write or print the answer after check your answer using SCILAB platform. Answer all the questions 1. Consider the sample data given below: x y Get the coefficients of fourth order polynomial equation using SCILAB platform. 2. The irreversible isomerization reaction A B was carried out in a batch reactor and the following concentration time data were obtained Time (min) C A (mol/dm 3 ) Fit a second order polynomial equation to the above experimental data and also estimate the rate of reaction (-dc A /dt) in each concentration - time data. 3. The reaction rate constant for the decomposition of a substituted dibasic acid has been determined at various temperatures as given in the table below. Use the method of least squares to determine the activation energy E in the equation, k = e -E/RT, where T is measured in Kelvin T ( C) k x 10 4 (h -1 ) Inferences: The Polynomial curve fitting practiced and understood the operations in SCILAB.

13 Chapter 2: Hands-on experience in commercial process simulators (ASPENPLUS )

Solving Equations and Optimizing Functions

Solving Equations and Optimizing Functions Solving Equations and Optimizing Functions At the end of this lecture, you will be able to: solve for the roots of a polynomial using polyroots. obtain approximate solutions to single equations from tracing

More information

MATLAB Ordinary Differential Equation (ODE) solver for a simple example 1. Introduction

MATLAB Ordinary Differential Equation (ODE) solver for a simple example 1. Introduction MATLAB Ordinary Differential Equation (ODE) solver for a simple example 1. Introduction Differential equations are a convenient way to express mathematically a change of a dependent variable (e.g. concentration

More information

MATLAB BASICS. Instructor: Prof. Shahrouk Ahmadi. TA: Kartik Bulusu

MATLAB BASICS. Instructor: Prof. Shahrouk Ahmadi. TA: Kartik Bulusu MATLAB BASICS Instructor: Prof. Shahrouk Ahmadi 1. What are M-files TA: Kartik Bulusu M-files are files that contain a collection of MATLAB commands or are used to define new MATLAB functions. For the

More information

Tutorial: 11 SCILAB Programming Applications of Chemical Engineering Problems Date : 26/09/2016

Tutorial: 11 SCILAB Programming Applications of Chemical Engineering Problems Date : 26/09/2016 Tutorial: 11 SCILAB Programming Applications of Chemical Engineering Problems Date : 26/09/2016 Aim To solve the chemical engineering problems (steady state and unsteady state) using SCILAB Problem statements

More information

3. Array and Matrix Operations

3. Array and Matrix Operations 3. Array and Matrix Operations Almost anything you learned about in your linear algebra classmatlab has a command to do. Here is a brief summary of the most useful ones for physics. In MATLAB matrices

More information

Introduction to Limits

Introduction to Limits MATH 136 Introduction to Limits Given a function y = f (x), we wish to describe the behavior of the function as the variable x approaches a particular value a. We should be as specific as possible in describing

More information

January 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,

January 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB, Introduction to MATLAB January 18, 2008 Steve Gu Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB, Part I: Basics MATLAB Environment Getting Help Variables Vectors, Matrices, and

More information

ENGR Spring Exam 2

ENGR Spring Exam 2 ENGR 1300 Spring 013 Exam INSTRUCTIONS: Duration: 60 minutes Keep your eyes on your own work! Keep your work covered at all times! 1. Each student is responsible for following directions. Read carefully..

More information

ME 354 Tutorial, Week#13 Reacting Mixtures

ME 354 Tutorial, Week#13 Reacting Mixtures ME 354 Tutorial, Week#13 Reacting Mixtures Question 1: Determine the mole fractions of the products of combustion when octane, C 8 H 18, is burned with 200% theoretical air. Also, determine the air-fuel

More information

EEL2216 Control Theory CT1: PID Controller Design

EEL2216 Control Theory CT1: PID Controller Design EEL6 Control Theory CT: PID Controller Design. Objectives (i) To design proportional-integral-derivative (PID) controller for closed loop control. (ii) To evaluate the performance of different controllers

More information

Homework 1 Solutions

Homework 1 Solutions 18-9 Signals and Systems Profs. Byron Yu and Pulkit Grover Fall 18 Homework 1 Solutions Part One 1. (8 points) Consider the DT signal given by the algorithm: x[] = 1 x[1] = x[n] = x[n 1] x[n ] (a) Plot

More information

Linear Algebra Using MATLAB

Linear Algebra Using MATLAB Linear Algebra Using MATLAB MATH 5331 1 May 12, 2010 1 Selected material from the text Linear Algebra and Differential Equations Using MATLAB by Martin Golubitsky and Michael Dellnitz Contents 1 Preliminaries

More information

CHAPTER 2 POLYNOMIALS KEY POINTS

CHAPTER 2 POLYNOMIALS KEY POINTS CHAPTER POLYNOMIALS KEY POINTS 1. Polynomials of degrees 1, and 3 are called linear, quadratic and cubic polynomials respectively.. A quadratic polynomial in x with real coefficient is of the form a x

More information

Problem 1. Produce the linear and quadratic Taylor polynomials for the following functions:

Problem 1. Produce the linear and quadratic Taylor polynomials for the following functions: Problem. Produce the linear and quadratic Taylor polynomials for the following functions: (a) f(x) = e cos(x), a = (b) log( + e x ), a = The general formula for any Taylor Polynomial is as follows: (a)

More information

SCILAB Programming Chemical Engineering Applications

SCILAB Programming Chemical Engineering Applications Tutorial: 10 Date :19/09/2016 SCILAB Programming Chemical Engineering Applications Aim To solve the algebraic explicit relations (or equations) used in chemical engineering problems using SCILAB Problem

More information

DEVELOPMENT OF A CAPE-OPEN 1.0 SOCKET. Introduction

DEVELOPMENT OF A CAPE-OPEN 1.0 SOCKET. Introduction DEVELOPMENT OF A CAPE-OPEN 1. SOCKET Eric Radermecker, Belsim S.A., Belgium Dr. Ulrika Wising, Belsim S.A., Belgium Dr. Marie-Noëlle Dumont, LASSC, Belgium Introduction VALI is an advanced data validation

More information

Name: Discussion Section:

Name: Discussion Section: CBE 141: Chemical Engineering Thermodynamics, Spring 2018, UC Berkeley Midterm 2 March 22, 2018 Time: 80 minutes, closed-book and closed-notes, one-sided 8 ½ x 11 equation sheet allowed Please show all

More information

UNIVERSITI MALAYSIA PERLIS

UNIVERSITI MALAYSIA PERLIS UNIVERSITI MALAYSIA PERLIS SCHOOL OF COMPUTER & COMMUNICATIONS ENGINEERING EKT 230 SIGNALS AND SYSTEMS LABORATORY MODULE LAB 5 : LAPLACE TRANSFORM & Z-TRANSFORM 1 LABORATORY OUTCOME Ability to describe

More information

Using MATLAB. Linear Algebra

Using MATLAB. Linear Algebra Using MATLAB in Linear Algebra Edward Neuman Department of Mathematics Southern Illinois University at Carbondale One of the nice features of MATLAB is its ease of computations with vectors and matrices.

More information

Identity Matrix: EDU> eye(3) ans = Matrix of Ones: EDU> ones(2,3) ans =

Identity Matrix: EDU> eye(3) ans = Matrix of Ones: EDU> ones(2,3) ans = Very Basic MATLAB Peter J. Olver October, 2003 Matrices: Type your matrix as follows: Use, or space to separate entries, and ; or return after each row. EDU> [;5 0-3 6;; - 5 ] or EDU> [,5,6,-9;5,0,-3,6;7,8,5,0;-,,5,]

More information

The University of British Columbia Final Examination - December 13, 2012 Mathematics 307/101

The University of British Columbia Final Examination - December 13, 2012 Mathematics 307/101 The University of British Columbia Final Examination - December 13, 2012 Mathematics 307/101 Closed book examination Time: 2.5 hours Last Name First Signature Student Number Special Instructions: No books,

More information

ECE2111 Signals and Systems UMD, Spring 2013 Experiment 1: Representation and manipulation of basic signals in MATLAB

ECE2111 Signals and Systems UMD, Spring 2013 Experiment 1: Representation and manipulation of basic signals in MATLAB ECE2111 Signals and Systems UMD, Spring 2013 Experiment 1: Representation and manipulation of basic signals in MATLAB MATLAB is a tool for doing numerical computations with matrices and vectors. It can

More information

Concept of the chemical potential and the activity of elements

Concept of the chemical potential and the activity of elements Concept of the chemical potential and the activity of elements Gibb s free energy, G is function of temperature, T, pressure, P and amount of elements, n, n dg G G (T, P, n, n ) t particular temperature

More information

Introduction to GNU Octave

Introduction to GNU Octave Introduction to GNU Octave A brief tutorial for linear algebra and calculus students by Jason Lachniet Introduction to GNU Octave A brief tutorial for linear algebra and calculus students Jason Lachniet

More information

Matlab for Review. NDSU Matlab Review pg 1

Matlab for Review. NDSU Matlab Review pg 1 NDSU Matlab Review pg 1 Becoming familiar with MATLAB The console The editor The graphics windows The help menu Saving your data (diary) General environment and the console Matlab for Review Simple numerical

More information

Math 307 Learning Goals. March 23, 2010

Math 307 Learning Goals. March 23, 2010 Math 307 Learning Goals March 23, 2010 Course Description The course presents core concepts of linear algebra by focusing on applications in Science and Engineering. Examples of applications from recent

More information

2D Plotting with Matlab

2D Plotting with Matlab GEEN 1300 Introduction to Engineering Computing Class Meeting #22 Monday, Nov. 9 th Engineering Computing and Problem Solving with Matlab 2-D plotting with Matlab Script files User-defined functions Matlab

More information

Assignment 1b: due Tues Nov 3rd at 11:59pm

Assignment 1b: due Tues Nov 3rd at 11:59pm n Today s Lecture: n n Vectorized computation Introduction to graphics n Announcements:. n Assignment 1b: due Tues Nov 3rd at 11:59pm 1 Monte Carlo Approximation of π Throw N darts L L/2 Sq. area = N =

More information

The roots are found with the following two statements. We have denoted the polynomial as p1, and the roots as roots_ p1.

The roots are found with the following two statements. We have denoted the polynomial as p1, and the roots as roots_ p1. Part II Lesson 10 Numerical Analysis Finding roots of a polynomial In MATLAB, a polynomial is expressed as a row vector of the form [an an 1 a2 a1 a0]. The elements ai of this vector are the coefficients

More information

MATHCAD SOLUTIONS TO THE CHEMICAL ENGINEERING PROBLEM SET

MATHCAD SOLUTIONS TO THE CHEMICAL ENGINEERING PROBLEM SET MATHCA SOLUTIONS TO THE CHEMICAL ENGINEERING PROBLEM SET Mathematical Software Session John J. Hwalek, epartment of Chemical Engineering University of Maine, Orono, Me 4469-5737 (hwalek@maine.maine.edu)

More information

AspenTech: VAPOR PRESSURES

AspenTech: VAPOR PRESSURES AspenTech: VAPOR PRESSURES Technical Memo No. XX-1 Subject: Vapor pressure interpolation error analysis To: Ms. Sam K. Safobeen Submitted by: Student 2 Date: May 11, 2010 Summary: I have compiled vapor

More information

Classes 6. Scilab: Symbolic and numerical calculations

Classes 6. Scilab: Symbolic and numerical calculations Classes 6. Scilab: Symbolic and numerical calculations Note: When copying and pasting, you need to delete pasted single quotation marks and type them manually for each occurrence. 6.1 Creating polynomials

More information

Function Operations and Composition of Functions. Unit 1 Lesson 6

Function Operations and Composition of Functions. Unit 1 Lesson 6 Function Operations and Composition of Functions Unit 1 Lesson 6 Students will be able to: Combine standard function types using arithmetic operations Compose functions Key Vocabulary: Function operation

More information

Matlab Exercise 0 Due 1/25/06

Matlab Exercise 0 Due 1/25/06 Matlab Exercise 0 Due 1/25/06 Geop 523 Theoretical Seismology January 18, 2006 Much of our work in this class will be done using Matlab. The goal of this exercise is to get you familiar with using Matlab

More information

A First Course on Kinetics and Reaction Engineering Example S3.1

A First Course on Kinetics and Reaction Engineering Example S3.1 Example S3.1 Problem Purpose This example shows how to use the MATLAB script file, FitLinSR.m, to fit a linear model to experimental data. Problem Statement Assume that in the course of solving a kinetics

More information

Getting started with BatchReactor Example : Simulation of the Chlorotoluene chlorination

Getting started with BatchReactor Example : Simulation of the Chlorotoluene chlorination Getting started with BatchReactor Example : Simulation of the Chlorotoluene chlorination 2011 ProSim S.A. All rights reserved. Introduction This document presents the different steps to follow in order

More information

MI-3 Prob. Set #7 DUE: Thursday, Oct.28, 2010 Fall '10

MI-3 Prob. Set #7 DUE: Thursday, Oct.28, 2010 Fall '10 MI-3 Prob. Set #7 DUE: Thursday, Oct.8, 00 Fall '0 Recursion On a Calculator Recursion is a process of repeating the same operation over and over. Specifically in mathematics, we take an epression, usually

More information

Fuel, Air, and Combustion Thermodynamics

Fuel, Air, and Combustion Thermodynamics Chapter 3 Fuel, Air, and Combustion Thermodynamics 3.1) What is the molecular weight, enthalpy (kj/kg), and entropy (kj/kg K) of a gas mixture at P = 1000 kpa and T = 500 K, if the mixture contains the

More information

Pure Component Equations

Pure Component Equations Pure Component Equations Fitting of Pure Component Equations DDBSP - Dortmund Data Bank Software Package DDBST Software & Separation Technology GmbH Marie-Curie-Straße 10 D-26129 Oldenburg Tel.: +49 (0)

More information

A Glimpse at Scipy FOSSEE. June Abstract This document shows a glimpse of the features of Scipy that will be explored during this course.

A Glimpse at Scipy FOSSEE. June Abstract This document shows a glimpse of the features of Scipy that will be explored during this course. A Glimpse at Scipy FOSSEE June 010 Abstract This document shows a glimpse of the features of Scipy that will be explored during this course. 1 Introduction SciPy is open-source software for mathematics,

More information

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 103L Fall Test 2 Solutions. Michael R. Gustafson II

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 103L Fall Test 2 Solutions. Michael R. Gustafson II 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 103L Fall 2017 Test 2 Solutions Michael R. Gustafson II Name (please print) NET ID (please print): In keeping with the Community Standard, I have neither

More information

Learning MATLAB by doing MATLAB

Learning MATLAB by doing MATLAB Learning MATLAB by doing MATLAB December 10, 2005 Just type in the following commands and watch the output. 1. Variables, Vectors, Matrices >a=7 a is interpreted as a scalar (or 1 1 matrix) >b=[1,2,3]

More information

The College of Staten Island

The College of Staten Island The College of Staten Island Department of Mathematics MTH 232 Calculus II http://www.math.csi.cuny.edu/matlab/ MATLAB PROJECTS STUDENT: SECTION: INSTRUCTOR: BASIC FUNCTIONS Elementary Mathematical functions

More information

Read through A Graphing Checklist for Physics Graduate Students before submitting any plots in this module. See the course website for the link.

Read through A Graphing Checklist for Physics Graduate Students before submitting any plots in this module. See the course website for the link. Module C2: MatLab The Physics and Astronomy Department has several copies of MATLAB installed on computers that can be accessed by students. MATLAB is a highly developed software package that allows the

More information

Tutorial 11. Use of User-Defined Scalars and User-Defined Memories for Modeling Ohmic Heating

Tutorial 11. Use of User-Defined Scalars and User-Defined Memories for Modeling Ohmic Heating Tutorial 11. Use of User-Defined Scalars and User-Defined Memories for Modeling Ohmic Heating Introduction The purpose of this tutorial is to illustrate the use of user-defined scalars (UDS) and user defined

More information

CSTR 1 CSTR 2 X A =?

CSTR 1 CSTR 2 X A =? hemical Engineering HE 33 F Applied Reaction Kinetics Fall 014 Problem Set 3 Due at the dropbox located in the hallway outside of WB 5 by Monday, Nov 3 rd, 014 at 5 pm Problem 1. onsider the following

More information

Homework and Computer Problems for Math*2130 (W17).

Homework and Computer Problems for Math*2130 (W17). Homework and Computer Problems for Math*2130 (W17). MARCUS R. GARVIE 1 December 21, 2016 1 Department of Mathematics & Statistics, University of Guelph NOTES: These questions are a bare minimum. You should

More information

Matlab Section. November 8, 2005

Matlab Section. November 8, 2005 Matlab Section November 8, 2005 1 1 General commands Clear all variables from memory : clear all Close all figure windows : close all Save a variable in.mat format : save filename name of variable Load

More information

Comprehend and execute the 10 elements of effective problem

Comprehend and execute the 10 elements of effective problem Lecture 8, 3/9/2012 Chapter 7: A GENERAL Strategy for Solving Material Balance Problems Objectives: Comprehend and execute the 10 elements of effective problem Drive a flow chart and Place labels on the

More information

Athena Visual Software, Inc. 1

Athena Visual Software, Inc. 1 Athena Visual Studio Visual Kinetics Tutorial VisualKinetics is an integrated tool within the Athena Visual Studio software environment, which allows scientists and engineers to simulate the dynamic behavior

More information

MATLAB Examples. Mathematics. Hans-Petter Halvorsen, M.Sc.

MATLAB Examples. Mathematics. Hans-Petter Halvorsen, M.Sc. MATLAB Examples Mathematics Hans-Petter Halvorsen, M.Sc. Mathematics with MATLAB MATLAB is a powerful tool for mathematical calculations. Type help elfun (elementary math functions) in the Command window

More information

Applied Linear Algebra in Geoscience Using MATLAB

Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in

More information

Lecture 20 - Plotting and Nonlinear Equations

Lecture 20 - Plotting and Nonlinear Equations Lecture 2 - Plotting and Nonlinear Equations Outline Prayer/Spiritual Thought Announcements 3. 4. Plotting Plotting Roots of Polynomials Single Nonlinear Equations Systems of Nonlinear Equations Plots

More information

AP CALCULUS SUMMER WORKSHEET

AP CALCULUS SUMMER WORKSHEET AP CALCULUS SUMMER WORKSHEET DUE: First Day of School Aug. 19, 2010 Complete this assignment at your leisure during the summer. It is designed to help you become more comfortable with your graphing calculator,

More information

Introduction to GNU Octave

Introduction to GNU Octave Introduction to GNU Octave Second Edition A brief tutorial for linear algebra and calculus students by Jason Lachniet Introduction to GNU Octave A brief tutorial for linear algebra and calculus students

More information

WISE Regression/Correlation Interactive Lab. Introduction to the WISE Correlation/Regression Applet

WISE Regression/Correlation Interactive Lab. Introduction to the WISE Correlation/Regression Applet WISE Regression/Correlation Interactive Lab Introduction to the WISE Correlation/Regression Applet This tutorial focuses on the logic of regression analysis with special attention given to variance components.

More information

Calculus II (Math 122) Final Exam, 19 May 2012

Calculus II (Math 122) Final Exam, 19 May 2012 Name ID number Sections C and D Calculus II (Math 122) Final Exam, 19 May 2012 This is a closed book exam. No notes or calculators are allowed. A table of trigonometric identities is attached. To receive

More information

Lecture 4: Matrices. Math 98, Spring Math 98, Spring 2018 Lecture 4: Matrices 1 / 20

Lecture 4: Matrices. Math 98, Spring Math 98, Spring 2018 Lecture 4: Matrices 1 / 20 Lecture 4: Matrices Math 98, Spring 2018 Math 98, Spring 2018 Lecture 4: Matrices 1 / 20 Reminders Instructor: Eric Hallman Login:!cmfmath98 Password: c@1analog Class Website: https://math.berkeley.edu/~ehallman/98-fa18/

More information

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 103L Fall Test 2. Michael R. Gustafson II

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 103L Fall Test 2. Michael R. Gustafson II 'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 103L Fall 2017 Test 2 Michael R. Gustafson II Name (please print) NET ID (please print): In keeping with the Community Standard, I have neither provided

More information

Study 4.10 #465, 471, , 487, , , 515, 517, 521, 523

Study 4.10 #465, 471, , 487, , , 515, 517, 521, 523 Goals: 1. Understand that antiderivatives are the functions from which the present derivative was found. 2. The process of finding an antiderivative or indefinite integral requires the reverse process

More information

Numerical solution of ODEs

Numerical solution of ODEs Péter Nagy, Csaba Hős 2015. H-1111, Budapest, Műegyetem rkp. 3. D building. 3 rd floor Tel: 00 36 1 463 16 80 Fax: 00 36 1 463 30 91 www.hds.bme.hu Table of contents Homework Introduction to Matlab programming

More information

Unit 4 Day 4 & 5. Piecewise Functions

Unit 4 Day 4 & 5. Piecewise Functions Unit 4 Day 4 & 5 Piecewise Functions Warm Up 1. Why does the inverse variation have a vertical asymptote? 2. Graph. Find the asymptotes. Write the domain and range using interval notation. a. b. f(x)=

More information

USE OF MATLAB TO UNDERSTAND BASIC MATHEMATICS

USE OF MATLAB TO UNDERSTAND BASIC MATHEMATICS USE OF MATLAB TO UNDERSTAND BASIC MATHEMATICS Sanjay Gupta P. G. Department of Mathematics, Dev Samaj College For Women, Punjab ( India ) ABSTRACT In this paper, we talk about the ways in which computer

More information

SOLUTIONS CHAPTER 9 TEXT BOOK EXERCISE Q1. Choose the correct answer for the given ones. (i) Morality of pure water is (a) 1. (b) 18. (c) 55.5 (d) 6. Hint: Morality of pure water Consider 1 dm 3 (-1000cm

More information

Computational Foundations of Cognitive Science

Computational Foundations of Cognitive Science Computational Foundations of Cognitive Science Lecture 14: Inverses and Eigenvectors in Matlab; Plotting and Graphics Frank Keller School of Informatics University of Edinburgh keller@inf.ed.ac.uk February

More information

SUMMER-18 EXAMINATION Model Answer

SUMMER-18 EXAMINATION Model Answer (ISO/IEC - 700-005 Certified) SUMMER-8 EXAMINATION Subject Title: Stoichiometry Subject code : 735 Page of 7 Important Instructions to examiners: ) The answers should be examined by key words and not as

More information

Table 1 Principle Matlab operators and functions Name Description Page reference

Table 1 Principle Matlab operators and functions Name Description Page reference Matlab Index Table 1 summarises the Matlab supplied operators and functions to which we have referred. In most cases only a few of the options available to the individual functions have been fully utilised.

More information

Note: The command name is upper case in the description given by help, but must be lower case in actual use. And the backslash Anb is dierent when A i

Note: The command name is upper case in the description given by help, but must be lower case in actual use. And the backslash Anb is dierent when A i MATLAB Tutorial You need a small number of basic commands to start using MATLAB. This short tutorial describes those fundamental commands. You need to create vectors and matrices, to change them, and to

More information

Heterogeneous Azeotropic Distillation Operational Policies and Control

Heterogeneous Azeotropic Distillation Operational Policies and Control Heterogeneous Azeotropic Distillation Operational Policies and Control Claudia J. G. Vasconcelos * and Maria Regina Wolf-Maciel State University of Campinas, School of Chemical Engineering, Campinas/SP,

More information

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB (Mathematical Operations with Arrays) Contents Getting Started Matrices Creating Arrays Linear equations Mathematical Operations with Arrays Using Script

More information

Exam 3 Solutions. ClO g. At 200 K and a total pressure of 1.0 bar, the partial pressure ratio for the chlorine-containing compounds is p ClO2

Exam 3 Solutions. ClO g. At 200 K and a total pressure of 1.0 bar, the partial pressure ratio for the chlorine-containing compounds is p ClO2 Chemistry 360 Dr. Jean M. Standard Fall 2016 Name KEY Exam 3 Solutions 1.) (14 points) Consider the gas phase decomposition of chlorine dioxide, ClO 2, ClO 2 ( g) ClO ( g) + O ( g). At 200 K and a total

More information

New Mexico Tech Hyd 510

New Mexico Tech Hyd 510 Vectors vector - has magnitude and direction (e.g. velocity, specific discharge, hydraulic gradient) scalar - has magnitude only (e.g. porosity, specific yield, storage coefficient) unit vector - a unit

More information

1. What is the value of the quantity PV for one mole of an ideal gas at 25.0 C and one atm?

1. What is the value of the quantity PV for one mole of an ideal gas at 25.0 C and one atm? Real Gases Thought Question: How does the volume of one mole of methane gas (CH4) at 300 Torr and 298 K compare to the volume of one mole of an ideal gas at 300 Torr and 298 K? a) the volume of methane

More information

The OptiSage module. Use the OptiSage module for the assessment of Gibbs energy data. Table of contents

The OptiSage module. Use the OptiSage module for the assessment of Gibbs energy data. Table of contents The module Use the module for the assessment of Gibbs energy data. Various types of experimental data can be utilized in order to generate optimized parameters for the Gibbs energies of stoichiometric

More information

IJSRD - International Journal for Scientific Research & Development Vol. 1, Issue 8, 2013 ISSN (online):

IJSRD - International Journal for Scientific Research & Development Vol. 1, Issue 8, 2013 ISSN (online): IJSRD - International Journal for Scientific Research & Development Vol. 1, Issue 8, 2013 ISSN (online): 2321-0613 Development and theoretical analysis of mathematical expressions for change of entropy

More information

Linear Algebra in LabVIEW

Linear Algebra in LabVIEW University College of Southeast Norway Linear Algebra in LabVIEW Hans-Petter Halvorsen, 2016-10-31 http://home.hit.no/~hansha Preface This document explains the basic concepts of Linear Algebra and how

More information

Name: First three letters of last name

Name: First three letters of last name Name: First three letters of last name Chemistry 342 Third Exam April 22, 2005 2:00 PM in C6 Lecture Center Write all work you want graded in the spaces provided. Both the logical solution to the problem

More information

Put your name on this exam paper!!!

Put your name on this exam paper!!! DEPARTMENT OF CHEMISTRY Midterm Examination Chemistry 1110 (Modern Chemistry I) Name: Student ID Number: Instructions: 1. Put your name on this exam paper!!! Questions are to be answered directly on these

More information

MATLAB and Mathematical Introduction Will be discussed in class on 1/24/11

MATLAB and Mathematical Introduction Will be discussed in class on 1/24/11 MATLAB and Mathematical Introduction Will be discussed in class on 1/24/11 GEOP 523; Theoretical Seismology January 17, 2011 Much of our work in this class will be done using MATLAB. The goal of this exercise

More information

A First Course on Kinetics and Reaction Engineering Example S5.1

A First Course on Kinetics and Reaction Engineering Example S5.1 Example S5.1 Problem Purpose This example illustrates the use of the MATLAB template file SolvBVDif.m to solve a second order boundary value ordinary differential equation. Problem Statement Solve the

More information

MTH30 Review Sheet. y = g(x) BRONX COMMUNITY COLLEGE of the City University of New York DEPARTMENT OF MATHEMATICS & COMPUTER SCIENCE

MTH30 Review Sheet. y = g(x) BRONX COMMUNITY COLLEGE of the City University of New York DEPARTMENT OF MATHEMATICS & COMPUTER SCIENCE BRONX COMMUNITY COLLEGE of the City University of New York DEPARTMENT OF MATHEMATICS & COMPUTER SCIENCE MTH0 Review Sheet. Given the functions f and g described by the graphs below: y = f(x) y = g(x) (a)

More information

LAB 1: MATLAB - Introduction to Programming. Objective:

LAB 1: MATLAB - Introduction to Programming. Objective: LAB 1: MATLAB - Introduction to Programming Objective: The objective of this laboratory is to review how to use MATLAB as a programming tool and to review a classic analytical solution to a steady-state

More information

Algorithms and Flowcharts

Algorithms and Flowcharts 1 CHAPTER ONE Algorithms and Flowcharts Introduction The program is a set of instruction gave to the computer to execute successive operations leads to solve specific problem. In general to solve any problem

More information

Name: Discussion Section:

Name: Discussion Section: CBE 141: Chemical Engineering Thermodynamics, Spring 2018, UC Berkeley Midterm 2 March 22, 2018 Time: 80 minutes, closed-book and closed-notes, one-sided 8 ½ x 11 equation sheet allowed Please show all

More information

Chapter 3 PROPERTIES OF PURE SUBSTANCES

Chapter 3 PROPERTIES OF PURE SUBSTANCES Chapter 3 PROPERTIES OF PURE SUBSTANCES PURE SUBSTANCE Pure substance: A substance that has a fixed chemical composition throughout. Air is a mixture of several gases, but it is considered to be a pure

More information

ChE 344 Winter 2013 Final Exam + Solution. Open Course Textbook Only Closed everything else (i.e., Notes, In-Class Problems and Home Problems

ChE 344 Winter 2013 Final Exam + Solution. Open Course Textbook Only Closed everything else (i.e., Notes, In-Class Problems and Home Problems ChE 344 Winter 03 Final Exam + Solution Thursday, May, 03 Open Course Textbook Only Closed everything else (i.e., Notes, In-Class Problems and Home Problems Name Honor Code (Please sign in the space provided

More information

TOPIC 2 Computer application for manipulating matrix using MATLAB

TOPIC 2 Computer application for manipulating matrix using MATLAB YOGYAKARTA STATE UNIVERSITY MATHEMATICS AND NATURAL SCIENCES FACULTY MATHEMATICS EDUCATION STUDY PROGRAM TOPIC 2 Computer application for manipulating matrix using MATLAB Definition of Matrices in MATLAB

More information

Substitutions and by Parts, Area Between Curves. Goals: The Method of Substitution Areas Integration by Parts

Substitutions and by Parts, Area Between Curves. Goals: The Method of Substitution Areas Integration by Parts Week #7: Substitutions and by Parts, Area Between Curves Goals: The Method of Substitution Areas Integration by Parts 1 Week 7 The Indefinite Integral The Fundamental Theorem of Calculus, b a f(x) dx =

More information

Solution KEY CONCEPTS

Solution KEY CONCEPTS Solution KEY CONCEPTS Solution is the homogeneous mixture of two or more substances in which the components are uniformly distributed into each other. The substances which make the solution are called

More information

Assignment 6, Math 575A

Assignment 6, Math 575A Assignment 6, Math 575A Part I Matlab Section: MATLAB has special functions to deal with polynomials. Using these commands is usually recommended, since they make the code easier to write and understand

More information

Problems Points (Max.) Points Received

Problems Points (Max.) Points Received Chemical Engineering 142 Chemical Kinetics and Reaction Engineering Midterm 1 Tuesday, October 8, 2013 8:10 am-9:30 am The exam is 100 points total. Please read through the questions very carefully before

More information

Chapter 3 PROPERTIES OF PURE SUBSTANCES

Chapter 3 PROPERTIES OF PURE SUBSTANCES Thermodynamics: An Engineering Approach Seventh Edition Yunus A. Cengel, Michael A. Boles McGraw-Hill, 2011 Chapter 3 PROPERTIES OF PURE SUBSTANCES Copyright The McGraw-Hill Companies, Inc. Permission

More information

Reactors. Reaction Classifications

Reactors. Reaction Classifications Reactors Reactions are usually the heart of the chemical processes in which relatively cheap raw materials are converted to more economically favorable products. In other cases, reactions play essential

More information

Introduction to the Problem-Solving Methodology (PSM)

Introduction to the Problem-Solving Methodology (PSM) Problem Name: Problem Description: Date: P01 Simple Reactor Introduction to the Problem-Solving Methodology (PSM) Your Name: Problem Session Objectives To learn the five stages of the problem solving methodology.

More information

Test #3 Last Name First Name November 13, atm = 760 mm Hg

Test #3 Last Name First Name November 13, atm = 760 mm Hg Form G Chemistry 1442-001 Name (please print) Test #3 Last Name First Name November 13, 2003 Instructions: 1. This exam consists of 25 questions. 2. No scratch paper is allowed. You may do the work in

More information

Mass Transfer Operations I Prof. Bishnupada Mandal Department of Chemical Engineering Indian Institute of Technology, Guwahati

Mass Transfer Operations I Prof. Bishnupada Mandal Department of Chemical Engineering Indian Institute of Technology, Guwahati Mass Transfer Operations I Prof. Bishnupada Mandal Department of Chemical Engineering Indian Institute of Technology, Guwahati Module - 5 Distillation Lecture - 6 Fractional Distillation: McCabe Thiele

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP 2. Use MATLAB solvers for solving higher order ODEs and

More information

Lab 2: Static Response, Cantilevered Beam

Lab 2: Static Response, Cantilevered Beam Contents 1 Lab 2: Static Response, Cantilevered Beam 3 1.1 Objectives.......................................... 3 1.2 Scalars, Vectors and Matrices (Allen Downey)...................... 3 1.2.1 Attribution.....................................

More information

Application of Mathematical Software Packages in Chemical Engineering Education DEMONSTRATION PROBLEMS

Application of Mathematical Software Packages in Chemical Engineering Education DEMONSTRATION PROBLEMS Application of Mathematical Software Packages in Chemical Engineering Education DEMONSTRATION PROBLEMS Sessions 16 and 116 ASEE Chemical Engineering Division Summer School University of Colorado - Boulder

More information

Experiment: Oscillations of a Mass on a Spring

Experiment: Oscillations of a Mass on a Spring Physics NYC F17 Objective: Theory: Experiment: Oscillations of a Mass on a Spring A: to verify Hooke s law for a spring and measure its elasticity constant. B: to check the relationship between the period

More information