Bout_tmss = anuga.shallow_water.boundaries.Transmissive_momentum_set_stage_boundary(domain, function = outflow_stage_boundary) domain.set_boundary({'left': Br, 'right': Br, 'top1': Bout_tmss, 'top2': Bout_tmss, 'bottom1': Br, 'bottom2': Br, 'chan_out': Bout_tmss, 'chan_in': Br}) #------------------------------------------------------------------------------ # Produce a documentation of parameters #------------------------------------------------------------------------------ from anuga.validation_utilities import save_parameters_tex save_parameters_tex(domain) #------------------------------------------------------------------------------ # # Evolve system through time # #------------------------------------------------------------------------------ barrier() for t in domain.evolve(yieldstep=10.0, finaltime=dtQdata*(len(Qdata)-2)): if(myid==0 and verbose): print domain.timestepping_statistics() vol = domain.report_water_volume_statistics()
# create parallel domain #=================================================================================== domain = distribute(domain) #----------------------------------------------------------------------------- # Setup boundary conditions #------------------------------------------------------------------------------ Br = anuga.Reflective_boundary(domain) # Solid reflective wall Bt = anuga.Transmissive_boundary(domain) # Continue all values on boundary Bd = anuga.Dirichlet_boundary([1, 0., 0.]) # Constant boundary values # Associate boundary tags with boundary objects domain.set_boundary({'left': Bt, 'right': Bt, 'top': Br, 'bottom': Br}) #------------------------------------------------------------------------- # Produce a documentation of parameters #------------------------------------------------------------------------- from anuga.validation_utilities import save_parameters_tex save_parameters_tex(domain) #=================================================================================== # Evolve system through time #=================================================================================== for t in domain.evolve(yieldstep=0.5, finaltime=50.): if myid == 0 and verbose: print domain.timestepping_statistics() domain.sww_merge(delete_old=True) finalize()