Spring 1996
GS511; Fundamentals of High Performance Computing and Visualization
The following MPEG movies shows how the vertical depth of a freshwater lens located beneath a circular island increases with an increase in recharge. The radius of the island is 200 ft. and the recharge rate varies from 0 to 10 in/day.
Source Code
| program movie | parameter(mmax=300,nmax=300,isize=mmax*nmax) parameter(mx=mmax+1,ny=nmax+1) dimension u(0:mx,0:ny) integer iu(mmax,nmax) integer k character*1 cu(mmax,nmax) character fn*10 real Z, r, W |
| do 444 m=1,mmax do 444 n=1,nmax u(m,n)=0.0 | |
| 444 | continue |
|
k = 0 do 10 W=.08333, .8333, .01 do 20 r=1,200,5 Z = SQRT((W * (40000 - r**2))/0.526) u(NINT(Z),r) = Z write(*,100) Z, r, W | |
| 100 | format('Z =', f10.2, 3X, 'r =', f6.2, 3X, 'W =', f4.2) |
| 20 | continue |
|
k = k + 1 if(k .lt. 10) write(fn,102) k if(k .ge. 10 .and. k .lt. 100) write(fn,103) k if(k .ge. 100 ) write(fn,104) k | |
| 102 | format('img00',i1,'.raw') |
| 103 | format('img0',i2,'.raw') |
| 104 | format('img',i3,'.raw') |
| do 33 m = 1,mmax do 33 n= 1,nmax iu(m,n)=255*(u(m,n)+1.)*.5 if(iu(m,n).lt.0) iu(m,n)=0 if(iu(m,n).gt.255) iu(m,n) = 255 cu(m,n) = char(iu(m,n)) | |
| 33 | continue |
| open(unit=2,file=fn,status='unknown',access='direct', | |
| 1 | form='unformatted',recl=isize) |
| write(2,rec=1) ((cu(m,n),n=1,nmax),m=1,mmax) close(2) | |
| 10 | continue |
| end |
To see the fabulous result, make sure your MPEG player is configured properly and click here.
Compliments can be sent to cg237740@lance.colostate.edu.