Generated from /asc/asci2/site/flashcode/secure/release_4p3/source/physics/Diffuse/Diffuse_visc.F90 with ROBODoc v4.99.8 on Fri Jul 17 16:16:09 2015


[Functions] source/physics/Diffuse/Diffuse_visc





 call Diffuse_visc (integer(IN) :: sweepDir, 
                    integer(IN) :: igeom, 
                    integer(IN) :: blockID,
                    integer(IN) :: numCells,
                    integer(IN) :: blkLimits(2,MDIM),
                    integer(IN) :: blkLimitsGC(2,MDIM),
                    real(IN)    :: leftCoords(MAXCELLS or numCells),
                    real(IN)    :: rightCoords(MAXCELLS or numCells),
                    real(INOUT) :: temp_flx(NFLUXES,:,:,:),
                    real(IN)    :: areaLeft(:,:,:),
                    real(IN)    :: secondCoord(MAXCELLS or numCells),
                    real(IN)    :: thirdCoord(MAXCELLS or numCells))


 Diffuse_visc alters the velocity fluxes for a block to account for viscosity.

 Energy fluxes (for E_FLUX and, if defined, EINT_FLUX) are also adjusted

 This is an explicit method, so a timestep limiter will be required.  
 Stability is guaranteed for 
                 dt < .5* -------

 Fluxes in PPM are stored at the zone boundaries, the temperature, etc. are
 at the zone centers.  So the velocity fluxes (more exactly, momentum fluxes)
 acquire terms like  F = -nu * grad(v), which is approximated as
                       nu_i + nu_{i-1}      v(xyz)_i - v(xyz)_{i-1}
         F(xyz)_i = - -----------------  * ------------------------   .
                              2                      dx

 This routine computes the velocity and energy fluxes from
 viscosity and adds them to the corresponding fluxes returned from
 hydro_1d.  It is to be called after calling hydro_1d on a block.
 The updated energy fluxes are then used in hy_ppm_updateSoln to
 produce the updated velocities and energy.


  sweepDir    -   the current sweep direction

  igeom       -   the geometry flag for the current sweep direction

  blockID     -   the block number to operate on
  numCells    -   the number of Cells along the sweep direction
  leftCoords  -   Coordinates of the left edge of the zones
  rightCoords -   Coordinates of the right edge of the zones

  temp_flx    -   Temporary storage for fluxes along sweep direction
  areaLeft    -   Cell face areas at the left (smaller) cell side

  secondCoord -  for an x sweep: y coordinate; for a y sweep: x coord; for a z sweep: x coord
  thirdCoord  -  for an x sweep: z coordinate; for a y sweep: z coord; for a z sweep: y coord
  blkLimits -   endpoints of block indices without including gcells
  blkLimitsGC -   endpoints of block indices including gcells


    This routine is used by the PPM implementation of the Hydro unit.
    Other implementations of Hydro, in particular MHD and RHD, may have their
    own mechanisms for handling diffusive effects that bypass Diffuse_visc
    (and the Diffuse code unit in general), or they may lack support for
    diffusive effects.




  Apparently this subroutine used to be called visc_explicit.
  Visc_explicit started out as a very lightly modified version of therm_explicit.