Process simulation, optimisation and design. P.S.O.D. ORGANIZATION ISSUES.

Slides:



Advertisements
Similar presentations
Chapter 0 Review of Algebra.
Advertisements

PSOD Lecture 2.
MathCAD Data.
Solving Equations Numerically Figure 4.1a Rename the independent variable x if necessary. For Figure 4.1a, Set up the table. Set up the first column for.
Solving Equations Numerically Figure 2.1a Rename the independent variable x if necessary. For Figure 2.1a, Set up the table. Set up the column for the.
Introduction to FX Equation 4. The Basic Idea FX Equation is DIFFERENT. Most equation editors use a point and click interface that has you searching for.
Microsoft Office XP Microsoft Excel
Spreadsheets A spreadsheet package is a general purpose computer package that is designed to perform calculations. A spreadsheet is a table which is divided.
Microsoft Excel The Basics. spreadsheet A type of application program which manipulates numerical and string data in rows and columns of cells. The value.
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Process simulation, optimisation and design. P.S.O.D. ORGANIZATION ISSUES.
MathCAD Data. Data in tables Tables are analogous to matrix The numbers of columns and rows can be dynamically changed (in contrast to matrix) To enter.
Matlab Matlab is a powerful mathematical tool and this tutorial is intended to be an introduction to some of the functions that you might find useful.
MATHEMATICA What it can do for you.. Overview Uses of Mathematica How the program works Language rules EXAMPLES!
Review of Matrix Algebra
Matrix Mathematics in MATLAB and Excel
Excel Web App By: Ms. Fatima Shannag.
PowerPoint Add formulae. Course contents Overview: Typing math formulae Lesson1: Type a simple formula Lesson2: Type a complex formula.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
1 Chapter 2 Matrices Matrices provide an orderly way of arranging values or functions to enhance the analysis of systems in a systematic manner. Their.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Algebra Review. Polynomial Manipulation Combine like terms, multiply, FOIL, factor, etc.
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
Mathcad Variable Names A string of characters (including numbers and some “special” characters (e.g. #, %, _, and a few more) Cannot start with a number.
Computer Programming (TKK-2144) 13/14 Semester 1 Instructor: Rama Oktavian Office Hr.: M.13-15, W Th , F
Data processing in MathCAD. Data in tables Tables are analogous to matrices Tables are analogous to matrices The numbers of columns and rows can be dynamically.
University of technology Department of Materials Engineering
Chapter 10 Review: Matrix Algebra
Managing Business Data Lecture 8. Summary of Previous Lecture File Systems  Purpose and Limitations Database systems  Definition, advantages over file.
Introduction to MATLAB for Engineers Third Edition William J. Palm III Chapter 11 MuPAD PowerPoint to accompany Copyright © The McGraw-Hill Companies,
Introduction to MATLAB Session 1 Prepared By: Dina El Kholy Ahmed Dalal Statistics Course – Biomedical Department -year 3.
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
Hydroinformatics: Session4 Dr Ivan Stoianov Room 328B Dr Andrew Ireson (Room 304) Mr Juan Rodriguez-Sanchez (411A) Mr Baback.
Excel. Spreadsheet Software  What Is a Spreadsheet, and How Does It Work? A spreadsheet program allows users to perform simple and complex sorting. It.
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
Array Dependence Analysis COMP 621 Special Topics By Nurudeen Lameed
MATH – High School Common Core Vs Tested Kansas Standards Please note: For informational purposes, all Common Core standards are listed, and the tested.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 3.1 Mathematical Foundation.
MATLAB Basics. The following screen will appear when you start up Matlab. All of the commands that will be discussed should be typed at the >> prompt.
Chapter 2: First Steps in MuPAD MATLAB for Scientist and Engineers Using Symbolic Toolbox.
PSOD Lecture 2. Matrices and vectors in Chemical & Process Engineering Appear in calculations when process is described by the system of equations:
Web 2.0 Tools SMART Notebook Math Tools By Joanna Snyder.
An Introduction to MathCAD Finding Solutions and Symbolic Maths.
MATLAB Harri Saarnisaari, Part of Simulations and Tools for Telecommunication Course.
Excel Web App By: Ms. Fatima Shannag.
PH24010 Data Handling and Statistics Use of MathCAD to handle statistical data Data storage in vectors and matrices MathCAD’s built-in functions: –Mean,
Newton’s Method, Root Finding with MATLAB and Excel
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Slide Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley A set of equations is called a system of equations. The solution.
Mathcad – what is it A fancy calculator A problem solving tool A unit converter An equation writer We will explore pieces of all of these.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
An Introduction to MathCAD More Symbolic Maths And First Steps in Calculus.
LINEAR MODELS AND MATRIX ALGEBRA
“Moh’d Sami” AshhabSummer 2008University of Jordan MATLAB By (Mohammed Sami) Ashhab University of Jordan Summer 2008.
MathematicalMarketing Slide 5.1 OLS Chapter 5: Ordinary Least Square Regression We will be discussing  The Linear Regression Model  Estimation of the.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
1-2 What is the Matlab environment? How can you create vectors ? What does the colon : operator do? How does the use of the built-in linspace function.
10.4 Matrix Algebra. 1. Matrix Notation A matrix is an array of numbers. Definition Definition: The Dimension of a matrix is m x n “m by n” where m =
ECE 1304 Introduction to Electrical and Computer Engineering
Chapter 7 Matrix Mathematics
Matrix Equations Step 1: Write the system as a matrix equation. A three-equation system is shown below. First matrix are the coefficients of all the.
Introduction Mathcad is a product of mathSoft inc. The Mathcad can help us to calculate, graph, and communicate technical ideas. It lets us work with.
Instruction of Chapter 8 on
(Mohammed Sami) Ashhab
LINEAR MODELS AND MATRIX ALGEBRA
Introduction to Mathcad
Comparing and Contrasting Functions
Dr Huw Owens Room B44 Sackville Street Building Telephone Number 65891
Section 1.2 Introduction to Parent Functions
Matrices and Determinants
Presentation transcript:

Process simulation, optimisation and design

P.S.O.D. ORGANIZATION ISSUES

Course scope Introduction Introduction MathCAD MathCAD Introduction to CAPE Introduction to CAPE Simple simulation of heat exchange process using common software Simple simulation of heat exchange process using common software ChemCAD (by dr Robert Kubica) ChemCAD (by dr Robert Kubica)

Process simulation, optimisation and design Course objectives

Provide the students with: Provide the students with: –using specialized software for mathematical problems solution –clear understanding of what is a process simulation, a process optimization and process design –using commonly available software to solve simulation problems –using specialized software for process simulation

Lectures are available on the web address

Introduction

All the simulation related issues requires

A Model, what is it? A model is a representation of some aspects of real world objects by: A model is a representation of some aspects of real world objects by: –other parameters easier to measure –scaled down objects –equations and numbers – mathematical models

The Model, what for? A good model of the apparatus is needed for: A good model of the apparatus is needed for: –Apparatus design –Process »simulation »optimization »design apparatus design can be done with pen and piece of paper but even quite simple process optimization problem needs to involve the computer apparatus design can be done with pen and piece of paper but even quite simple process optimization problem needs to involve the computer

Model, how to calculate? Manually Manually –We need: »Knowledge »Paper and pen »Log tables, slide rule, calculator Computer supported calculation Computer supported calculation –We need: »Knowledge »PROGRAM

COMPUTER PROGRAM DEFINITION „Set of instructions in a logical sequence interpreted and executed by a computer enabling the computer to perform a required function; also called software. Programs are the "thought processes" of computers, without which they cannot operate. Programs are written in various languages, to conform with the operating system of particular computers.”

Computer supported calculation PROGRAM PROGRAM –Written by user, using programming language: »Low level (assembler) »High level (C, Pascal, Fortran, Basic) –Written by user, using common applications for calculation »Spreadsheets (Excel, Calc) »Mathematical tools (MathLab, MathCAD) –Specialized software for modeling and process simulation (AspenOne, ProSIM, ChemCAD) PROGRAM PROGRAM –Written by user, using programming language: »Low level (assembler) »High level (C, Pascal, Fortran, Basic) –Written by user, using common applications for calculation »Spreadsheets (Excel, Calc) »Mathematical tools (MathLab, MathCAD) –Specialized software for modeling and process simulation (AspenOne, ProSIM, ChemCAD)

MathCADMathCAD The mathematical tool

Introduction User interface User interface –Writing cursor '+' –Toolbars »Calculator – equation symbols »Graph – building the charts »Matrix – inserting matrix/vectors, matrics operation »Calculus – derivatives, integrals, limits, summation, iterated product »Symbolic »Evaluation »Boolean –logical operation »Programming »Greek – inserting Greek letters –Turn of the Resource center at startup View/Preferences/Startup Options

Basic operations Basic operations –Typing: »"normal" – text Forced by: [shift]+["] Forced by: [shift]+["] Automatically: after space insertion Automatically: after space insertion »"variable" – interpreted by program Default Default –The typing modes are identified by style: »Normal – Font is Arial (by default) »Variable – Font is Times (by default) –Assign symbol":=" (keys [:][=])

Numbers notation Numbers notation –Floating-point notation: 1.23·10 4 Multiplication symbol [*]Superscript (exponent) [^] Key sequence: [1][.][2][3][*][1][0][^][4]

MathCAD intro [2][/][3][+][3][^][2][  ][l][n][(][3][)][=] To go back to basic level press spacebar or right arrow [2][/][3][+][3][^][2][space bar][l][n][(][3][)][=] or

MathCAD intro Variables notation Variables notation –Latin and Greek alphabet ( [ctrl] + [g] after typing Latin letter) –Case sensitivity: x  X –Subscripts (not vector/matrix subscripts) [.] –Prim: x`, bis: x`` etc.

MathCAD intro Assigning values and expressions (Pascal like) Assigning values and expressions (Pascal like) –One value assigned to one variable: x:=5 keys: [x][:][5] –Range of arithmetic progression assigned to variable »Default step: x:=0..3 (means numbers 0, 1, 2, 3) keys [x][:][0][;][3] »Defined step: x:=0,2..6 (means numbers 0, 2, 4, 6) keys [x][:][0][,][2][;][6] –Expression to variable: y:=2·x+3 keys: [y][:][2][*][x][+][3] Has to be defined earlier

MathCAD intro CorrectIncorrect

MathCAD intro The expressions edition The expressions edition –To change the position of edited place press space bar  Vertical line: shows place of insertion of a sign Horizontal: shows range will be inserted into function etc.

MathCAD functions Standard functions set Standard functions set Functions definition Functions definition –Syntax: FunctionName(arg1, arg2,...):= expression –E.g. f(x,y)=x·y keys: [f][(][x][y][)][:][x][*][y] Calculations with use of defined (or predefined) functions: Calculations with use of defined (or predefined) functions: –Evaluation for constants –Evaluation for defined variables –Evaluation for range of constants (vectors)

MathCAD functions Function of constant (scalar) Function of constant (scalar)

MathCAD functions Function of variable Function of variable Local variable Global variable

MathCAD functions Range of arithmetic sequence (or vector) Range of arithmetic sequence (or vector)

MathCAD functions Graphs: Graphs: –Function of one variable f(x) keys: [f][(][x][)][shift]+[2][x]

MathCAD functions Graphs: Graphs: – –Default independent values range: -10 ÷ 10 – –Can be edited

Graphs: Graphs: –Several functions of one independent variable range: f(x), keys: [f][(][x][)][,] [g][(][x][)][shift]+[2][x] MathCAD functions

Graphs: Graphs: –Several functions of several different independent variable range: f(x), z keys: [f][(][x][)][,] [g][(][z][)][shift]+[2][x][,][z] MathCAD functions

Graphs formatting: Graphs formatting: MathCAD functions

Graphs formatting: Graphs formatting: MathCAD functions

Show markers enabled

MathCAD – vectors and matrix Matrix variable definition Matrix variable definition vector – one column matrix vector – one column matrix

MathCAD – vectors and matrix

Matrix operations Matrix operations –Multiply by constant –Matrix transpose [ctrl]+[1] –Inverse [^][-][1] –Matrix multiplying –Determinant

To read the matrix elements A r, k : key [[] r- row nr, k – column nr To read the matrix elements A r, k : key [[] r- row nr, k – column nr –e.g. element A 1,1 keys: [A][[][1][,][1][=] To chose matrix column To chose matrix column –First column A( A ): keys [A][ctrl]+[6][0] –Default first column number is 0, (to change : Math/Options/Array Origin) MathCAD – vectors and matrix

Calculations of dot product and cross product of vectors Calculations of dot product and cross product of vectors

Special definition of matrix elements as a function of row-column number M i,j =f(i,j) Special definition of matrix elements as a function of row-column number M i,j =f(i,j) –E.g. Value of element is equal to product of column and row number MathCAD – vectors and matrix

MathCAD 3D graphs 3D graphs of function on the base of matrix : [ctrl]+[2][M] 3D graphs of function on the base of matrix : [ctrl]+[2][M] –M – matrix defined earlier RESTICTION: function arguments have to bee integer type

3D Graphs of function of real type arguments 3D Graphs of function of real type arguments –Using procedure: CreateMesh(function, lb_v1, ub_v1, lb_v2, ub_v2, v1grid, v2grid) –Assign result to variable –Plot of the variable like plot of matrix ([ctrl]+[2]) MathCAD 3D graphs Boundaries can be the real type numbers. (def. –5,5) Grids have to be integer type numbers (def. 20)

MathCAD 3D graphs

MathCAD 3D graphs - formating

MathCAD 3D graphs – formatting: fill options

Contours colour filled

MathCAD 3D graphs – formatting: line options

MathCAD 3D graphs – formatting: Lighting

MathCAD 3D graphs – formatting: Fog and perspective

MathCAD 3D graphs – formatting: Backplane and Grids

Predefined constants e = 2,718 – natural logarithm base e = 2,718 – natural logarithm base g = 9,81 m 2 /s – acceleration of gravity g = 9,81 m 2 /s – acceleration of gravity  = 3,142 – circle perimeter/diameter ratio  = 3,142 – circle perimeter/diameter ratio

MathCAD equation solving Single equation (one unknown value) Single equation (one unknown value) 1.Given-Find method »Input start point of variable »Type "Given" »Type equation with using [ = ] ([ctrl]+[=]) »Type Find(variable)=

MathCAD equation solving Given-Find – solving methods Given-Find – solving methods –Linear (function of type c 0 x 0 + c 1 x c n x n ) – starting point do not affects on results, it only defines size of matrix/vector of the solution. –Nonlinear – according to nonlinear equation. Obtained result could depend on starting point. Available methods: »Conjugate Gradient »Quasi – Newton »Levenberg-Marquardt »Quadratic The choice of method is automatic by default. User can choose method from the pop-up menu over word Find. The choice of method is automatic by default. User can choose method from the pop-up menu over word Find.

Single equation (one unknown value) Single equation (one unknown value) 2.Root procedure: Root(function, variable, low_limit, up_limit)= –Values of function at the bounds must have different signs or MathCAD equation solving

Single equation (one unknown value) Single equation (one unknown value) 2.Root procedure methods: 1.Secant method 2.Mueller method MathCAD equation solving x3x3 x2x2 y3y3 x1x1 y1y1 y2y2 x4x4 x5x5

Single equation (one unknown value) Single equation (one unknown value) 3.Special procedure: polyroots for the polynomials. Argument of procedure is a vector of polynomial coefficients (a 0, a 1...). The result is a vector too. MathCAD equation solving Methods: 1.Laguerre's method 2.companion matrix

The system of linear equations The system of linear equations –Solving on the base of matrix toolbar: »Prepare square matrix of equations coefficients (A) and vector of free terms (B) »Do the operation x:=A -1 B and show result: x= Or »Use the procedure LSOLVE: lsolve(A,B)= MathCAD, the system of equations solving

The system of nonlinear equation The system of nonlinear equation –Can be solved using given-find method »Assign starting values to variables »Type Given »Type the equations using = sign (bolded) »Type Find(var1, var2,...)= MathCAD, the system of equations solving

Differential equations solving Numerical methods: Numerical methods: –Gives only values not function –Engineer usually needs values –There is no need to make complicated transformations (e.g. variables separation) –Basic method implemented in MathCAD is Runge-Kutta 4 th order method.

Differential equations solving Numerical methods principle Numerical methods principle –Calculation involve bounded segment of independent variable only –Every point is being calculated on the base of one or few points calculated before or given. –Independent variable is calculated using step: x i+1 = x i + h = x i +  x –Dependent value is being calculated according to the method

Differential equations solving Runge-Kutta 4 th order method principles: Runge-Kutta 4 th order method principles: –New point of integral is being calculated on the base of one point (given/calculated) and 4 intermediate values

MathCAD differential equations Single, first order differential equation Single, first order differential equation 1.Assign the initial value of dependent variable (optionally) 2.Define the derivative function 3.Assign to the new variable the integrating function rkfixed: R:=rkfixed(init_v, low_bound, up_bound, num_seg, function) Initial condition

4.Result is matrix (table) of two columns: first contain independent values second dependent ones 5.To show result as a plot: 5.To show result as a plot: MathCAD differential equations

System of first order differential equations System of first order differential equations 1.Assign the vector of initial conditions of dependent variables (starting vector) 2.Define the vectoral function of derivatives (right-hand sides of equations) 3.Assign to the variable function rkfixed: R:=rkfixed(init_vect, low_bound, up_bound, num_seg, function) MathCAD differential equations

4.Result is matrix (table) of three columns: first contain independent values, 2 nd first dependent values, third second ones : 5.Results as a plot: R 5.Results as a plot: R MathCAD differential equations

Single second order equation Single second order equation 1.Transform the second order equation to the system of two first order equations: Initial condition MathCAD differential equations

Example: Example: Solve the second order differential equation (calculate values of function and its first derivatives) given by equation: While y=10 and y’=-1 for x=0 In the range of x= In the range of x=

MathCAD differential equations System of equations Starting vectorVectoral function