This document provides an introduction to using MATLAB for solving common problems in chemical engineering. It discusses mathematical modeling and the types of models used. It then gives an overview of MATLAB, including its capabilities and basic functions. The document proceeds to provide examples of how MATLAB can be used to solve various chemical engineering problems, including linear systems, non-linear equations, interpolation, curve fitting, ordinary differential equations, and more. It also introduces the MATLAB programming environment and some basic programming concepts.
Ch 04 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Chyi-Tsong Chen
The slides of Chapter 3 of the book entitled "MATLAB Applications in Chemical Engineering": Numerical Solution of Ordinary Differential Equations. Author: Prof. Chyi-Tsong Chen (陳奇中教授); Center for General Education, National Quemoy University; Kinmen, Taiwan; E-mail: chyitsongchen@gmail.com.
Ebook purchase: https://play.google.com/store/books/details/MATLAB_Applications_in_Chemical_Engineering?id=kpxwEAAAQBAJ&hl=en_US&gl=US
These slides may be used for a part of Advanced level course in Chemical Reaction Engineering. I taught this course to Masters level students covering 1.5 credit hours.
Episode 53 : Computer Aided Process Engineering
Lecture notes and reading material
* A lecture note covering all the lectures has been prepared (see course home-page)
* Supplementary text-books are listed
* A course home-page has been created
* All lecture and tutorial material can be downloaded from the home-page
http://www.capec.kt.dtu.dk/Courses/MSc-level-Courses/
SAJJAD KHUDHUR ABBAS
Ceo , Founder & Head of SHacademy
Chemical Engineering , Al-Muthanna University, Iraq
Oil & Gas Safety and Health Professional – OSHACADEMY
Trainer of Trainers (TOT) - Canadian Center of Human
Development
Slides for the eLearning course Separation and purification processes in biorefineries (https://open-learn.xamk.fi) in IMPRESS project (https://www.spire2030.eu/impress).
Section: Distillation
Subject: 0.2 Introduction to distillation.
Ch 04 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Chyi-Tsong Chen
The slides of Chapter 3 of the book entitled "MATLAB Applications in Chemical Engineering": Numerical Solution of Ordinary Differential Equations. Author: Prof. Chyi-Tsong Chen (陳奇中教授); Center for General Education, National Quemoy University; Kinmen, Taiwan; E-mail: chyitsongchen@gmail.com.
Ebook purchase: https://play.google.com/store/books/details/MATLAB_Applications_in_Chemical_Engineering?id=kpxwEAAAQBAJ&hl=en_US&gl=US
These slides may be used for a part of Advanced level course in Chemical Reaction Engineering. I taught this course to Masters level students covering 1.5 credit hours.
Episode 53 : Computer Aided Process Engineering
Lecture notes and reading material
* A lecture note covering all the lectures has been prepared (see course home-page)
* Supplementary text-books are listed
* A course home-page has been created
* All lecture and tutorial material can be downloaded from the home-page
http://www.capec.kt.dtu.dk/Courses/MSc-level-Courses/
SAJJAD KHUDHUR ABBAS
Ceo , Founder & Head of SHacademy
Chemical Engineering , Al-Muthanna University, Iraq
Oil & Gas Safety and Health Professional – OSHACADEMY
Trainer of Trainers (TOT) - Canadian Center of Human
Development
Slides for the eLearning course Separation and purification processes in biorefineries (https://open-learn.xamk.fi) in IMPRESS project (https://www.spire2030.eu/impress).
Section: Distillation
Subject: 0.2 Introduction to distillation.
Batch Distillation
1 SCOPE
2 FIELD OF APPLICATION
3 DEFINITIONS
4 BACKGROUND TO THE DESIGN
4.1 General
4.2 Choice of batch/continuous operation
4.3 Boiling point curve and cut policy
4.4 Method of design
4.5 Scope of calculations required for design
5 SIMPLE BATCH DISTILLATION
6 FRACTIONAL BATCH DISTILLATION
6.1 General
6.2 Approximate methods
6.3 Rigorous design - use of a computer model
6.4 Other factors influencing the design
6.4.1 Occupation
6.4.2 Choice of Batch Rectification or Stripping
6.4.3 Batch size
6.4.4 Initial estimate of cut policy
6.4.5 Liquid Holdup
6.4.6 Total reflux operation and heating-up time
6.4.7 Column operating pressure
6.5 Optimum Design of the Batch Still
6.6 Special design problems
7 GENERAL ASPECTS OF EQUIPMENT DESIGN
7.1 Kettle reboilers
7.2 Column Internals
7.3 Condensers and reflux split boxes
8 PROCESS CONTROL AND INSTRUMENTATION IN
BATCH DISTILLATION
9 MECHANICAL DESIGN FEATURES
10 BIBLIOGRAPHY
APPENDICES
A McCABE - THIELE METHOD - TYPICAL EXAMPLE
Slides for the eLearning course Separation and purification processes in biorefineries (https://open-learn.xamk.fi) in IMPRESS project (https://www.spire2030.eu/impress).
Subject: 2.4 Plate efficiencies.
COURSE LINK:
https://www.chemicalengineeringguy.com/courses/gas-absorption-stripping/
Introduction:
Gas Absorption is one of the very first Mass Transfer Unit Operations studied in early process engineering. It is very important in several Separation Processes, as it is used extensively in the Chemical industry.
Understanding the concept behind Gas-Gas and Gas-Liquid mass transfer interaction will allow you to understand and model Absorbers, Strippers, Scrubbers, Washers, Bubblers, etc…
We will cover:
- REVIEW: Of Mass Transfer Basics required
- GAS-LIQUID interaction in the molecular level, the two-film theory
- ABSORPTION Theory
- Application of Absorption in the Industry
- Counter-current & Co-current Operation
- Several equipment to carry Gas-Liquid Operations
- Bubble, Spray, Packed and Tray Column equipments
- Solvent Selection
- Design & Operation of Packed Towers
- Pressure drop due to packings
- Solvent Selection
- Design & Operation of Tray Columns
- Single Component Absorption
- Single Component Stripping/Desorption
- Diluted and Concentrated Absorption
- Basics: Multicomponent Absorption
- Software Simulation for Absorption/Stripping Operations (ASPEN PLUS/HYSYS)
----
Please show the love! LIKE, SHARE and SUBSCRIBE!
More likes, sharings, suscribers: MORE VIDEOS!
-----
CONTACT ME
Chemical.Engineering.Guy@Gmail.com
www.ChemicalEngineeringGuy.com
http://facebook.com/Chemical.Engineering.Guy
You speak spanish? Visit my spanish channel -www.youtube.com/ChemEngIQA
An overview of distillation column design concepts and major design considerations. Explains distillation column design concepts, what you would provide to a professional distillation column designer, and what you can expect back from a distillation system design firm. To speak with an engineer about your distillation column project, call EPIC at 314-207-4250.
Gas - Liquid Reactors
0 INTRODUCTION/PURPOSE
1 SCOPE
2 FIELD OF APPLICATION
3 DEFINITIONS
4 PRELIMINARY CONSIDERATIONS
4.1 Preliminary Equipment Selection
4.2 Equipment for Low Viscosity Liquids
4.3 Equipment for High Viscosity Liquids
5 REACTOR DESIGN
6 ESSENTIAL THEORY
6.1 Rate and Yield Determining Steps
6.2 Chemical and Physical Rates
6.3 Modification for Exothermic and Complex Reactions
6.4 Preliminary Selection of Reactor Type
7 EXPERIMENTAL DETERMINATION OF REGIME
7.1 Direct Measurement of Reaction Kinetics
7.2 Laboratory Gas-Liquid Reactor Experiments
8 EQUILIBRIUM AND DIFFUSIVITY DATA SOURCES
9 OVERALL EFFECTS
9.1 Liquid Flow Patterns
9.2 Scale of Mixing
9.3 Gas Flow Pattern : Mean Driving Force for Mass Transfer
9.4 Gas-Liquid Reactor Modeling
9.5 Heat Transfer
9.6 Materials of Construction
9.7 Foaming
10 FINAL CHOICE OF REACTOR TYPE
11 SCALE-UP AND SPECIFICATION OF GAS-LIQUID
REACTORS
11.1 Bubble Columns
11.2 Packed Columns
11.3 Trickle Beds
11.4 Plate or Tray Columns
11.5 Spray Columns
11.6 Wiped Film
11.7 Spinning Film Reactors
11.8 Stirred Vessels
11.9 Plunging Jet
11.10 Surface Aerator
11.11 Static Mixers
11.12 Ejectors, Venturis and Orifice Plates
11.13 3-Phase Fluidized Bed
12 BIBLIOGRAPHY
TABLES
1 REGIMES OF GAS-LIQUID MASS TRANSFER WITH ISOTHERMAL CHEMICAL REACTION
2 REGIMES OF GAS-LIQUID MASS TRANSFER IGNORING LARGE EXOTHERMS OR OTHER COMPLICATIONS
3 COMPARATIVE MASS TRANSFER PERFORMANCE OF CONTACTING DEVICES
4 COMPARATIVE MASS TRANSFER DATA
5 CHOICE OF GAS-LIQUID REACTOR TYPE
FIGURES
1 RATE AND YIELD DETERMINING STEPS
2 ENHANCEMENT FACTOR vs HATTA NUMBER
3 ENHANCEMENT FACTOR vs HATTA NUMBER : EFFECT OF THERMAL & OTHER FACTORS
4 REACTORS FOR LIQUID-PHASE KINETICS
MEASUREMENT
5 EXPERIMENTS TO DETERMINE THE OPERATING
REGIME
6 EXPERIMENTS DETERMINE THE OPERATING REGIME WHERE A SOLID CATALYST IS INVOLVED
7 THE MIXED ZONES IN LOOPS' MODEL FOR STIRRED REACTORS
Reactor and Catalyst Design
0 INTRODUCTION/PURPOSE
1 SCOPE
2 FIELD OF APPLICATION
3 DEFINITIONS
4 CATALYST DESIGN
4.1 Equivalent Pellet Diameter
4.2 Voidage
4.3 Pellet Density
5 REACTOR DESIGN
6 CATALYST SUPPORT
6.1 Choice of Support
TABLES
1 CATALYST SUPPORT SHAPES
2 SECONDARY REFORMER SPREADSHEET
FIGURES
1 GRAPH OF EFFECTIVENESS v THIELE MODULUS
2 VARIATION OF COSTS WITH CATALYST SIZE
3 VARIATION OF COSTS WITH CATALYST BED VOIDAGE
4 VARIATION OF COSTS WITH VESSEL DIAMETER
MATLAB sessions: Laboratory 2
MAT 275 Laboratory 2
Matrix Computations and Programming in MATLAB
In this laboratory session we will learn how to
1. Create and manipulate matrices and vectors.
2. Write simple programs in MATLAB
NOTE: For your lab write-up, follow the instructions of LAB1.
Matrices and Linear Algebra
⋆ Matrices can be constructed in MATLAB in different ways. For example the 3 × 3 matrix
A =
8 1 63 5 7
4 9 2
can be entered as
>> A=[8,1,6;3,5,7;4,9,2]
A =
8 1 6
3 5 7
4 9 2
or
>> A=[8,1,6;
3,5,7;
4,9,2]
A =
8 1 6
3 5 7
4 9 2
or defined as the concatenation of 3 rows
>> row1=[8,1,6]; row2=[3,5,7]; row3=[4,9,2]; A=[row1;row2;row3]
A =
8 1 6
3 5 7
4 9 2
or 3 columns
>> col1=[8;3;4]; col2=[1;5;9]; col3=[6;7;2]; A=[col1,col2,col3]
A =
8 1 6
3 5 7
4 9 2
Note the use of , and ;. Concatenated rows/columns must have the same length. Larger matrices can
be created from smaller ones in the same way:
c⃝2011 Stefania Tracogna, SoMSS, ASU
MATLAB sessions: Laboratory 2
>> C=[A,A] % Same as C=[A A]
C =
8 1 6 8 1 6
3 5 7 3 5 7
4 9 2 4 9 2
The matrix C has dimension 3 × 6 (“3 by 6”). On the other hand smaller matrices (submatrices) can
be extracted from any given matrix:
>> A(2,3) % coefficient of A in 2nd row, 3rd column
ans =
7
>> A(1,:) % 1st row of A
ans =
8 1 6
>> A(:,3) % 3rd column of A
ans =
6
7
2
>> A([1,3],[2,3]) % keep coefficients in rows 1 & 3 and columns 2 & 3
ans =
1 6
9 2
⋆ Some matrices are already predefined in MATLAB:
>> I=eye(3) % the Identity matrix
I =
1 0 0
0 1 0
0 0 1
>> magic(3)
ans =
8 1 6
3 5 7
4 9 2
(what is magic about this matrix?)
⋆ Matrices can be manipulated very easily in MATLAB (unlike Maple). Here are sample commands
to exercise with:
>> A=magic(3);
>> B=A’ % transpose of A, i.e, rows of B are columns of A
B =
8 3 4
1 5 9
6 7 2
>> A+B % sum of A and B
ans =
16 4 10
4 10 16
10 16 4
>> A*B % standard linear algebra matrix multiplication
ans =
101 71 53
c⃝2011 Stefania Tracogna, SoMSS, ASU
MATLAB sessions: Laboratory 2
71 83 71
53 71 101
>> A.*B % coefficient-wise multiplication
ans =
64 3 24
3 25 63
24 63 4
⋆ One MATLAB command is especially relevant when studying the solution of linear systems of dif-
ferentials equations: x=A\b determines the solution x = A−1b of the linear system Ax = b. Here is an
example:
>> A=magic(3);
>> z=[1,2,3]’ % same as z=[1;2;3]
z =
1
2
3
>> b=A*z
b =
28
34
28
>> x = A\b % solve the system Ax = b. Compare with the exact solution, z, defined above.
x =
1
2
3
>> y =inv(A)*b % solve the system using the inverse: less efficient and accurate
ans =
1.0000
2.0000
3.0000
Now let’s check for accuracy by evaluating the difference z − x and z − y. In exact arithmetic they
should both be zero since x, y and z all represent the solution to the system.
>> z - x % error for backslash command
ans =
0
0
0
>> z - y % error for inverse
ans =
1.0e-015 *
-0.4441
0
-0.88 ...
Batch Distillation
1 SCOPE
2 FIELD OF APPLICATION
3 DEFINITIONS
4 BACKGROUND TO THE DESIGN
4.1 General
4.2 Choice of batch/continuous operation
4.3 Boiling point curve and cut policy
4.4 Method of design
4.5 Scope of calculations required for design
5 SIMPLE BATCH DISTILLATION
6 FRACTIONAL BATCH DISTILLATION
6.1 General
6.2 Approximate methods
6.3 Rigorous design - use of a computer model
6.4 Other factors influencing the design
6.4.1 Occupation
6.4.2 Choice of Batch Rectification or Stripping
6.4.3 Batch size
6.4.4 Initial estimate of cut policy
6.4.5 Liquid Holdup
6.4.6 Total reflux operation and heating-up time
6.4.7 Column operating pressure
6.5 Optimum Design of the Batch Still
6.6 Special design problems
7 GENERAL ASPECTS OF EQUIPMENT DESIGN
7.1 Kettle reboilers
7.2 Column Internals
7.3 Condensers and reflux split boxes
8 PROCESS CONTROL AND INSTRUMENTATION IN
BATCH DISTILLATION
9 MECHANICAL DESIGN FEATURES
10 BIBLIOGRAPHY
APPENDICES
A McCABE - THIELE METHOD - TYPICAL EXAMPLE
Slides for the eLearning course Separation and purification processes in biorefineries (https://open-learn.xamk.fi) in IMPRESS project (https://www.spire2030.eu/impress).
Subject: 2.4 Plate efficiencies.
COURSE LINK:
https://www.chemicalengineeringguy.com/courses/gas-absorption-stripping/
Introduction:
Gas Absorption is one of the very first Mass Transfer Unit Operations studied in early process engineering. It is very important in several Separation Processes, as it is used extensively in the Chemical industry.
Understanding the concept behind Gas-Gas and Gas-Liquid mass transfer interaction will allow you to understand and model Absorbers, Strippers, Scrubbers, Washers, Bubblers, etc…
We will cover:
- REVIEW: Of Mass Transfer Basics required
- GAS-LIQUID interaction in the molecular level, the two-film theory
- ABSORPTION Theory
- Application of Absorption in the Industry
- Counter-current & Co-current Operation
- Several equipment to carry Gas-Liquid Operations
- Bubble, Spray, Packed and Tray Column equipments
- Solvent Selection
- Design & Operation of Packed Towers
- Pressure drop due to packings
- Solvent Selection
- Design & Operation of Tray Columns
- Single Component Absorption
- Single Component Stripping/Desorption
- Diluted and Concentrated Absorption
- Basics: Multicomponent Absorption
- Software Simulation for Absorption/Stripping Operations (ASPEN PLUS/HYSYS)
----
Please show the love! LIKE, SHARE and SUBSCRIBE!
More likes, sharings, suscribers: MORE VIDEOS!
-----
CONTACT ME
Chemical.Engineering.Guy@Gmail.com
www.ChemicalEngineeringGuy.com
http://facebook.com/Chemical.Engineering.Guy
You speak spanish? Visit my spanish channel -www.youtube.com/ChemEngIQA
An overview of distillation column design concepts and major design considerations. Explains distillation column design concepts, what you would provide to a professional distillation column designer, and what you can expect back from a distillation system design firm. To speak with an engineer about your distillation column project, call EPIC at 314-207-4250.
Gas - Liquid Reactors
0 INTRODUCTION/PURPOSE
1 SCOPE
2 FIELD OF APPLICATION
3 DEFINITIONS
4 PRELIMINARY CONSIDERATIONS
4.1 Preliminary Equipment Selection
4.2 Equipment for Low Viscosity Liquids
4.3 Equipment for High Viscosity Liquids
5 REACTOR DESIGN
6 ESSENTIAL THEORY
6.1 Rate and Yield Determining Steps
6.2 Chemical and Physical Rates
6.3 Modification for Exothermic and Complex Reactions
6.4 Preliminary Selection of Reactor Type
7 EXPERIMENTAL DETERMINATION OF REGIME
7.1 Direct Measurement of Reaction Kinetics
7.2 Laboratory Gas-Liquid Reactor Experiments
8 EQUILIBRIUM AND DIFFUSIVITY DATA SOURCES
9 OVERALL EFFECTS
9.1 Liquid Flow Patterns
9.2 Scale of Mixing
9.3 Gas Flow Pattern : Mean Driving Force for Mass Transfer
9.4 Gas-Liquid Reactor Modeling
9.5 Heat Transfer
9.6 Materials of Construction
9.7 Foaming
10 FINAL CHOICE OF REACTOR TYPE
11 SCALE-UP AND SPECIFICATION OF GAS-LIQUID
REACTORS
11.1 Bubble Columns
11.2 Packed Columns
11.3 Trickle Beds
11.4 Plate or Tray Columns
11.5 Spray Columns
11.6 Wiped Film
11.7 Spinning Film Reactors
11.8 Stirred Vessels
11.9 Plunging Jet
11.10 Surface Aerator
11.11 Static Mixers
11.12 Ejectors, Venturis and Orifice Plates
11.13 3-Phase Fluidized Bed
12 BIBLIOGRAPHY
TABLES
1 REGIMES OF GAS-LIQUID MASS TRANSFER WITH ISOTHERMAL CHEMICAL REACTION
2 REGIMES OF GAS-LIQUID MASS TRANSFER IGNORING LARGE EXOTHERMS OR OTHER COMPLICATIONS
3 COMPARATIVE MASS TRANSFER PERFORMANCE OF CONTACTING DEVICES
4 COMPARATIVE MASS TRANSFER DATA
5 CHOICE OF GAS-LIQUID REACTOR TYPE
FIGURES
1 RATE AND YIELD DETERMINING STEPS
2 ENHANCEMENT FACTOR vs HATTA NUMBER
3 ENHANCEMENT FACTOR vs HATTA NUMBER : EFFECT OF THERMAL & OTHER FACTORS
4 REACTORS FOR LIQUID-PHASE KINETICS
MEASUREMENT
5 EXPERIMENTS TO DETERMINE THE OPERATING
REGIME
6 EXPERIMENTS DETERMINE THE OPERATING REGIME WHERE A SOLID CATALYST IS INVOLVED
7 THE MIXED ZONES IN LOOPS' MODEL FOR STIRRED REACTORS
Reactor and Catalyst Design
0 INTRODUCTION/PURPOSE
1 SCOPE
2 FIELD OF APPLICATION
3 DEFINITIONS
4 CATALYST DESIGN
4.1 Equivalent Pellet Diameter
4.2 Voidage
4.3 Pellet Density
5 REACTOR DESIGN
6 CATALYST SUPPORT
6.1 Choice of Support
TABLES
1 CATALYST SUPPORT SHAPES
2 SECONDARY REFORMER SPREADSHEET
FIGURES
1 GRAPH OF EFFECTIVENESS v THIELE MODULUS
2 VARIATION OF COSTS WITH CATALYST SIZE
3 VARIATION OF COSTS WITH CATALYST BED VOIDAGE
4 VARIATION OF COSTS WITH VESSEL DIAMETER
MATLAB sessions: Laboratory 2
MAT 275 Laboratory 2
Matrix Computations and Programming in MATLAB
In this laboratory session we will learn how to
1. Create and manipulate matrices and vectors.
2. Write simple programs in MATLAB
NOTE: For your lab write-up, follow the instructions of LAB1.
Matrices and Linear Algebra
⋆ Matrices can be constructed in MATLAB in different ways. For example the 3 × 3 matrix
A =
8 1 63 5 7
4 9 2
can be entered as
>> A=[8,1,6;3,5,7;4,9,2]
A =
8 1 6
3 5 7
4 9 2
or
>> A=[8,1,6;
3,5,7;
4,9,2]
A =
8 1 6
3 5 7
4 9 2
or defined as the concatenation of 3 rows
>> row1=[8,1,6]; row2=[3,5,7]; row3=[4,9,2]; A=[row1;row2;row3]
A =
8 1 6
3 5 7
4 9 2
or 3 columns
>> col1=[8;3;4]; col2=[1;5;9]; col3=[6;7;2]; A=[col1,col2,col3]
A =
8 1 6
3 5 7
4 9 2
Note the use of , and ;. Concatenated rows/columns must have the same length. Larger matrices can
be created from smaller ones in the same way:
c⃝2011 Stefania Tracogna, SoMSS, ASU
MATLAB sessions: Laboratory 2
>> C=[A,A] % Same as C=[A A]
C =
8 1 6 8 1 6
3 5 7 3 5 7
4 9 2 4 9 2
The matrix C has dimension 3 × 6 (“3 by 6”). On the other hand smaller matrices (submatrices) can
be extracted from any given matrix:
>> A(2,3) % coefficient of A in 2nd row, 3rd column
ans =
7
>> A(1,:) % 1st row of A
ans =
8 1 6
>> A(:,3) % 3rd column of A
ans =
6
7
2
>> A([1,3],[2,3]) % keep coefficients in rows 1 & 3 and columns 2 & 3
ans =
1 6
9 2
⋆ Some matrices are already predefined in MATLAB:
>> I=eye(3) % the Identity matrix
I =
1 0 0
0 1 0
0 0 1
>> magic(3)
ans =
8 1 6
3 5 7
4 9 2
(what is magic about this matrix?)
⋆ Matrices can be manipulated very easily in MATLAB (unlike Maple). Here are sample commands
to exercise with:
>> A=magic(3);
>> B=A’ % transpose of A, i.e, rows of B are columns of A
B =
8 3 4
1 5 9
6 7 2
>> A+B % sum of A and B
ans =
16 4 10
4 10 16
10 16 4
>> A*B % standard linear algebra matrix multiplication
ans =
101 71 53
c⃝2011 Stefania Tracogna, SoMSS, ASU
MATLAB sessions: Laboratory 2
71 83 71
53 71 101
>> A.*B % coefficient-wise multiplication
ans =
64 3 24
3 25 63
24 63 4
⋆ One MATLAB command is especially relevant when studying the solution of linear systems of dif-
ferentials equations: x=A\b determines the solution x = A−1b of the linear system Ax = b. Here is an
example:
>> A=magic(3);
>> z=[1,2,3]’ % same as z=[1;2;3]
z =
1
2
3
>> b=A*z
b =
28
34
28
>> x = A\b % solve the system Ax = b. Compare with the exact solution, z, defined above.
x =
1
2
3
>> y =inv(A)*b % solve the system using the inverse: less efficient and accurate
ans =
1.0000
2.0000
3.0000
Now let’s check for accuracy by evaluating the difference z − x and z − y. In exact arithmetic they
should both be zero since x, y and z all represent the solution to the system.
>> z - x % error for backslash command
ans =
0
0
0
>> z - y % error for inverse
ans =
1.0e-015 *
-0.4441
0
-0.88 ...
Least Square Optimization and Sparse-Linear SolverJi-yong Kwon
Short slide that explains about the least square problem and its practical solution, including Poisson Image editing example and brief introduction of sparse linear solver.
A Powerpoint Presentation designed to provide beginners to MATLAB an introduction to the MATLAB environment and introduce them to the fundamentals of MATLAB including matrix generation and manipulation, Arrays, MATLAB Graphics, Data Import and Export, etc
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkreddyprasad reddyvari
3 days Hands on workshop on MATLAB/SIMULINK for Engineering Applications:
this workshop aims to make students to aware of MATLAB to do own projects in engineering life with best available technology E-Simulink Softwares and tools.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
Understanding Inductive Bias in Machine LearningSUTEJAS
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
Water billing management system project report.pdfKamal Acharya
Our project entitled “Water Billing Management System” aims is to generate Water bill with all the charges and penalty. Manual system that is employed is extremely laborious and quite inadequate. It only makes the process more difficult and hard.
The aim of our project is to develop a system that is meant to partially computerize the work performed in the Water Board like generating monthly Water bill, record of consuming unit of water, store record of the customer and previous unpaid record.
We used HTML/PHP as front end and MYSQL as back end for developing our project. HTML is primarily a visual design environment. We can create a android application by designing the form and that make up the user interface. Adding android application code to the form and the objects such as buttons and text boxes on them and adding any required support code in additional modular.
MySQL is free open source database that facilitates the effective management of the databases by connecting them to the software. It is a stable ,reliable and the powerful solution with the advanced features and advantages which are as follows: Data Security.MySQL is free open source database that facilitates the effective management of the databases by connecting them to the software.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Matlab for Chemical Engineering
1. MATLAB
for
Chemical Engineering
www.msubbu.in
Chemical Engineering
Dr. M. Subramanian
Associate Professor
Department of Chemical Engineering
Sri Sivasubramaniya Nadar College of Engineering
OMR, Chennai – 603 110
msubbu.in[AT]gmail.com
16th March 2012
M Subramanian, MATLAB for ChE
www.msubbu.in
2. Contents
I. Mathematical Models in Chemical Engineering
II. Getting Started with MATLAB
III. MATLAB examples for Solving typical ChE problemsIII. MATLAB examples for Solving typical ChE problems
IV. Getting Started with Simulink
M Subramanian, MATLAB for ChE
www.msubbu.in
5. Types of Mathematical Models
• Mathematical models are of two types:
– based on physical theory
– empirical
• Models based on physical theory can be further• Models based on physical theory can be further
divided into the following categories:
– Linear / non-linear
– Steady / unsteady
– Lumped / distributed parameter system
– Continuous / discrete variables
M Subramanian, MATLAB for ChE
www.msubbu.in
6. Forms of Mathematical Models
• Algebraic equations
– Linear
– nonlinear
• Integral equations• Integral equations
• Differential equations
– Ordinary differential
– Partial differential
• Difference equations
M Subramanian, MATLAB for ChE
www.msubbu.in
9. Basis of Mathematical Models in
Chemical Engineering
• Laws of physics, chemistry, such as conservation of mass,
energy, and momentum
• Equation of state• Equation of state
• Equilibrium relationships
• Rate laws
M Subramanian, MATLAB for ChE
www.msubbu.in
10. Mathematical Problems in
Chemical Engineering
• Linear algebraic equations
• Non-linear equations
• Curve fitting – polynomial, non-linear
• Interpolation• Interpolation
• Integration
• Differential equations
• Partial differential equations
M Subramanian, MATLAB for ChE
www.msubbu.in
12. About MATLAB
• MATLAB has become a standard among
academic and industrial users
• Developed by Math Works Inc.
• http://www.mathworks.com
• MATLAB - acronym for MATrix• MATLAB - acronym for MATrix
LABoratory
• Matrices and arrays - the heart of
MATLAB
• Offers programming features - similar to
other languages
M Subramanian, MATLAB for ChE
www.msubbu.in
13. Capabilities of MATLAB
• Provides extensive numerical resources
• Contains lot of reliable, accurate mathematical subprograms
• The subprograms provide solutions to broad range of
mathematical problems including:
– matrix algebra, complex arithmetic, differential equations, nonlinear
systems, and many special functions
– matrix algebra, complex arithmetic, differential equations, nonlinear
systems, and many special functions
• Provides a variety of graphic output displays:
– linear, log-log, semilog, polar, bar chart, and contour plots
– 2-D and 3-D views
• Provides GUI tool: Simulink® – block diagram representation,
simulation
M Subramanian, MATLAB for ChE
www.msubbu.in
16. MATLAB Variables
» D = 2
D =
2
» v = 3
v =
ans Default variable name used
for resuts
pi Value of π
inf Stands for infinity (e.g., 1/0)
NaN Stands for Not-a-Numberv =
3
» rho = 1000;
» mu = 0.001;
» Re = D*v*rho/mu
Re =
6000000
»
NaN Stands for Not-a-Number
(e.g., 0/0)
i, j i = j = √-1
» c1 = 2+3i
c1 =
2.0000 + 3.0000i
M Subramanian, MATLAB for ChE
www.msubbu.in
17. Mathematical Functions
» x=sqrt(2)/2
x =
0.7071
» y=sin(x)
Trigonometric
functions
sin, cos, tan, sin,
acos, atan, sinh,
cosh, tanh, asinh,
acosh, atanh, csc,
sec, cot, acsc, …
Exponential
functions
exp, log, log10, sqrt
» y=sin(x)
y =
0.6496
»
Complex functions abs, angle, imag, real,
conj
Rounding and
Remainder
functions
floor, ceil, round, mod,
rem, sign
M Subramanian, MATLAB for ChE
www.msubbu.in
18. Array Operations
» x = 1:10;
» y = sin(x)
y =
Columns 1 through 7
0.8415 0.9093 0.1411 -0.7568 -0.9589 -0.2794 0.6570
Columns 8 through 10
0.9894 0.4121 -0.5440
» y(3)» y(3)
ans =
0.1411
» y(1:5)
ans =
0.8415 0.9093 0.1411 -0.7568 -0.9589
M Subramanian, MATLAB for ChE
www.msubbu.in
19. Array Manipulation
» A = [1 2; 3 4; 5 6]
A =
1 2
3 4
5 6
» B = [1 2 3; 4 5 6];
» A+B
??? Error using ==> plus
Matrix dimensions must agree.
»
» A*B
ans =» B = [1 2 3; 4 5 6];
» A'
ans =
1 3 5
2 4 6
ans =
9 12 15
19 26 33
29 40 51
»
M Subramanian, MATLAB for ChE
www.msubbu.in
20. Element by Element Operation
» clear
» a = [1 2; 3 4];
» b = [1 1; 2 2];
»
» a.*b
ans =
» a./b
ans =
1.0000 2.0000
1.5000 2.0000
» a/b
Warning: Matrix is singular to
1 2
6 8
»
Warning: Matrix is singular to
working precision.
ans =
-Inf Inf
-Inf Inf
»
M Subramanian, MATLAB for ChE
www.msubbu.in
21. Matrix Operations
» A = [1 2; 3 4];
» B = [1 1; 2 2];
» [A B]
ans =
1 2 1 1
3 4 2 2
» C = [A B]
C =
1 2 1 1
3 4 2 2
» C(1,:)
ans =3 4 2 2
» ans-1
ans =
0 1 0 0
2 3 1 1
ans =
1 2 1 1
» C(:,2:end)
ans =
2 1 1
4 2 2
M Subramanian, MATLAB for ChE
www.msubbu.in
22. Matrix Functions
» A
A =
1 2
3 4
» det(A)
» [a b] = eig(A)
a =
-0.8246 -0.4160
0.5658 -0.9094
ans =
-2
» inv(A)
ans =
-2.0000 1.0000
1.5000 -0.5000
»
b =
-0.3723 0
0 5.3723
»
Related: diag, triu, tril, rank, size
M Subramanian, MATLAB for ChE
www.msubbu.in
23. » frictionfactor
Dia in meter = .1
Velocity in m/s = 2
Re =
200000
Using Script M-files
200000
0.0037
»
M Subramanian, MATLAB for ChE
www.msubbu.in
24. Control Flow Statements
if <expression>
…
else
switch expression
case option1
…
case option2
…
for <index=start:end>
…
end
else
…
end
…
.
case optionN
…
otherwise
end
while <condition>
…
end
M Subramanian, MATLAB for ChE
www.msubbu.in
25. Part III
Capabilities of MATLAB in Solving
Typical Chemical Engineering ProblemsTypical Chemical Engineering Problems
M Subramanian, MATLAB for ChE
www.msubbu.in
26. Component Compositions of acids Composition
of blended acidSpent acid
X
Aqueous HNO3
Y
Aqueous H2SO4
Z
H2SO4 44.4 0 98 60
HNO3 11.3 90 0 32
H2O 44.3 10 2 8
Matrix Problems
To calculate the quantities of each of the three acids required for making 100 kg
blended acid:
H2SO4 balance:
44.4 X + 0 Y + 98 Z = 60
HNO3 balance:
11.3 X + 90 Y + 0 Z = 32
H2O balance:
44.3 X + 10 Y + 2 Z = 8
» A = [44.4 0 98
11.3 90 0
44.3 10 2]
» B = [60
32
8]
» x = inv(A)*B
x =
0.0764
0.3460
0.5776
Similar Problems: Stage by stage calculations of absorber, extractor, with linear
equilibrium relationships, under isothermal operation…
M Subramanian, MATLAB for ChE
www.msubbu.in
27. Plots
» x = 1:2:50;
» y = x.^2;
» plot(x,y,'*-')
» xlabel('Values of x')
» ylabel('y')
»
» P = logspace(3,7);
» Q = 0.079*P.^(-0.25);
» loglog(P,Q, '.-')
» grid
M Subramanian, MATLAB for ChE
www.msubbu.in
28. Non-linear Equation
% pvt_calculation.m
global R T P Tc Pc
T = input('Temperature in K ')
P = input('Pressure in Bar ')
R = 0.08314; % Bar.m3/kmol.K
Tc = 190.6; % Tc of Methane K
Pc = 45.99; % Pc of Methane bar
v_ig = R*T/P
» pvt_calculation
Temperature in K 350
v_ig = R*T/P
v_vander = fzero('vander',v_ig)
%-------------------------------
% vander.m
function v2 = vander(vol);
global R T P Tc Pc
a = 27*(R^2)*(Tc^2)/(64*Pc);
b = R*Tc/(8*Pc);
v2 = R*T - (P + a/vol^2)*(vol-b);
%---------------------------------
Temperature in K 350
Pressure in Bar 30
v_ig =
0.9700
v_vander =
0.9347
»
M Subramanian, MATLAB for ChE
www.msubbu.in
29. Non-linear Equations
van Laar equations:
Relates γi with xi. Estimating the parameters (A12’, A21’) based on
γi , xi data, involves solving the nonlinear algebraic equations.
M Subramanian, MATLAB for ChE
www.msubbu.in
30. function Eqn = vanLaarEqns(A, x1, g1, g2)
% to solve for vanLaar parameters A1, A2
x2 = 1-x1;
Eqn(1) = log(g1) - A(1)*(1+ (A(1)*x1/(A(2)*x2)))^(-2);
Eqn(2) = log(g2) - A(2)*(1+ (A(2)*x2/(A(1)*x1)))^(-2);
% end
Solution to Non-linear Equations
» x_1 = 0.561; g_1 = 1.4167; g_2 = 1.4646; Azero = [2 2];
» Asolved = fsolve(@vanLaarEqns, Azero, [], x_1, g_1, g_2)
Optimization terminated: first-order optimality is less than
options.TolFun.
Asolved =
1.2015 1.7911
»
M Subramanian, MATLAB for ChE
www.msubbu.in
31. Non-linear Equations in ChE
• Terminal settling velocity
• Pressure drop vs. velocity for flow through pipelines, Piping
network calculations, pressure drop / velocity calculations in
packed and fluidized beds
• PVT relations – nonlinear algebraic
• Internal Rate of Return (IRR) calculations
M Subramanian, MATLAB for ChE
www.msubbu.in
32. Interpolations
V = ZRT/P
» interp2(Pr_data,Tr_data,Z0_data,0.5,0.48)
ans =
0.1059
M Subramanian, MATLAB for ChE
www.msubbu.in
33. Polynomial Fitting
» T=[0,18,25,100,200,300,400,500];
» Cp=[8.371, 8.472, 8.514, 9.035, 9.824, 10.606, 11.347, 12.045];
» P=polyfit(T,Cp,3)
P =
-0.0000 0.0000 0.0063 8.3590
Cp = aT3 + bT2 + cT + d
» T_range = [0:500];
» Cp_fit = P(1).*T_range.^3+P(2).*T_range.^2+P(3).*T_range+P(4);
» plot(T,Cp,'*',T_range,Cp_fit)
M Subramanian, MATLAB for ChE
www.msubbu.in
34. Nonlinear Curve Fitting
% AntoineFit.m
function AntoineFit
% T in oC; P in kPa
% ln P = A - B/(T+C)
T = [127.371 144.129 153.240 159.318 166.330 168.757 174.720 ...
178.420 181.160 183.359 189.673 196.222 201.605 206.080 ...
212.190 218.896 224.570];
ln P = A - B/(T+C)
212.190 218.896 224.570];
P = [0.139 0.293 0.424 0.538 0.706 0.774 0.964 ...
1.101 1.213 1.309 1.627 2.024 2.414 2.784 ...
3.369 4.128 4.882];
ABC0 = [5 500 -50]; % Starting guess
M Subramanian, MATLAB for ChE
www.msubbu.in
36. Nonlinear Curve Fitting in ChE
• Langmuir-Hinshelwood kinetics
• Parameters of Redlich-Kister expansion for property changes of
mixing
• Activity coefficient-composition models• Activity coefficient-composition models
M Subramanian, MATLAB for ChE
www.msubbu.in
37. Ordinary Differential Equations
To plot the variation in tank levels for two interacting tanks
From mass balance, and using Bernoulli equations, we get:
M Subramanian, MATLAB for ChE
www.msubbu.in
38. Solving ODEs
%twotnk.m
function hdot = twotnk(t,h)
% To solve
% dh1/dt = 1 - 0.5*sqrt(h1-h2)
% dh2/dt = 0.25*sqrt(h1-h2) - 0.25*sqrt(h2)
hdot = zeros(2,1); % a column vector
hdot(1) = 1- 0.5*sqrt(h(1)-h(2));
hdot(2) = 0.25*sqrt(h(1) - h(2)) - 0.25*sqrt(h(2));
» [t, h] = ode45(@twotnk, [0 100], [12 7]');
» plot(t, h)
M Subramanian, MATLAB for ChE
www.msubbu.in
39. ODE Problems in ChE
• Reaction Engineering
– Concentration vs time (dC/dt),
• Heat Transfer
– Temperature vs time(dT/dt), Temperature vs distance– Temperature vs time(dT/dt), Temperature vs distance
(dT/dx)
M Subramanian, MATLAB for ChE
www.msubbu.in
41. Simulink
• SIMULINK is an extension to MATLAB which uses a icon-driven
interface for the construction of a block diagram representation
of a process.
System
Inputs Outputs
• Steps involved in Simulink Solution:
– Creating the Block Diagram
– Specifying the Block Parameters
– Setting up the Solver
– Running the Simulation
M Subramanian, MATLAB for ChE
www.msubbu.in