Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Computation for physicists

  1. Sep 19, 2006 #1
    I thought this might be a well-used thread if I asked the following:

    What computer skills do physicists use in their work? Please tell me what technology you have learned for whatever job you do. This questions mostly geared toward those of you guys out in the field, not fellow undergrads like myself. (:
  2. jcsd
  3. Sep 19, 2006 #2
    I'm a graduate student doing work in the stochastic solution of chemical rate equations.

    This is a purely computational exercise. The original code was in MATLAB, but I translated it to C this summer and obtained speed improvements of about 200x. Currently, we're working on applying evolutionary algorithms to pick rate parameters that give us the best fit to "experiment".
  4. Sep 19, 2006 #3
    matlab, c and fortran are widely used. how much and what exactly you need to know depends a lot on how computationally oriented whatever you do is. I mainly use matlab for data-analysis but all of the heavier computational work the theorists do at our lab is done in fortran or c.
  5. Sep 20, 2006 #4

    George Jones

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    As others have said, C and Fortran for numerical work like solving differential equations, computing definite integrals, finding roots, etc.

    Maple and Mathematica are used to do the above things symbolically, if possible. Sometimes an attack that uses a combination of symbolic and numerical computer methods is needed.
  6. Sep 20, 2006 #5


    User Avatar

    Matlab - great for visualising results, fast.
  7. Sep 20, 2006 #6
    As a grad student, I work with fortran and mathematica on a daily basis. Fortran, because that is what most of the codes I work on were written in before my time. Mathematica because my advisor uses it for a lot of things so it makes it easy for me to send him files regularily. He does use it for things that would be better done with MATLAB but that just isn't the way he does things.
  8. Sep 20, 2006 #7
    I'm also a grad student, and I will be working in C/C++/F for my simulations dealing with HPC "realtime" rendering and Nbody. I also use Matlab for classes(booo).
  9. Sep 21, 2006 #8
    I'm dabbling with C# in my spare time. The C family are extraordinarily powerful, but can be very difficult to use and perhaps are superfluous for physics applications in some cases. They teach FORTRAN here in second and third year, and the staff are apparently quite keen on matlab for certain things, but I never got on with it.
  10. Sep 22, 2006 #9


    User Avatar
    Science Advisor
    Gold Member

    I do mostly condensed matter & material science stuff ...... Cs, F for HPC, Python, some Perl, Java, visual basic etc. ..... quite a bit of the software development is done "directly" using matlab & mathematica (scripting, simple GUI builders, their 'compilers') and various other scripting languages/interfaces.
  11. Sep 22, 2006 #10
    I'm an undergrad student, first year in Theoretical Physics / Applied Maths, I have taken 2 years of java in Highschool, I would really like to pursue advanced programming with java and physics together. If anyone has any resources I'd gladly appreciate them. I know that most of you said you work in a C language or Fortran, but I would like to try my luck at writing programs for physics with java
  12. Sep 22, 2006 #11

    George Jones

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You might want to look at these books, which complement each other nicely.

    Java Number Cruncher: The Java Programmer's Guide to Numerical Computing


    In order to teach myself some Java, I have developed an interactive animation that shows orbits (timelike geodesics parametrized by proper time) about Schwarzschild black holes. The program numerically solves differential equations, computesdefinite integrals, finding roots, and plots the results graphically.

    The animation takes as input from the user the initial r coordinate, and the initial speed and angle with respect to an orthonormal frame of a platform hovering (and experiencing an incredibly large "g-force") at that r value.

    The animation sits in a frame in a bunch of hyperlinked html files. These files contain a number of short explanations and write-ups for some suggested virtual experiments that can be performed with the package.

    Experiment 1: Falling Into a Black Hole
    Experiment 2: Escape Velocity
    Experiment 3: Investigation of Stable Circular Orbits
    Experiment 4: Investigation of Unstable Circular Orbits
    Experiment 5: Investigation of Spiral Orbits
    Experiment 6: Gravity Bends Light Rays!
    Experiment 7: Boundaries Between Orbits of Various Kinds
    Experiment 8: Orbital Precession and Closed Orbits

    I've had a lot of fun (and some frustrations) developing and playing with the package. I have attached a zipped file that contains all the necessary files. To use the animation, unzip the zipped file, making sure that all files are extracted into the same folder. (A new folder should probably created before doing this.) Click on the file blackHoleOrbits.html to view and interact with the animation.

    The animation is certainly not at a professional level, and it has glitches and warts.

    I posted this a couple of years ago, but I think I have fixed one of the minor glitches.

    Attached Files:

    Last edited by a moderator: May 2, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook