[FLASH-BUGS] "minor" glitch in flatten.F90

From: Markus Gross (m.s.gross@hw.ac.uk)
Date: Wed Jul 16 2003 - 04:47:52 CDT

  • Next message: Markus Gross: "[FLASH-BUGS] "minor" glitch in flatten.F90 (part 2)"

    Hi!

    I was scratching my head about this for the last couple of days and finally
    found a reason for it.

    Situation:

    assuming 1d, hydro, ppm, split. you have two blocks with identical data, the
    only difference is that the one block is an exact mirror copy of the other.
    ie:

    p_block1(:)= p_block2(16:1:-1)
    u_block1(:)=-u_block2(16:1:-1)

    for pressure and velocity.

    Expecting the same results for block1 and block2 would be reasonable but
    leads to suprises and a lot of scratching of the head.

    The reason for this was in the flattening which has a bias towards one
    direction if the pressure gradient is zero in a small section. There seems to
    be a similar bias in the monotonizing, just didn't get around to investigate
    it yet.

    The problem is:

    !this is the original
    !!$ if (dp(i) .LT. 0.e0) then
    !!$ scrch2(i) = scrch3(i+1)
    !!$ else
    !!$ scrch2(i) = scrch3(i-1)
    !!$ endif

    I replaced it with:

    !
    !
    ! this is the at.hoc modification
           if (dp(i) .LT. 0.e0) scrch2(i) = scrch3(i+1)
           if (dp(i) .GT. 0.e0) scrch2(i) = scrch3(i-1)
           if (dp(i) .eq. 0.e0) scrch2(i) = scrch3(i )

    I didn't check if it is reasonable yet, because my Colella &
    Woodward is buried here somewere at the moment and I cannot find it ...

    I attached an example with hardcoded values for pressure and velocity. This
    small programm runs twice, for the original and the mirror data.

    What do you think? Is a special case somewhat of course, but some bc's (as
    mine) or ic's may produce this sort of data and error subsequently.

    Markus.

    -- 
    _______________________________________________________________
    

    Markus Gross AMIMechE BEng (Hons.) Mechanical Engineering

    Heriot Watt University Edinburgh School of Engineering and Physical Sciences James Nasmyth Building Edinburgh EH14 4AS UK

    Member of IMechE, SPIE, CSME and VDI _______________________________________________________________

    further contact:

    Phone : +44 (0) 131 451 4737

    UNiX talk: talk markus@lasersim.mce.hw.ac.uk

    _______________________________________________________________

    "Plans are a place to begin," Grove said. "They rarely deliver you to where you expect. Make your plans knowing you are going to throw them away."

    _______________________________________________________________




    This archive was generated by hypermail 2b30 : Wed Jul 16 2003 - 04:48:08 CDT