[FLASH-BUGS] "minor" glitch in flatten.F90
Markus Gross
m.s.gross at hw.ac.uk
Wed Jul 16 04:47:52 CDT 2003
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(:)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) !!$ else
!!$ scrch2(i) !!$ endif
I replaced it with:
!
!
! this is the at.hoc modification
if (dp(i) .LT. 0.e0) scrch2(i) if (dp(i) .GT. 0.e0) scrch2(i) if (dp(i) .eq. 0.e0) scrch2(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 at 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."
_______________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flatentest.f90
Type: text/x-c
Size: 4619 bytes
Desc: not available
Url : http://flash.uchicago.edu/pipermail/flash-bugs/attachments/20030716/fc4b2cf5/attachment.bin
More information about the flash-bugs
mailing list