Built-in Calculated Variables – Part 3 – Advanced variables

flotools’ built-in calculated variable library includes some variables that use complex calculations beyond those that can be summarized by simple algebraic relationships. These variables are discussed in this section.

Cooldown time

Whenever the variable MDTHYD is available as a trend, flotools calculates cooldown time by searching the trend for the first time at which the trend crosses from negative values to non-negative values. This is available as a cross plot variable for each case.

Pig Displacement Volume

flotools has a pig analysis component that figures out the entry and exit times of pigs. First it scans the input file for the presence of pigs and then looks for the presence of ZPIG and/or ZZPIG variables in the .tpl files. It understands the pig routing from the input file and then using either ZPIG or ZZPIG marks the time at which the pig enters the first branch, the times at which the pig transfers branches and the time at which the pig exits the last branch in its path.

Once this information is available, a pig displacement volume calculator integrates the following variables at the pig exit location (if available) from the time the pig launches to the time it exits: QLT, QLST, QLTHL, QOST, QLTWT, QWST. These variables are available as cross plot variables for each case.

C-Factor

flotools looks for the presence of EVR variable and calculates the C-Factor as EVR*100. In the future, we will add the ability to calculate this using the velocity and density variables even when EVR is not present.

Residence Time

A simple residence time calculation is available in flotools for gas, liquid, hydrocarbon liquid, and water phases. flotools looks for the presence of QG, QLT, QLTHL, and QLTWT. Residence time is calculated as the average of (section volume / volume rate in section) over all sections.