17.01.2015 Views

GPS-X Technical Reference

GPS-X Technical Reference

GPS-X Technical Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

431 Miscellaneous<br />

The Gear's Stiff routine is a self-tuning algorithm that adapts itself to rapidly<br />

changing derivatives - in some cases though it might require excessive simulation<br />

time to cross a discontinuity in the model. The Runge-Kutta-Fehlberg(1)<br />

algorithm is exactly the opposite - it is very forgiving for discontinuities, but<br />

experiences difficulties with steeper problems. A good compromise between<br />

these two solvers is the Adams-Moulton algorithm. It is very robust and does not<br />

give up easily but it is slower. The Runge-Kutta-Fehlberg(2) algorithm is almost<br />

identical to Runge-Kutta-Fehlberg(1), but is more robust.<br />

<br />

<br />

<br />

<br />

It is possible to monitor the step sizes used by the integration algorithm during a<br />

run. You can either print the values to the Log window by entering the following<br />

command at the command line in the Simulation Control window: output<br />

truecssitg or place the variable truecssitg on an output graph. You can select<br />

truecssitg for display in the<br />

General Data > System > Display Variables > General program variables form<br />

(it is labeled as Average integration step size). The average integration step size<br />

(truecssitg) is calculated over each communication interval. Start your<br />

simulation using a small communication interval (~0.01 or less). Sharp drops in<br />

truecssitg usually signal a discontinuity. Using the above method, the Sum of<br />

absolute values of the derivatives (dsum) can also be checked for sharp changes.<br />

If your simulation is slow you can find which variable makes the simulation slow<br />

by selecting the Fullinfo option in the Options>Set up>Information menu of the<br />

Simulation Control window, and running the simulation using either the dams-<br />

Moulton or Gear’s Stiff integration algorithms. The error summary displayed at<br />

the end of the run in the Log window will point to the variable that controls the<br />

step size.<br />

The integration of systems with low DO (dissolved oxygen) concentrations (in<br />

the range of a few dozen micrograms) is time consuming because the integration<br />

algorithm has to cut back on the step size or risk running into negative DO<br />

values.<br />

Sometimes the integration algorithms have difficulty at the start of a simulation.<br />

In such cases the initial concentrations of the state variables may be<br />

inappropriate, resulting in large initial derivative values. In this case the variable<br />

step integration algorithms keep cutting back on the step size to go over this<br />

initial bump. It may be helpful to use the steady-state solver to determine the<br />

initial conditions.<br />

<strong>GPS</strong>-X <strong>Technical</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!