• VTF
  • FSI
  • AMROC
  • SFC
  • Motion
  • STLIB
  • Main Page
  • src/2d/equations/euler/rp/flx2eu.f

    c
    c =========================================================
          subroutine flx2(ixy,maxmx,meqn,mbc,mx,q,maux,aux,f)
    c =========================================================
    c
    c     # Flux-function for the two-dimensional Euler equations.
    c
    c     # The flux is computed in x-direction if ixy=1 
    c     #                              or in y-direction if ixy=2.
    c
    c     # Copyright (C) 2002 Ralf Deiterding
    c     # Brandenburgische Universitaet Cottbus
    c
    c     # Copyright (C) 2003-2007 California Institute of Technology
    c     # Ralf Deiterding, ralf@cacr.caltech.edu
    c
          implicit double precision (a-h,o-z)
          dimension q(1-mbc:maxmx+mbc, meqn)
          dimension aux(1-mbc:maxmx+mbc, maux)
          dimension f(1-mbc:maxmx+mbc, meqn)
          common /param/  gamma,gamma1
    c
          if (ixy.eq.1) then
             mu = 2
             mv = 3
          else
             mu = 3
             mv = 2
          endif
    c
          do i=1-mbc,mx+mbc
             u = q(i,mu)/q(i,1)
             v = q(i,mv)/q(i,1)
             p = gamma1*(q(i,4) - 0.5d0*q(i,1)*(u**2+v**2))
             f(i,1)  =   q(i,mu)
             f(i,mu) = u*q(i,mu)+p
             f(i,mv) = v*q(i,mu)
             f(i,4)  = u*(q(i,4)+p)
          enddo
    c
          return
          end
    

<