Package worldBuilder

Class WaterFlow


  • public class WaterFlow
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int HYDRO_DEBUG  
    • Constructor Summary

      Constructors 
      Constructor Description
      WaterFlow​(Map map)
      compute water flow, water depth, and soil hydration Assertion: drainage has been called: oceanic and downHill are up-to-date
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double annual_erosion​(int index)
      estimated erosion
      double annual_sedimentation​(int index)
      estimated sediment deposition
      double depth​(double flow, double velocity)
      estimated river depth
      void recompute()  
      double velocity​(double slope)
      estimated water flow velocity
      double width​(double flow, double velocity)
      estimated river width
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WaterFlow

        public WaterFlow​(Map map)
        compute water flow, water depth, and soil hydration Assertion: drainage has been called: oceanic and downHill are up-to-date
    • Method Detail

      • recompute

        public void recompute()
      • annual_erosion

        public double annual_erosion​(int index)
        estimated erosion
        Parameters:
        index - of point being checked
        Returns:
        meters of erosion
      • annual_sedimentation

        public double annual_sedimentation​(int index)
        estimated sediment deposition
        Parameters:
        index - of the point being checked
        Returns:
        meters of deposited sediment
      • velocity

        public double velocity​(double slope)
        estimated water flow velocity
        Parameters:
        slope - ... dZ/dX
        Returns:
        flow speed (meters/second)
      • width

        public double width​(double flow,
                            double velocity)
        estimated river width
        Parameters:
        flow - speed (cubic meters/second)
        velocity - ... flow speed (meters/second)
        Returns:
        estimated width (meters)
      • depth

        public double depth​(double flow,
                            double velocity)
        estimated river depth
        Parameters:
        flow - speed (cubic meters/second)
        velocity - ... flow speed (meters/second)
        Returns:
        estimated depth (meters)