Changeset 5154
- Timestamp:
- Mar 11, 2008, 10:13:40 AM (17 years ago)
- Location:
- anuga_work/development/near_shore_PMD
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/near_shore_PMD/create_mesh.py
r5095 r5154 3 3 4 4 from anuga.pmesh.mesh_interface import create_mesh_from_regions 5 5 from anuga.coordinate_transforms.geo_reference import Geo_reference 6 6 7 7 xslope = 5.0 # Distance between the boundary ande the start of the slope … … 13 13 # Basic geometry and bounding polygon 14 14 xleft = -100 # Beach 15 xleft = 8000 # looking at the first 2 km of wave travel 15 16 xright = 10000 # wave generated here 16 17 if thinner: 17 ytop = 100018 ybottom = - 100018 ytop = 500 19 ybottom = -500 19 20 else: 20 21 ytop = 2000 … … 36 37 xright = 2000 37 38 if thinner: 38 ytop = 90039 ybottom = - 90039 ytop = 450 40 ybottom = -450 40 41 else: 41 42 ytop = 1000 … … 58 59 'wave': [0]}, 59 60 maximum_triangle_area=maximum_triangle_area, 60 interior_regions=interior_regions, 61 #interior_regions=interior_regions, 62 mesh_geo_reference=Geo_reference(), 61 63 filename=mesh_filename, 62 64 verbose=True) -
anuga_work/development/near_shore_PMD/run_beach.py
r5095 r5154 51 51 # swash 52 52 z[i] = -0.05*x[i] 53 #z[i] = -30 53 54 elif x[i] <= 1000: 54 55 # surf 55 56 z[i] = -0.15*(x[i]**(0.5)) 57 #z[i] = -30 56 58 else: 57 59 # Nominal shoreface 58 60 z[i] = -0.01888*(x[i]**(0.8)) 61 #z[i] = -30 59 62 #>>> -0.15*(1000**0.5) 60 63 #-4.7434164902525691 … … 71 74 if is_trial_run is True: 72 75 outputdir_name += '_test' 73 yieldstep = 1 074 finaltime = 1 200.76 yieldstep = 1 77 finaltime = 100. 75 78 maximum_triangle_area=3000 76 79 thinner=True 77 80 else: 78 yieldstep = 5. 79 finaltime = 1200 80 maximum_triangle_area=50 81 yieldstep = 1. 82 finaltime = 1600 83 finaltime = 100 84 maximum_triangle_area = 100 81 85 thinner=True 82 86 … … 93 97 pro_instance.outputdir + 'create_mesh.py') 94 98 99 #mesh_filename = pro_instance.meshdir + basename + '.tsh' 95 100 mesh_filename = pro_instance.meshdir + basename + '.msh' 96 101 … … 131 136 domain.set_name(basename) 132 137 domain.set_datadir(pro_instance.outputdir) 138 domain.set_default_order(2) # Use second order spatial scheme 133 139 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum']) 134 140 domain.set_minimum_storable_height(0.001) … … 152 158 Bd = Dirichlet_boundary([10.,0,0]) 153 159 Bwp = Transmissive_Momentum_Set_Stage_boundary(domain, 154 lambda t: [(1.2*sin(2*t*pi/10)), 0.0, 0.0]) 160 lambda t: [(1.2*sin(2*t*pi/10)), 0.0 ,0.0]) 161 Bwp_velocity = Time_boundary(domain, 162 lambda t: [(1.2*sin(2*t*pi/10)), 163 0.24*sin(2*t*pi/10),0.0]) 155 164 Bws = Transmissive_Momentum_Set_Stage_boundary(domain, 156 165 lambda t: [1.2*sin(2*t*pi/10)+1.0*sin(2*t*pi/9.5), 157 166 0.0, 0.0]) 158 domain.set_boundary( {'wall': Br, 'wave': Bw s} )167 domain.set_boundary( {'wall': Br, 'wave': Bwp_velocity} ) 159 168 160 169 #------------------------------------------------------------------------- … … 193 202 #------------------------------------------------------------- 194 203 if __name__ == "__main__": 195 main( is_trial_run = False, 196 outputdir_name=' Primary_wave_thin_50')204 main( is_trial_run = False, friction=0.0, 205 outputdir_name='Velocity_wave_thinner_100_0_friction_ft1600_2nd_order')
Note: See TracChangeset
for help on using the changeset viewer.