Changeset 1710
 Timestamp:
 Aug 11, 2005, 3:45:58 PM (18 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

inundation/ga/storm_surge/analytical solutions/Analytical solution_wave_runup.py
r1701 r1710 5 5 Christopher Zoppou, Stephen Roberts, Ole Nielsen, Duncan Gray 6 6 Geoscience Australia 7 7 8 8 Specific methods pertaining to the 2D shallow water equation 9 9 are imported from shallow_water … … 15 15 16 16 ###################### 17 # Module imports 17 # Module imports 18 18 import sys 19 19 from os import sep … … 39 39 #points, elements = strang_mesh('Runup.pt') 40 40 points, elements = strang_mesh('strang_7389.pt') 41 domain = Domain(points, elements) 41 domain = Domain(points, elements) 42 42 43 43 domain.default_order = 2 … … 49 49 for id, face in domain.boundary: 50 50 domain.boundary[(id,face)] = 'external' 51 52 domain.boundary[(0,0)] = 'left' 51 if domain.get_vertex_coordinate(id,(face+1)%3)[0] < 200.0+1.0e10: 52 domain.boundary[(id,face)] = 'left' 53 54 53 55 54 56 … … 60 62 print "Number of triangles = ", len(domain) 61 63 62 #Reduction operation for get_vertex_values 64 #Reduction operation for get_vertex_values 63 65 from util import mean 64 domain.reduction = mean 66 domain.reduction = mean 65 67 #domain.reduction = min #Looks better near steep slopes 66 68 67 #Define the boundary condition 69 #Define the boundary condition 68 70 def stage_setup(x,t_star1): 69 71 vh = 0 … … 84 86 sigma_prime = sigma0/a 85 87 const = (1.ii*lambda_prime)**2+sigma_prime**2 86 88 87 89 v1 = 8.*eta/a*imag(1./const**(3./2.) \ 88 90 3./4.*(1.ii*lambda_prime)/const**(5./2.)) 89 91 90 92 x1 = v1**2/2.a**2*sigma_prime**2/16.+eta \ 91 93 *real(1.2.*(5./4.ii*lambda_prime) \ … … 149 151 h = 0 150 152 w[i] = z[i] 151 return w 153 return w 152 154 153 155 domain.set_quantity('stage', stage) … … 161 163 162 164 165 166 #domain.visualise = True 167 163 168 ###################### 164 169 #Evolution … … 168 173 domain.write_time() 169 174 print boundary_stage(domain.time) 170 175 171 176 print 'That took %.2f seconds' %(time.time()t0) 172 177 173
Note: See TracChangeset
for help on using the changeset viewer.