wiki:DianaICSolver

Version 8 (modified by miroshkin, 14 years ago) (diff)

--

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.
Standard IDACalcIC() method of Sundials package can calculate consistent initial conditions for differential algebraic equations systems,
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.

Example

Adsorption column model contains the equations system
Python script with calling standard IDACalcIC() method generates the exception
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
eso.GetAllResiduals() returns vector of right hand side values of equations system with current values of state vector
Note: With correct state vector initial values all residuals of equation set object should be equal to zeros

Additional examples

Attachments (11)