0% found this document useful (0 votes)
3 views

Chapter0_intro_and_revision

This document serves as an introduction to advanced mathematical modeling for process engineers, focusing on differential equations (DEs) and their relevance in chemical engineering. It covers the basics of ordinary differential equations (ODEs), methods for solving them, and the importance of modeling with DEs in various engineering applications. The course will emphasize solving first-order and second-order DEs using analytical and numerical methods, particularly those pertinent to chemical engineering.

Uploaded by

Christine Kho
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Chapter0_intro_and_revision

This document serves as an introduction to advanced mathematical modeling for process engineers, focusing on differential equations (DEs) and their relevance in chemical engineering. It covers the basics of ordinary differential equations (ODEs), methods for solving them, and the importance of modeling with DEs in various engineering applications. The course will emphasize solving first-order and second-order DEs using analytical and numerical methods, particularly those pertinent to chemical engineering.

Uploaded by

Christine Kho
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Advanced Mathematical Modelling for Process Engineers

Chapter 0: Introduction and revision


MATH2052

Dr. Chengjie Cai


School of Mathematical Sciences

2022-23
Lecture 1  Introduction + recap of rst-order ODEs

Today, we will:
revise what dierential equations are, how to describe them, and what
it means to solve one;
revise solving rst-order ordinary dierential equations by separation of
variables and the integrating factor method;
appreciate how dierential equations are relevant to chemical
engineering.

Dr. Chengjie Cai (UoN) MATH2052 2022-23 2 / 20


Dierential equations
Consider a dependent variable (e.g. concentration, mass, temperature,
volume . . . ) that depends on one or more independent variables (e.g.
space, time).
A dierential equation (DE) is an equation that relates the dependent
variable to its derivative(s). For example:
dy d2 x dx
= 2y ; or 2
+4 − 6x = 3t 2 :
dx dt dt
If the dependent variable is a function of only one variable, the DE is
an ordinary dierential equation (ODE).
If the dependent variable is a function of more than one variable, the
DE is a partial dierential equation (PDE). For these, we need partial
@y
derivatives, e.g. = yx . An example of a PDE is
@x
@y @y
+ = xt 2 ; where y = y (x; t):
@x @t
Dr. Chengjie Cai (UoN) MATH2052 2022-23 3 / 20
Linearity

An ODE for y (x) is linear if:


there are no non-linear functions of y or its derivatives (e.g. ),
y -dependent terms do not appear multiplied together (e.g. ).
Otherwise, the ODE is `non-linear'.
Examples:
„ «3
d2 y dy
+5 − 4y = ex is
dx 2 dx
d2 y dy
2
+ 10 = 6y is
dx dx
dy
y + x3 = 0 is
dx
dy
+ 4x 3 y = e4x is
dx

Dr. Chengjie Cai (UoN) MATH2052 2022-23 4 / 20


Order and homogeneity
The order of a DE is the highest derivative occurring in the equation.
For example:
d2 y dy
+6 − 10y = 0
dx 2 dx

dy
3 + 4xy 3 = 0
dx

A linear DE is homogeneous if all terms contain the dependent variable, say


y (x); i.e. if all terms involving y (x) are placed on the LHS of the equation,
then the DE is homogeneous if the RHS is zero.
d2 y dy
2
+6 − 10y = 0
dx dx

d2 y dy
2
+6 − 10y = x 2
dx dx
Dr. Chengjie Cai (UoN) MATH2052 2022-23 5 / 20
Solving a DE

Solving a DE means nding the dependent variable (say, y ) as a function of


the independent variable (say, x ).
For example, the DE
dy
+ y = 2x (1)
dx
has general solution y = ce−x + 2x − 2, where c is a constant.
Let's check via substitution that this is indeed the solution!

dy
y = ce−x + 2x − 2 → =
dx

The LHS of equation (1) becomes:

Dr. Chengjie Cai (UoN) MATH2052 2022-23 6 / 20


Why do chemical engineers care?
DEs crop up a lot in chemical engineering; many chemical engineering
processes can be modelled using DEs.
Example 1 - Mixing
dc 1 c
= − ;
dt 40 10

c(0) = 0:

This ODE gives the concentration of dye in the tank over time, denoted
c(t), where water and dye are both owing into the tank at dierent rates,
and a mixture is owing out of the tank (see diagram).
Solving this ODE gives us c(t); an expression for the concentration of dye
at any point in time.
Dr. Chengjie Cai (UoN) MATH2052 2022-23 7 / 20
Why do chemical engineers care?

Example 2 - A mechanical pressure indicating device

d2 „ d„
a2 2
+ a1 + a0 „ = p(t);
dt dt

„(0) = 0:

This ODE gives the output signal over time, denoted „(t), of a device
measuring the pressure p(t) of a system.
Solving this ODE gives us „(t); an expression for the output signal at any
point in time. This allows us to monitor uctuations in pressure.
Dr. Chengjie Cai (UoN) MATH2052 2022-23 8 / 20
Why do chemical engineers care?

Example 3 - Diusion

@2C @2C @2C


„ «
@C
=D + + :
@t @x 2 @y 2 @z 2

This PDE gives the concentration of a substance over time, denoted


C(x; y ; z; t), given that the substance diuses.
Solving this PDE, subject to initial data, gives us C(x; y ; z; t); an
expression for the concentration at any point in space and time.
This PDE is called the diusion/heat equation and can be used to model
the diusion of many physical quantities; in particular, concentration, mass
and temperature.
Dr. Chengjie Cai (UoN) MATH2052 2022-23 9 / 20
Modelling with dierential equations

Using DEs to model systems, processes and physical phenomena is


aptly termed modelling with dierential equations.
Given that DEs crop up a lot in chemical engineering, it is very
important for us to be able to solve and analyse DEs.
In example 1, we may wish to know how long it will take for the
concentration c(t) to reach a particular value . . . we cannot work this
out from the DE, but we can from the solution to the DE.
The general process for modelling with DEs is:
Derive the model, based on knowledge of the relevant processes and
phenomena.
Solve the model; i.e. get an expression for the dependent variable.
Use the solution to learn about the behaviour of the system.
Sometimes a solution may not come out as `sensible' or physically
possible, in which case we may need to rene our model.

Dr. Chengjie Cai (UoN) MATH2052 2022-23 10 / 20


Solving a rst-order ODE via separation of variables
First-order ODEs are usually written in the canonical form
dy
= f (x; y ), where f is a given function.
dx
Sometimes, the function f `separates' into the product of a function of
x and a function of y .

The ODE then becomes


Rearranging and integrating both sides with respect to x :

(2)

Or equivalently:
(3)

Dr. Chengjie Cai (UoN) MATH2052 2022-23 11 / 20


Separation of variables  example
The LHS of equation (3) only depends on y , and the RHS only depends on
x . Therefore, we can do both integrals independently, and then hopefully
rearrange to get the solution in the form y = y (x).
dy √
Example: Find the general solution of = x y.
dx
Solution: From equation (3), we get

Hence,

where is an arbitrary constant.


Finally, squaring both sides:
Dr. Chengjie Cai (UoN) MATH2052 2022-23 12 / 20
Solving a rst-order ODE via the integrating factor method
dy
To solve a rst-order ODE of the form + p(x)y = q(x),
dx
we multiply both sides by the integrating factor e :
R
p(x) dx

„ «
R
p(x) dx dy R
p(x) dx
e + p(x)y =e q(x):
dx

From the product rule (in reverse), we can re-write the LHS of the ODE:
R
p(x) dx
=e q(x):

We can then integrate both sides with respect to x , and hopefully


rearrange to get the solution in the form y = y (x).

Dr. Chengjie Cai (UoN) MATH2052 2022-23 13 / 20


The integrating factor method  example
dy
Find the general solution of − 2y = ex .
dx
Solution:
We identify p(x) = ; q(x) = .
The integrating factor is

This becomes

→ for arbitrary constant c:


Dr. Chengjie Cai (UoN) MATH2052 2022-23 14 / 20
General solutions v.s. particular solutions

When we solve a rst-order ODE, we get a constant of integration,


say c .
This gives us a `family' of solutions, where every possible value of c is
a valid solution (see this Desmos graph).
The solution with an arbitrary constant of integration is called the
general solution.

If we specify a point that the solution has to go through, we can x


the value of c .
For example, let's specify for the solution in the previous example that
when x = 0, y = 0. We substitute these values into the solution:

Therefore, the particular solution that passes through (0; 0) is


y (x) = (check with the Desmos graph).
Dr. Chengjie Cai (UoN) MATH2052 2022-23 15 / 20
Boundary conditions and initial conditions
To obtain a particular solution, we must specify additional information
to allow us to x the constant of integration.
In the mixing example, it was stated that c(0) = 0; the concentration
of dye at time t = 0 is zero.
Typically, we state a condition for either the dependent variable or its
derivative at a particular value of the independent variable.
If the independent variable is zero, the condition is called an initial
condition (IC).
If the independent variable is not zero, the condition is called a
boundary condition (BC).

For an nth -order DE, there will be n constants of integration (can you
see why?).
Therefore to get a particular solution, we will need n distinct
conditions on the dependent variable (more on this later).
Dr. Chengjie Cai (UoN) MATH2052 2022-23 16 / 20
Linear v.s. nonlinear DEs

We can solve some DEs using analytical (pen-and paper) techniques.


However, for complicated non-linear DEs, nding an exact solution can
be very dicult, if not impossible.
For example, imagine trying to solve
y y 0 − x 2 y 3 = cos(xy )!1

Instead, we can approximate the solution using numerical methods.


Many numerical methods are iterative; an initial condition is used as a
starting point and a solution is built from it, step by step, using a
repeated rule.

1
Don't worry; this ODE makes me want to cry too.
Dr. Chengjie Cai (UoN) MATH2052 2022-23 17 / 20
The objectives of this course

In this course, we will learn how to solve:


rst-order DEs,
systems of coupled rst-order DEs,
second-order DEs,
using various analytical and numerical methods.

We will focus on ODEs for this semester and rst half of the Spring
semester, and PDEs for the second half of the Spring semester.

We will also be focusing on DEs that are relevant to chemical


engineering (e.g. see Problem Sheet Py5).

In the Python workshops, we will learn how to write programs that will
automate numerical methods for us (very useful!).

Dr. Chengjie Cai (UoN) MATH2052 2022-23 18 / 20


Lecture 1  summary
DEs appear a lot in chemical engineering, so are worth studying.
A DE for dependent variable y (x) is linear if (i) there are no non-linear
functions of y and (ii) there are no y terms multiplied together.
The order of a DE is the highest derivative present.
A linear DE is homogeneous if all terms contain the dependent
variable.

First-order ODEs of the form y 0 = g (x)h(y ) can be solved using


separation of variables.
First-order ODEs of the form y 0 + p(x)y = q(x) can be solved using
the integrating factor method.
For DEs that are dicult/impossible to solve exactly, we can
approximate the solution using numerical methods.

Dr. Chengjie Cai (UoN) MATH2052 2022-23 19 / 20


Lecture 1  optional feedback question
Find the particular solution of the mixing example from earlier:

dc 1 c
= − ;
dt 40 10

c(0) = 0:

(a,b) Use both separation of variables and the integrating factor method.
(c) Sketch the graph of the solution and comment briey on it.

Dr. Chengjie Cai (UoN) MATH2052 2022-23 20 / 20

You might also like