This model simulates a single pipeline with a reservoir and valve as shown in the figure below. The bulk of calculations are done inside a Script element. The first part calculates the initial conditions by equating the difference in reservoir levels (start vs end) to the friction and valve loss. Next we solve for the Q and H for the interior points of the pipeline then upstream boundary condition. Next we solve the valve boundary condition and store the flow and head to be used as starting conditions for the next time step. Time step is dynamically calculated!
If you are interested in playing with this model but you do not have a commercial license of GoldSim, no problem. You can use our free Player and play with the Player model linked below (files saved with "*.gsp").
You can download the model using the links below.