 /*-----------------------------------------------------------------------------------------
 LIBRARY: CLASE
 COMPONENT: Stiff
 PARTITION: Stiff
 EXPERIMENT: ExpInteg
 TEMPLATE: TRANSIENT
 CREATION DATE: 09/10/2016
-----------------------------------------------------------------------------------------*/

EXPERIMENT ExpInteg ON Stiff.Stiff
   DECLS
   OBJECTS
   INIT
      -- initial values for state variables

   BOUNDS
   BODY
      -- creates an ASCII file with the results in table format
      -- REPORT_TABLE("results.rpt", "*",TRUE)

      -- set the debug level (valid range [0,4])
      DEBUG_LEVEL= 1   
      -- select default integration solver
      IMETHOD= DASSL   
      -- Set flag to stop when bad numerical operation occurs (eg division by 0). By default do not stop.
      setStopWhenBadOperation(FALSE)
      -- set relative and absolute tolerance for DASSL solver (transient solver)
      REL_ERROR = 1e-006
      ABS_ERROR = 1e-006
      -- set relative tolerance for algebraics solver (steady solver)
      TOLERANCE = 1e-006
      -- when to report results 
      REPORT_MODE = IS_CINT -- by default report at every CINT time or event detection

      -- calculates a steady state
      --STEADY()

      -- calculates a transient integration
      TIME = 0
      TSTOP = 10
      CINT = 0.001
      INTEG()
END EXPERIMENT
