Changeset 1642
- Timestamp:
- Jul 26, 2005, 5:52:20 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/shallow_water.py
r1641 r1642 60 60 Generic_domain = Domain #Rename 61 61 62 #Shal ow water domain62 #Shallow water domain 63 63 class Domain(Generic_domain): 64 64 … … 261 261 """ 262 262 self.writer.store_timestep(name) 263 263 264 264 265 ####################MH 090605 new extrapolation function belonging to domain class … … 633 634 634 635 635 636 # def dry(domain):637 # """Protect against infinitesimal heights and associated high velocities638 # at vertices639 # """640 641 # #FIXME: Experimental (from old version). Not in use at the moment642 643 # #Shortcuts644 # wv = domain.quantities['stage'].vertex_values645 # zv = domain.quantities['elevation'].vertex_values646 # xmomv = domain.quantities['xmomentum'].vertex_values647 # ymomv = domain.quantities['ymomentum'].vertex_values648 # hv = wv - zv #Water depths at vertices649 650 # #Update651 # for k in range(domain.number_of_elements):652 # hmax = max(hv[k, :])653 654 # if hmax < domain.minimum_allowed_height:655 # #Control stage656 # wv[k, :] = zv[k, :]657 658 # #Control momentum659 # xmomv[k,:] = ymomv[k,:] = 0.0660 661 662 636 def protect_against_infinitesimal_and_negative_heights(domain): 663 637 """Protect against infinitesimal heights and associated high velocities 664 638 """ 665 666 #FIXME: Look here for error667 639 668 640 #Shortcuts … … 673 645 hc = wc - zc #Water depths at centroids 674 646 675 #print zc676 #print '1', wc677 647 #Update 678 648 for k in range(domain.number_of_elements): … … 685 655 #Control momentum 686 656 xmomc[k] = ymomc[k] = 0.0 687 688 #print '2', wc689 657 690 658 … … 811 779 def balance_deep_and_shallow(domain): 812 780 """Compute linear combination between stage as computed by 813 gradient-limiters limiting using w, and stage computed as814 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). 815 783 The former takes precedence when heights are large compared to the 816 784 bed slope while the latter takes precedence when heights are … … 822 790 The h-limiter is always applied irrespective of the order. 823 791 """ 824 825 #New idea.826 #827 # In the presence and near of bedslope it is necessary to828 # limit slopes based on differences in h rather than w829 # (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 before835 #836 792 837 793 #Shortcuts … … 1440 1396 1441 1397 1398 1399 1442 1400 ########################### 1443 1401 ########################### … … 1720 1678 1721 1679 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) 1723 1681 1724 1682
Note: See TracChangeset
for help on using the changeset viewer.