vtf-logo

clawpack/applications/euler_znd/2d/Carbuncle/src/combl.f

c     =====================================================
      subroutine combl()
c     =====================================================
c     
c     Copyright (C) 2002 Ralf Deiterding
c     Brandenburgische Universitaet Cottbus
c
      implicit double precision (a-h,o-z)
      include  "cuser.i"
c
c     Create and initialize application specific common-blocks.
c
      parameter( lin = 5, lmechout = 11 )
      character *16 cwork
c
      cwork= 'Gas'
      Wk = 1.d0
c      
      RU = 1.d0
      PA = 1.d0
c
      open(unit=lin,status='old',form='formatted',file='init.dat')
      read (lin, *) gamma
      read (lin, *) rhol, ul, vl, pl
      read (lin, *) rhor, ur, vr, pr
      read (lin, *) sloc, sloc2
      close (lin)
c
      open(unit=lmechout, status='unknown', form='formatted', 
     &     file='chem.dat') 
      write (lmechout,400) RU
      write (lmechout,401) PA
      write (lmechout,402) gamma
      write (lmechout,403) cwork     
      write (lmechout,404) Wk        
      close (lmechout)
c
 400  format('RU       ',e16.8)
 401  format('PA       ',e16.8)
 402  format('Gamma    ',e16.8)
 403  format('Sp       ',a16)
 404  format('W        ',e16.8)
c
      gamma1 = gamma-1.d0
c     # data in left state:
      rhoul = rhol * ul
      rhovl = rhol * vl
      el = pl/gamma1 + 0.5d0*(rhoul**2+rhovl**2)/rhol
c
c     # data in right state:
      rhour = rhor * ur
      rhovr = rhor * vr
      er = pr/gamma1 + 0.5d0*(rhour**2+rhovr**2)/rhor
c
      return
      end