Using SWMM Control Sets in SewerGEMS and CivilStorm

Product(s): SewerGEMS, CivilStorm
Version(s): CONNECT Edition, V8i
Area: Modeling

Problem

Can SWMM Control Sets be used in Bentley's storm and sewer products? How is the data inputted and utilized?

Solution

SWMM Control Sets allow a SewerGEMS or CivilStorm user to control the behavior of elements based on the condition in some other element using control rules set based on the SWMM program. These control rules are based on the syntax rules presented below and are used only by the Explicit (SWMM) solver. SWMM Control Sets can be used to turn pumps on and off. They can also be used to adjust the weir height and orifice opening for conduit control structures. Additional information on these can be found in the SewerGEMS and CivilStorm Help documentation.

If you are using a pond and pond outlet structure, set the pond outlet node's "has control structure?" to "No", then define a start control structure in the downstream conduit, to define your orifice or weir. SWMM controls currently only apply to conduit control structures, not pond composite outlet structure components.

The following screenshot shows the objects that can be used in SWMM Control Sets:

Object Type

Available Attributes

Expected Value

NODE

DEPTH
HEAD
VOLUME
INFLOW

numerical value
numerical value
numerical value
numerical value

LINK

FLOW
DEPTH
TIMEOPEN
TIMECLOSED

numerical value
numerical value
decimal hours or hr:min
decimal hours or hr:min

CONDUIT

STATUS
TIMEOPEN
TIMECLOSED

OPEN or CLOSED
decimal hours or hr:min
decimal hours or hr:min

PUMP

STATUS
SETTING
FLOW
TIMEOPEN
TIMECLOSED

ON or OFF
pump curve multiplier
numerical value
decimal hours or hr:min
decimal hours or hr:min

ORIFICE

 

SETTING
TIMEOPEN
TIMECLOSED

fraction open
decimal hours or hr:min
decimal hours or hr:min

WEIR

SETTING
TIMEOPEN
TIMECLOSED

fraction open
decimal hours or hr:min
decimal hours or hr:min

OUTLET

SETTING
TIMEOPEN
TIMECLOSED

rating curve multiplier
decimal hours or hr:min
decimal hours or hr:min

SIMULATION

TIME
DATE
MONTH
DAY
DAYOFYEAR
CLOCKTIME

elapsed time in decimal hours or hr:min:sec
month/day/year
month of year (1 - 12)
day of week (Sunday = 1)
day of year (month/day)
time of day in hr:min:sec

Note: ponds would use the "NODE" object even though they are polygons in SewerGEMS and CivilStorm.

The meaning of SETTING depends on the object being controlled:

  • for Pumps it is a multiplier applied to the flow computed from the pump curve,
  • for Orifices it is the fractional amount that the orifice is fully open (orifice control is accomplished by lowering or raising a horizontal gate from the top of the orifice),
  • for Weirs it is the fractional amount of the original freeboard that exists (i.e., weir control is accomplished by moving the crest height up or down),
  • for Outlets it is a multiplier applied to the flow computed from the outlet's rating curve. 

Node (depth, head, inflow), link (flow, depth), pump flow, and simulation time are typically used in the condition part of the Control Set. The pump status and orifice and weir settings are used in the action statement. The formatting of this statement is similar to the logical control statement that users of WaterGEMS, WaterCAD, and SewerCAD may be familiar with: IF condition THEN action ELSE action2. Priorities can also be added that will make it so a given control takes precedence over another control.

Using Control Curves

Starting with SewerGEMS and CivilStorm version 10.04.00.158, control sets for weirs and pumps can also include control curve data. To use this, go to Components > SWMM Extensions > Control Curves. This will open a dialog where you can enter your curve data. 

Control Curves are used with pumps and flow regulators like orifices and weirs. A relationship between the control setting and the controller variable can be specified by using a Control Curve, a Time Series, or a PID Controller.

For example for a weir:

RULE MC1
IF NODE N2 DEPTH >= 0
THEN WEIR W25 SETTING = CURVE C25

Or for a pump:

RULE LS034_P1
IF NODE MH034 DEPTH >= 4.000000
THEN PUMP PMP1 SETTING = CURVE VFD_TYPICAL

For a pump, the control curve can be used to simulate a variable speed pump by adjusting the pump outflow flow using the "control setting" multiplier corresponding to the current wet well depth (Controller Value). In older versions of SewerGEMS and CivilStorm, you would need to approximate this type of pump using a Type 4 (depth vs flow, simulated variable speed) pump curve type, or use the built-in variable speed pump functionality with the GVF-Convex solver.

Creating Control Sets

As SWMM Control Sets are used with pumps or control structures on conduits, these elements will need to be present in the model. Go to Components > SWMM Extensions > Control Sets to open the SWMM Control Sets dialog. This is where you can create and edit your control sets. To create a new control set, click the New button in the upper left.

The Control Editor Pane on the right side of the dialog allows you to define SWMM controls. Each control rule is a series of statements of the form:

RULE ruleID
IF condition_1 AND condition_2 OR condition_3 AND condition_4 Etc.
THEN action_1 AND action_2 Etc. ELSE action_3 AND action_4 Etc.
PRIORITY value

where keywords are shown in all caps, ruleID is an ID label assigned to the rule, condition_n is a Condition Clause, action_n is an Action Clause, and value is a priority value (e.g., a number from 1 to 5, with 5 being the highest priority).

NOTE:

  • Only the RULE, IF and THEN portions of a rule are required; the other portions are optional.
  • Blank lines between clauses are permitted and any text to the right of a semicolon is considered a comment.
  • ELSE statements may need to be placed on a separate line.
  • Units are not entered in the control set text box. Instead, they are specified using the dropdown above the box. For example when set to  "US Units - CFS, ft, cubic ft" then the "10" in the below example represents a flow of 10 CFS. 
  • The PRIORITY value is used to determine which rule applies when two or more rules require that conflicting actions be taken on a link. A conflicting rule with a higher priority value has precedence over one with a lower value (e.g., PRIORITY 5 outranks PRIORITY 1). A rule without a priority value always has a lower priority than one with a value. For two rules with the same priority value, the rule that appears first is given the higher priority.

For example, suppose you wanted to create a control where a weir fraction open changes based on the flow on a given conduit. A zero could be used for closed and a 1.0 for open, plus values in between. The control would be formatted like this:

RULE 1A
IF LINK CO-1 FLOW > 10
THEN WEIR W1 SETTING = 0.5

Note: Starting with SewerGEMS and CivilStorm CONNECT Edition Update 3 (version 10.03.03.04), SWMM Time Series Control Data can now be used with SWMM Control Sets. For more information on creating these and applying them to a control set, see this link: Using SWMM Time Series Control Data.

In this case, you would enter "LINK" before the conduit label so that the control knows what type of element it is. In the action statement (THEN), you include the element type as well as a label. In the example above the label is "W1". This is the label of the weir as seen in the Conduit Control Structures dialog:

Note: older versions had a "SWMM Label" field where the label would be entered. 

The next step for using SWMM Control Sets is to open the calculation option properties. Set the property field Apply SWMM Control Set to "True." For the property SWMM Control Set, click the pulldown menu and select the name.

Keep in mind that your SWMM Control Set will typically have more than one entry. For instance, you will have controls for the pump turning on and off. For conduit control structures, you would have different weir or orifice settings for different simulation times or flow values.

Ponds and Pond Outlets

If you are using a pond and pond outlet structure, set the pond outlet node's "has control structure?" to "No", then define a start control structure in the downstream conduit, to define your orifice or weir. SWMM controls currently only apply to conduit control structures, not pond composite outlet structure components.

If you want to reference the pond's water surface elevation as the condition of a SWMM control, it would still be referenced as a "node". In EPA-SWMM, ponds are treated as nodes, and when a SewerGEMS/CivilStorm model is computed with the SWMM solver, it is internally converted to a storage node element. So, even though the pond is a polygon in SewerGEMS/CivilStorm, you would treat it as a node in the SWMM controls. So, the controls might look something like this as an example:

RULE 1A
IF NODE PO-1 DEPTH < 1
THEN ORIFICE O1 SETTING = 0
PRIORITY 1

RULE 1B
IF NODE PO-1 DEPTH > 3
THEN ORIFICE O1 SETTING = 1
PRIORITY 2

Examples

The following are examples of control rules that can be used in SWMM Control Sets:

Simple time-based pump control

RULE R1
IF SIMULATION TIME > 8
THEN PUMP 12 STATUS = ON
ELSE PUMP 12 STATUS = OFF ;

Multi-condition orifice gate control

RULE R2A
IF NODE 23 DEPTH > 12 AND LINK 165 FLOW > 100
THEN ORIFICE R55 SETTING = 0.5

RULE R2B
IF NODE 23 DEPTH > 12 AND LINK 165 FLOW > 200
THEN ORIFICE R55 SETTING = 1.0

RULE R2C IF NODE 23 DEPTH <= 12 OR LINK 165 FLOW <= 100
THEN ORIFICE R55 SETTING = 0 ;

Pump station operation (as in a SWMM4 Type5 pump)

RULE R3A
IF NODE N1 DEPTH > 5
THEN PUMP N1A STATUS = ON

RULE R3B
IF NODE N1 DEPTH > 7
THEN PUMP N1B STATUS = ON

RULE R3C
IF NODE N1 DEPTH <= 3
THEN PUMP N1A STATUS = OFF AND PUMP N1B STATUS = OFF

Conduit control structure using Control Curves

RULE44A
IF JUNCTION J1 DEPTH >= 0.0
THEN WEIR W2 SETTING = CURVE CurveData-1

Important Notes

  • It is best to only specify either a SWMM control set or on/off controls for a model. Using both types of controls can lead to conflicts.
  • If you run into an error 217 about an invalid format when using an AND or an OR function, but moving the AND/OR portion to a new line.
  • Not all modulated controls are currently available for use in SewerGEMS and CivilStorm. 
  • Starting with version 10.03.03.04, SWMM Time Series can be used in SWMM Controls.
  • Starting with version 10.04.00.158, SWMM Control Curves can be used in SWMM Controls.

See Also

Modeling gate valve opening and closing based on pressure transducer reading

Conduit start/stop control structures

Creating Controls - Conditions, Actions, and Control Sets 

Creating Controls - Conditions, Actions, and Control Sets for WaterGEMS and WaterCAD SELECTSeries 6 

Recommended
Related