The particular issue you're having is that (0.5 * phi,) is not a rank-1 Variable, it's a tuple (list) of rank-0 Variable(s). FiPy doesn't know what to do with this. coeff=phi*[[0.5]] should do better.
That said, FiPy is not well suited to hyperbolic problems and Jamie has pointed to some of the things to be cautious about. > On Aug 29, 2016, at 9:09 AM, Sebastian Glane <[email protected]> wrote: > > Dear fipy-users and developers, > > I am new to fipy and would like to solve Burgers' equation as a first step. > This problem involves a non-linear convection term. According to the FAQs, > for the diffusion term it is to program the nonlinearity using coeff. I did > the same for the convection term: fipy.VanLeerConvectionTerm( coeff = (0.5 * > phi, ), var = phi ). But somehow it does not work out. I also tried with > phi.faceValue. > > Best regards > > Sebastian > <Burgers1D.py>_______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
