Navigating the Landscape of Hydraulic Modeling: A Comparative Study of InfoSewer, ICM InfoWorks, and ICM SWMM for Steady State Models
Navigating the Landscape of Hydraulic Modeling: A Comparative Study of InfoSewer, ICM InfoWorks, and ICM SWMM for Steady State Models

Navigating the Landscape of Hydraulic Modeling: A Comparative Study of InfoSewer, ICM InfoWorks, and ICM SWMM for Steady State Models

This article explores the interoperability and comparative performance of three hydraulic models: InfoSewer, ICM InfoWorks, and ICM SWMM.

We begin with a core model developed in InfoSewer for training purposes. We then guide you through a series of transformations and comparisons:

  1. Model Conversion: The InfoSewer model is converted to ICM InfoWorks, demonstrating the process and validating flow consistency.
  2. SWMM Integration: We converted the model to SWMM format using ICM InfoWorks' internal menu tool, showcasing the software's built-in conversion capabilities.
  3. Comparative Analysis: Leveraging Ruby scripting, we compare the ICM InfoWorks (current) and SWMM (background) networks, highlighting key differences and necessary adjustments.
  4. Model Refinement: We optimize the SWMM model in detail, including subcatchment modifications and the transfer of trade flows from InfoWorks to SWMM.
  5. To get close to InfoSewer's steady-state model, the ICM InfoWorks and SWMM models are changed to use ICM's saved state feature and short simulation runs.

Throughout this process, we uncover valuable insights into each platform's strengths and limitations. Notably, ICM InfoWorks provides a more accurate approximation of the steady-state condition compared to SWMM.

Steady State model in ICM Infoworks and ICM SWMM


Comparative Analysis: Leveraging Ruby scripting, we compare the ICM InfoWorks (current) and SWMM (background) networks, highlighting key differences and necessary adjustments.
Ruby scripting for cn vs bn networks
cn = WSApplication.current_network
bn = WSApplication.background_network

# Retrieve hw_subcatchments from cn
cn_subcatchments = cn.row_object_collection('hw_subcatchment')

# Retrieve hw_node from bn
bn_nodes = bn.row_object_collection('sw_node')

# Create a hash map for bn base_flow by node_id
bn_base_flows = {}
bn_nodes.each do |node|
  bn_base_flows[node.node_id] = node.base_flow
end

# Initialize totals
total_trade_flow = 0.0
total_base_flow = 0.0

# Compare trade_flow from cn to base_flow from bn using node_id
cn_subcatchments.each do |subcatchment|
  node_id = subcatchment.node_id
  trade_flow = subcatchment.trade_flow

  if bn_base_flows.key?(node_id)
    base_flow = bn_base_flows[node_id]
    # Ensure trade_flow and base_flow are not nil
    trade_flow = trade_flow.nil? ? 0.0 : trade_flow
    base_flow = base_flow.nil? ? 0.0 : base_flow
    if base_flow + trade_flow != 0
      puts "Node ID: #{node_id}, Trade Flow: #{format('%.5f', trade_flow)}, Base Flow: #{format('%.5f', base_flow)}"
    end
    
    # Update totals with nil checks
    total_trade_flow += trade_flow unless trade_flow.nil?
    total_base_flow += base_flow unless base_flow.nil?
  else
    puts "Node ID: #{node_id} not found in bn"
  end
end

# Print totals
puts "Total Trade Flow: #{total_trade_flow}"
puts "Total Base Flow : #{total_base_flow}"        


Closing Note:

Thank you for reading these articles. I appreciate your engagement and support. Thank you again, and I hope you'll join me on this ongoing journey of learning and discovery. Until next time!

The articles in this newsletter highlight temporal asymmetries. They discuss topics that, while only universally relevant at some times, become crucial for those in need. These pieces are resources, and they are ready to let you know and help when specific circumstances arise.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了