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

Last change on this file since 643 was 528, checked in by ole, 20 years ago

Added file boundary to Merimbula validation

File size: 1.2 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, File_boundary,\
13     Dirichlet_boundary
14from pmesh2domain import pmesh_to_domain_instance
15
16######################
17# Domain
18filename = 'merimbula_interpolated.tsh'
19yieldstep = 10
20finaltime = 1000
21   
22print 'Creating domain from', filename
23domain = pmesh_to_domain_instance(filename, Domain)
24print "Number of triangles = ", len(domain)
25
26domain.default_order = 1
27domain.filename = filename
28
29domain.set_quantity('friction', 0.07)
30
31######################
32# Boundary conditions
33
34filename = 'Eden_Australia_31082004.txt'
35Bf = File_boundary(domain, filename)
36
37inflow_stage = 20.0
38Bd = Dirichlet_boundary([inflow_stage, 0.0, 0.0])
39Br = Reflective_boundary(domain)
40domain.set_boundary({'external': Br, 'open': Bf}) 
41         
42######################
43#Evolution
44for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
45    domain.write_time()
46   
47print 'Done'
48
49   
Note: See TracBrowser for help on using the repository browser.