c c c ===================================================== subroutine ic(maxmx,maxmy,meqn,mbc,mx,my,x,y,dx,dy,q) c ===================================================== c Copyright (C) 2003-2007 California Institute of Technology c Ralf Deiterding, ralf@amroc.net c implicit double precision (a-h,o-z) c include "cuser.i" c dimension q(meqn,1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc) dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc) c Y10 = 1.d0 Y11 = 0.d0 Y20 = 0.d0 Y21 = 1.d0 c do 60 i = 1, mx do 60 j = 1, my ang = atan((y(j)-y0)/(x(i)-x0)) if (x(i)-x0.lt.0.d0) ang = ang+pi r = dsqrt((x(i)-x0)**2+(y(j)-y0)**2) c if (r.lt.r0) then vel = 0.d0 p = p0 call cellave(x(i)-dx/2.d0,y(j)-dy/2.d0,dx,dy,wl) rho = (1.d0-wl)*rho0 + wl*rho1 Y1 = (1.d0-wl)*Y10 + wl*Y11 Y2 = (1.d0-wl)*Y20 + wl*Y21 else xi = r/r0 call flow(xi,v,vel,p,rho) vel = vel Y1 = Y10 Y2 = Y20 endif c u = vel*dcos(ang) v = vel*dsin(ang) c q(1,i,j) = rho*Y1 q(2,i,j) = rho*Y2 q(3,i,j) = rho*u q(4,i,j) = rho*v q(5,i,j) = p/gamma1 + .5d0*rho*(u*u+v*v) + q(2,i,j)*q0 60 continue return end