c $Header: /home/proj/vtfng/vtf/amroc/rim/src/integrate.f,v 1.3 2009/02/05 02:53:26 cummings Exp $ subroutine integrate(nx,ny,nbc,neqn,dx,dy,dt,fx,fy) implicit double precision (a-h,o-z) include 'rim2d.i' dimension fx(neqn,1-nbc:nx+nbc,1-nbc:ny+nbc) dimension fy(neqn,1-nbc:nx+nbc,1-nbc:ny+nbc) c dimension stbx(-1:nxm,-1:nym), stby(-1:nxm,-1:nym) c c - - - - USE THE CONSERVATIVE F-D SCHEME - - - - - - - - - - - - area=dx*dy do j=1,ny do i=1,nx cm = den(i,j)*area cmu = cm*u(i,j) cmv = cm*v(i,j) cmet = cm*(p(i,j)/den(i,j)/(gamma(i,j)-1d0)+z(i,j)*q0 & +.5d0*(v(i,j)*v(i,j)+u(i,j)*u(i,j))) cmz = cm*z(i,j) zdot = 0.25d0*area*(stbx(i,j)+stbx(i+1,j)+ & stby(i,j)+ stby(i,j+1)) cm = cm - dt*(fx(1,i+1,j)-fx(1,i,j)+fy(1,i,j+1)-fy(1,i,j)) cmu= cmu - dt*(fx(2,i+1,j)-fx(2,i,j)+fy(2,i,j+1)-fy(2,i,j)) cmv= cmv - dt*(fx(3,i+1,j)-fx(3,i,j)+fy(3,i,j+1)-fy(3,i,j)) cmet=cmet- dt*(fx(4,i+1,j)-fx(4,i,j)+fy(4,i,j+1)-fy(4,i,j)) cmz = cmz + dt*zdot - & dt*(fx(5,i+1,j)-fx(5,i,j)+fy(5,i,j+1)-fy(5,i,j)) den(i,j) = cm/area u(i,j) = cmu/cm v(i,j) = cmv/cm z(i,j) = cmz/cm et = cmet/cm p(i,j) = (et-q0*z(i,j)-0.5d0*(v(i,j)*v(i,j)+u(i,j)*u(i,j)))* & den(i,j)*(gamma(i,j)-1.d0) gamma(i,j) = (fx(6,i+1,j)+fx(6,i,j)+fy(6,i,j+1)+fy(6,i,j))/ & 4d0 enddo enddo return end