//Calculate pipe segment surface area and populate PIPESURFACEAREA
if ($feature.NOMINALDIAMETER == null)  {
return $feature.PIPESURFACEAREA
}
else if ($feature.NOMINALDIAMETER == 0)  {
return $feature.PIPESURFACEAREA
}
else
return 3.1416 * $feature.NOMINALDIAMETER/12 * Length(Geometry($feature), 'm') * 3.2808