"""Validation study of Merimbula lake using Pyvolution. Existence of file 'merimbula_interpolated.tsh' is assumed. """ ############################### # Setup Path and import modules import sys from os import sep, path sys.path.append('..'+sep+'pyvolution') from shallow_water import Domain, Reflective_boundary, Dirichlet_boundary from pmesh2domain import pmesh_to_domain_instance ###################### # Domain filename = 'merimbula_interpolated.tsh' yieldstep = 10 finaltime = 1000 print 'Creating domain from', filename domain = pmesh_to_domain_instance(filename, Domain) print "Number of triangles = ", len(domain) domain.default_order = 1 domain.filename = filename domain.set_quantity('friction', 0.07) ###################### # Boundary conditions inflow_stage = 20.0 Bd = Dirichlet_boundary([inflow_stage, 0.0, 0.0]) Br = Reflective_boundary(domain) domain.set_boundary({'external': Br, 'open': Bd}) ###################### #Evolution for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime): domain.write_time() print 'Done'