Numérotation des lignes :

conthe
C CONTHE    SOURCE    BECC      09/11/18    21:15:01     6542      subroutine conthe(nesp, nordpo, acv, w, h0, runiv,     &     tmaxcv, uvec, y,     &     tguess,     &     acvtot, ux, uy, uz, p, t,     &     logipg, lognc, logneg, valer, meserr)CC     See PRIDE1.ESOCC     This subroutine creates some thermodynamical variables andC     properties starting from the conservative variables.CC     INPUT:C     nesp, nordpo,C     acv(0:nordpo,nesp)C     wC     h0C     runiv = universal constant of gasC     tmaxcv = upper limit for cv expansionC     uvec(1,*) = rhoC     uvec(2,*) = rhouC     uvec(3,*) = rhovC     uvec(4,*) = rhowC     uvec(5,*) = rhoetC     yC     tguess = guess value for the temperature in the Newton methodCC     OUTPUT:C     acvtot   = coefficients such thatC                cv = \sum_{i=1,nordpo+1} acvtot(i) T^{i-1}C                ether = \sum_{i=1,nordpo+1} acvtot(i) T^{i} / (i)C     rho      = densityC     ux,uy,uz = velocityC     p        = pressureC     t        = temperatureCC     ERRORC     logipg, lognc, logneg, valer, meserrC      integer nesp, nordpo     &     , iesp, icoef      real*8 acv(0:nordpo,nesp), w(nesp), h0(nesp), runiv, tmaxcv     &     , uvec(1:5), y(1:nesp)     &     , tguess, acvtot(1:(nordpo+1))     &     , rho, ux, uy, uz, p, t     &     , valer(2)     &     , hftot, rgas, un2, ether      character*(40) meserr(2)      logical lognc, logneg, logipgCC     Initialisation of some variablesC      hftot = 0.0d0      do icoef = 1 ,(nordpo+1), 1         acvtot(icoef) = 0.0d0      enddo      rgas = 0.0d0CC     Density, velocity, internal energyC      rho = uvec(1)      ux = uvec(2) / rho      uy = uvec(3) / rho      uz = uvec(4) / rho      un2 = (ux * ux) + (uy * uy) + (uz * uz)C      do iesp = 1, 5C         write(*,*) uvec(iesp)C      enddoCC     rgas, hftot, acvtotC     In order to avoid one more loop, this could have be done beforeC      do iesp = 1, nesp, 1C        Rgas = y(iesp) / W_iesp         Rgas = Rgas + (y(iesp)/w(iesp))C        hftot = hftot + (y_i * hf0i)         hftot = hftot + (y(iesp) * h0(iesp))         do icoef = 0, nordpo, 1            acvtot(icoef+1) = acvtot(icoef+1) +     &           (y(iesp) * acv(icoef,iesp))         enddo      enddo      rgas = rgas * runivCC     Computation of temperature TC     if (T > Tmax) => cv = cv(Tmax)C     if (T &lt; Tmin) => cv = cv(Tmin)C      ether = (uvec(5) / rho) - (0.5d0 * un2)      ether = ether - hftotC      write(*,*) hftot, ether      if(ether .lt. 0.0D0)then         logneg = .true.         meserr(1) = 'internal sensible energy               '         valer(1) = ether         goto 9999      endif      call prite1(nordpo,Tmaxcv,acvtot,ether,tguess,T,lognc,logipg)      if(logipg)then         goto 9999      endif      if(lognc)then         goto 9999      endifC      p = rgas * rho * T 9999 continue      return      end   

© Cast3M 2003 - Tous droits réservés.
Mentions légales