[FLASH-BUGS] avisco bug for cylindrical coords
Tomasz Plewa
tomek at flash.uchicago.edu
Wed Aug 27 08:53:37 CDT 2003
Thanks, Andrew. We will immediately include safeguards to prevent
it from happening.
Tomek
--
On Wed, Aug 27, 2003 at 01:51:45AM -0700, Andrew MacFadyen wrote:
>
> In cylindrical coordinates with a reflecting boundary for the radial
> coordinate and xmin = 0.0, x(i-1) = -x(i) for i = 5 so x(5)**2 = x(4)**2
> and there is a division by zero for i = 5 in the computation of avis(i).
> avis(5) is set to zero anyway in hydro_1d for reflecting b.c. but the
> following change avoids the divide by zero.
>
>
> --- ../../source/hydro/explicit/split/ppm/avisco.F90 2003-06-10
> 12:31:23.000000000 -0700
> +++ avisco.F90 2003-08-26 18:09:09.000000000 -0700
> @@ -58,8 +58,12 @@
>
> if (igeomx == 1) then
> do i = 5, nzn4+1
> - avis(i) = (x(i) * u(i) - x(i-1) * u(i-1)) * 2.0 / &
> - (x(i)**2 - x(i-1)**2)
> + IF (x(i)**2 == x(i-1)**2) THEN
> + avis(i) = 0.0
> + ELSE
> + avis(i) = (x(i) * u(i) - x(i-1) * u(i-1)) * 2.0 / &
> + (x(i)**2 - x(i-1)**2)
> + ENDIF
> avis(i) = - cvisc * avis(i) * (x(i) - x(i-1))
> enddo
> end if
>
>
> --
> Andrew MacFadyen
> http://www.its.caltech.edu/~aim
> Theoretical Astrophysics, Caltech
> andrew at tapir.caltech.edu
> MC 130-33, Pasadena, CA 91125 (626): 796-5675(fax); 395-8413(w);
> 396-8247(h)
>
>
--
More information about the flash-bugs
mailing list