On Wed, Jan 16, 2013 at 4:17 PM, Maximilian Balandat <[email protected]>wrote:
> Hi, > > I am trying to solve the following nonlinear conservation law in one > spatial dimension in the variable u(t,x): > > u_x + f(u)_t = 0 > You might also want to look at Clawpack for this class of equations. FiPy isn't great at dealing with strictly hyperbolic equations. It will give you an answer, but in general high order schemes are necessary. I am confused by the above equation. Are the x and t derivatives on the correct terms? > > with initial condition u(.,0) = u0. Here f is a nonlinear function of u (f > is a local operator). I want to solve this on the domain [-tmin, tmax] x > [0,L] > (this is just a conservation law with variables x,t interchanged...), so > the mesh is on the interval [-tmin, tmax]. So far I am using periodic > boundary conditions for simplicity. > > If f were of the form f(u) = f_0(u)*u I could simply use a Convection term > and update the coefficient f_0(0) at each step, I have done that > successfully. > Good. > But for the above problem I am not sure how to employ the .divergence or > getGradient() methods and I am struggling to find examples. > Why do you need either the ".divergence" or ".grad" methods? I am not sure what you are trying to do. -- Daniel Wheeler
_______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
