Skip to content

Water quality simulation with bulk coefficient and limiting potential not working properly #461

@belottif

Description

@belottif

Summary
I'm running a water quality simulation using as a test the Net3 network. I added one source with strength 7.4 at the tank '1'. I set a bulk coefficients for each pipe in the network and a global limiting potential of 15. I would expect that the quality at some nodes in the network would increase until reaching 15, but this is not happening. In some cases the quality also decrease instead of increasing. After trying different limiting potentials and different bulk coefficients the results change sometimes based on the bulk coefficients, but it doesn't seem that the limiting potential plays a role. Moreover, for a first order reaction in which unit should I define the bulk coefficients? I guess I should write them in 1/d and then they will transformed by WNTR into 1/s during calculation, is it right?

Example
import wntr
wn = wntr.network.WaterNetworkModel('Net3.inp')
wn.options.quality.parameter = 'CHEMICAL'
wn.add_source('S', '1', 'CONCEN', 7.4,'SourcePattern')
wn.options.reaction.limiting_potential = 15
wn.options.reaction.bulk_coeff = 0.1
lake = wn.get_node('Lake')
lake.initial_quality = 7.4
river = wn.get_node('River')
river.initial_quality = 7.4
for name, junction in wn.junctions():
junction.initial_quality = 7.4

sim = wntr.sim.EpanetSimulator(wn)
base = sim.run_sim()
results = base.node['quality']

Environment
Provide information on your computing environment.

  • Operating system: Windows 10 Enterprise
  • Python version: 3.11.5
  • WNTR version: 1.1.0

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions