Changeset 1587

Ignore:
Timestamp:
Jul 7, 2005, 3:47:06 PM (19 years ago)
Message:

Location:
inundation/ga/storm_surge
Files:
4 edited

Unmodified
Removed
• inundation/ga/storm_surge/Hobart/Landslide_1D.for

 r1491 c nx = 101 dtmax  = 1.0d0 dtmax  = 0.5d0 Tout   = 1.0d0 tf = 200.0d0 tf = 1500.0d0 length = 1000.0d0 limith = 1 dx = 10.d0 dx = 10000.d0/dble(nx-1) K = 0.0d0 if (nx.gt.nxmax) write(*,*)'nx too large' toll = 1.0d-10 cfl = 0.01d0 cfl = 0.2d0 theta = 1.2d0 version = 10 w1 = h1 + z(i) w2 = h2 + z(i+1) d1h = h1 - h0 d2h = h2 - h1 d1w = w1 - w0 d2w = w2 - w1 c ------- W = H+Z h_x = xmin( d1w, d2w) - dz c         h_x = xmin( d1w, d2w) - dz h_x = xmic(theta, d1h, d2h) c ------- Return the left and right values of h in an interval c ------- Test for h_l or h_r negative hmin = dmin1(h0,h1,h2) if ( h_l(i) .le. hmin ) then h_l(i) = hmin h_r(i) = h(i) + (h(i) - h_l(i)) elseif ( h_r(i) .le. hmin ) then h_r(i) = hmin h_l(i) = h(i) + (h(i) - h_r(i)) endif c\$\$\$         hmin = dmin1(h0,h1,h2) c\$\$\$         if ( h_l(i) .le. hmin ) then c\$\$\$            h_l(i) = hmin c\$\$\$            h_r(i) = h(i) + (h(i) - h_l(i)) c\$\$\$         elseif ( h_r(i) .le. hmin ) then c\$\$\$            h_r(i) = hmin c\$\$\$            h_l(i) = h(i) + (h(i) - h_r(i)) c\$\$\$         endif enddo c c ---- Enforce a minimum height c do i=md,nx+md+2 hmax = dmax1(h_l(i),h_r(i)) if (hmax .lt. 1.0d-3 ) then h_r(i)  = 0.0d0 uh_r(i) = 0.0d0 h_l(i)  = 0.0d0 uh_l(i) = 0.0d0 h(i)    = 0.0d0 uh(i)   = 0.0d0 endif enddo c\$\$\$      do i=md,nx+md+2 c\$\$\$         hmax = dmax1(h_l(i),h_r(i)) c\$\$\$         if (hmax .lt. 1.0d-3 ) then c\$\$\$c           h_r(i)  = 0.0d0 c\$\$\$           uh_r(i) = 0.0d0 c\$\$\$c           h_l(i)  = 0.0d0 c\$\$\$           uh_l(i) = 0.0d0 c\$\$\$c           h(i)    = 0.0d0 c\$\$\$           uh(i)   = 0.0d0 c\$\$\$         endif c\$\$\$      enddo c c ---- Try for a flat subinterval d2 = u(i+1) - u(i) u_x = xmic( theta, d1, d2 ) c          u_x = xmin( d1, d2 ) u_l(i) = u(i) - 0.5d0*u_x u_r(i) = u(i) + 0.5d0*u_x