HOW TO

Calculate airflow resistance in tunnels using Arcade in the Enterprise portal and ArcGIS Online

Last Published: May 12, 2025

Summary

Understanding airflow resistance in tunnels is essential to ensure safe and efficient ventilation. For example, a subway tunnel with narrow entry points and a steep curve is flagged for potential airflow bottlenecks, prompting a redesign of its ventilation system.

This article describes the workflow to calculate airflow resistance in tunnels using Arcade in the ArcGIS Enterprise portal and ArcGIS Online.

Procedure

  1. Log in to the ArcGIS Enterprise portal or ArcGIS Online and click Content > My Content.
  2. Click the hosted feature layer to open the item page.
  3. Add a new string field. Refer to Portal for ArcGIS: Add a field or ArcGIS Online: Add a field for instructions. In this example, a new field, Airflow_Resistance, is added to the attribute table with two existing fields named Entry_Width and Length.
  4. Open the Arcade window. Refer to Portal for ArcGIS: Calculate values for a field from the item page or ArcGIS Online: Calculate values for a field from the item page for instructions.
  5. In the Expression box, specify the following Arcade expression:
    1. Retrieve values from the attributes.
var width = $feature.Entry_Width;
var length = $feature.Length;
  1. Automatically calculate the cross-sectional area using the Area() function.
var area = Area($feature, "square-meters");
  1. Check if all required values are present.
if (IsEmpty(width) || IsEmpty(area) || IsEmpty(length) || width == 0 || area == 0) {
    return null;
}
  1. Calculate the airflow resistance index.
var resistance = (length / area) * (1 / width);
  1. Classify the airflow constraint based on the resistance index.
var airflowStatus = IIF(resistance > 5, "High Constraint",
                  IIF(resistance > 2, "Moderate Constraint", "Low Constraint"));
  1. Return the result with classification and resistance values.
return "Airflow Constraint: " + airflowStatus + " (Resistance Index: " + Round(resistance, 2) + ")";

The code block below shows the example of the full working script:

var width = $feature.Entry_Width;
var length = $feature.Length;

var area = Area($feature, "square-meters");

if (IsEmpty(width) || IsEmpty(area) || IsEmpty(length) || width == 0 || area == 0) {
    return null; // Prevent division by zero or missing data
}

var resistance = (length / area) * (1 / width);

var airflowStatus = IIF(resistance > 5, "High Constraint",
                  IIF(resistance > 2, "Moderate Constraint", "Low Constraint"));

return "Airflow Constraint: " + airflowStatus + " (Resistance Index: " + Round(resistance, 2) + ")";
  1. Click OK.

The image below shows the calculated airflow resistance in tunnels.

The calculated airflow resistance in tunnels

Article ID: 000035688

Software:
  • ArcGIS Online
  • Portal for ArcGIS
  • ArcGIS Enterprise

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options