Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
HTML
<script type="text/javascript">
    
 AJS.toInit(function() {
 // unbind directly-embedded images
 AJS.$("img.confluence-embedded-image").unbind("click.fb");
 });
 </script>

scrollbar

To begin with, create a new region for this section.

The model is now almost ready to be run. We just need to specify three more small details at this point of the tutorial. First of all, the model needs to be discretized spatially. In other words, we have to generate the computational grid for the network. This is done with the CreateComputationalGrid   method.

Code Block
languagepy
titleCreate computational grid
CreateComputationalGrid(flowModel, gridAtFixedLength = True, fixedLength = 200)

This creates a grid with a calculation point every 200 meters.

Secondly, we need to specify the time discretization: start and stop time, and time-step that will be used in the simulation.

Code Block
languagepy
titleSet model timesDefine time settings
from datetime import datetime, time # region Import libraries

SetModelTimes(flowModel, datetime(2007, 1, 15, 1, 0, 0), datetime(2007, 1, 17, 1, 0, 0), time(0,10,0,))

The last thing we need to do is to Finally, we rename a gridpoint location called grid point location, currently called "stadsgrachten Zwolle Midden_0.000". Later on in this tutorial, we will import data measured at that place. In order to easily identify the location from now on, we will give it the name "Gauging Station". This is because we use this later on in the tutorial (we will have measurements for this point)

Code Block
languagepy
titleRename gridpoint location "stadsgrachten Zwolle Midden_0.000" to "Gauging Station"
dataPoint = GetComputationGridLocationByName(flowModel, "stadsgrachten Zwolle Midden_0.000")
dataPoint.Name = "Gauging Station"

 

Note: The icon Image Added indicates functions that you might find interesting to see how they have been built. You can do this by opening the corresponding library (another normal script python file on its own) in the toolbox and checking the code which defines the function or method you are interested in.

 

 

Panel

 

Panel

Continue with Run the flow model