Base Flow to a Stream

Matt Jones
Homework #4
GS511

This movie shows the effect of increasing rainfall on the head in an unconfined aquifer that is connected to a river which serves as a constant head boundary. The recharge rate varies from 2ft/day to 3ft/day which is unrealistic but enables the problem to be conceptualized easily. The step in the recharge rate was 0.1 ft/day. The hydraulic conductivity of the aquifer is 10 ft/day. The constant head at the river was specified as 10 feet.

As the recharge rate increases, the head is pushed higher in a conceptual sense.

Click here to view.


 
 
 	program mpg
c
	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)
	character*1 cu(mmax,nmax)
	character fn*10
	integer matt
	real w,x,K,L
	matt = 0
	K = 10.
	L = 300.
	river = 10.
c
c	Initialize my u matrix so that everything will be zero
c
	do 111 m=0,mmax
	do 111 n=0,nmax
	u(m,n)=0.0
111	continue
c
c	generate the numbers baby
c
	do 222 w=2.,3.,.1 
	do 115 m=0,mmax
	do 115 n=0,nmax
	u(m,n)=0.0
115	continue
	do 333 x=L,1.,-1.
	h = SQRT(river**2 + w/(K)*(L**2 - x**2))
	ix =x
	ih = 200-h
	u(ih,ix)=h
	write (6,100)w,ix,ih,h
100	format ('W=',f10.2,'ix=',I10,'ih=',I10,'(h)=',f10.2)
333	continue
c
c	generate the 300 by 300 matrix
c	
	
	matt = matt+1
	if (matt.lt.10) write (fn,102) matt
	if (matt.ge.10.and.matt.lt.100) write (fn,103) matt
	if (matt.ge.100) write (fn,104) matt

102	format ('img00',i1,'.raw')
103	format ('img0',i2,'.raw')
104	format ('img',i3,'.raw')


	do 444 m =1,mmax
	do 444 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))
	
444	continue
c
c
c	
	open(unit=2,file=fn,status='unknown',access='direct',form='unformatted',recl=isize)
	write (2,rec=1) ((cu(m,n),n=1,nmax),m=1,mmax)
	close (2)
	

		
222	continue
	end