Changeset 2270
- Timestamp:
- Jan 24, 2006, 2:08:25 PM (19 years ago)
- Location:
- development/cairns_2006
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
development/cairns_2006/cairns_fault.xya
r2229 r2270 1 5481413.1609155666, 1 558472.38241363952 4933271.8448240105, 1 558472.38241363953 54 44342.9345278544, 1335833.47064026244 4 899908.64107507, 1335833.47064026241 5481413.1609155666, 1001875.1029801967 2 4933271.8448240105, 1001875.1029801967 3 5481413.1609155666, 779236.19120681973 4 4933271.8448240105, 779236.19120681973 -
development/cairns_2006/run_cairns.py
r2229 r2270 14 14 from pyvolution.pmesh2domain import pmesh_to_domain_instance 15 15 from Numeric import array, zeros, Float, allclose 16 import cairns_project 16 #import cairns_project 17 import project 17 18 from caching import cache 18 19 from utilities.polygon import read_polygon, Polygon_function … … 22 23 #------------------------------- 23 24 print 'Creating domain' 24 M = 72 #float(len1)/m 25 N = 20 #float(len2)/n 25 """ 26 M = 36 #float(len1)/m 27 N = 10 #float(len2)/n 26 28 27 29 points, elements, boundary = rectangular_cross(M, N, len1=6393693.9504678631, … … 31 33 #points, elements, boundary = rectangular_cross(N, M, len1=58.0, len2=1.0, origin=(145.0,-24.0)) 32 34 33 domain = Domain(points, elements, boundary) 35 domain = cache(Domain, (points, elements, boundary)) 36 37 """ 38 domain = cache(pmesh_to_domain_instance, 39 (project.mesh_filename, Domain), 40 dependencies = [project.mesh_filename]) 34 41 35 42 domain.check_integrity() … … 49 56 #p0 = read_polygon('cairns_fault_degrees.xya') 50 57 51 domain.set_quantity('stage',Polygon_function([(p0,1 .0)]))58 domain.set_quantity('stage',Polygon_function([(p0,1000.0)])) 52 59 53 60 #print domain.quantities['stage'].vertex_values 54 61 55 62 domain.set_quantity('elevation', 56 filename = cairns_project.bathymetry_filename[:-4] + '.xya',63 filename = project.bathymetry_filename[:-4] + '.xya', 57 64 alpha = 10.0, 58 65 verbose = True, … … 70 77 print 'Boundaries' 71 78 72 # Tidal cycle recorded at Eden as open 73 #print 'Open sea boundary condition from ',cairns_project.boundary_filename 74 #from pyvolution.util import file_function 75 #tide_function = file_function(cairns_project.boundary_filename[:-4] + '.tms', 76 # domain, 77 # verbose = True) 79 78 80 #Bts = Transmissive_Momentum_Set_Stage_boundary(domain, tide_function) 79 81 80 # All other boundaries are reflective 81 #Br = Reflective_boundary(domain) 82 #domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br}) 82 Br = Reflective_boundary(domain) 83 domain.set_boundary({'border': Br, 'border': Br, 'border': Br, 'border': Br}) 83 84 84 Bt = Transmissive_boundary(domain)85 domain.set_boundary({'left': Bt, 'right': Bt, 'top': Bt, 'bottom': Bt})85 #Bt = Transmissive_boundary(domain) 86 #domain.set_boundary({'left': Bt, 'right': Bt, 'top': Bt, 'bottom': Bt}) 86 87 87 88 #------------------------------- 88 89 # Setup domain runtime parameters 89 90 #------------------------------- 91 90 92 domain.visualise = True 91 93 domain.visualise_color_stage = True 94 95 #domain.visualise = False 96 #domain.visualise_color_stage = False 92 97 93 98 base = os.path.basename(sys.argv[0]) … … 96 101 domain.store = True #Store for visualisation purposes 97 102 98 99 100 103 #------------------------------- 101 104 # Evolve … … 103 106 import time 104 107 t0 = time.time() 105 yieldstep = 10 106 finaltime = 120 107 108 yieldstep = 60.0 109 finaltime = 480.0 108 110 109 111 for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
Note: See TracChangeset
for help on using the changeset viewer.