/[escript]/trunk/modellib/py_src/tsunami.py
ViewVC logotype

Diff of /trunk/modellib/py_src/tsunami.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2549 by jfenwick, Mon Jul 20 06:43:47 2009 UTC revision 2625 by jfenwick, Fri Aug 21 06:30:25 2009 UTC
# Line 897  class TsunamiInDeepWater(Model): Line 897  class TsunamiInDeepWater(Model):
897      Runs the deep water tsunami model based on a simplified form of the      Runs the deep water tsunami model based on a simplified form of the
898      shallow water equation.      shallow water equation.
899    
900      M{d^2 h/dt^2 =div(c grad(h)) }      *d^2 h/dt^2 =div(c grad(h))*
901    
902      where h is the wave height above sea level, and c=sqrt(g*H),      where h is the wave height above sea level, and c=sqrt(g*H),
903      with H - depth of the water level, g - gravity constant      with H - depth of the water level, g - gravity constant
# Line 933  class TsunamiInDeepWater(Model): Line 933  class TsunamiInDeepWater(Model):
933          """          """
934          Returns new step size          Returns new step size
935    
936          @param dt: last time step size used          :param dt: last time step size used
937          @type dt: C{float}          :type dt: ``float``
938          @return: time step size that can safely be used          :return: time step size that can safely be used
939          @rtype: C{float}          :rtype: ``float``
940          """          """
941          return self.__dt          return self.__dt
942    
# Line 944  class TsunamiInDeepWater(Model): Line 944  class TsunamiInDeepWater(Model):
944          """          """
945          Performs the time step using the Verlet scheme          Performs the time step using the Verlet scheme
946    
947          @param dt: time step size to be used          :param dt: time step size to be used
948          @type dt: C{float}          :type dt: ``float``
949          """          """
950          self.__pde.setValue(X=-self.__c2*grad(self.wave_height))          self.__pde.setValue(X=-self.__c2*grad(self.wave_height))
951    
# Line 962  class SurfMovie(Model): Line 962  class SurfMovie(Model):
962      """      """
963      movie from a wave propagation on the sea      movie from a wave propagation on the sea
964    
965      @ivar time: current time      :ivar time: current time
966      @ivar bathymetry: scalar data set      :ivar bathymetry: scalar data set
967      @ivar wave_height: vector data set      :ivar wave_height: vector data set
968      @ivar filename: name of the movie file      :ivar filename: name of the movie file
969      """      """
970      def __init__(self,**kwargs):      def __init__(self,**kwargs):
971          Model.__init__(self,**kwargs)          Model.__init__(self,**kwargs)
# Line 1229  class SurfMovie(Model): Line 1229  class SurfMovie(Model):
1229          """          """
1230          Does any necessary postprocessing after each step          Does any necessary postprocessing after each step
1231    
1232          @param dt:          :param dt:
1233          """          """
1234          if self.t >= self.__next_t:          if self.t >= self.__next_t:
1235              prefix = os.path.join(WORKDIR, \              prefix = os.path.join(WORKDIR, \
# Line 1250  class SurfMovie(Model): Line 1250  class SurfMovie(Model):
1250          """          """
1251          returns new step size          returns new step size
1252    
1253          @param dt: last time step size used          :param dt: last time step size used
1254          @type dt: C{float}          :type dt: ``float``
1255          @return: time step size that can savely be used          :return: time step size that can savely be used
1256          @rtype: C{float}          :rtype: ``float``
1257          """          """
1258          return self.__next_t-self.t          return self.__next_t-self.t
1259    

Legend:
Removed from v.2549  
changed lines
  Added in v.2625

  ViewVC Help
Powered by ViewVC 1.1.26