= Description = To 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 differential algebraic equations systems, [[BR]]whose state vector can be separated into a dynamic part and algebraic part. If this is not possible {{{IDACalcIC()}}} generates the exception {{{ ECapeUnknown in IDASolver (Diana) startIntegrator, IDACalcIC failed }}} '''''ICSolver''''' can calculate initial conditions for systems without any conversions of the equations.[[BR]] [attachment:ICSolver.pdf "Mathematical and programming explanations of ICSolver implementation (pdf)"] = Example = [attachment:AdsColumn.mdl "Adsorption column model"] contains the equations system[[BR]] [attachment:AdsColumn_error.py "Python script with calling standard IDACalcIC() method"] generates the exception[[BR]] [attachment:AdsColumn.py "Python script with using ICSolver and nonzero output verbosity level"] shows the initial state vector and message {{{ ICSolver: Consistent initial conditions have been found }}} == Additional information == {{{ eso.GetAllVariables() }}} returns state vector values of equation set object[[BR]] {{{ eso.GetAllResiduals() }}} returns vector of right hand side values of equations system with current values of state vector[[BR]] ''Note: With correct state vector initial values all residuals of equation set object should be equal to zeros'' == Additional examples == * Hafke reactor[[BR]] [attachment:HafkeReactor.py "script"] [attachment:HafkeReactor.tar "script + model + results"] * Cstr model[[BR]] [attachment:Cstr.py "script"] [attachment:Cstr.tar "script + model + results"] * MATLAB example[[BR]] [attachment:matlab.tar "files"]