Tutorial 9   

Sensitivity Analysis

Problem Statement

With any model, one of the first exercises to carry out is a sensitivity analysis of the model parameters.  There are two reasons for doing so:  1) to validate the model results and 2) to identify parameters to be adjusted during calibration.  The former reason should allow the modeler to develop some confidence in the model so that it behaves in an expected manner. For example, lowering the air flow rate to the aeration basin should result in a lower dissolved oxygen concentration.  The latter reason for performing a sensitivity analysis, parameter identification, is useful because it helps determine the parameters that have the most impact on the model response.  We do not want to adjust parameters during a calibration run that have little effect on the model behavior.

After the model is calibrated and verified, sensitivity analyses are useful for other reasons.  Mathematical models can be revealing, sometimes allowing us to explore operational strategies that might never have been contemplated otherwise. 

In this chapter, you will explore the steady-state and dynamic sensitivity of a basic model.

Objectives

The purpose of this tutorial is to see how we can extract as much information as possible from a GPS-X model.  By the end of this tutorial, you should have developed a working knowledge of the Analyze functions.  This includes setting up and running steady state, phase dynamic, and time dynamic sensitivity analyses.  By completing this tutorial, you will also learn how to interpret the results from these simulations.

Setting up the Layout

The Analyze module is an optional feature of GPS-X.  If you have not purchased this module, contact us for pricing information.

Because this feature requires multiple simulations, for demonstration purposes the work will be carried out on a simple model consisting of an influent, a completely-mixed tank, and a rectangular final clarifier. 

1.       Create a new layout.

 

2.       Select the Comprehensive- Carbon, Nitrogen, Phosphorous, pH (mantis2lib) from the Library menu (if it isn’t already selected) (see Figure 9‑1)

image

Figure 91 – Select Library

3.       Create the layout as shown in Figure 9‑2 with a codstates Wastewaterinfluent model, a mantis2 Completely-Mixed Tank(CSTR) model, and a simple1d Rectangular Secondary Clarifier model. These should be the default model settings. 

4.       Save the layout with the name ‘tutorial-9’.

A close up of a device  Description automatically generated

Figure 92 – Tutorial 9 Layout

Setting up the Analysis Parameters

5.       Switch to Simulation Mode.

6.      Create a new scenario. Call it ‘Sinusoidal’.

7.      Change influent parameters. Access the influent’s process menu and change:

·        Flow > Flow Data > flow type parameter to Sinusoidal.

·        Flow > Flow Data > influent flow parameter to 5,000 m3/d.

·         Composition > Load Type Options > loadtypeparameter to Sinusoidal.

8.       Change CSTR parameters.  

·         Set Input Parameters > Operational > specify oxygen transfer by to Entering Airflow.

·         Set the total air flow into aeration tank to 15,000 m3/d.

9.       Create input controls.  Place the influent flow and the total air flow into aeration tank input variables on an input control tab.  They can be found in the following locations:

·         the influent flow variable can be found in the influent object Flow >Flow Data

·         the total air flow into aeration tank can be found in the CSTR object Input Parameters > Operational

Put both parameters on the same input control tab, with limits of 2,000-10,000 m3/d for the influent flow and 10,000-40,000 m3/d for the air flow.

10.   Create output graphs. You will create four different graphs.  One for each of:

·         ammonia nitrogen (from the clarifier’s effluent stream’s (fe) Output Variables > Concentrations form)

·         total carbonaceous BOD5 (from the clarifier’s effluent stream’s Output Variables > Concentrations form)

·         total nitrogen with soluble dinitrogen gas (from the clarifier’s effluent stream’s Output Variables > Concentrations under the Nitrogen Variables heading select the More… form)

·         dissolved oxygen (from the clarifier’s effluent stream’s  Output Variables > Concentrations form)

Use limits of 0-30 mgN/L for NH3-N, 0-300 mgO2/L for cBOD5, 0-100 mgN/L for total nitrogen, and 0-7 mgO2/L for DO. 

11.   Auto arrange the graphs.

12.   Save the layout.

Steady-State Analysis

You will now carry out a steady state sensitivity analysis of the air flow into the aeration tank on the dependent variables that you have selected for display (NH3-N, cBOD5, total nitrogen, DO).

13.   Set up the independent variable.  Open the settings window for the input controls and change:

·         the Type of controller for the total air flow into aeration tank to “Analyze-Step”. 

·         the Delta value to 500.  This is the increment that the analyzer will step through from the min to max values.

 Graphical user interface, application  Description automatically generated

Figure 93 – Setting up the Independent Variable

image

14.   Confirm the analysis type. Click the little arrow beside the Analyze button on the main toolbar (or access it through the main menu’s Tools > Analyze) and confirm that “Steady State” is selected.

 Graphical user interface, text, application  Description automatically generated

Figure 94 - Selecting Analysis Type

15.   Switch to Analyze Mode.  Click the Analyze button on the main toolbar (or access the Analyze Mode checkbox through the main menu’s Tools > Analyze) to turn on the analyzer. 

The status bar at the bottom of the main window will indicate that you are in Analyze Mode and the graphs will change so that the independent variable is the x-axis instead of time.

 A picture containing graphical user interface  Description automatically generated

Figure 95 – Status Bar showing “Analyze – Steady State” Mode

16.   Run a steady state 0-day simulation.

Observe the effect of an increase in the air flow on DO and the effluent BOD5, NH3 and total nitrogen.  Typical results are shown in Figure 9‑6

Note that an air flow of 40,000 m3/d results in a DO level over 2.0 gO2/L. 

Try the analysis using different influent flows.

  Chart, line chart  Description automatically generated

Figure 96 – Steady State Analysis Results

Time Dynamic Analysis

You will now carry out a time dynamic sensitivity analysis of the air flow into the aeration tank on the dependent variables that you have selected for display (NH3-N, cBOD5, total nitrogen, DO).

image

17.   Change the analysis type. Click the little arrow beside the Analyze button on the main toolbar (or access it through the main menu’s Tools > Analyze) and change the type to “Time Dynamic”.

image

Figure 97 – Selecting Analysis Type

18.   Switch to Analyze Mode.  If you aren’t already in analyze mode (check on the status bar), click the Analyze button on the main toolbar (or access the Analyze Mode checkbox through the main menu’s Tools > Analyze) to turn on the analyzer. 

The status bar at the bottom of the main window will indicate that you are in Analyze – Time Dynamic mode. The graphs will have time as the x-axis, just like in the regular simulation mode.

image

Figure 98 – Status Bar showing “Analyze – Time Dynamic” Mode

19.   Set the simulation time to 1-day (with Steady State checked so that the initial conditions are at steady state) and Start the simulation. The results of this simulation are shown in Figure 9‑9.

 A picture containing chart  Description automatically generated

Figure 99 – Example of Time Dynamic Analysis Results

Each successive curve on the various graphs is the result of a dynamic simulation using a specific air flow into the aeration tank.  Notice in Figure 9‑9 that for increasing values of air flow, the DO concentration in the aeration tank increases - it also fluctuates over time because of the sinusoidal influent flow and load patterns. You can change the number of run curves on the graph by going to View > Preferences > Input/Output > Number of runs displayed (analyze/optimize).

Phase Dynamic Analysis

You will now carry out a phase dynamic sensitivity analysis of the air flow into the aeration tank on the dependent variables that you have selected for display (NH3-N, cBOD5, total nitrogen, DO).

20.   Select Phase Dynamic from the Analyze drop-down menu.

21.   Set the Simulation time to 1-day (with Steady State checked so that the initial conditions are at steady state) and Start the simulation.

 Chart, line chart  Description automatically generated

Figure 910 – Example of Phase Dynamic Analysis

This type of analysis allows you to run the same dynamic simulation as in the previous step.  The only difference is in the graphical display.  Here the results will be plotted against the analyze variable and not against time.  The length of the simulations will set the phase.  Typical results are shown in Figure 9‑10 for a sinusoidal influent. 

In this case, the results are very similar to the Steady Stateanalysis type since the simulation was not very dynamic. 

The graph shows the DO concentration after 1.0 day for an air flow of 10,000 to 40,000 m3/d (as opposed to showing the steady-state value at time t=0 when carrying out the Steady State analysis.)