• VTF
  • FSI
  • AMROC
  • SFC
  • Motion
  • STLIB
  • Main Page
  • Related Pages
    • chk3meu.f
    • combl.f
    • cuser.i
    • init3.f
    • lset3.f
    • Makefile.am
    • physbd3.f
    • srczp3.f
    • FluidProblem.h
    • chk3meu.f
    • ip3meurfl.f
    • rpn3meuhllc.f
    • rpt3meu.f
    • flgout3meu.f
    • flx3xx.f
    • amr_sfc_main.C

    fsi/sfc-amroc/WaterBlastPlastic/src/lset3.f

    c
    c     Copyright (C) 2003-2007 California Institute of Technology
    c     Ralf Deiterding, ralf@cacr.caltech.edu
    c
    c     # The water shock tube + plate
    c     =====================================================
          subroutine ls(maxmx,maxmy,maxmz,mbc,mx,my,mz,x,y,z,
         &     dx,dy,dz,phi,t)
    c     =====================================================
          implicit double precision (a-h,o-z)
    c     
          include  "cuser.i"
    c     
          dimension phi(1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc, 
         &     1-mbc:maxmz+mbc)
          dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc),
         &     z(1-mbc:maxmz+mbc)
    c     
          do 60 k = 1-mbc, mz+mbc
             do 60 j = 1-mbc, my+mbc
                do 60 i = 1-mbc, mx+mbc
                   r = dsqrt(y(j)**2+z(k)**2)
                   if (r.gt.rd) then
                      if (x(i).ge.0.0d0) then
                         phi(i,j,k) = rd-r
                      else
                         phi(i,j,k) = -dsqrt(x(i)**2+(rd-r)**2)
                      endif
                   else
                      if (x(i).ge.0.0d0.or.phi(i,j,k).ge.0.d0) then
                         if (dabs(rd-r).lt.dabs(phi(i,j,k))) 
         &                    phi(i,j,k) = rd-r
                      else
                         if (phi(i,j,k).lt.-1.d3) phi(i,j,k) = x(i)
                      endif
                   endif
     60   continue
    c     
          return
          end
    c
    c
    c     # The piston
    c     =====================================================
          subroutine lspiston(maxmx,maxmy,maxmz,mbc,mx,my,mz,x,y,z,
         &     dx,dy,dz,phi,t)
    c     =====================================================
          implicit double precision (a-h,o-z)
    c     
          include  "cuser.i"
    c     
          dimension phi(1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc, 
         &     1-mbc:maxmz+mbc)
          dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc),
         &     z(1-mbc:maxmz+mbc)
    c     
          do 60 k = 1-mbc, mz+mbc
             do 60 j = 1-mbc, my+mbc
                do 60 i = 1-mbc, mx+mbc
                   phi(i,j,k) = xm-x(i)
     60   continue
    c 
          return
          end
    c
    c
    c     Return piston velocities
    c     =====================================================
          subroutine ipvelpiston(meqn,nc,qex,xc,phi,vn,maux,
         &     auex,dx,time)
    c     =====================================================
    c
          implicit none
    c
          integer   mx, my, meqn, maux, nc
          double precision qex(meqn,nc), xc(3,nc), phi(nc), vn(3,nc), 
         &                 auex(maux,nc), dx(3), time, vnx, vny
    c     
          include  "cuser.i"
    c     
    c     Local variables
    c
          integer n
    c
          do 100 n = 1, nc
             auex(1,n) = vm
             auex(2,n) = 0.d0
             auex(3,n) = 0.d0
     100  continue
    c
          return
          end
    c