Changeset 1642


Ignore:
Timestamp:
Jul 26, 2005, 5:52:20 PM (19 years ago)
Author:
ole
Message:

Comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/shallow_water.py

    r1641 r1642  
    6060Generic_domain = Domain #Rename
    6161
    62 #Shalow water domain
     62#Shallow water domain
    6363class Domain(Generic_domain):
    6464
     
    261261        """
    262262        self.writer.store_timestep(name)
     263
    263264
    264265####################MH 090605 new extrapolation function belonging to domain class
     
    633634
    634635
    635 
    636 # def dry(domain):
    637 #     """Protect against infinitesimal heights and associated high velocities
    638 #     at vertices
    639 #     """
    640 
    641 #     #FIXME: Experimental (from old version). Not in use at the moment
    642 
    643 #     #Shortcuts
    644 #     wv = domain.quantities['stage'].vertex_values
    645 #     zv = domain.quantities['elevation'].vertex_values
    646 #     xmomv = domain.quantities['xmomentum'].vertex_values
    647 #     ymomv = domain.quantities['ymomentum'].vertex_values
    648 #     hv = wv - zv  #Water depths at vertices
    649 
    650 #     #Update
    651 #     for k in range(domain.number_of_elements):
    652 #         hmax = max(hv[k, :])
    653 
    654 #         if hmax < domain.minimum_allowed_height:
    655 #             #Control stage
    656 #             wv[k, :] = zv[k, :]
    657 
    658 #             #Control momentum
    659 #             xmomv[k,:] = ymomv[k,:] = 0.0
    660 
    661 
    662636def protect_against_infinitesimal_and_negative_heights(domain):
    663637    """Protect against infinitesimal heights and associated high velocities
    664638    """
    665 
    666     #FIXME: Look here for error
    667639
    668640    #Shortcuts
     
    673645    hc = wc - zc  #Water depths at centroids
    674646
    675     #print zc
    676     #print '1', wc
    677647    #Update
    678648    for k in range(domain.number_of_elements):
     
    685655            #Control momentum
    686656            xmomc[k] = ymomc[k] = 0.0
    687 
    688     #print '2', wc
    689657
    690658
     
    811779def balance_deep_and_shallow(domain):
    812780    """Compute linear combination between stage as computed by
    813     gradient-limiters limiting using w, and stage computed as
    814     constant height above bed and limited using h.
     781    gradient-limiters limiting using w, and stage computed by
     782    gradient-limiters limiting using h (h-limiter).
    815783    The former takes precedence when heights are large compared to the
    816784    bed slope while the latter takes precedence when heights are
     
    822790    The h-limiter is always applied irrespective of the order.
    823791    """
    824 
    825     #New idea.
    826     #
    827     # In the presence and near of bedslope it is necessary to
    828     # limit slopes based on differences in h rather than w
    829     # (which is what is needed away from the bed).
    830     #
    831     # So whether extrapolation was first order or second order,
    832     # it will need to be balanced with a h-limited gradient.
    833     #
    834     # For this we will use the quantity alpha as before
    835     #
    836792
    837793    #Shortcuts
     
    14401396
    14411397
     1398
     1399
    14421400###########################
    14431401###########################
     
    17201678
    17211679
    1722     #distribute_to_vertices_and_edges = distribute_to_vertices_and_edges_c
     1680    #distribute_to_vertices_and_edges = distribute_to_vertices_and_edges_c #(like MH's)
    17231681
    17241682
Note: See TracChangeset for help on using the changeset viewer.