Changeset 3793
- Timestamp:
- Oct 16, 2006, 2:36:26 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r3789 r3793 164 164 self.minimum_storable_height = minimum_storable_height 165 165 self.quantities_to_be_stored = ['stage','xmomentum','ymomentum'] 166 166 167 167 168 168 … … 1112 1112 alpha = 1.0 1113 1113 1114 1115 1116 1117 1118 1119 1120 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 # 1122 1122 #Weighted balance between w-limited and h-limited stage is 1123 1123 # 1124 1125 1124 # wvi := (1-alpha)*(zvi+hvi-) + alpha*(zvi+hvi) 1125 # 1126 1126 #It follows that the updated wvi is 1127 1127 # wvi := zvi + (1-alpha)*hvi- + alpha*hvi 1128 1128 # 1129 1129 # Momentum is balanced between constant and limited 1130 1130 1131 1131 … … 1133 1133 # wv[k,i] = zv[k,i] + hvbar[k,i] 1134 1134 1135 1136 1137 1135 #return 1136 1137 if alpha < 1: 1138 1138 1139 1139 for i in range(3): … … 1444 1444 if eta[k] >= eps: 1445 1445 if h[k] >= eps: 1446 1447 1448 1449 1450 1451 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] 1452 1452 1453 1453 … … 1533 1533 if tau[k] >= eps: 1534 1534 if h[k] >= eps: 1535 1536 1537 1538 1539 1535 S = -tau[k]/h[k] 1536 1537 #Update momentum 1538 xmom_update[k] += S*uh[k] 1539 ymom_update[k] += S*vh[k] 1540 1540 1541 1541 … … 1557 1557 except Exception, e: 1558 1558 msg = 'Function %s could not be executed:\n%s' %(f, e) 1559 1559 #FIXME: Reconsider this semantics 1560 1560 raise msg 1561 1561 … … 1780 1780 #Weighted balance between stage parallel to bed elevation 1781 1781 #(wvi = zvi + hc) and stage as computed by 1st or 2nd 1782 1782 #order gradient limiter 1783 1783 #(wvi = zvi + hvi) where i=0,1,2 denotes the vertex ids 1784 1784 # … … 1789 1789 #Note that hvi = zc+hc-zvi in the first order case (constant). 1790 1790 1791 1791 if alpha < 1: 1792 1792 for i in range(3): 1793 1793 wv[k,i] = zv[k,i] + hc[k] + alpha*(hv[k,i]-hc[k])
Note: See TracChangeset
for help on using the changeset viewer.