Modelování 6A: Polovsádkový reaktor (DAE)

Určení DAE indexu soustavy

Matematický model vsádkového reaktoru pro 4 složky

\begin{aligned}\displaystyle  &V\frac{\mathrm{d}c_i}{\mathrm{d}t}+c_i\frac{\mathrm{d}V}{\mathrm{d}t}    = c_i^\mathrm{in}\dot{V}^\mathrm{in} + r_i V \quad i \in (\text{A, B, C, D})\\  &\sum_{i \in (\text{A, B, C, D})} \frac{c_i M_i}{\rho_i} = 1\end{aligned}

můžeme napsat v maticovém tvaru

\displaystyle\mathbf{M}(t,\mathbf{y}) \frac{\mathrm{d}\mathbf{y}}{\mathrm{d}t} = \mathbf{f}(t,\mathbf{y})

takto

\begin{bmatrix}  V & 0 & 0 & 0 & c_\mathrm{A} \\  0 & V & 0 & 0 & c_\mathrm{B} \\  0 & 0 & V & 0 & c_\mathrm{C} \\  0 & 0 & 0 & V & c_\mathrm{D} \\  0 & 0 & 0 & 0 & 0  \end{bmatrix}  \begin{bmatrix}  \mathrm{d}c_\mathrm{A}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{B}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{C}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{D}/\mathrm{d}t \\  \mathrm{d}V/\mathrm{d}t  \end{bmatrix} =  \begin{bmatrix}  c_\mathrm{A}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{A}V \\  c_\mathrm{B}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{B}V \\  c_\mathrm{C}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{C}V \\  c_\mathrm{D}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{D}V \\  1-\sum_{i\in(\text{A, B, C, D})}c_i M_i /\rho_i  \end{bmatrix}  .

Vidíme, že matice M je kvůli poslední rovnici singulární, jedná se tedy o DAE. Index je definován jako počet derivací algebraických rovnic, které je nutné provést, abychom DAE převedli na ODE. Derivace poslední, algebraické, rovnice je

\displaystyle  \frac{\mathrm{d}c_\mathrm{A}}{\mathrm{d}t} \frac{M_\mathrm{A}}{\rho_\mathrm{A}} +  \frac{\mathrm{d}c_\mathrm{B}}{\mathrm{d}t} \frac{M_\mathrm{B}}{\rho_\mathrm{B}} +  \frac{\mathrm{d}c_\mathrm{C}}{\mathrm{d}t} \frac{M_\mathrm{C}}{\rho_\mathrm{C}} +  \frac{\mathrm{d}c_\mathrm{D}}{\mathrm{d}t} \frac{M_\mathrm{D}}{\rho_\mathrm{D}} = 0  .

Nahradíme-li v modelu algebraickou rovnici její derivací, dostaneme

\begin{bmatrix}  V & 0 & 0 & 0 & c_\mathrm{A} \\  0 & V & 0 & 0 & c_\mathrm{B} \\  0 & 0 & V & 0 & c_\mathrm{C} \\  0 & 0 & 0 & V & c_\mathrm{D} \\  M_\mathrm{A}/\rho_\mathrm{A} & M_\mathrm{B}/\rho_\mathrm{B} & M_\mathrm{C}/\rho_\mathrm{C} & M_\mathrm{D}/\rho_\mathrm{D} & 0  \end{bmatrix}  \begin{bmatrix}  \mathrm{d}c_\mathrm{A}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{B}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{C}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{D}/\mathrm{d}t \\  \mathrm{d}V/\mathrm{d}t  \end{bmatrix} =  \begin{bmatrix}  c_\mathrm{A}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{A}V \\  c_\mathrm{B}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{B}V \\  c_\mathrm{C}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{C}V \\  c_\mathrm{D}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{D}V \\ 0  \end{bmatrix}  .

Pomocí Gaussovy eliminace se podívejme, zda je matice M stále singulární. Přičteme-li k poslednímu řádku postupně -Mi/(ρiV) násobky všech předchozích řádků, a výsledek násobíme V, získáme

\begin{bmatrix}  V & 0 & 0 & 0 & c_\mathrm{A} \\  0 & V & 0 & 0 & c_\mathrm{B} \\  0 & 0 & V & 0 & c_\mathrm{C} \\  0 & 0 & 0 & V & c_\mathrm{D} \\  0 & 0 & 0 & 0 & \sum_{i \in (\text{A,B,C,D})}\frac{c_i M_i}{\rho_i}  \end{bmatrix}  \begin{bmatrix}  \mathrm{d}c_\mathrm{A}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{B}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{C}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{D}/\mathrm{d}t \\  \mathrm{d}V/\mathrm{d}t  \end{bmatrix} =  \begin{bmatrix}  c_\mathrm{A}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{A}V \\  c_\mathrm{B}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{B}V \\  c_\mathrm{C}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{C}V \\  c_\mathrm{D}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{D}V \\  \sum_{i \in (\text{A, B, C, D})}\left[(c_\mathrm{i}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{i}V)\frac{M_i}{\rho_i}\right]  \end{bmatrix}  .

Rovnici múžeme zjednodušit, pokud si všimneme, že výraz v posledním řádku matice je roven 1 (viz stavová rovnice)

\begin{bmatrix}  V & 0 & 0 & 0 & c_\mathrm{A} \\  0 & V & 0 & 0 & c_\mathrm{B} \\  0 & 0 & V & 0 & c_\mathrm{C} \\  0 & 0 & 0 & V & c_\mathrm{D} \\  0 & 0 & 0 & 0 & 1  \end{bmatrix}  \begin{bmatrix}  \mathrm{d}c_\mathrm{A}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{B}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{C}/\mathrm{d}t \\  \mathrm{d}c_\mathrm{D}/\mathrm{d}t \\  \mathrm{d}V/\mathrm{d}t  \end{bmatrix} =  \begin{bmatrix}  c_\mathrm{A}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{A}V \\  c_\mathrm{B}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{B}V \\  c_\mathrm{C}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{C}V \\  c_\mathrm{D}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{D}V \\  \sum_{i \in (\text{A, B, C, D})}\left[(c_\mathrm{i}^\mathrm{in} \dot{V}^\mathrm{in} + r_\mathrm{i}V)\frac{M_i}{\rho_i}\right]  \end{bmatrix}  .

Vidíme, že matice M je regulární a že pomocí zpětné substituce již snadno odvodíme soustavu obyčejných diferenciálních rovnic. Jelikož jsme k transformaci DAE na ODE potřebovali jednou derivovat, lze tento příspěvek uzavřít s tím, že DAE index našeho modelu je roven 1.

Print This Post Print This Post

Published by

Zdenek Grof

I am administrator of this site.

Leave a Reply

Your email address will not be published. Required fields are marked *