Changeset 2772
- Timestamp:
- Apr 27, 2006, 11:10:38 AM (19 years ago)
- Location:
- inundation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/examples/bedslope.py
r2619 r2772 1 1 """Simple example of shallow water wave equation using Pyvolution 2 2 3 Water driven by linear slope and Dirichlet boundary 3 Water driven up a linear slope with a time varying boundary, 4 similar to beach environment 4 5 5 6 """ … … 12 13 13 14 #Create basic triangular mesh 14 points, vertices, boundary = rectangular( 2, 1)15 points, vertices, boundary = rectangular(10, 10) 15 16 16 17 #Create shallow water domain … … 30 31 domain.set_quantity('friction', 0.1) 31 32 32 h = 0.0 5 # Constant depth33 domain.set_quantity('stage', expression = 'elevation + %f' %h)33 h = 0.00 # Constant depth over elevation 34 domain.set_quantity('stage', -.4) 34 35 35 36 … … 41 42 Bd = Dirichlet_boundary([0.2,0.,0.]) 42 43 Bw = Time_boundary(domain=domain, 43 f=lambda t: [(0.1*sin(t*2*pi) ), 0.0, 0.0])44 f=lambda t: [(0.1*sin(t*2*pi)-0.3), 0.0, 0.0]) 44 45 45 46 46 47 print 'Tags are ', domain.get_boundary_tags() 47 48 48 domain.set_boundary({'left': Bd, 'right': Br, 'top': Br, 'bottom': Br}) 49 #domain.set_boundary({'left': Bw, 'right': Br, 'top': Br, 'bottom': Br}) 49 domain.set_boundary({'left': Br, 'right': Bw, 'top': Br, 'bottom': Br}) 50 50 51 51 … … 54 54 domain.check_integrity() 55 55 56 for t in domain.evolve(yieldstep = 0.1, finaltime = 0.2):56 for t in domain.evolve(yieldstep = 0.1, finaltime = 4.0): 57 57 domain.write_time() 58 58 -
inundation/geospatial_data/geospatial_data.py
r2711 r2772 443 443 ofile is the file name, including the extension 444 444 The point_dict is defined at the top of this file. 445 446 If absolute is True data points at returned added to the xll and yll 447 and geo_reference as None 448 449 If absolute is False data points at returned as relative to the xll 450 and yll and geo_reference remains uneffected 445 451 """ 446 452 447 #this was done for all keys in the mesh file.448 #if not mesh_dict.has_key('points'):449 # mesh_dict['points'] = []450 451 453 if (ofile[-4:] == ".xya"): 452 454 if absolute is True:
Note: See TracChangeset
for help on using the changeset viewer.