ChEn-3170: Computational Methods in Chemical Engineering Spring 2020 UMass Lowell; Prof. V. F. de Almeida 23Mar20
$ \newcommand{\Amtrx}{\boldsymbol{\mathsf{A}}} \newcommand{\Bmtrx}{\boldsymbol{\mathsf{B}}} \newcommand{\Cmtrx}{\boldsymbol{\mathsf{C}}} \newcommand{\Mmtrx}{\boldsymbol{\mathsf{M}}} \newcommand{\Smtrx}{\boldsymbol{\mathsf{S}}} \newcommand{\Imtrx}{\boldsymbol{\mathsf{I}}} \newcommand{\Pmtrx}{\boldsymbol{\mathsf{P}}} \newcommand{\Qmtrx}{\boldsymbol{\mathsf{Q}}} \newcommand{\Lmtrx}{\boldsymbol{\mathsf{L}}} \newcommand{\Umtrx}{\boldsymbol{\mathsf{U}}} \newcommand{\xvec}{\boldsymbol{\mathsf{x}}} \newcommand{\yvec}{\boldsymbol{\mathsf{y}}} \newcommand{\zvec}{\boldsymbol{\mathsf{z}}} \newcommand{\avec}{\boldsymbol{\mathsf{a}}} \newcommand{\bvec}{\boldsymbol{\mathsf{b}}} \newcommand{\cvec}{\boldsymbol{\mathsf{c}}} \newcommand{\rvec}{\boldsymbol{\mathsf{r}}} \newcommand{\gvec}{\boldsymbol{\mathsf{g}}} \newcommand{\norm}[1]{\bigl\lVert{#1}\bigr\rVert} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\abs}{abs} $
your name
¶Context | Points |
---|---|
Precision of the answer | 80% |
Answer Markdown readability | 10% |
Code readability | 10% |
'''1.1 Import reaction mechanism'''
r0 : SiH4 <=> SiH2 + H2 r1 : SiH4 <=> SiH3 + H r2 : SiH4 + SiH2 <=> Si2H6 r3 : Si2H4 + H2 <=> SiH4 + SiH2 r4 : SiH4 + H <=> SiH3 + H2 r5 : SiH4 + SiH3 <=> Si2H5 + H2 r6 : SiH4 + SiH <=> SiH3 + SiH2 r7 : SiH4 + SiH <=> Si2H5 r8 : SiH4 + Si <=> 2 SiH2 r9 : Si + H2 <=> SiH2 r10 : SiH2 + SiH <=> Si2H3 r11 : SiH2 + Si <=> Si2H2 r12 : SiH2 + Si3 <=> Si2H2 + Si2 r13 : H2 + Si2H2 <=> Si2H4 r14 : H2 + Si2H4 <=> Si2H6 r15 : H2 + SiH <=> SiH3 r16 : H2 + Si2 <=> Si2H2 r17 : H2 + Si2H3 <=> Si2H5 r18 : Si2H2 + H <=> Si2H3 r19 : Si + Si3 <=> 2 Si2 n_reactions = 20
'''1.2 Species and stoichiometric data'''
['Si2H5', 'SiH4', 'Si2', 'Si2H2', 'SiH2', 'Si3', 'SiH', 'Si2H4', 'Si', 'Si2H3', 'SiH3', 'H2', 'H', 'Si2H6'] # species = 14 s_mtrx = [[ 0. -1. 0. 0. 1. 0. 0. 0. 0. 0. 0. 1. 0. 0.] [ 0. -1. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 1. 0.] [ 0. -1. 0. 0. -1. 0. 0. 0. 0. 0. 0. 0. 0. 1.] [ 0. 1. 0. 0. 1. 0. 0. -1. 0. 0. 0. -1. 0. 0.] [ 0. -1. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. -1. 0.] [ 1. -1. 0. 0. 0. 0. 0. 0. 0. 0. -1. 1. 0. 0.] [ 0. -1. 0. 0. 1. 0. -1. 0. 0. 0. 1. 0. 0. 0.] [ 1. -1. 0. 0. 0. 0. -1. 0. 0. 0. 0. 0. 0. 0.] [ 0. -1. 0. 0. 2. 0. 0. 0. -1. 0. 0. 0. 0. 0.] [ 0. 0. 0. 0. 1. 0. 0. 0. -1. 0. 0. -1. 0. 0.] [ 0. 0. 0. 0. -1. 0. -1. 0. 0. 1. 0. 0. 0. 0.] [ 0. 0. 0. 1. -1. 0. 0. 0. -1. 0. 0. 0. 0. 0.] [ 0. 0. 1. 1. -1. -1. 0. 0. 0. 0. 0. 0. 0. 0.] [ 0. 0. 0. -1. 0. 0. 0. 1. 0. 0. 0. -1. 0. 0.] [ 0. 0. 0. 0. 0. 0. 0. -1. 0. 0. 0. -1. 0. 1.] [ 0. 0. 0. 0. 0. 0. -1. 0. 0. 0. 1. -1. 0. 0.] [ 0. 0. -1. 1. 0. 0. 0. 0. 0. 0. 0. -1. 0. 0.] [ 1. 0. 0. 0. 0. 0. 0. 0. 0. -1. 0. -1. 0. 0.] [ 0. 0. 0. -1. 0. 0. 0. 0. 0. 1. 0. 0. -1. 0.] [ 0. 0. 2. 0. 0. -1. 0. 0. -1. 0. 0. 0. 0. 0.]] m x n = (20, 14) matrix shape = (20, 14)
'''1.3 Compute rank'''
rank(S) = 12
$\gvec = \begin{pmatrix} -2.772 \\ 1.35 \\ 0.692 \\ -2.37 \\ -2.266 \\ -2.476 \\ 0.124 \\ -1.486 \\ -0.553 \\ 1.538 \\ -1.407 \\ -2.66 \\ -0.831 \\ -0.682 \end{pmatrix} $
for the species:
SiH, SiH2, Si3, SiH4, Si2H3, Si2, SiH3, Si2H5, H2, H, Si2H4, Si, Si2H2, Si2H6,
compute a reaction rates vector and make a plot. Use your own algorithms and explain your work, that is, what is the meaning of your computed reaction rate vector? What problem are you solving to obtain the reaction rate vector from the given production rate vector? Do the production rate equations have a solution?
'''1.4 Compute a reaction rates vector'''
species ['Si2H5', 'SiH4', 'Si2', 'Si2H2', 'SiH2', 'Si3', 'SiH', 'Si2H4', 'Si', 'Si2H3', 'SiH3', 'H2', 'H', 'Si2H6'] species production rates g_vec = [-1.486 -2.37 -2.476 -0.831 1.35 0.692 -2.772 -1.407 -2.66 -2.266 0.124 -0.553 1.538 -0.682] reaction rates r_vec= [ 0.083 -0.449 0.589 -0.406 -0.51 -0.342 0.775 0.35 0.662 0.579 0.386 1.236 -1.853 -0.335 0.183 0.692 -0.968 -0.12 -1.556 -0.306] ||r|| = 3.435e+00
'''1.4 Plot of reaction rates'''
Meaning of the computed reaction rates vector:
'''1.5 Find production rates for unique reaction rates'''
reaction rates r_vec= [-0.122 -0.845 -0.535 0.848 -0.059 -0.158 -0.231 -0.267 0.701 0.823 0.013 0.282 -0.504 -0.186 0.313 -0.109 0.008 -0.158 0.725 0.31 ] ||r|| = 2.045e+00 ||g - ST r|| = 9.13539e-09