Changes between Version 5 and Version 6 of DianaICSolver


Ignore:
Timestamp:
Sep 12, 2011, 2:36:16 PM (14 years ago)
Author:
miroshkin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DianaICSolver

    v5 v6  
    1 = Examples =
    2 == Models requiring ICSolver ==
     1= Description =
     2To simulate chemical or biological process in Diana the Initial Value Problem should be solved at first. A guess for initial conditions can be set in model file. [[BR]] Standard {{{ IDACalcIC() }}} method of Sundials package can calculate consistent initial conditions for homogeneous differential algebraic equations systems of the type
    33
    4 The following example shows how ICSolver can be used to find
    5 consistent initial conditions where just applying the standard
    6 IDA solver throws an exception:
     4{{{
     5#!html
     6<table border="0" width="50%" align="center">
     7<tr>
     8  <td align = "center" fontsize ="50%" width="90%">
     9  dx<sub>1</sub>/dt = f<sub>1</sub>(x<sub>1</sub>, x<sub>2</sub>, ..., x<sub>n</sub>, t)<br>
     10  dx<sub>2</sub>/dt = f<sub>2</sub>(x<sub>1</sub>, x<sub>2</sub>, ..., x<sub>n</sub>, t)<br>
     11             ...            <br>
     12  dx<sub>n</sub>/dt = f<sub>n</sub>(x<sub>1</sub>, x<sub>2</sub>, ..., x<sub>n</sub>, t)
     13  </td>
     14  <td align="center">(1)
     15  </td>
     16</tr>
     17</table>
     18}}}
    719
    8  * Adsorption column[[BR]]
    9    [attachment:AdsColumn.py "script"] [attachment:AdsColumn.tar "script + model + results"]
     20But in case of non-homogeneous differential algebraic equations systems of the type
     21
     22{{{
     23#!html
     24<table border="0" width="50%" align="center">
     25<tr>
     26  <td align = "center" fontsize ="50%" width="90%">
     27  F<sub>1</sub>(dx<sub>1</sub>/dt, dx<sub>2</sub>/dt, ..., dx<sub>n</sub>/dt) = f<sub>1</sub>(x<sub>1</sub>, x<sub>2</sub>, ..., x<sub>n</sub>, t)<br>
     28  F<sub>2</sub>(dx<sub>1</sub>/dt, dx<sub>2</sub>/dt, ..., dx<sub>n</sub>/dt) = f<sub>2</sub>(x<sub>1</sub>, x<sub>2</sub>, ..., x<sub>n</sub>, t)<br>
     29             ...            <br>
     30  F<sub>n</sub>(dx<sub>1</sub>/dt, dx<sub>2</sub>/dt, ..., dx<sub>n</sub>/dt) = f<sub>n</sub>(x<sub>1</sub>, x<sub>2</sub>, ..., x<sub>n</sub>, t)
     31  </td>
     32  <td align="center">(2)
     33  </td>
     34</tr>
     35</table>
     36}}}
     37
     38{{{IDACalcIC()}}} generates the exception
     39{{{
     40   ECapeUnknown in IDASolver (Diana) startIntegrator, IDACalcIC failed
     41}}}
     42
     43Consistent initial conditions for differential algebraic equations system  of type (2) can be found with {{{IDACalcIC()}}} method, but the system should be manually changed to form (1) before.[[BR]]
     44'''''ICSolver''''' can calculate initial conditions for systems of the type (2) without any conversions of the system.
     45
     46= Example =
     47
     48Adsorption column model contains the equations system of type (2) example[[BR]]
     49Python script with calling standard IDACalcIC() method generates the exception[[BR]]
     50Python script with using ICSolver and nonzero output verbosity level shows the initial state vector and message
     51
     52{{{
     53   ICSolver: Consistent initial conditions have been found
     54}}}
     55
     56== Additional information ==
     57
     58{{{ eso.GetAllVariables() }}} returns state vector values of model[[BR]]
     59{{{ eso.GetAllResiduals() }}} returns vector of right hand side values of equations system[[BR]]
     60With correct initial values of state vector for model equations all residuals should be equal to zeros.
    1061
    1162== Additional examples ==
     
    2172 * MATLAB (with comments)[[BR]]
    2273   [attachment:matlab.tar "files"]
    23