source: inundation/ga/storm_surge/pyvolution/flatbed.py @ 527

Last change on this file since 527 was 505, checked in by ole, 20 years ago

this is a test from GA

File size: 1003 bytes
Line 
1"""Example of shallow water wave equation.
2
3Generate slope
4
5"""
6
7######################
8# Module imports
9#
10from mesh_factory import rectangular
11from shallow_water import Domain, Reflective_boundary, Dirichlet_boundary,\
12     Constant_height, wind_Stress
13from Numeric import array
14
15#Create basic mesh
16N = 150
17points, vertices, boundary = rectangular(N, N, 1000, 1000)
18
19#Create shallow water domain
20domain = Domain(points, vertices, boundary)
21domain.smooth = True
22domain.visualise = False
23domain.store = True
24domain.default_order=1
25
26#Set driving forces
27manning = 0.07
28manning = 0.0
29inflow_level = 10.0
30domain.set_quantity('friction', manning)
31
32
33
34######################
35# Boundary conditions
36Br = Reflective_boundary(domain)
37Bd = Dirichlet_boundary([inflow_level,0.,0.])
38
39domain.set_boundary({'left': Bd, 'right': Br, 'top': Br, 'bottom': Br})
40domain.check_integrity()
41
42
43######################
44#Evolution
45for t in domain.evolve(yieldstep = 10, finaltime = 500):
46    domain.write_time()
47
48print 'Done'   
49
Note: See TracBrowser for help on using the repository browser.