Changeset 1491
- Timestamp:
- Jun 1, 2005, 4:04:38 PM (20 years ago)
- Location:
- inundation/ga/storm_surge
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/Hobart/Landslide_1D.for
r1444 r1491 348 348 c 349 349 c ---- Try for a flat subinterval 350 c 351 do i=md,nx+md+2352 hmax = dmax1(h_l(i),h_r(i))353 dz = (z2(i) - z2(i-1))354 355 if (h_l(i) .lt. 0.01d0*h_r(i) ) then356 h_r(i) = sqrt(abs(2.0d0*dz*h(i)))357 endif358 359 if (h_r(i) .lt. 0.01d0*h_l(i) ) then360 h_l(i) = sqrt(abs(2.0d0*dz*h(i)))361 endif362 enddo350 cc 351 c do i=md,nx+md+2 352 c hmax = dmax1(h_l(i),h_r(i)) 353 c dz = (z2(i) - z2(i-1)) 354 c 355 c if (h_l(i) .lt. 0.01d0*h_r(i) ) then 356 c h_r(i) = sqrt(abs(2.0d0*dz*h(i))) 357 c endif 358 c 359 c if (h_r(i) .lt. 0.01d0*h_l(i) ) then 360 c h_l(i) = sqrt(abs(2.0d0*dz*h(i))) 361 c endif 362 c enddo 363 363 364 364 return -
inundation/ga/storm_surge/Hobart/Landslide_Tadmor.for
r1452 r1491 3 3 c 4 4 c Stiff source term solution using the second order 5 c central scheme of Tadmorand the modifications5 c central scheme of Landslide and the modifications 6 6 c suggested by Liotta, Romano and Russo, SIAM 7 7 c J. Numer. Anal. 38(4), 1337-1356, 2000. 8 8 c This is the Randau scheme. 9 9 c 10 c Solving Sampson's parabolic canal problem11 10 c============================================================ 12 11 implicit none … … 16 15 17 16 integer nx, nxx, io, i, isteps 18 real*8 toll,cfl,theta,g,h0,dx,dtmax,Tout,Tfinal,tc,a,tau,B,t0, 19 . p,s,zeta_0,zeta_1,zeta,u0 20 21 open(1,file='Stepflow5.out') 22 open(2,file='Stepflow5.t') 23 open(3,file='Stepflow5.h') 24 open(4,file='Stepflow5.uh') 25 open(5,file='Stepflow5.n') 26 open(8,file='Stepflow5.c') 17 real*8 toll,cfl,theta,g,dx,dtmax,Tout,Tfinal,tc,a,tau,B,t0, 18 . p,s,zeta_0,zeta_1,zeta,u0,version,hl,hr 19 20 open(11,file='data.w') 21 open(12,file='data.t') 22 open(13,file='data.h') 23 open(14,file='data.uh') 24 open(15,file='data.n') 25 open(16,file='data.x') 26 27 open(1,file='MacDonald.bed') 27 28 c 28 29 c Parameters 29 c 30 nx = 501 30 c 31 version = 1.0 32 nx = 101 31 33 nxx = nx+2*md 32 34 if (nx.gt.nxmax) write(*,*)'nx too large' 33 35 toll = 1.d-6 34 cfl = 0. 5d036 cfl = 0.2d0 35 37 theta = 1.0d0 36 38 g = 9.81d0 37 h0=10.0d0 39 hl=10.0d0 40 hr = 0.d0 38 41 dx = 10000.d0/dble(nx-1) 39 42 dtmax = 0.5d0 40 Tout = 20.0d0 41 Tfinal = 10000.0d0 42 a = 3000.d0 43 tau = 0.001d0 44 B = 5.d0 43 Tout = 1.0d0 44 Tfinal = 1500.0d0 45 45 46 t0 = 0.d0 46 47 … … 48 49 c Setup Terrain 49 50 c 50 do io = 1,2 51 do i = 1,nxx 52 x(i,io) = dble(i-md-1)*dx+(io-1)*dx/2.0 53 enddo 54 call bed(x(1,io),z(1,io),dz(1,io),nxx) 51 c ---- Non-uniform terrain from MacDonald 52 io = 1 53 do i = 1,nxx 54 read(1,*)x(i,io),z(i,io) 55 z(i,io) = z(i,io)*5.d0 56 end do 57 do i = 2,nxx-1 58 dz(i,io) = (z(i+1,io) - z(i-1,io))/2.d0/dx 59 end do 60 dz(1,io) = dz(2,io) 61 dz(nxx,io) = dz(nxx-1,io) 62 63 io = 2 64 do i = 1,nxx 65 x(i,io) = x(i,io-1) 66 z(i,io) = z(i,io-1) 67 dz(i,io) = dz(i,io-1) 55 68 end do 56 69 … … 58 71 c Initial Conditions 59 72 c 60 p = dsqrt(8.d0*g*h0/a/a) 61 s = dsqrt(p*p-tau*tau)/2.d0 62 u0 = B*exp(-tau*t0/2.d0)*sin(s*t0) 63 zeta_0 = a*a*B*B*exp(-tau*t0)/(8.d0*g*g*h0) 64 . *(-s*tau*cos(s*t0)+(tau*tau/4.d0-s*s)*cos(2.d0*s*t0)) 65 . -B*B*exp(-tau*t0)/4.d0/g 66 zeta_1 = -exp(-tau*t0/2.d0)/g*(B*s*cos(s*t0) 67 . +tau*B/2.d0*sin(s*t0)) 68 do i = 1,nxx 69 u(i,1) = 20.d0 - h0*(1.d0 - (x(i,1) - 5000.d0)**2/a/a) 70 zeta = zeta_0 + (x(i,1) - 5000.d0)*zeta_1 + 20.d0 71 if(zeta.lt.u(i,1))then 72 u(i,1) = 0.d0 73 c ---- Rectangular pulse initial condition 74 do i = md+1, nx+md 75 if (x(i,io).lt.100.d0.or.x(i,io).gt.200.d0) then 76 u(i,1) = hr 73 77 else 74 u(i,1) = zeta - u(i,1)75 end 76 u(i,2) = 0. d077 end do 78 u(i,1) = hl 79 endif 80 u(i,2) = 0.0d0 81 end do 78 82 79 83 c 80 84 c Setup for Time looping 81 85 c 82 isteps = 0 86 83 87 tc = 0.0d0 84 88 call dump_solution(u,z,nx,tc,isteps) … … 87 91 c 88 92 call momentum_mass(nx,dx,cfl,g,theta,Tfinal, 89 . u,dtmax,h0,toll,z,dz,Tout) 93 . u,dtmax,toll,z,dz,Tout,isteps) 94 95 write(15,*)isteps,nxx,version 96 do i=1,nxx 97 write(16,*) x(i,1) 98 enddo 99 100 90 101 c 91 102 c Close down … … 104 115 c The evolver 105 116 c=============================================================== 106 subroutine momentum_mass(nx,dx,cfl,g,theta,tf,u,dtmax, h0,toll,107 . z,dz,Tout )117 subroutine momentum_mass(nx,dx,cfl,g,theta,tf,u,dtmax,toll, 118 . z,dz,Tout,isteps) 108 119 c 109 120 c INPUT nx # of cells in x-direction … … 129 140 130 141 integer nx, nxx, io, i, isteps 131 real*8 toll,cfl,theta,g, h0,dx,dt,Tout,Tfinal,tc142 real*8 toll,cfl,theta,g,dx,dt,Tout,Tfinal,tc 132 143 133 144 integer istop,iout,nt,ii,oi,i2,m … … 173 184 c see (2.1) and (4.3) 174 185 c 175 call swflux(f,u,1,nxx,em_x,g,toll) 176 177 call print_twoarray(f,nxx,'flux') 178 call print_twoarray(u,nxx,'h and uh') 186 call swflux(f,u,1,nxx,em_x,g,toll) 179 187 c 180 188 c Compute numerical derivatives 'ux', 'fx'. … … 187 195 call derivative(f(1,2),fx(1,2),nxx,theta) 188 196 189 call print_twoarray(df,nxx,'df')190 call print_twoarray(ux,nxx,'ux')191 197 c 192 198 c Compute time step size according to the input CFL # … … 194 200 if(ii.eq.1) then 195 201 dt = dmin1(cfl*dx/em_x,dtmax,Tout) 196 c write(*,*)em_x, dt197 202 if( ( tc + 2.d0*dt ) .ge. Tnext ) then 198 203 dt = 0.5d0*(Tnext - tc ) … … 204 209 endif 205 210 end if 206 c write(*,*)'dt = ',dt 207 c write(*,*)'Tnext = ',Tnext 211 208 212 dtcdx2 = dt/dx/2.d0 209 213 dtcdx3 = dt/dx/3.d0 … … 226 230 call swflux(f,u2,3,nxx-2,em_x,g,toll) 227 231 228 call print_twoarray(f,nxx,'flux half')229 232 c 230 233 c Compute the values of 'u' at the next time level. see (2.16). … … 246 249 end do 247 250 248 call print_twoarray(u,nxx,'u after h update')249 251 c 250 252 c Momentum equation … … 267 269 c 268 270 c Friction term 269 u(i,m) = u(i,m)*exp(-0.001d0*dt) 270 end do 271 call print_twoarray(u,nxx,'u after uh update') 271 c u(i,m) = u(i,m)*exp(-0.001d0*dt) 272 end do 272 273 c 273 274 tc = tc + dt … … 282 283 c 283 284 1001 write(*,*)isteps 284 write(5,*)isteps,nx 285 285 286 return 286 287 287 288 end 288 289 289 c===========================================================290 c Setup Terrain with parabolic canal291 c===========================================================292 subroutine bed(x,z,dz,n)293 294 implicit none295 integer md, nxmax,nxd,mn296 parameter (md=3, nxmax=1601, nxd=nxmax+2*md, mn=2)297 integer n298 real*8 z(n),dz(n),x(n)299 300 integer i301 real*8 h0, a302 303 h0 = 10.d0304 a = 3000.d0305 306 do i=1,n307 z(i) = 20.d0 - h0*(1.d0 - (x(i) - 5000.d0)**2/a/a)308 dz(i) = 2.d0*h0*(x(i) - 5000.d0)/a/a309 enddo310 return311 end312 290 c=========================================================== 313 291 c Shallow Water Flux … … 393 371 real*8 u(nxd,mn),z(nxd,2) 394 372 395 write( 2,*)tc373 write(12,*)tc 396 374 io = 1 375 i = 2 397 376 isteps = isteps + 1 398 377 write(*,*)isteps, tc 399 do ii = 1,2 400 do i = md + 1, nx +md401 write(3,200)u(i,1)402 write(4,200)u(i,2)403 write(1,200)z(i,io) + u(i,1)378 379 do i = 1, nx + 2*md 380 write(13,200)u(i,1) 381 write(14,200)u(i,2) 382 write(11,200)z(i,io) + u(i,1) 404 383 200 format(e20.8) 405 end do 406 end do 407 408 iflag = 0 409 do i = md + 1,nx + md 410 if(u(i,1).gt.1.d-04.and.iflag.eq.0)then 411 c write(8,200)u(i,1) 412 write(8,200)i*20.d0 413 iflag = 1 414 end if 415 end do 384 end do 385 416 386 return 417 387 end 418 c===========================================================419 c Output Routine420 c===========================================================421 subroutine print_twoarray(u,nxx,msg)422 implicit real*8 (a-h)423 implicit real*8 (o-z)424 parameter (md=3, nxmax=1601, nxd=nxmax+2*md, mn=2)425 real*8 u(nxd,mn)426 character*(*) msg427 return428 write(*,*)msg429 430 do i = 1,nxx431 write(*,*)u(i,1),u(i,2)432 end do433 return434 end -
inundation/ga/storm_surge/Hobart/run_hobart_buildings.py
r1471 r1491 47 47 48 48 # Colours for Hobart 49 domain.visualiser.stage_color = (0.0,0.38,0.1)49 domain.visualiser.stage_color = (0.0,0.38,0.1) 50 50 domain.visualiser.friction_color = (0.1,0.99,0.1) 51 domain.visualiser.other_color = (0.99,0.4,0.1)51 domain.visualiser.other_color = (0.99,0.4,0.1) 52 52 53 53
Note: See TracChangeset
for help on using the changeset viewer.