1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Computational physics, where to start?

  1. Jul 16, 2011 #1
    I'm interested in picking up some programming skills specifically for modeling or solving physics-related things. Like solving PDE problems, like the heat or wave equation boundary problems I had in my PDE course. I'd also like to learn how to make animated simulations of the solution for example, or making simpler models of things like orbital motion, mechanical systems, etc. Fluid dynamics I find appealing too but I'm guessing that's way more advanced.

    I have only rudimentary knowledge of some Mathematica (basic calculus, ODE's, integral transforms, plotting data(which I'm terrible at, so I always end up using Origin), not much else).

    I'm led to believe Python is the way to go in my situation, is it a good choice for my purposes? The astrophysics grad students at my university use IDL a lot, would it be a better idea to get acquainted with that one instead?
    Last edited: Jul 16, 2011
  2. jcsd
  3. Jul 16, 2011 #2
    A friend of mine is doing some theoretical astrophysics research this summer (mapping magnetic field lines to stars) and has been using MATLAB for most of the summer, he just now is starting to learn IDL.

    Python is a good language to have under your belt but I would also recommend Fortran.
  4. Jul 16, 2011 #3
    That sounds interesting. I *think* matlab is what we'll have to use in our computational physics course next year(no syllabus yet).

    I think I forgot to mention something crucial. I'm looking for something without a steep learning curve(I'm doing this for fun atm), so I'll be able to dive right into and do fun things like modeling systems of particles for example, or solving PDE's. I'm guessing that sort of rules out Fortran or other "hard" languages?

    I've noticed there is a huge amount of books with titles like "mathematica/matlab for physics", can anyone recommend one that teaches by example and builds from the ground up?
  5. Jul 16, 2011 #4
    At our university they teach C in the Computational Physics classes. The book we used was C Programming: The Essentials for Scientists and Engineers by Brooks. It was pretty good with a lot of examples.
  6. Jul 16, 2011 #5
    I'd heard that Fortran was a dead language. Is it still useful for things like computational physics? I'm not really experienced in this area, though I would like to get into it in the next couple of years. Also, my understanding is that there are multiple versions of Fortran. Is there any one in particulr that you'd recommend?
  7. Jul 16, 2011 #6
    I don't personally know Fortran but one of my professors uses Fortran in his research and he stands by it as the best programming language out there... Though that may just be his biased opinion.

    It was developed and used by IBM in 1957, the latest release for the code was last year so I can only assume that means it's still in use and is still supported.

    This is an interesting blurb from wikipedia:

  8. Jul 17, 2011 #7
    I believe Fortran and C(++) are the most used languages in computational physics research. At least in applications where good performance of the code is essential. The reason for this is mostly because the two languages have a wide variety of libraries available for scientific computing.

    I don't know what level are you on (I'm suspecting undergrad), but I'd recommend learning Matlab first. If you're just interested in learning how to solve physics problems using computers, Matlab is definitely your choice. It's easy to learn and yet virtually all the physicists that I know use it in research too. Actually at least in my university they teach Matlab on mandatory undergrad courses so you might run into it too during your courses at some point.

    As for the physics side, I'd recommend Thijssen's Computational Physics book. It assumes that you know the physics behind the problems though.

    So: Matlab and Thijssen's Computational Physics. Python is also very popular, but if you're just starting out, I think Matlab is more essential tool to learn.
  9. Jul 17, 2011 #8
    Fortran is not as pretty or bells-and-whistles prone as C++, but it is BLINDLINGLY fast at numerical computations. It makes most languages look pokey in comparison if used correctly. If you need a million by a million matrix dealt with, you use Fortran. Got a ton of equations to integrate? Fortran. Massive fluid dynamics calculations? Fortran!

    It is 'dead' in the sense that it has fallen out of favor with some areas of science but it is ubiquitous in stuff like astrophysics, high energy, and computational fluid dynamics. Python is better in terms of user-friendliness, C++ in terms of popularity. There's no use hand-wringing about which language. Pick one of those three and go at it!
  10. Jul 18, 2011 #9
    Looks like matlab it is... Found some free ebook on physical modeling with matlab for newbies to the language/program (author: Downey), looks good as a starting point!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Computational physics, where to start?