You can use links if you want:

plaes.org

Entries tagged “pde”

First order PDE solving with Sympy

written by plaes, on Jul 10, 2009 1:32:00 PM.

For the past week, I have been working on my pdesolve() functionality so it would be possible to solve some first-order PDE's using the method of characteristics. Although, progress has been slow, following is already possible (if you have pulled my branch):

In [1]: from sympy import *
In [2]: from sympy.solvers.solvers import *
In [3]: from sympy import Derivative as D
In [4]: t,x,y,z = symbols('txyz')
In [5]: a = Symbol('a', Real=True)
In [6]: u = Function('u')
In [7]: eq = Eq(D(u(x, t), t) + a*D(u(x, t), x))
In [8]: eq
Out[8]: 
  d             d              
a⋅──(u(x, t)) + ──(u(x, t)) = 0
  dx            dt             
In [9]: pdesolve(eq, u(x, t))
Out[9]: [F₁(x - a⋅t)]

So, if interested, you can view the code on my github repository.

Basic PDE separation of variables implemented

written by plaes, on Jul 2, 2009 6:52:00 AM.

For the most of the past week, I have been working on variable separation of PDE's and yesterday I sent my merge request. Currently two mostly-used strategies - additive and multiplicative separation are implemented and tested on simpler equations like Laplace's.

So, what's next? :)

I am currently prototyping a pdesolve() which can handle first-order equations (and also any hyperbolic PDEs) using characteristic methods. Once this is finished, I can start adding the variable separation into pdesolve() and after this has been done, I can move on to implment support for boundary and initial conditions.

Separation of variables for PDEs

written by plaes, on Jun 26, 2009 3:01:31 PM.

School finally ended last week (no exam results yet, though) and I took a long-long trip back home.. Week started slowly due to the deadly combination of the forgotten laptop power cord, Midsummer day, Victory Day and best weather ever. This resulted in lots of grilling, beer and also a small side-effect: my GSoC mentor is probably quite angry now for missing my weekly update again...

Back to Sympy now.

So far all my various doc-related fixes have been committed to upstream, and I have decided to bite the bullet and start implementing the variable separation for PDEs. So far some very simple testcases based on first-order equations work, but I have some trouble with equations containing higher order derivatives. You can pull from gihtub/pde-separate and please break it :)

Partial differential equations with Sympy

written by plaes, on Mar 21, 2009 9:06:00 AM.

Yesterday I bit the bullet and managed to add a simple solver for the separable variables PDE case into Sympy.

I have also set up a git repository viewer and my two patches can be viewed on the pde-upstream branch.