Set 1 – Linear Equations Preliminaries Using appropriate functions

Set 1 – Linear Equations
Preliminaries
Using appropriate functions in Matlab create following matrices:
1
2 3 4 5
a) 𝐴 = [ 5
4 3 2 1]
βˆ’2 βˆ’1 0 1 2
1 3
5 7 9
b) 𝐡 = [
]
0.5 1 1.5 2 2.5
c) 5x4 elements matrix C filled with pseudorandom numbers from interval <0,2>,
d) Visualize matrix C,
e) Using matrix A from a) create:
f) vector A1 of elements being a second row of matrix A,
g) matrix A2 created from columns from 2 to 5 of matrix A,
h) matrix A3 created from columns from 3 to 5 from rows 2 and 3 of matrix A,
i) matrix A4 created from columns 1, 3 and 5 of matrix A
Problem 1
Using analytical methods calculate stoichiometric coefficients of following reaction:
𝑁𝑂3βˆ’ + π‘Žπ΄π‘™π‘‚2βˆ’ + 𝑏𝐻2 𝑂 β†’ 𝑁𝐻3 + π‘Žπ΄π‘™ + 𝑐𝑂𝐻 βˆ’
Derive:
a)
b)
c)
d)
e)
f)
g)
h)
i)
j)
matrix equation Ax = b of the above problem,
rank of matrix A,
determinant of matrix A,
eigenvalues of matrix A,
trace of matrix A,
inverse of matrix A,
minimal element of matrix A,
sum of all elements of matrix A,
sum of elements on diagonal of matrix A,
calculate analytically above problem with the help of MATLAB.
Solution: a = -8, b = 2, c = -5
Problem 2
Using numerical methods derive stoichiometric coefficient of the following reaction (β€žBlakley’s
equation”):
𝐻2 + π‘ŽπΆπ‘Ž(𝐢𝑁)2 + π‘π‘π‘Žπ΄π‘™πΉ4 + 𝑐𝐹𝑒𝑆𝑂4 + 𝑑𝑀𝑔𝑆𝑖𝑂3 + 𝑒𝐾𝐼 + 𝑓𝐻3 𝑃𝑂4 + π‘”π‘ƒπ‘πΆπ‘Ÿπ‘‚4 + β„Žπ΅π‘ŸπΆπ‘™ + 𝑖𝐢𝐹2 𝐢𝑙2
+ 𝑗𝑆𝑂2 β†’
π‘˜π‘ƒπ‘π΅π‘Ÿ2 + π‘™πΆπ‘ŸπΆπ‘™3 + π‘šπ‘€π‘”πΆπ‘‚3 + 𝑛𝐾𝐴𝑙(𝑂𝐻)4 + π‘œπΉπ‘’(𝑆𝐢𝑁)3 + 𝑝𝑃𝐼3 + π‘Ÿπ‘π‘Ž2 𝑆𝑖𝑂3 + π‘ πΆπ‘ŽπΉ2 + 𝑑𝐻2 𝑂
Analyse results.
Solution:
88 H2 + 15 Ca(CN)2 + 6 NaAlF4 + 10 FeSO4 + 3 MgSiO3 + 6 KI + 2 H3PO4 + 6 PbCrO4 + 12 BrCl + 3
CF2Cl2 + 20 SO2 = 6 PbBr2 + 6 CrCl3 + 3 MgCO3 + 6 KAl(OH)4 + 10 Fe(SCN)3 + 2 PI3 + 3 Na2SiO3 +
15 CaF2 + 79 H2O
Problem 3
a) introductionary example
1. Write down a mass balance equation for given reactor system.
2. Compute the unknown concentration 𝑐3 of the outgoing flow 3.
Solution:
𝑄1 𝑐1 + 𝑄2 𝑐2 = 𝑄3 𝑐3
b) Reactors set
Let us consider a set of five steady state reactors with no accumulation as depicted in the figure below:
1. The following problem is related with:
a) Linear equation,
b) Set of linear equations, (correct)
c) Nonlinear equation,
d) Set of nonlinear equations.
2. Using numerical methods calculate compute the unknown concentration 𝑐1 , 𝑐2 , 𝑐3 , 𝑐4 , 𝑐5 in the
reactors.
Solution:
5𝑐1 βˆ’ 𝑐3 = 50
βˆ’2𝑐1 + 3𝑐2 = 0
βˆ’π‘2 + 9𝑐3 = 200
βˆ’π‘2 βˆ’ 8𝑐3 + 11𝑐4 βˆ’ 2𝑐5 = 0
βˆ’3𝑐1 βˆ’ 𝑐2 + 4𝑐5 = 0
C = [14.66 9.77 23.31 20.28 13.44] mg/m3