Product(s): |
HAMMER |

Version(s): |
CONNECT Edition and V8i |

Area: |
Modeling |

Original Author: |
Jesse Dringoli, Bentley Technical Support Group |

# Overview

This technote explains how to set up an initially partially closed valve that changes positions during the transient simulation. An example model is provided for demonstration, and version 08.11.01.32 of HAMMER is assumed.

# Background

In older versions of HAMMER, all valves (including TCV, GPV, PRV, etc) were assumed to be either fully open or fully closed in the initial conditions. So, the transient operating rule (which describes when and how fast a valve closes during the transient simulation) was required to begin with either 100% (fully closed) or 0% (fully open). However, as of HAMMER V8i SELECTseries 1, you can now model a valve that is initially partially closed. The process by which this can be done is described below.

# Establish the Initial and Fully-Open Conditions

The first thing you will need to do is enter the head loss or discharge coefficient that describes the hydraulics of the valve during the initial conditions. You must also enter the coefficient for the fully-open position of that valve, so that HAMMER can determine the relative *discharge coefficient *at certain positions of the valve (discussed later on in this technote.)

1. In the properties of the valve, select "Discharge Coefficient" as the "Coefficient Type", then set the initial status to active. Enter the discharge coefficient representing your valve's initial position.

2. For the "Discharge Coefficient (Fully Open)" field, enter the discharge coefficient representing the valve in its fully open position:

## How can I Determine the Discharge Coefficient?

Most valve manufacturer can provide a table of discharge coefficient for a range of valve positions. The discharge coefficient is sometimes referred to as "Cv" and describes the flow for a unit pressure (such as gpm/psi^{0.5}). So, the discharge coefficient for a certain desired initial closure position can be looked up on the table. For example, consider the below table:

In this case, the fully open discharge coefficient would be set to 10.0. If you know the valve is initially 20% closed, the initial discharge coefficient would be set to 5.0.

## What if I'm not using a TCV? (older HAMMER versions)

`Note: skip this section if you `

*are *using a TCV

In recent versions of HAMMER (such as the CONNECT Edition), initial partial closure is supported even with a FCV, PRV, PSV or PBV. In earlier versions, or if using a GPV, you'll need to convert it to an equivalent TCV first, using the below steps. `Note: when computing initial conditions with any valve type, there will be one single specific head loss across the valve for that steady state condition. HAMMER converts this head loss into a discharge coefficient to be used in the transient calculations. `

1. First, compute initial conditions to see the head loss through your valve. The below example uses a GPV:

This head loss will be based on the type of valve you choose. For example for this GPV, the head loss was based on the GPV head loss curve. In another example, the head loss through a FCV would be the head loss necessary to achieve the desired FCV flow rate. To derive the discharge coefficient, you can use the following formula:

Cv = { (39.693 * D^{4}) / [Hl / (V^2 / 2g) ] }^{0.5}

Where Cv is the discharge coefficient (cfs/(ft H2O)^0.5), D is the diameter (ft), V is the velocity (ft/s) and Hl is the head loss (ft). However, a shortcut can be employed to find the discharge coefficient…

2. Go to Analysis > Calculation Options and open the transient calculation option set associated with the current scenario. In the properties of the calculation options, choose "True" for "specify initial conditions?"

3. Go to Tools > Copy Initial Conditions. Choose the desired timestep (0.000 hours for steady state) and click OK. This will copy the discharge coefficient to a special field in the valve properties, which you can view under the "Transient (Physical)" section:

4. Next, morph the valve into a TCV, by selecting the TCV from the layout toolbar and clicking directly on top of the valve:

5. Now, enter the discharge coefficient found in step 3 as the initial discharge coefficient for the TCV. The fully open discharge coefficient will also still need to be entered. One way to find this would be to compute initial conditions with the original valve set to "inactive". In this case, the initial conditions solver will use the "minor loss coefficient" that you entered, which represents the fully open condition. You would then use steps 2-4 above to find the discharge coefficient, then enter it as the TCV's fully open discharge coefficient. 6. Choose "false" for "specify initial conditions" in the transient calculation options, compute initial conditions, then verify that the computed head loss is the same as it was with your other valve type:

## What if I only know the head loss coefficient?

It is always preferable to describe your valve with a discharge coefficient, since HAMMER always uses discharge coefficients in the transient calculations. As of HAMMER version 08.11.01.32, is it not recommended to use the "headloss coefficient" coefficient type for a TCV, if you need to model it in an initially partially closed position. To determine the equivalent discharge coefficient, either computer initial conditions and look at the calculated discharge coefficient in the Results section of the TCV properties, or use the following formula:

Cv = ((39.693 * D^{4}) / H)^{0.5}

Where D is the diameter (ft), H is the headloss coefficient and Cv is the discharge coefficient (cfs/(ft H2O)

`Note: the "Minor Loss Coefficient" should be converted to the "Discharge Coefficient (fully open)". `

## What if I Want to Use the Valve Characteristics Curve Coefficient Type?

There are three options available for the "coefficient type" for a TCV: Discharge coefficient, headloss coefficient and Valve Characteristics curve. The latter option lets you enter the initial valve setting in terms of relative closure percentage, instead of a head loss or discharge coefficient. For example if you know your valve is 20% open in the initial conditions, you would simply enter 20%.

However, some extra work is necessary with this option. Essentially you will need to relate relative closure percentages to discharge coefficients, in order to be able to refer to positions in terms of percent. This is done using the Valve Characteristics selection, described in the next section. For example if you enter 20% as the "Relative Closure (initial)", HAMMER needs to look that percentage up in the valve characteristics curve, to find the corresponding relative discharge coefficient. Then, based on the fully open discharge coefficient, it knows the discharge coefficient corresponding to 20%.

# Establish the Valve Characteristics

The next step in the process of modeling an initially partially closed TCV is to select or define the valve characteristics curve. This is basically a table of relative closure versus relative discharge coefficient, which HAMMER uses to translate a **percent open** to a **discharge coefficient**. Basically when you model a valve closure in HAMMER, you are entering a table of time versus relative closure. This is done under Components > Patterns and is selected in the TCV properties under the Transient Operating Rule. In order for HAMMER to understand what these percentages really mean, it needs to translate them into a discharge coefficient. Every valve behaves a bit differently as it closes, so for example a value of 90% closed in your operating rule might not necessarily mean that the valve's open area is 10% of the fully open area. Therefore, the Valve Characteristics table is used to define this relationship.

By default, several standard valve types are available, in the "valve type" field (such as butterfly, globe, needle). The table of relative closure versus relative discharge coefficient is not visible to the user for these predefined valves, but is defined based on the following equations:

Note: the X axis represents relative closure and the Y axis represented relative discharge coefficient. The two equations on the right side can be used to derive tabular values from which the curves were constructed.

For example, let's say you wanted to use the "butterfly" valve characteristics selection, and you want the valve to be initially **25%** closed, with a fully open discharge coefficient of **10.0** cfs/ft H2O^{0.5}. In this case, we can determine from the above diagram that the 25% relative closure translates to a relative discharge coefficient of 58.7%, which means a discharge coefficient of 0.587 X 10.0 =** 5.87** cfs/ft H2O^{0.5}.

`Note: The relative discharge coefficient values are relative to the value entered for "Discharge Coefficient (fully open)". `

You can also define a user defined table of relative closure versus relative discharge coefficient, by selecting "user defined" as the valve type. This exposes the "Valve Characteristics" attribute, which is where you would enter the table of relative closure versus relative discharge coefficient to define the characteristics of your valve.

`Note: remember that HAMMER uses relative closure, so 0% means fully open and 100% means fully closed. Other places may use relative opening, where the opposite is true. `

# Establish the Transient Operating Rule

The last step needed to model the closure of an initially partially closed valve is to tell HAMMER when the valve closes (or opens) during the transient simulation and how fast it occurs. This is done by establishing a table of time versus relative closure, called the Operating Rule.

First, go to Components > Patterns and create a new pattern under "Operational (transient, valve)". Here you can enter the table of relative closure over time. Next, select the name of the pattern you just created in the "Operating Rule" field in the TCV properties.

Intuitively, the "Starting relative closure" field in the pattern must match the initial relative closure, which you can see in the "results" section of the properties of the TCV:

# Putting it All Together

To summarize what we've done, let's consider the following example valve:

From the Operating Rule, the valve is initially 20% closed. From the Valve Characteristics table, a 20% relative closure translates to a 50% relative discharge coefficient. The "fully open" discharge coefficient is 10.0, so the initial discharge coefficient must be 10.0 X 50% = 5.0. 5.0 is entered as the initial discharge coefficient, so when the initial conditions are calculated, the computed relative closure (in the results section of the properties) is 20%.

Let's say you wanted to run another scenario where the valve starts at 90% closed. First, you would modify or create a new operating rule, with the "Starting Multiplier" set to 90%. Next you would need to match up the initial discharge coefficient to the 90% by looking at the characteristics curve. A 90% relative closure translates to a 5% relative discharge coefficient. 5% of the fully open discharge coefficient of 10.0 is 0.5. So, the initial discharge coefficient would be set to 0.5.

# Troubleshooting

What does the following message mean?

*"The valve's Initial Closure percent does not match the initial closure percent in the valve's referenced Operating Rule. The Operating Rule will be used as specified, but should be modified in order to get the expected results." *

This means that the Starting Relative Closure in your transient operating rule is not in agreement with the initial conditions of the valve. Check the "Relative Closure (Calculated)" field in the "Results" section of the properties of the TCV, to see what the initial relative closure is (which is calculated based on the initial discharge coefficient, fully open discharge coefficient and valve characteristic curve). You'll need to adjust the initial discharge coefficient so that the initial relative closure matches your pattern, or adjust the starting multiplier in your transient operating rule so that it matches the computed initial relative closure.

If you're using a GPV, you will need to convert it to an equivalent TCV, using the method described further above in this technote. As of the CONNECT Edition, an FCV, PRV, PSV and PBV all support reporting the relative closure (in the results section of the properties) and an Operating Rule to start at that position and change it over the course of the transient simulation

# Example Model

The below model is an example of an initially partially closed valve in HAMMER. Note:

- The link below is to a version that can be opened in HAMMER V8i build 08.11.01.32 and above.
- Additional information can be found in the Project Properties
- You must be signed in to download the file. The link will not work if you are not signed in.
- This model is for illustrative purposes only