Hi Zhekai, There is generally a lot of numerical diffusion when solving convection problems with first order schemes and even some numerical diffusion when using higher order schemes. There are many different schemes and a mass of literature on how to preserve square waves, shocks and hyperbolic equations, but FiPy doesn't have any of those schemes implemented (e.g. TVD schemes come to mind). There is also a secondary issue when coupling hyperbolic equations to do with how the flux is calculated that FiPy doesn't address (the Riemann problem, roe solvers etc). However, for many convection-diffusion problems the time scale of the shocks is not worth resolving or is impossible to resolve while also resolving much longer time scales. When resolving at the convection time scale there is often no benefit from the implicit schemes that FiPy uses. Basically, FiPy is not a great tool for shock problems. CLAWPACK may be something that you could look at for this. I think it's fully explicit and it's focus is on hyperbolic coupled equations.
I hope that helps. Cheers, Daniel On Thu, Oct 20, 2016 at 12:58 AM, Zhekai Deng <zhekaideng2...@u.northwestern.edu> wrote: > Hi all, > > I am trying to use Fipy to solve convection only problem for the > concentration moved only by solid body rotation in a "circular" shape > geometry. > > By looking at the examples online, I found out that > > http://www.ctcms.nist.gov/fipy/examples/convection/generated/examples.convection.source.html#module-examples.convection.source > > and some of the level set example appears to allow me do it. > > I implemented the approach from convection example. However, the solution > still looks has diffusion ( or maybe artificial smoothness ) as the > concentration move with velocity field. I have attached my example code, > that concentration enter from the top right side of the geometry, and > undergo solid body rotation eventually to the left side, and flow out of the > domain. So my question is that is there any way to further reduce the > diffusion? Also, does anyone know where this "diffusion" is coming from ? > > The approach that I have tried but did not work are following: > 1. Solve the equation with very small diffusion coefficient (1e-8) > 2. Reduce the timestep or refine the mesh size does not seem to help very > much > > I have attached my example code in this email. Thank you very much. > > Best, > > Zhekai > > > _______________________________________________ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > -- Daniel Wheeler _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]