2010/7/19 Daniel Wheeler <[email protected]> > > On Sat, Jul 17, 2010 at 5:06 AM, Benny Malengier > <[email protected]> wrote: > > Hi, > > > > I'd like to know the result of the stokesCavity.py test of some other > > people. Do they also fail? > > Not for me at least. > > > When I run the flow/stokesCavity.py, the test fails. Adding at the bottom > of > > that file: > > > > Test values in the last cell. > >>>> print pressure.getGlobalValue()[...,-1], 145.233883763 > > > > I obtain the result : > > False > > False > > False > > It's failing for you. I'd don't think the test is very good though. I > might try and improve the test method when I include your version of > the example. > > > Are the RHS the values from Dolphyn? Is this test supposed to fail? > > I don't believe the test is supposed to fail, but I used Dolfyn > originally to compare the results and provide the comparison numbers. > A lot has changed since then though. >
I think the comparison is just the fipy output of 5 sweeps, and I ran it with more sweeps, hence the fail. Sorry. It would be nice to compare in the __main__ section with real dolphyn results, eg also on the x=0.3 and y=0.5 line. It would also be nice if the file with the dolphyn code is attached so people who are so inclined, can check the claims you make at the beginning of the example about correctness. As to the test for the test suite, I suppose the 5 is chosen so as not to have a long test running time, but obviously as the result did not converge, this is not a very good test. I can't think of another way to do it though. Greetings, Benny > > > Without knowing what this test does, there is little conclusion I can > draw. > > I'll post the Rhie-Chow correction when I tested some more with it. It > > defenitely removes the pressure oscillation in my work, so it seems ok. > > Good. As I said I need to think of a better way to compare the solution. > > > I also wonder about the part of the solver after: > > ## update the pressure using the corrected value but hold one cell > fixed > > then code follows to keep cell[0] at pressure 0. Is this really needed? > > That might depend on which solver is used. It is probable that an > iterative solver might wander, while a direct solver does not have > that issue (or visa-versa). > > > Not > > doing it results in > > sweep: 299 , x residual: 0.0196690174713 , y residual 0.0177051252932 , p > > residual: 1.70403715572e-07 , continuity: 3.94729816867e-06 > > 151.910461226 145.233883763 > > 0.202533960386 0.24964673696 > > -0.21920158527 -0.164498041783 > > which is hardly different from the original. I would prefer Imposing a > > pressure value via a boundary condition on the pressure correction > equation, > > this seems to work great if one sets eg a boundary at a specific pressure > to > > a fixed value. > > Okay, if it works that is much cleaner. > > -- > Daniel Wheeler > > >
