Changeset 774 for inundation/ga
- Timestamp:
- Jan 21, 2005, 2:41:01 PM (20 years ago)
- Location:
- inundation/ga/storm_surge
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/analytical solutions/Analytical solution_oblique_shock.py
r634 r774 88 88 #Initial condition 89 89 h = 0.5 90 domain.set_quantity(' level', Constant_height(x_slope, h) )90 domain.set_quantity('stage', Constant_height(x_slope, h) ) 91 91 92 92 -
inundation/ga/storm_surge/analytical solutions/Analytical solution_wave_runup.py
r550 r774 115 115 return [stage, uh, vh] 116 116 117 def boundary_ level(t):117 def boundary_stage(t): 118 118 x = -200 119 119 return stage_setup(x,t) … … 137 137 138 138 #Set the water depth 139 def level(x,y):139 def stage(x,y): 140 140 z = x_slope(x,y) 141 141 n = x.shape[0] … … 149 149 return w 150 150 151 domain.set_quantity(' level', level)151 domain.set_quantity('stage', stage) 152 152 153 153 … … 155 155 #Set up boundary conditions 156 156 Br = Reflective_boundary(domain) 157 Bw = Time_boundary(domain, boundary_ level)157 Bw = Time_boundary(domain, boundary_stage) 158 158 domain.set_boundary({'left': Bw, 'external': Br}) 159 159 … … 165 165 for t in domain.evolve(yieldstep = 1., finaltime = 100): 166 166 domain.write_time() 167 print boundary_ level(domain.time)167 print boundary_stage(domain.time) 168 168 169 169 print 'That took %.2f seconds' %(time.time()-t0) -
inundation/ga/storm_surge/analytical solutions/Analytical_solution_MacDonald_import_mesh.py
r647 r774 75 75 #--------------------------------------------------------- 76 76 #Decide which quantities are to be stored at each timestep 77 domain.quantities_to_be_stored = [' level', 'xmomentum', 'ymomentum']77 domain.quantities_to_be_stored = ['stage', 'xmomentum', 'ymomentum'] 78 78 79 79 #Reduction operation for get_vertex_values … … 99 99 #Initial condition 100 100 domain.set_quantity('elevation', 0.0) 101 domain.set_quantity(' level', 0.2)101 domain.set_quantity('stage', 0.2) 102 102 103 103 #----------------- -
inundation/ga/storm_surge/analytical solutions/Analytical_solution_Sampson_import_mesh.py
r563 r774 92 92 93 93 94 #Set the water level95 def level(x,y):94 #Set the water stage 95 def stage(x,y): 96 96 z = x_slope(x,y) 97 97 n = x.shape[0] … … 105 105 return h 106 106 107 domain.set_quantity(' level', level)107 domain.set_quantity('stage', stage) 108 108 109 109 -
inundation/ga/storm_surge/analytical solutions/Analytical_solution_Yoon_import_mesh.py
r556 r774 74 74 domain.set_quantity('elevation', x_slope) 75 75 76 #Set the initial water level77 def level(x,y):76 #Set the initial water stage 77 def stage(x,y): 78 78 z = x_slope(x,y) 79 79 n = x.shape[0] … … 87 87 return h 88 88 89 domain.set_quantity(' level', level)89 domain.set_quantity('stage', stage) 90 90 91 91 -
inundation/ga/storm_surge/analytical solutions/Analytical_solution_contracting_channel_import_mesh.py
r620 r774 46 46 47 47 #Decide which quantities are to be stored at each timestep 48 domain.quantities_to_be_stored = [' level', 'xmomentum', 'ymomentum']48 domain.quantities_to_be_stored = ['stage', 'xmomentum', 'ymomentum'] 49 49 50 50 #Reduction operation for get_vertex_values … … 63 63 #Initial condition 64 64 domain.set_quantity('elevation', 0.0) 65 domain.set_quantity(' level', 0.2)65 domain.set_quantity('stage', 0.2) 66 66 67 67 -
inundation/ga/storm_surge/analytical solutions/Hobart.py
r700 r774 53 53 #Initial condition 54 54 # Throughout 55 domain.set_quantity(' level', 0.)55 domain.set_quantity('stage', 0.) 56 56 57 57 # Within polygon region … … 67 67 68 68 zp = domain.get_quantity('elevation', location='centroids', indexes=indices) 69 # Set the levelto bed elevation plus depth for all triangle vertices in the polygon region69 # Set the stage to bed elevation plus depth for all triangle vertices in the polygon region 70 70 71 domain.set_quantity(' level', zp+depth, location='centroids', indexes=indices)71 domain.set_quantity('stage', zp+depth, location='centroids', indexes=indices) 72 72 73 73 … … 80 80 #for i in indices: 81 81 # w[i, :] = z[i, :] + depth 82 #domain.set_quantity(' level', w)82 #domain.set_quantity('stage', w) 83 83 84 84 … … 91 91 #--------------------------------------------------------- 92 92 #Decide which quantities are to be stored at each timestep 93 domain.quantities_to_be_stored = [' level', 'xmomentum', 'ymomentum']93 domain.quantities_to_be_stored = ['stage', 'xmomentum', 'ymomentum'] 94 94 95 95 #---------------------------- -
inundation/ga/storm_surge/analytical solutions/Malpasset_new.py
r669 r774 49 49 #----------------- 50 50 #Initial condition 51 domain.set_quantity(' level', 0.)51 domain.set_quantity('stage', 0.) 52 52 53 53 #------------------------------------- -
inundation/ga/storm_surge/analytical solutions/Sydney.py
r696 r774 54 54 domain.set_quantity('elevation', x_slope) 55 55 56 #Set the initial water level57 def level(x,y):56 #Set the initial water stage 57 def stage(x,y): 58 58 z = x_slope(x,y) 59 59 n = x.shape[0] … … 61 61 return h 62 62 63 domain.set_quantity(' level', level)63 domain.set_quantity('stage', stage) 64 64 p0 = [[334429.024416, 6251238.11488],[334428.532417, 6251234.42489], 65 65 [334432.468407, 6251233.93289],[334431.730409, 6251238.36088]] 66 domain.set_quantity(' level',Polygon_function([(p0,10000.0)]))66 domain.set_quantity('stage',Polygon_function([(p0,10000.0)])) 67 67 68 68 ############ -
inundation/ga/storm_surge/examples/beach.py
r694 r774 113 113 print 'That took %.2f seconds' %(time.time()-t0) 114 114 115 print 'Set level'116 domain.set_quantity(' level',115 print 'Set stage' 116 domain.set_quantity('stage', 117 117 Polygon_function( [(water, -1.5), 118 118 (land, -10)] )) -
inundation/ga/storm_surge/examples/run_tsh.py
r718 r774 115 115 #domain.set_region(Set_region('mound', 'elevation', 100, location='unique vertices')) 116 116 domain.set_region(Add_value_to_region('mound', 'elevation', 100, location='unique vertices', initial_quantity='elevation')) 117 domain.set_region(Add_value_to_region('reservoir', ' level', 100.0,initial_quantity='elevation'))117 domain.set_region(Add_value_to_region('reservoir', 'stage', 100.0,initial_quantity='elevation')) 118 118 119 119 #print domain.quantities['elevation'].vertex_values 120 #print domain.quantities[' level'].vertex_values120 #print domain.quantities['stage'].vertex_values 121 121 122 122 domain.check_integrity()
Note: See TracChangeset
for help on using the changeset viewer.