Hi Daniel, Thanks for your reply.
Another FiPy user suggested I try ExplicitUpwindConvectionTerm. Sure enough, it did work better than PowerLawConvectionTerm or ExponentialConvectionTerm ... but small cell size is important. As per your suggestion, I also tried VanLeerConvectionTerm. That seems to work slightly better than the explicit upwind term, enabling slightly larger cell sizes, but no effect on time step size. I'll probably stick with VanLeer for now. On Sep 26, 2013, at 11:32 AM, Daniel Wheeler wrote: > On Mon, Sep 23, 2013 at 7:12 PM, Richard Edward Gillilan > <[email protected]> wrote: >> I want to solve the time-dependent convection-diffusion equation and am >> testing my code on a simple 1D case. >> >> The flow field is a simple constant velocity. I've set D = 0, so no >> diffusion should happen at all. >> This system represents a little plug of high-concentration solute in a >> solvent that should flow down the tube >> without spreading. Problem is that I get lots of spreading even when I set >> cell size and time-step very small. >> >> Can anyone see what I'm doing wrong? > > Hi Richard, > > Sorry for taking so long to reply to this. It's a difficult problem > but there is masses of literature on this problem. No scheme perfectly > preserves the initial shape. The term you are using > "PowerLawConvectionTerm" is only first order. A second order scheme > will do better. Try the VanLeerConvectionTerm for a second order > accurate scheme > > http://matforge.org/fipy/browser/fipy/fipy/terms/vanLeerConvectionTerm.py#L47 > > A lot of work uses even higher order schemes. Those aren't in FiPy. > CLAWPACK may have some of those if you want to compare. > I'l check it out. Thanks! Richard _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
