On Mon, Dec 29, 2014 at 7:36 PM, Fausto Arinos de A. Barbuto
<[email protected]> wrote:
>
> Hello,
>
> I want to implement the following term in the RHS of the equation below:
>
> \frac{1}{c}\frac{\partial u}{\partial t}  =  u \frac{\partial u}{\partial x}

You should write the equation in the form

    \frac{1}{c}\frac{\partial u}{\partial t}  =  \frac{1}{2}
\frac{\partial u^2}{\partial x}

for FiPy.
>
> where "c" is a constant.  I wonder what convection/advection module should
> I use, and how.  The expression
>
> TransientTerm(coeff=1.0/c) == FirstOrderAdvectionTerm(u)
>
> did not work.

FiPy is not that great at pure hyperbolic problems, but you can try to
use the "VanLeerAdvectionTerm" to preserve the shocks better. See
https://gist.github.com/wd15/22d739ee506f5ebf07eb.

-- 
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to