// Calcualte the internal volume of the pipe segment
if ($feature.NOMINALDIAMETER == null)  {
return $feature.PIPEVOLUME
}
else if ($feature.NOMINALDIAMETER == 0)  {
return $feature.PIPEVOLUME
}
else
return ROUND(3.1416 * POW(($feature.NOMINALDIAMETER - 2 * $feature.WALLTHICKNESS)/24, 2) * Length(Geometry($feature), 'm') * 3.2808, 6)