Sunteți pe pagina 1din 8

Topics 6 and 7: Engineering systems modelling: Ordinary

Differential Equations (ODEs)


ODEs in Chemical Engineering
As was discussed in the previous document, calculus brought
about a revolution to the way engineering problems are solved.
Indeed, without it, it would have been impossible to develop the
vast majority of the advances seen today in engineering.
If you refer to the second example in Topic 5, the half-life of a
certain compound was predicted through the use of separation of
variables in an equation involving derivatives and independent
variables, an ordinary differential equation. It was solved
analytically, that is, yielding an answer with an accuracy as good
as the calculator you are using. In this document, we will only consider analytical solutions.
You may be familiar with some ordinary differential equations. Perhaps the most famous
example is Newtons second law of motion:
2 ()

= (())
2
Chemical engineering modelling often involves the use of more than one differential equation
when modelling a system. Following the laws of conservation of energy, momentum and
mass, it is common to see differential equations being formulated around these.
These differential equations are normally set with respect to time, with general form:

= (())

where is any variable, and represents time.


If the system is steady-state, with variables not changing over time, then we set these
differential equations equal to 0. This is a common occurrence.
For example, in continuous processes; because mass in = mass out, we say that the
amount of mass in the system is constant, there is no change. Recalling that the derivative is
set to show a change with respect to time, then its value will be 0 (since there is no change
in the total amount of mass in the system with respect to time, regardless of mass entering
or leaving the system).
The general macroscopic balance equation (for energy, mass and momentum) is
represented by an ODE:
Rate of accumulation of property = Rate of Input of property Rate of Output of property +
Rate of generation of property.
For example, mass balances are modelled as ODEs as follows:

= +

The rate of mass generation is included to follow the general form of macroscopic balance
equations but is set to 0 unless we are considering nuclear reactions, which is beyond the
scope of your first year.

Solving ODEs analytically is also partially dependent on the


format of the information given. Generally speaking, there are
two types of problem:

Initial Value Problems (IVPs)


Boundary Value Problems (BVPs)

The main difference, as you will see in the example below, lies
on the fact that IVPs give two conditions under the same value
for the specified variable, whilst in BVPs they are different.
So, for a problem: = ;

an IVP would state the conditions as follows: (0) =


1, (0) = 0
a BVP would state the conditions as follows: (0) = 1, (5) = 0

In many cases, one of the conditions can be assumed without it being stated specifically.
For example, if water is falling on an initially empty tank, it should be immediately clear that
at t = 0, the height, h, of water in the tank will also be 0.

The following question is extracted from Applied Mathematical Methods for Chemical Engineers,
Second Edition (Norman W. Loney)

Page 15 example 2.1


Example
Water containing 0.5kg of salt per litre is poured into a
tank at a rate of 2 L/min, and the well-stirred mixture
leaves the tank at the same rate. After 10 min, the
process is stopped and fresh water is poured into the tank
at the rate of 2 L/min, with the new mixture leaving at
2L/min. Determine the amount of salt in the tank at the
end of 20 min if there were 100L of pure water in the tank
initially.
Hint: Rate of accumulation = Rate of input Rate of
output
Solution
100

0.5 2
2
=(
)(
) (
)

min
min

Initially having (0) = 0


So we rewrite as:

1
1
+ =

50
100
Finding the integrating factor as:
1

() = 50 = 50
And the equation is rewritten as:

( 50 )

() =

1
50
100

50
+ 50
100

With a being the integrating constant. Hence using the initial condition (0) = 0, we get:
() =

50
(1 50 )
100

So at t=10:
(10) =

10
50
(1 50 )
100

And so after the 10min period the water input would change to pure so the equation would
reduce to Rate of accumulation = - Rate of output with the new initial condition of:

(10) =

10
50
(1 50 )
100

Thus:
100

= 2

Thus solving the above gives:

() = 50
Where b is the integrating factor. Using the initial condition, we obtain:
10
10
1
= (1 50 ) 50
2

Therefore, at t=20 or after 10 min in the secondary conditions, the concentration of salt is:
10
10
1
(20) = (1 50 ) 50
2

And the amount of (kg) of salt in the tank at the end of this time period is:
100 (20) = 50(1 0.2 ) 0.2
= 7.42 kg

The following questions are partially extracted from Stewart Calculus, Applications of Second-Order
Differential Equations, Example 3 and CasaXPS Mechanics 3 Rev 12

Example
Analysis of electrical circuits can also be done using second order differential equations.
In fact, Kirchhoffs voltage law can be written as:

2
1
+
+ = ()
2

A chemical engineer wants to measure the charge produced by a small prototype he has
built for a wind turbine at any time t when undergoing mild weather conditions. The initial
values for current and charge are both 0 (remember =

He measures the following values: = 40 , = 1 , = 16 104 () =


100 cos(10). Find the general solution for the charge at any time t.
Solution
Substituting into the equation:
2

+ 40
+ 625 = 100 cos(10)
2

Auxiliary equation: 2 + 40 + 625 = 0


Solving for roots: = 20 15
Hence, the complementary solution is: () = 20 (1 cos(15) + 2 sin(15))
For the particular solution:
() = cos(10) + sin(10)
() = 10 sin(10) + 10 cos(10)
() = 100 cos(10) 100 sin(10)
Equating coefficients yields that:
84

64

= 697 and = 697.


Hence, the general solution is given by:
() = 20 (1 cos(15) + 2 sin(15)) +

4
(21 cos(10) + 16 sin(10))
697

Remembering that () = 0 and () = 0 and differentiating the equation to substitute in


the second limit yields that:
1 =
Hence, at any time t:
() = 20 (

84
464
, 2 =
697
2091

84
464
4
cos(15)
sin(15)) +
(21 cos(10) + 16 sin(10))
697
2091
697

Example
The velocity and the acceleration of a particle has been formulated by the following second
order differential equation:
2

+5
+ 6 = 4
2

Given the initial conditions = 0,

= 4 = 0, find the equation of motion for the particle

with respect to time.


Solution
The auxiliary equation corresponding with our differential is:
2 + 5 + 6 = 0 ( + 3)( + 2) = 0
The complementary function is then given as:
() = 2 + 3
Since () = 4 cannot be constructed from () the PI can be chosen to be:
() =

=
=

Substituting back into the differential:


2

+5
+ 6 = + 5( ) + 6 = 2
2

And the particular integral must satisfy the differential equation:


2

+5
+ 6 = 4
2

Therefore:
4 2 4 = 2 = 2 () = 2
The general solution to our differential is then:
() = () + ()
() = 2 + 2 + 3
Applying the boundary conditions, we can find A and B to be:
0 = (0) = 2 0 2 2(0) 3 3(0) 2 + + = 0 ()

= 2 2 2 3 3

Therefore

= 4 = 0 results in the equation:


4 = 2 0 2 2(0) 3 3(0) 6 + 2 + 3 = 0 ()

Solving simultaneously results in A=0 and B= -2. Hence the particular equation is:
() =

Example
A particle of mass m, attached to a spring is subject to three forces:
1. A tension force 9

2. A damping force proportional to the velocity 2


3. A disturbing force 32

By applying Newtons second law of motion, express the displacement x in terms of time
t as a differential equation for the general solution x(t).
Hint: displacement can be obtained from the linear summation of the forces.
Solution
Newtons second law of motion F=ma allows three forces to be combined in the form:

= 9 2
+ 3 sin(2)
2

Cancel out the mass terms and rearrange to get:


2

+2
+ 9 = 3 sin(2) ()
2

Hence the complimentary function for our differential can be found by:
2

+2
+ 9 = 0 ()
2

Auxiliary equation being:


2 + 2 + 9 = 0 = 32 < 0
Thus the roots are in a complex form that makes the complementary function the form of:
() = (() + ())
Where:
=
=

2
=
= 1
2 2(1)

4 2 32
=
= 22
2
2(1)

() = ((22) + (22))
The particular integral of () for the function () = 3sin(2). Since the form for the
function ()matches () = 0 cos() + 1 sin() 0 = 0 = 2 particular integral
must be in the form () = 0 cos(2) + 1 sin(2) where both 0 1 must be determined
by substituting into the identity:
2

+2
+ 9 3 sin(2)
2

Given from () = 0 cos(2) + 1 sin(2)


= 20 sin(2) + 21 cos(2)

And
2
= 22 0 cos(2) + 22 1 sin(2) = 4(0 cos(2) + 1 sin(2))

Therefore:
2

+
2
+ 9
2

= 4(0 cos(2) + 1 sin(2)) + 2(20 sin(2) + 21 cos(2)) + 9(0 cos(2) + 1 sin(2))


3 sin(2) + 0 cos(2)
Collecting coefficients of cos(2t) and sin(2t):
Sin(2t): 41 40 + 91 = 3 51 40 = 3
5

cos(2t): 40 + 41 + 90 = 0 1 = 4 0
5
12
15
5 ( 0 ) 40 = 3 0 =
1 =
4
41
41

The particular integral for equation (a) is therefore:


() =

12
15
cos(2) + sin(2)
41
41

With general solution


() = () + ()
() = [ ((22) + (22)] + [

12
15
cos(2) + sin(2)]
41
41

S-ar putea să vă placă și