source: inundation/ga/storm_surge/validation/run_merimbula.py @ 522

Last change on this file since 522 was 522, checked in by ole, 20 years ago
File size: 1.1 KB
Line 
1"""Validation study of Merimbula lake using Pyvolution.
2
3Existence of file 'merimbula_interpolated.tsh' is assumed.
4"""
5
6###############################
7# Setup Path and import modules
8import sys
9from os import sep, path
10sys.path.append('..'+sep+'pyvolution')
11
12from shallow_water import Domain, Reflective_boundary, Dirichlet_boundary
13from pmesh2domain import pmesh_to_domain_instance
14
15######################
16# Domain
17filename = 'merimbula_interpolated.tsh'
18yieldstep = 10
19finaltime = 1000
20   
21print 'Creating domain from', filename
22domain = pmesh_to_domain_instance(filename, Domain)
23print "Number of triangles = ", len(domain)
24
25domain.default_order = 1
26domain.filename = filename
27
28domain.set_quantity('friction', 0.07)
29
30######################
31# Boundary conditions
32inflow_stage = 20.0
33Bd = Dirichlet_boundary([inflow_stage, 0.0, 0.0])
34Br = Reflective_boundary(domain)
35domain.set_boundary({'external': Br, 'open': Bd}) 
36         
37######################
38#Evolution
39for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
40    domain.write_time()
41   
42print 'Done'
43
44   
Note: See TracBrowser for help on using the repository browser.