Class Structure

From GeoMod

Jump to: navigation, search

The project includes several classes:

  1. class topo, which is a reviesd version of Dr. Urbano's raster_map class, to draw topography
  2. class waterX (X is the version number), the core class for the project, to simulate the flood inundation
  3. class water_tile, an inheretant class of box class, is used to draw flood water tile.

The discription of functions (if available) inside these classes

1. class topo:

  1. The initiation of the class to read a txt file of topography data.
  2. function get_lowest() to return the rows # and column # and the elevation of the lowest point of the initiated area
  3. fucntion of draw_map() to draw a 3_D elevation map of initiated area with elevation tile
  4. function of 3d_line() to draw a 3_D line of the elevation
  5. function of area() to calculate total area
  6. function slope() to calculate the gradient of any two cells

2. class waterX:

  1. the initiation of the class to read the elevation data (txt file) and initiate the subarea of flood inundation modeling using imin,imax,jmin,jmax parameter also include vertical scale, input preciptation, and time step.
  2. function of get_lowest() to return the rows # and column # and the elevation of the lowest point of the initiated subarea.
  3. function of d_N() (or d_water_N() or both, depends on different version) to calculate the water communication with the adjacent cell on the north based on energy equation algorithm (d_water_N(), based on gravity gradient algorithm)
  4. function of d_S() (or d_water_S() or both, depends on different version) to calculate the water communication with the adjacent cell on the south based on energy equation algorithm (d_water_S(), based on gravity gradient algorithm)
  5. function of d_W() (or d_water_W() or both, depends on different version) to calculate the water communication with the adjacent cell on the west based on energy equation algorithm (d_water_W(), based on gravity gradient algorithm)
  6. function of d_E() (or d_water_E() or both, depends on different version) to calculate the water communication with the adjacent cell on the east based on energy equation algorithm (d_water_E(), based on gravity gradient algorithm)
  7. function slope1()(or slope2()) to calculate the gradient of topography of any two cells (slope2(), gradient of water elevation of any two cells)
  8. function d_Q()(or d_Q2()) change the total water volume change among the adjacdent cells during each time step
  9. fucntion of draw_flood() to draw the flood water tile and the depth graphy of the lowest cell and two of its adjacent cells.

3. class water_tile:

just add one additional properity, depth, to box class

Personal tools