Tank fills from top does not get the inlet and outlet flow balance in EPS run.

Hi team, 

I have a tank modelled in WaterCAD that has a seperate inlet & outlet with valve throttling. The results I get show that there is high inflow to the tank (say 30L/s), not that I expect, and demand pattern outflow (say 5L/s) as I expect. 

The tank does not overflow (i.e,. %full fluctuates between 80 to 100%). Where is the rest of flow going? 
i checked the other flow paths related to the upstream of the tank and one looks ok but the other one which basically feeds the tank shows the weird not balanced results. I added a check valve at this downstream tank to ensure there is no backflow but no luck in solving it. 

Could it be the calculation parameters as it appears that the network is not balanced. 
I would appreciate your prompt response. 
Regards, 

Parents
  • Thanks Scott for your time. 

    I don't get 'network unbalanced' in the notification bar. I only get one 'red' timestep which seems to be irrelevant to this part of the network. The parent scenario with no tank runs perfectly fine. The scenario with the tank is creating issues. 
    The below is what I get as inflow and outflow results as well as tank % full which suggests me that there is flow missing in the system.

    Thanks again. 

  • Hi Sareh,

    Please plot this as Pipe Flow vs Time  ..... not Flow (Absolute) vs time.  What the trend is suggesting is that reverse flow is happening in P-1375(2) which is why the tank is falling.

    Additionally, plot the Tank Flow (Out Net) is L/s.  These two plots will narrow the diagnostics a lot more.



  • Hi Ben, 

    I guess the reverse flow in P-1375(2) was a result of tank overflow. As when I added the reservoir the mystery solved as to where the missing flow is. I plotted the two graphs as you stated above. can you please have a check and provide further advice? Thanks. 

    Blue (flow in outlet), Cyan (flow to the reservoir, overflow), Green (inflow coming to the tank). 

    Thanks heaps. 

    Regards, 

  • Hi Sareh,

    Are you able to generate the same plots, but with the Reservoir linking Pipe closed or inactive?   "Overflows" in WaterCAD don't quite happen the way a user may expect as the base engine doesn't really treat Tanks as an open-air storage, but that would need to take the Reservoir out of the model in order to see what is going on.

    Either that or post the model SQLite file to the forums.



  • Hi Ben, 

    sure. below are the graphs generated from a scenario that the dummy reservoir is offline. 

    would you be able to have a review and advise possible solutions. 

  • Thanks Sareh, that does further limit possibilities.

    I'm thinking however similar thoughts to Jesse in that this model probably needs a little more thorough investigation perhaps by uploading the model, either to the forum to review or to Bentley technical staff to review it.

    It is impossible for the Tank Percent Full (%) to decrease if the Tank Flow (in Net) is always a positive value.

    The main possibility that comes to mind is similar to Jesse's thoughts.  There are within all the other calculated timesteps very severe upstream disconnections that causes the model to pull very large volumes of water out of the tank by reversal of flow in P-1375(2) that the engine does as a means of satisfying upstream flow demands when the pipes in this system become disconnected from the upstream head source.

    If you didn't want to upload the model for review, the suggested next diagnostic step is what Jesse advised:  In the Calculation Options set "Reporting Timestep" = "<All Timesteps">

    The replot the Graphs above for Upstream Pipe Flow, Downstream Pipe Flow, and Tank Flow (In Net), but this time these Graphs will include All Timestep data and rather than just the results at every 0.1 hours.



Reply
  • Thanks Sareh, that does further limit possibilities.

    I'm thinking however similar thoughts to Jesse in that this model probably needs a little more thorough investigation perhaps by uploading the model, either to the forum to review or to Bentley technical staff to review it.

    It is impossible for the Tank Percent Full (%) to decrease if the Tank Flow (in Net) is always a positive value.

    The main possibility that comes to mind is similar to Jesse's thoughts.  There are within all the other calculated timesteps very severe upstream disconnections that causes the model to pull very large volumes of water out of the tank by reversal of flow in P-1375(2) that the engine does as a means of satisfying upstream flow demands when the pipes in this system become disconnected from the upstream head source.

    If you didn't want to upload the model for review, the suggested next diagnostic step is what Jesse advised:  In the Calculation Options set "Reporting Timestep" = "<All Timesteps">

    The replot the Graphs above for Upstream Pipe Flow, Downstream Pipe Flow, and Tank Flow (In Net), but this time these Graphs will include All Timestep data and rather than just the results at every 0.1 hours.



Children
  • Thanks Ben. 

    As requested, I have set the reporting timesteps to be 'all points'. Please refer to the below results. 

    The tank with issue (T2) is being supplied by an upstream tank (T1) and along the transfer line between the two tanks are a few branches that feed demands via individual PRVs. 

    T1 - tank 1 (upstream) 

    T2 - tank 2 (downstream) - the tank with the balancing problem. 

    Please share any further thoughts. 

    Cheers. 

  • Thanks Sareh,

    Setting the Calculation Options Reporting to all timesteps is often key to reviewing and diagnosing the validity of a model.  In these case, the extremely high number of intermediate calculation timesteps clearly shows that the model has a severe instability issue, causing the model to need to recalculate intermediate values every fraction of a second.

    It would be easier to diagnose on seeing a copy of the model itself, but this type of issue is frequently caused by upstream head sources,  such as Tank T1, becoming hydraulically disconnected from the downstream nodes.  This can happen if either:

    1. Upstream Tank T1 level frequently falls to 0 metres
    2. Upstream Tank T1 level frequently fills to 100% full (a general rule in WaterCAD modelling is never let a Tank ever fall to 0% and never let it increase to 100%:  Set the model up so that it stays at values >0% and <100% , otherwise the mass balance and calculation becomes unstable with excessively high number of timesteps and runtime)
    3. A downstream control, such as a control valve, shutting off the source of head from downstream nodes

    Disconnection errors are often present in as warnings in the Calculation Summary.  Another way to see these is to Graph the Hydraulic Grade Line at Nodes (eg. Junctions) in the areas of the network that you suspect may have become disconnected at some timesteps.  In this case, any Junction downstream of T1 and upstream of T2.   This will report a very, very low number in the case of hydraulic disconnection.

    The first step to fixing then will to configure the model to ensure that Tank T1 always maintains a level percent between say 1-99%  in order for Tank T2 to simulate accurately.   Additionally ensure that the Nodes/Junctions downstream of T1, and upstream of T2, always report a Hydraulic Grade Line at values expected (they should have an HGL similar to Tank T1)



  • Thanks Ben, 

    Your points are quite helpful. 

    What I understand from the model now is: 

    1. Upstream tank is doing well. operating above 0% and below 100% (refer first graph). 

    2. Downstream tank (T2) is full at almost every timestep (refer second graph) 

    3. The HGL is plotted between the two tanks and the data makes sense for all the timesteps (refer 3rd graph) 

    Can you please review the screenshots and provide any further recommendations? 

  • This is pointing to instability caused by T2 tank filling controls.

    Should have seen this earlier, but in WaterCAD don't set Control levels to be equal to exactly equal to 0% of 100% of the Tank Level.  Always set it to a value in between.

    Otherwise the user can run into 2 similar problems both related to decimal rounding errors:

    • in the first case the user may have entered 2.00002 metres but in WaterCAD it displays it as "2.000" causing a hard-to-see problem that it seems as if the control is set to stop filling the tank  at 100% full
    • The second problem is a fundamental problem in all programming maths that use floating point numbers.  Both the tank levels and the control levels are are numbers that can't be stored in computer memory with 100% precision.  You can run into issues where say conversion of the numbers at runtime in the calculation runs into an error where the tank level control number, due to floating point imprecision, can be ever so slightly higher than the tank maximum level, causing engine instability.

    An example of precision error can be seen just be looking at Eg.MS Excel and see that it calculates the wrong value for this simple division of one number by another, due to its inability to store numbers precisely.  WaterCAD similarly will run into decimal precision issues under certain circumstances.

    To avoid this, try changing this setting to 1.98 metres,  0.02 metres below the Top Level of the Tank, which obeys the general rule, never use Control Levels in WaterCAD that are exactly equal to 0% or 100% tank level.



  • Hi Ben, 

    Unfortunately changing the number from 2.0 to 1.98 did not solve the problem. Still seeing large flows through the inlet and tank is overflowing. 

    Would appreciate any further assistance. 

    Regards,