Entries tagged “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.
Tagged as:
pde, python, sympy
|
0 comments
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.
Tagged as:
code, math, pde, sympy
|
0 comments
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 :)
Tagged as:
gsoc, pde, python, summer, sympy
|
0 comments
written by plaes, on Jun 16, 2009 2:23:00 PM.
As I have still exam session in progress, I haven't had much motivation to write about my almost non-existent progress with GSoC.
So, school first: I have still one exam left - Optics, which is on 19th and will be hard as some of the stuff we are required to know does not even exist (tunnel effect) in the Hecht's "Optics"
. (Although I might be wrong, as I only have 2nd edition and later editions might have updates). Fortunately I have almost 100% of the lecture notes available.
After the exam, either on Friday or Saturday, I will be moving back home (which is ~1 day of travelling) and then I can really start with GSoC.
Now, GSoC..
As some people have had trouble connecting to my personal server (Who said that free countries do not have internet censorship?), I created a mirror of my private Sympy repo on github.
There you can find the following two branches I consider upstream quality:
py3k - some preliminary Python3K porting, which gets rid of all the dict.has_key() that were reported during test phase. (So some still remain).
doc-fixes - I ran into few problems while tried to build Sympy's documentation - most of them were Sphinx warnings, although ran into some errors too. So please review and comment.
There's also my pde-wip branch, but currently I'm not very happy with that approach...
Thanks Ondrej for pushing me to keep posting :)
Tagged as:
school, sympy
|
1 comment
written by plaes, on Jun 2, 2009 2:36:00 AM.
Yesterday was so far the hottest day of the year topping near 28 degrees Celsius. It was also the first day of the exam session and I already got my feet wet with "Structure of Matter I". Unfortunately this isn't the only one - I still have exams in Theoretical Physics I, Mathematical Physics III and the hardest of them all - Optics.
So, what about Summer of Code and my project Partial Differential Equation support for Sympy?
I certainly haven't jumped the ship and continue working on it as soon as possible.
The first task for me is to define an acceptable syntax for defining and solving PDE problems (with all the hints, assumptions, initial values and boundary conditions).
(After staring this text for 15 minutes and trying to figure out what shall I write here about my plans, I finally have to conclude that it has been a long hot day...)
As a sidenote, I did set up an application for reviewing patches. Hopefully it eases the management of the patch queue and improves overall code quality. (I really find google groups' lack of inline diff support quite unhelpful :( )
PS. You might need root certificate from Cacert, otherwise you may run into issues accessing the site.
Tagged as:
math, school, sympy
|
0 comments
written by plaes, on Apr 22, 2009 9:27:00 AM.
As some of you might already know I am also working within a small group of students developing a small cubesat satellite. Last weekend we finally published a press release which basically concludes that our mission is actually feasible.
Now the University of Tartu together with Finnish Meteorological Institute and
other European partners particularly from Estonia and Finland are joining forces to
develop the first‐ever orbital test of the electric sail physical principle and
technology. The ESTCube‐1 is a 1 kg nanosatellite and Estonia's first satellite, with
planned launch in 2012.
And good news come in pairs - my project proposal Improve Sympy to handle Partial Differential Equations was accepted into Google Summer of Code. This means that I can basically spend my summer at Saaremaa and not worry about finding a summer job... :D
But more about the GSoC tomorrow...
Tagged as:
estcube, gsoc, sympy
|
0 comments
written by plaes, on Apr 11, 2009 10:19:00 PM.
I went through my local sympy branches and cleaned up some smaller fixes in order to submit them upstream. I did not push the PDE stuff yet, as I feel it needs some more testing.
So only four patches this time:
Added corner case for Bernoulli equation.
Small cleanups to the ODE solver and tests.
Fix typo: s/trascendental/transcendental
Fix path to aboutus.txt url.
And also a small note to myself how to publish and delete remote branch:
git push server local_branch:remote_branch
git push server :remote_branch
Tagged as:
git, hacking, python, sympy
|
0 comments
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.
Tagged as:
code, git, pde, python, sympy
|
1 comment