Changeset 3793


Ignore:
Timestamp:
Oct 16, 2006, 2:36:26 PM (17 years ago)
Author:
ole
Message:

One more file untabified

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/shallow_water_domain.py

    r3789 r3793  
    164164        self.minimum_storable_height = minimum_storable_height
    165165        self.quantities_to_be_stored = ['stage','xmomentum','ymomentum']
    166                
     166               
    167167
    168168
     
    11121112            alpha = 1.0
    11131113
    1114         #Let
    1115         #
    1116         #  wvi be the w-limited stage (wvi = zvi + hvi)
    1117         #  wvi- be the h-limited state (wvi- = zvi + hvi-)
    1118         #
    1119         #
    1120         #where i=0,1,2 denotes the vertex ids
    1121         #
     1114        #Let
     1115        #
     1116        #  wvi be the w-limited stage (wvi = zvi + hvi)
     1117        #  wvi- be the h-limited state (wvi- = zvi + hvi-)
     1118        #
     1119        #
     1120        #where i=0,1,2 denotes the vertex ids
     1121        #
    11221122        #Weighted balance between w-limited and h-limited stage is
    11231123        #
    1124         #  wvi := (1-alpha)*(zvi+hvi-) + alpha*(zvi+hvi)
    1125         #
     1124        #  wvi := (1-alpha)*(zvi+hvi-) + alpha*(zvi+hvi)
     1125        #
    11261126        #It follows that the updated wvi is
    11271127        #  wvi := zvi + (1-alpha)*hvi- + alpha*hvi
    11281128        #
    1129         # Momentum is balanced between constant and limited
     1129        # Momentum is balanced between constant and limited
    11301130
    11311131
     
    11331133        #    wv[k,i] = zv[k,i] + hvbar[k,i]
    11341134
    1135         #return
    1136 
    1137         if alpha < 1:
     1135        #return
     1136
     1137        if alpha < 1:
    11381138
    11391139            for i in range(3):
     
    14441444        if eta[k] >= eps:
    14451445            if h[k] >= eps:
    1446                 S = -g * eta[k]**2 * sqrt((uh[k]**2 + vh[k]**2))
    1447                 S /= h[k]**(7.0/3)
    1448 
    1449                 #Update momentum
    1450                 xmom_update[k] += S*uh[k]
    1451                 ymom_update[k] += S*vh[k]
     1446                S = -g * eta[k]**2 * sqrt((uh[k]**2 + vh[k]**2))
     1447                S /= h[k]**(7.0/3)
     1448
     1449                #Update momentum
     1450                xmom_update[k] += S*uh[k]
     1451                ymom_update[k] += S*vh[k]
    14521452
    14531453
     
    15331533        if tau[k] >= eps:
    15341534            if h[k] >= eps:
    1535                 S = -tau[k]/h[k]
    1536 
    1537                 #Update momentum
    1538                 xmom_update[k] += S*uh[k]
    1539                 ymom_update[k] += S*vh[k]
     1535                S = -tau[k]/h[k]
     1536
     1537                #Update momentum
     1538                xmom_update[k] += S*uh[k]
     1539                ymom_update[k] += S*vh[k]
    15401540
    15411541
     
    15571557        except Exception, e:
    15581558            msg = 'Function %s could not be executed:\n%s' %(f, e)
    1559             #FIXME: Reconsider this semantics
     1559            #FIXME: Reconsider this semantics
    15601560            raise msg
    15611561
     
    17801780        #Weighted balance between stage parallel to bed elevation
    17811781        #(wvi = zvi + hc) and stage as computed by 1st or 2nd
    1782         #order gradient limiter
     1782        #order gradient limiter
    17831783        #(wvi = zvi + hvi) where i=0,1,2 denotes the vertex ids
    17841784        #
     
    17891789        #Note that hvi = zc+hc-zvi in the first order case (constant).
    17901790
    1791         if alpha < 1:
     1791        if alpha < 1:
    17921792            for i in range(3):
    17931793                wv[k,i] = zv[k,i] + hc[k] + alpha*(hv[k,i]-hc[k])
Note: See TracChangeset for help on using the changeset viewer.