Title: LECTURER: MANUEL GARCIAPEREZ , Ph.D.
1RESEARCH AND TEACHING METHODS
CLASS PROJECT
LECTURER MANUEL GARCIA-PEREZ , Ph.D.
Department of Biological Systems Engineering 205
L.J. Smith Hall, Phone number 509-335-7758 e-mail
mgarcia-perez_at_wsu.edu
2OUTLINE
1.- CLASS PROJECT
2.- PROCESS MODELLING
PHYSICAL MODEL
MATHEMATICAL MODEL
SOLVING THE MODEL AND NUMERICAL METHODS
REFERENCES
31.- CLASS PROJECT
Goal and Objectives
(1) Gain basic skills to develop mathematical
models describing the behavior of simple
processes in which biological materials are
converted into food, fuels and chemicals.
(2) Identify suitable numerical methods to solve
the mathematical model proposed and develop
simple algorithms (programming flow chart) to
simulate the process of interest.
(3) Be aware of what kind of experimental data is
needed to adjust the parameters of your model.
(4) Propose a strategy to validate the model. How
to acquire, process and analyze the information
needed for validation.
(5) Explain how to use the computer simulation
code developed in this project to study the
system of interest.
41.- CLASS PROJECT
Tasks
The specific tasks are outlined below
1.- Make a brief description of the technology
you are improving or developing as part of your
graduate studies.
2.- Identify a simple component of your
technology that you would like to model. Answer
the following questions
What is the intended use of the mathematical
model? What are the governing phenomena or
mechanism for the system of interest? In what
form is the model required? How should the model
be instrumented and documented? What are the
systems inputs and outputs? How accurate does the
model have to be? What data on the system are
available and what is the quality of and accuracy
of the data?
51.- CLASS PROJECT
Tasks
3.- Develop a phenomenological model to describe
the behavior of the system of your interest. The
phenomenological models should be based on mass
and energy balances (Use microscopic, macroscopic
or plug flow models).
4.- Identify the most suitable numerical method
to solve the model developed in task 3. Try to
answer the following questions
What variables must be chosen in the model to
satisfy the degrees of freedom? Is the model
solvable? What numerical (or analytical)
solution techniques should be used? What form
of representation should be used to display the
results (2 D graphs, 3D, Visualization)?
61.- CLASS PROJECT
5.- Develop an algorithm (programming flow chart)
and a computer code (in any high-level computing
language) to evaluate how the output variables
will change when the input variables are
modified. If you decide not to use a high-level
computer language you may choose to use Microsoft
Excel.
6.- Identify what kind of experimental data
should be collected to adjust the parameters of
the model proposed.
7.- Suggest a strategy to validate your model.
72.- PROCESS MODELLING
MODELLING IS NOT JUST ABOUT PRODUCING A SET OF
EQUATIONS, THERE IS FAR MORE TO PROCESS MODELLING
THAN WRITING EQUATIONS.
A PARTICULAR MODEL DEPENDS NOT ONLY ON THE
PROCESS TO BE DESCRIBED BUT ALSO ON THE MODELLING
GOAL. IT INVOLVES THE INTENDED USE OF THE MODEL
AND THE USER OF THAT MODEL.
THE ACTUAL FORM OF THE MODEL IS ALSO DETERMINED
BY THE EDUCATION, SKILLS AND TASTE OF THE
MODELLER AND THAT OF THE USER.
THE BASIC PRINCIPLES IN MODEL BUILDING ARE BASED
ON OTHER DISCIPLINES IN PROCESS ENGINEERING SUCH
AS MATHEMATICS, CHEMISTRY AND PHYSICS. THEREFORE,
A GOOD BACKGROUND IN THESE AREAS IS ESSENTIAL FOR
A MODELLER. THERMODYNAMICS, UNIT OPERATIONS,
REACTION KINETICS, CATALYSIS, PROCESS
FLOWSHEETING AND PROCESS CONTROL ARE HELPFUL
PRE-REQUISITES FOR A COURSE IN PROCESS MODELLING.
82.- PROCESS MODELLING
A MODEL IS AN IMITATION OF REALITY AND A
MATHEMATICAL MODEL IS A PARTICULAR FORM OF
REPRESENTATION.
IN THE PROCESS OF MODEL BUILDING WE ARE
TRANSLATING OUR REAL WORLD PROBLEM INTO AN
EQUIVALENT MATHEMATICAL PROBLEM WHICH WE SOLVE
AND THEN ATTEMPT TO INTERPRET. WE DO THIS TO
GAIN INSIGHT INTO THE ORIGINAL REAL WORLD
SITUATION OR TO USE THE MODEL FOR CONTROL,
OPTIMIZATION OR POSSIBLE SAFETY STUDIES.
3
4
92.- PROCESS MODELLING
SYSTEMATIC METHODOLOGY TO BUILD MATHEMATICAL
MODELS
102.- PROCESS MODELLING (PROBLEM DEFINITION AND
CONTROLLING FACTORS)
1.- DEFINE THE PROBLEM IT FIXES THE DEGREE OF
DETAIL RELEVANT TO THE MODELLING GOAL AND
SPECIFIES
A.- INPUTS AND OUTPUTS B.- HIERARCHY LEVEL
RELEVANT TO THE MODEL C.- THE NECESSARY RANGE
AND ACCURACY OF THE MODEL D.- THE TIME
CHARACTERISTICS (STATIC VERSUS DYNAMIC) OF THE
PROCESS MODEL.
2.- IDENTIFY THE CONTROLLING FACTORS OR
MECHANISMS THE NEXT STEP IS TO INVESTIGATE THE
PHYSICO-CHEMICAL PROCESSES AND PHENOMENA TAKING
PLACE IN THE SYSTEM RELEVANT TO THE MODELLING
GOAL. THESE ARE TERMED CONTROLLING FACTORS OR
MECHANISMS. THE MOST IMPORTANT CONTROLLING
FACTORS INCLUDE
A.- CHEMICAL REACTION, B.- DIFFUSION OF MASS,
C.- CONDUCTION OF HEAT D.- FORCED CONVECTION HEAT
TRANSFER, E.- FREE CONVECTION HEAT TRANSFER, F.-
RADIATION HEAT TRANSFER, G.- EVAPORATION, H.-
TURBULENT MIXING, I.- HEAT OR MASS TRANSFER
THROUGH A BIUNDARY LAYER J.- FLUID FLOW.
112.- PROCESS MODELLING (PHYSICAL MODEL)
SYSTEMATIC METHODOLOGY TO BUILD MATHEMATICAL
MODELS
122.- PROCESS MODELLING (PHYSICAL MODEL)
3.- CREATE A SUITABLE PHYSICAL MODEL
REALITY
Identified essential process characteristics
Incorrectly identified process characteristics
PHYSICAL MODEL
Identified non-essential process characteristics
THERE ARE STANDARD MATHEMATICAL DESCRIPTIONS FOR
EACH OF THE COMPONENTS OF THE PHYSICAL MODEL.
132.- PROCESS MODELLING (PHYSICAL MODEL)
THE LEVEL OF MIXING IS ONE OF THE MOST IMPORTANT
PARAMETERS DEFINING THE PHYSICAL MODEL TO BE
USED. THIS DETERMINES THE EXISTENCE OF NOT OF
GRADIENTS INSIDE THE SYSTEM.
GRAPHIC REPRESENTATION
PHYSICAL MODEL
OBSERVATIONS
MICROSCOPIC BALANCES
ABSENCE OF MACROSCOPIC MIXING IN ALL DIRECTIONS.
(ONLY MOLECULAR MIXING, LAMINAR FLOW)
IT IS COMMONLY USED TO DESCRIBE THE BEHAVIOUR OF
SYSTEMS IN TURBULENT REGIME.
PLUG FLOW MODEL
MACROSCOPIC BALANCES
MIXING IN ALL DIRECTIONS (IT IS USED TO DESCRIBE
THE BEHAVIOUR OF STIRRED TANKS)
142.- PROCESS MODELLING (PHYSICAL MODEL)
EXAMPLE (FLUIDIZED BED REACTORS)
PLUG FLOW MODEL
MACROSCOPIC BALANCES
???
FREEBOARD
SPLASH ZONE
BUBBLE PHASE
SOLID PHASE
EMULSION PHASE
EXCHANGE OF HEAT AND MASS
EXCHANGE OF HEAT AND MASS
BUBBLING ZONE
BIOMASS
???
JET ZONE
CARRIER GAS (EMULSION PHASE)
CARRIER GAS (BUBBLE)
CARRIER GAS
BIOMASS
SCHEME OF A FLUIDIZED BED REACTOR
(ONE PHYSICAL MODEL PER PHASE)
152.- PROCESS MODELLING (PHYSICAL MODEL)
PHYSICAL MODELS FOR THE SOLID PHASE
SELF SEGREGATION MODEL (PLUG FLOW)
MACROSCOPIC BALANCES
PLUG FLOW
VOLATILES
FINES
COARSE
Bubble
EMULSION PHASE
BIOMASS
BIOMASS
162.- PROCESS MODELLING (PHYSICAL MODEL)
HOW TO FORMALIZE THE CHEMICAL COMPOSITION OF THE
SYSTEM?
OFTEN THE CHEMICAL DESCRIPTION OF THE SYSTEM IS
CONDITIONED TO THE KIND OF DATA AVAILABLE IN THE
LITERATURE AND BY THE GOALS OF THE MODEL.
TYPICAL TERMS USED TO DESCRIBE THE CHEMICAL
COMPOSITION OF THERMOCHEMICAL PROCESSES
BIOMASS, FIXED CARBON (CHARCOAL), VOLATILES,
GASES, CO2, CO, H2O, ASH, TARS, BIO-OILS
B
C
D
E
A
172.- PROCESS MODELLING (MATHEMATICAL MODEL)
SYSTEMATIC METHODOLOGY TO BUILD MATHEMATICAL
MODELS
182.- PROCESS MODELLING (MATHEMATICAL MODEL)
CONSTRUCTION OF MATHEMATICAL MODEL
MACROSCOPIC BALANCES
MASS BALANCES SPECIE i
You should write a mass balance per every
component per every phase
d mi,tot/ dt - D( ri ltvgt S) wim ri,av Vtot
1
Rate of mass accumulation of specie i
Rate of mass generation of specie i by reaction
Net Rate of mass exchange of specie through the
interface.
Q
W
ENERGY BALANCE
2
d Etot/dt - D (ri v S) h ½ v2 F
Q - W
You should write an Energy balance per phase
Heat
Work
Energy accumulation
Energy associated to each inlet and outlet
MOST COMMON ENERGY BALANCE FOR REACTING SYSTEMS
V r cp dT / dt ? Fj cpj (Tj - T)
ri,av V (-DHR) Q W
Heat
Energy accumulation
Energy associated to each inlet and outlet
Work
rA Production of compound by chemical reaction
(kmol/m3.s) (-) if produced, (-) if consumed
Q () if generated (-) if consumed
192.- PROCESS MODELLING (MATHEMATICAL MODEL)
MEANING OF SOME TERMS
ltvgt average velocity (m/s)
S
S areas of transversal section of inlet and
outlet pipes (m2)
ltVgt
r density of fluid (kg/m3)
wim transport of component i through the
interface per unit of time (kg/s) () if it
enters to the system and (-) if it exists the
system
F Potential Energy
K Kinetic Energy
U Internal Energy
202.- PROCESS MODELLING (MATHEMATICAL MODEL)
PLUG FLOW
CONSTRUCTION OF MATHEMATICAL MODEL
MASS BALANCES SPECIE i
mikc a DC Kya Dy
You should write a mass balance per every
component per every phase
Mass balance per unit of volume
dCi / d t d (vz Ci)/dz Ri mi
E
mi
dz
Transport for convection
Rate of mass accumulation of specie i
Net Rate of mass exchange of specie through the
interface.
Rate of mass generation of specie i by reaction
Et (4/D) U DT
ENERGY BALANCE
r Cp (dT/dt vz dT/dz) SR Et
You should write an Energy balance per every phase
Heat or work transport through the interface
Rate of Energy accumulation
Energy transport by convection
Units
Property/vol. time
Heat associated with chemical reactions
RA Production of compound by chemical reaction
(kmol/m3.s) (-) if produced, (-) if consumed
SR Heat associated with chemical reactions
(kJ/m3.s) SR DHRRA () if generated (-) if
consumed
212.- PROCESS MODELLING (MATHEMATICAL MODEL)
MICROSCOPIC BALANCES
CONSTRUCTION OF MATHEMATICAL MODEL
RECTANGULAR COORDENATES (r, m, D, k, Cp are
considered constant)
MASS BALANCES SPECIE i
dCA/ dt vx dCA/dx vy dCA/dy vz dCA/dzDAB
d2CA/dx2 d2CA/dy2d2CA/dz2 RA
Accumulation
Transport per diffusion
Generation
Transport per convection
ENERGY BALANCE
r Cp dT/ dt vx dT/dx vy dT/dy vz
dT/dzk d2T/dx2 d2T/dy2d2T/dz2 SR
Transport per thermal diffusion
Transport per convection
Accumulation
Generation
222.- PROCESS MODELLING (MATHEMATICAL MODEL)
BALANCE OF MOMENTUM (FOR NEWTONIAN FLUIDS,
CARTESIAN COORDENATES)
NAVIER-STOKES EQUATIONS
DIRECTION X
r dvx/ dt vx d vx/dx vy d vx/dy vz d
vx/dz dp/dx m d2 vx /dx2 d2 vx /dy2d2 vx
/dz2 r gx
Rate of momentum addition by convection per unit
volume
Rate of momentum addition by molecular transport
per unit volume
Rate of increase of momentum per unit volume
External Force
DIRECTION Y
r dvy/ dt vx d vy/dx vy d vy/dy vz d
vy/dz dp/dy m d2 vy /dx2 d2 vy /dy2d2 vy
/dz2 r gy
Rate of increase of momentum per unit volume
Rate of momentum addition by convection per unit
volume
Rate of momentum addition by molecular transport
per unit volume
External Force
DIRECTION Z
r dvz/ dt vx d vz/dx vy d vz/dy vz d
vz/dz dp/dz m d2 vz /dx2 d2 vz /dy2d2 vz
/dz2 r gz
232.- SINGLE PARTICLE MODELS (MATHEMATICAL MODEL)
CONSTITUTIVE RELATIONS
TRANSFER RELATIONSHIP
TE
HEAT TRANSFER
BUBBLE
MASS TRANSFER miK (CEi-CBi)
TB
MASS TRANSFER COEFFICIENT
CBi
MASS TRANSFER
HEAT TRANSFER EU a (TE-TB)
CEi
EMULSION
HEAT TRANSFER COEFFICIENT
Ri - ko eE/(RT) Cjn
REACTION KINETICS
THERMODYNAMICAL RELATIONS
EQUILIBRIUM RELATIONSHIPS
PROPERTY RELATIONS
Liquid density rL f (P, T, xi) Vapour
density rV f (P, T, xi) Liquid enthalpy
h f (P, T, xi) Vapour enthalpy H f
(P, T, yi)
EQUATIONS OF STATE
Ideal gas, Redleich-Kwong, Peng-Robinson and
Soave-Redleich-Kwong equations.
242.- PROCESS MODELLING (MATHEMATICAL MODEL)
WHAT EQUATION SHOULD BE USED?
MASS BALANCES IF THE PARAMETER OF INTEREST IS
RELATED WITH CHANGES IN CONCENTRATIONS
ENERGY BALANCE IF THE PARAMETER OF INTEREST IS
RELATED WITH CHANGES IN TEMPERATURE
BALANCE OF MOMENTUM IF THE PARAMETER OF INTEREST
IS RELATED WITH DISTRUBTION OF VELOCITIES .
WHAT SYSTEM OF COORDENATES SHOULD BE USED?
IMPORTANT WHEN USING MICROSCOPIC MODELS
CARTESIAN COORDINATE SYSTEM
CYLINDRICAL COORDINATE SYSTEM
252.- PROCESS MODELLING (MATHEMATICAL MODEL)
Simplifications
In steady state the properties do not change with
time (dp/dt 0)
When a property is transported in the same
direction by more than one mechanism, you should
evaluate the possibility of only taking into
account the controlling mechanism. Example
Disregard molecular mechanisms if the property is
also transported by turbulent mechanisms.
When the distance to the source that produces the
changes is constant in certain direction, then
you can consider that there is no gradient of the
property of interest along this direction.
Source that produces the changes
z
y
x
Source that produces the changes
Q
dTz/dy 0
262.- PROCESS MODELLING (MATHEMATICAL MODEL)
EXAMPLE 1
A viscous fluid is heated as it flows by gravity
in a rectangular channel with a moderate slope.
Develop a mathematical model that allows you to
determine the temperature profiles in the liquid
at any position along the channel. The system
receives heat from the bottom (Bottom
Temperature 100 oC). The dimensions of the
channel are
Case I a 100 cm h 5 cm Case II a 10
cm, h 5 cm
a
Y
X
Z
h
vz
HEAT
272.- PROCESS MODELLING (MATHEMATICAL MODEL)
PHYSICAL MODEL
VISCOUS MATERIAL, FLOWING DUE TO THE ACTION OF
GRAVITATIONAL FORCES (MODERATE SLOPE). IT IS
LOGICAL TO SUPPOSE THAT IT IS FLOWING IN LAMINAR
REGIME. (MICROSCOPIC MODEL)
IN THESE CONDITIONS THE FLOW HAPPENS WITHOUT
MIXING IN THE AXIAL DIRECTION. NO MIXING IN THE
DIRECTION PERPENDICULAR TO THE FLOW.
PHYSICAL MODEL MICROSCOPIC MODEL
MATHEMATICAL MODEL
ENERGY BALANCE
TEMPERATURE PROFILE
COORDENATE SYSTEM RECTANGULAR (CARTESIAN)
GENERAL MATHEMATICAL MODEL
r Cp dT/ dt vx dT/dx vy dT/dy vz
dT/dzk d2T/dx2 d2T/dy2d2T/dz2 SR
Transport per thermal diffusion
Transport per convection
Accumulation
Generation
282.- PROCESS MODELLING (MATHEMATICAL MODEL)
SIMPLIFICATIONS
1.- STEADY STATE (dT/dt) 0
2.- THE ONLY COMPONENT OF VELOCITY THAT EXIST IS
IN THE DIRECTION OF THE MAIN FLOW (DIRECTION Z)
vx vy 0
3.- NO CHEMICAL REACTION, SO THERE IS NO HEAT
ASSOCIATED WITH THE CHEMICAL REACTION SR 0
4.- THERE IS HEAT EXCHANGE ONLY THROUGH THE
BOOTOM. THE LATERAL WALLS ARE CONSIDERED
INSOLATED d2T/dx2 0
5.- THE HEAT TRANSFER BY CONDUCTION IN THE AXIAL
DIRECTION IS NEGLIGIBLE COMPARED WITH THE
TRANSPORT OF ENERGY DUE TO THE MOVEMENT OF THE
FLUID IT MEANS
r Cp vz dT/dz gtgt k d2T/dz2
292.- PROCESS MODELLING (MATHEMATICAL MODEL)
HEAT
a
Y
X
h
Z
vz
HEAT
HEAT
0
0
0
0
0
0
r Cp dT/ dt vx dT/dx vy dT/dy vz
dT/dzk d2T/dx2 d2T/dy2d2T/dz2 SR
r Cp vz dT/dzk d2T/dy2
Case I a 1000 cm h 5 cm
r Cp vz dT/dzk d2T/dx2 d2T/dy2
Case II a 10 cm, h 5 cm
TO SOLVE THIS EQUATION IT IS NECESSARY TO
ESTIMATE THE VALUES OF vz AT DIFFERENT VALUES OF
X, Y, Z (MOMENTUM EQUATION). IF THE CHANNEL IS
WIDE ENOUGH THEN THE CHANGES OF vz AS A FUNCTION
OF X CAN BE CONSIDERED NEGLIGIBLE.
302.- PROCESS MODELLING (MATHEMATICAL MODEL)
EXAMPLE 2
A GAS IS HEATED IN A TUBULAR HEAT EXCHANGER.
BECAUSE OF THE LOW STABILITY OF CERTAIN
COMPONENTS THIS STREAM CANNOT REACH TEMPERATURES
OVER Ts. DEVELOP A MATHEMATICAL MODEL TO DESCRIBE
THE TEMPERATURE PROFILE OF THIS REACTOR.
SATURATED VAPOUR
GASES
GASES
CONDENSATE
PHYSICAL MODEL
DEPENDING ON THE FLOW REGIME THE TEMPERATURE CAN
VARY RADIALLY OR AXIALLY. MOST INDUSTRIAL SYSTEMS
OPERATE IN TURBULENT REGIME BECAUSE HEAT TRANSFER
COEFICIENTS ARE HIGHER. IT IS REASONABLE TO
SUPPOSE THAT THE GAS IS FLOWING IN TURBULENT
REGIME.
312.- PROCESS MODELLING (MATHEMATICAL MODEL)
PHYSICAL MODEL
TURBULENT REGIME, A SINGLE PHASE
PHYSICAL MODEL PLUG FLOW
MATHEMATICAL MODEL
PROPERTY OF INTEREST TEMPERATURE EQUATION
ENERGY BALANCES
r Cp (dT/dt vz dT/dz) SR Et
SIMPLIFICATIONS
EXCEPT DURING STARTUP AND SHUTDOWNS THE SYSTEM
WILL BE OPERATING AT STEADY STATE.
dT/dt 0
NO CHEMICAL REACTION SR 0
r Cp vz dT/dz Et
THE VALUES OF Et CAN BE CALCULATED FOR TUBES
USING THE FOLLOWING EQUATION
Et (4/D) U (TV-T)
r Cp vz dT /dz (4/D) U (Tv -T)
322.- PROCESS MODELLING (MATHEMATICAL MODEL)
EXAMPLE 3
Develop a mathematical model to calculate the
profiles of temperature and concentration in a
steady state for a tubular insolated reactor.
This reactor is fed with an homogeneous stream
containing component A. Consider an
incompressible system (liquid).
Irreversible reaction
A B
A
Solvent
Solvent
INSOLATED SYSTEM
15 m
The dependency of the reaction rate with the
temperature can be described by the Arrhenius
equation
rA K CA
K A exp (-E/RT)
A 3.00 s-1
E 4652 kJ/kmol
Consider the axial diffusion negligible.
332.- PROCESS MODELLING (MATHEMATICAL MODEL)
EXAMPLE 3
DATA
VELOCITY OF FLUID 3 m/s
SPECIFIC HEAT 4.184 J/kg K
ENTALPY OF REACTION -279.12 kJ/kg
PHYSICAL MODEL
PLUG FLOW
EQUATIONS MASS AND ENERGY BALANCES
MATHEMATICAL MODEL
0
0
dCA / d t d (vz CA)/dz RA mA
MASS BALANCE
dCA / d t 0 (STEADY STATE)
mA 0 (SINGLE PHASE, NO MASS TRANSPORT THORUGH
THE INTERPHASES)
vz CONSTANT (INCONPRESSIBLE FLUID)
vz dCA/dz RA
RA A exp (-E/RT) CA
342.- PROCESS MODELLING (MATHEMATICAL MODEL)
EXAMPLE 3
dCA/dz A exp (-E/RT) CA / vz
???
ENERGY BALANCE
0
0
r Cp (dT/dt vz dT/dz) SR Et
dT/dt 0 STEADY STATE
E 0 HOMOGENEOUS INSOLATED SYSTEM
r Cp vz dT/dz SR -RA DH
dT/dz -A exp (- E / RT) CA DH / (cp
vz)
MATHEMATICAL MODEL
dCA/dz A exp (-E/RT) CA / vz
dT/dz -A exp (- E / RT) CA DH / (cp
vz)
352.- PROCESS MODELLING
SYSTEMATIC METHODOLOGY TO BUILD MATHEMATICAL
MODELS
362.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
ROOTS OF EQUATIONS
f (x) a x2 b x c 0
METHODS
372.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
LINEAR ALGEBRAIC EQUATIONS
TO DETERMINE THE VALUES OF x1, x2, x3, THAT
SIMULTANEOUSLY SATISFY A SET OF EQUATIONS
METHODS
GAUSS ELIMINATION
LU DECOMPOSITION AND MATRIX INVERSION
SPECIAL MATRICES AND GAUSS-SEIDEL
382.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
DIFFERENTIATION
THE DERIVATIVEREPRESENT THE RATE OF CHANGE OF A
DEPENDENT VARIABLE WITH RESPECT TO AN INDEPENDENT
VARIABLE.
dy/dx f(x, y)
METHODS TO SOLVE ORDINARY DIFFERENTIAL EQUATIONS
WHEN THE FUNCTION INVOLVES ONE INDEPENDENT
VARIABLE, THE EQUATION IS CALLED AS ORDINARY
DIFFERENTIAL EQUATION.
METHODS OF SOLUTION
RUNGE-KUTTA METHODS
(EULERS METHOD, RUNGE-KUTTA)
(STIFFNESS AND MULTYISTEP METHOD)
STIFFNESS AND MULTISPET METHODS
392.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
EULERS METHOD
SOLVING ORDINARY DIFFERENTIAL EQUATIONS
dy/dx f (x, y)
THE SOLUTION OF THIS KIND OF EQUATIONS IS
GENERALLY CARRIED OUT USING THE GENERAL FORM
NEW VALUE OLD VALUE SLOPE x STEP SIZE
OR IN MATHEMATICAL TERMS,
yi1 yi f h
ACCORDING TO THIS EQUATION, THE SLOPE ESTIMATE OF
f IS USED TO EXTRAPOLATE FROM AN OLD VALUE yi TO
A NEW VALUE OVER A DISTANCE h. THIS FORMULA IS
APPLIED STEP BY STEP TO COMPUTE OUT INTO A FUTURE
AND, HENCE OUT THE TRAJECTORY OF THE SOLUTION.
IN THE EULER METHOD THE FIRST DERIVATIVE PROVIDES
A DIRECT ESTIMATE OF THE SLOPE AT xi.
yi1 yi f (xi, yi) h
402.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
EXAMPLE OF EULERS METHOD
USE THE EULERS METHOD TO NUMERICALLY INTEGRATE
THE FOLLOWING EQUATION
dy/dx -2 x3 12 x2 20 x 8.5
f (xi, yi)
MATHEMATICAL SOLUTION
? dy ? (-2 x3 12 x2 20 x 8.5) dx
NUMERICAL SOLUTION
yi1 yi f (xi, yi) h
COMPARISON OF TRUE VALUE AND APPROXIMATE VALUES
OF THE INTEGRAL WITH THE INITIAL VALUES y 1 AT x
0 (h 0.5)
412.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
EFFECT OF REDUCED STEP SIZE ON EULERS METHOD
422.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
PARTIAL DIFFERENTIAL EQUATION INVOLVES TWO OR
MORE INDEPENDENT VARIABLES.
d(cp r T)/ dtK (d2T / dr2)((b-1)/r )
dT/dr)(-q)(-dr/dt)
METHODS TO SOLVE PARTIAL DIFFERENTIAL EQUATIONS
LINEAR SECOND-ORDER EQUATIONS
A (d2u/dx2) B (d2u/dx dy) C (d2u/dy2) D 0
NUMERICAL SOLUTION
FINITE DIFFERENCE ELLIPTIC EQUATIONS
(d2T/dx2) (d2T/dy2) 0
B2-4AC lt 0
THE CONTROL-VOLUME APPROACH
(dT/dt) k (d2T/dx2)
FINITE DIFFERENCE PARABOLIC EQUATIONS B2-4AC
0
THE SIMPLE IMPLICIT METHOD
THE CRACK-NICOLSON METHOD
432.- PROCESS MODELLING
SYSTEMATIC METHODOLOGY TO BUILD MATHEMATICAL
MODELS
442.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
DEVELOP AN ALGORITHM TO SOLVE THE PROBLEM
WRITING ALGORITHMS USUALLY RESULTS IN SOFTWARES
THAT ARE MUCH EASIER TO SHARE, IT ALSO HELPS
GENERATE MUCH MORE EFFICIENT PROGRAMS.
WELL-STRUCTURED ALGORITHMS ARE INVARIABLY EASIER
TO DEBUG AND TEST, RESULTING IN PROGRAMS THAT
TAKE A SHORTER TIME TO DEVELOP, TEST AND UPDATE.
A KEY IDEAS BEHIND STRUCTURED PROGRAMMING IS THAT
ANY NUMERICAL ALGORITHM CAN BE COMPOSED USING THE
THREE FUNDAMENTAL CONTROL STRUCTURES SEQUENCE,
SELECTION, AND REPETITION. BY LIMITING OURSELVES
TO THESE STRUCTURES, THE RESULTING COMPUTER CODE
WILL BE CLEARER AND EASIER TO FOLLOW.
A FLOWCHART IS A VISUAL OR GRAPHICAL
REPRESENTATION OF AN ALGORITHM. THE FLOWCHART
EMPLOYS A SERIES OF BLOCKS AND ARROWS, EACH OF
WHICH REPRESENTS A PARTICULAR OPERATION OR STEP
IN THE ALGORITHM. THE ARROW SHOW THE SEQUENCE IN
WHICH OPERATIONS ARE IMPLEMENTED.
NOT EVERYONE INVOLVED WITH COMPUTER PROGRAMMING
AGREES THAT FLOWCHARTING IS A PRODUCTIVE
ENDEAVOR. IN FACT SOME EXPERIENCED PROGRAMMERS DO
NOT ADVOCATE FLOWCHARTS. HOWEVER, I FEEL THAT WE
SHOULD STUDY IT BECAUSE IT IS A VERY GOOD WAY TO
EXPRESSING AND COMMUNICATING ALGORITHMS.
452.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
SYMBOL
NAME
FUNCTION
TERMINAL
REPRESENTS THE BEGINNING OR END OF A PROGRAM
REPRESENTS THE FLOW OF LOGIC. THE HUMPS ON THE
HORIZONTAL ARROW INDICATE THAT IT PASSES OVER AND
DOES NOT CONNECT WITH THE VERTICAL FLOWLINES
FLOWLINES
REPRESENTS CALCULATIONS OR DATA MANIPULATIONS
PROCESS
REPRESENTS INPUTS OR OUTPUTS OF DATA AND
INFORMATION
INPUT/OUTPUT
REPRESENTS A COMPARISON, QUESTION, OR DECISION
THAT DETERMINES ALTERNATIVE PATHS TO BE FOLLOWED
DECISION
JUNCTION
REPRESENTS THE CONFLUENCES OF FLOWLINES
OFF-PAGE CONNECTOR
REPRESENTS A BREAK THAT IS CONTINUED ON ANOTHER
PAGE
USED FOR LOOPS WHICH REPEAT A PRESPECIFIED NUMBER
OF ITERATIONS
COUNT-CONTROLLED LOOP
462.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
PSEUDOCODE FOR A DUMB VERSION OF EULERS METHOD
SET INTEGRATION RANGE
xi 0
xf 4
INITIALIZE VARIABLES
x xi
y 1
SET STEP SIZE AND DETERMINE NUMBER OF
CALCULATION STEPS
dx 0.5
nc (xf - xi)/dx
OUTPUT INITIAL CONDITION
PRINT x, y
LOOP TO IMPLEMENT EULERS METHOD AND SISPLAY
RESULTS
DO i 1, nc
dydx - 2 x3 12 x2 20 x 8.5
y y dydx dx
x x dx
PRINT x, y
END DO
END
472.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
START
xo, xf, yo, dx
i 0 .. nc
(dydx)i - 2 xi3 12 xi2 20 xi 8.5
yi1 yi (dydx)i dx
xi1 xi dx
Xi1, yi1
No
Yes
igt nc
END
482.- PROCESS MODELLING (SOLVING THE MODEL,
NUMERICAL METHOD)
PROGRAMME LANGUAGE
FORTRAN, BASIC / VISUAL BASIC, PASCAL / OBJECT
PASCAL, C / C .
COMMERCIAL PACKAGE
MS EXCEL, MATLAB, MATHCAD
PROCESS SIMULATION PROGRAMS
ASPEN, HYSYS, FLUENT
9.- ADJUST MODEL PARAMETERS
10.- VALIDATE THE MODEL