Changeset 1950 for inundation/pyvolution/euler.py
- Timestamp:
- Oct 17, 2005, 5:47:56 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/euler.py
r1949 r1950 58 58 Generic_domain = Domain #Rename 59 59 60 # Shallow water domain60 #Euler domain 61 61 class Domain(Generic_domain): 62 62 … … 65 65 use_inscribed_circle=False): 66 66 67 conserved_quantities = [' stage', 'xmomentum', 'ymomentum']68 other_quantities = [' elevation', 'friction']67 conserved_quantities = ['density', 'xmomentum', 'ymomentum', 'energy'] 68 other_quantities = ['pressure'] 69 69 Generic_domain.__init__(self, coordinates, vertices, boundary, 70 70 conserved_quantities, other_quantities, 71 71 tagged_elements, geo_reference, use_inscribed_circle) 72 72 73 from config import minimum_allowed_height, g 74 self.minimum_allowed_height = minimum_allowed_height 75 self.g = g 76 77 self.forcing_terms.append(gravity) 78 self.forcing_terms.append(manning_friction) 73 from euler_config import minimum_allowed_density 74 self.minimum_allowed_density = minimum_allowed_density 79 75 80 76 #Realtime visualisation … … 89 85 self.store = False 90 86 self.format = 'sww' 91 self.smooth = True87 self.smooth = False 92 88 93 89 #Reduction operation for get_vertex_values … … 96 92 #self.reduction = min #Looks better near steep slopes 97 93 98 self.quantities_to_be_stored = [' stage']94 self.quantities_to_be_stored = ['density', 'xmomentum', 'ymomentum', 'energy', 'pressure'] 99 95 100 96 101 97 #Establish shortcuts to relevant quantities (for efficiency) 102 #self.w = self.quantities['stage']103 #self.uh= self.quantities['xmomentum']104 #self.vh= self.quantities['ymomentum']105 #self.z = self.quantities['elevation']106 #self.eta = self.quantities['friction'] 98 self.rho = self.quantities['density'] 99 self.mx = self.quantities['xmomentum'] 100 self.my = self.quantities['ymomentum'] 101 self.E = self.quantities['energy'] 102 107 103 108 104 def initialise_visualiser(self,scale_z=1.0,rect=None): … … 111 107 from realtime_visualisation_new import Visualiser 112 108 self.visualiser = Visualiser(self,scale_z,rect) 113 self.visualiser.setup['elevation']=True114 109 self.visualise = True 115 110 … … 119 114 #Check that we are solving the shallow water wave equation 120 115 121 msg = 'First conserved quantity must be " stage"'116 msg = 'First conserved quantity must be "density"' 122 117 assert self.conserved_quantities[0] == 'stage', msg 123 118 msg = 'Second conserved quantity must be "xmomentum"' 124 119 assert self.conserved_quantities[1] == 'xmomentum', msg 125 120 msg = 'Third conserved quantity must be "ymomentum"' 121 assert self.conserved_quantities[2] == 'ymomentum', msg 122 msg = 'Fourth conserved quantity must be "energy"' 126 123 assert self.conserved_quantities[2] == 'ymomentum', msg 127 124
Note: See TracChangeset
for help on using the changeset viewer.