Changeset 5085 for anuga_work/debug
- Timestamp:
- Feb 27, 2008, 10:12:20 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/debug/bad_time_step/run_dam.py
r5084 r5085 1 1 """ 2 Script for debugging potential problem with the boundary 3 condition: transmissive_momentum_set_stage 2 4 3 Script for running a breaking wave simulation of Jon Hinwoods wave tank. 4 Note: this is based on the frinction_ua_flume_2006 structure.5 When the wave reflects back towards the boundary excessive values 6 for momentum are generated leading to degenerate timesteps. 5 7 6 7 Duncan Gray, GA - 2007 8 Ole Nielsen and Duncan Gray, GA - 2008 8 9 """ 9 10 … … 23 24 24 25 from anuga.abstract_2d_finite_volumes.util import file_function 25 #from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross26 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross 26 27 from anuga.pmesh.mesh_interface import create_mesh_from_regions 27 28 … … 49 50 #------------------------------------------------------------------------- 50 51 friction=0.01 51 maximum_triangle_area=0.0152 #maximum_triangle_area=0.1 #OK53 52 54 53 basename = 'debug_boundary' 55 mesh_filename = basename + '.msh'56 54 57 55 boundary_file = 'boundary.tms' … … 64 62 #------------------------------------------------------------------------- 65 63 66 # Original unstructured mesh ()67 #create_mesh.generate(mesh_filename,68 # maximum_triangle_area=maximum_triangle_area)69 70 71 # Simple mesh with same dimensions72 73 64 xright = 19.0 74 65 ybottom = 0 75 66 ytop = 0.45 76 67 xleft = 0.0 77 #xslope = 4.078 68 79 #Outline 80 point_sw = [xleft, ybottom] 81 point_se = [xright, ybottom] 82 point_nw = [xleft, ytop] 83 point_ne = [xright, ytop] 84 85 86 create_mesh_from_regions([point_sw, 87 point_se, 88 point_ne, 89 point_nw], 90 {'wall': [0,1,2], 'wave': [3]}, 91 maximum_triangle_area=maximum_triangle_area, 92 filename=mesh_filename) 93 94 95 #TODO 96 #points, elements, boundary = rectangular_cross(m, n, len1=1.0, len2=1.0, origin = (0.0, 0.0)): 69 #Very simple mesh 70 points, elements, boundary = rectangular_cross(200, 5, 71 len1=xright, 72 len2=ytop, 73 origin = (0.0, 0.0)) 97 74 98 75 … … 101 78 # Setup computational domain 102 79 #------------------------------------------------------------------------- 103 domain = Domain(mesh_filename, use_cache = False, verbose = True) 80 #domain = Domain(mesh_filename, use_cache = False, verbose = True) 81 domain = Domain(points, elements, boundary, verbose = True) 104 82 print domain.statistics() 105 83 … … 125 103 Bts = Transmissive_Momentum_Set_Stage_boundary(domain, function) 126 104 Br = Reflective_boundary(domain) 127 domain.set_boundary( {' wall': Br, 'wave': Bts} )105 domain.set_boundary( {'top': Br, 'right': Br, 'bottom':Br, 'left': Bts} ) 128 106 129 107 … … 134 112 for t in domain.evolve(0.1, 15): 135 113 print domain.timestepping_statistics(track_speeds=False) 136 print domain.boundary_statistics(tags=[' wave'])114 print domain.boundary_statistics(tags=['left']) 137 115 138 116 print 'finished'
Note: See TracChangeset
for help on using the changeset viewer.