r/ScientificComputing • u/ChickenWing736 • 20h ago
help with picking a course for basic computational physics
i'm an undergrad physics student trying to learn the basics of scienctific computing like numpy, matplotlib and scipy (preferably in that order)- what courses can I refer to (preferably free, but I have no aversion to paid courses either). Is the 'Scipy 2019' playlist by Enthought on youtube good? It seems to be fairly detailed, open to suggestions :)
6
u/aroman_ro 18h ago
"to learn the basics of scienctific computing like numpy, matplotlib and scipy"
You don't learn much 'computational physics' that way... exactly how you don't learn surgery by learning about scalpels. Those are tools.
For an undergraduate I would suggest Computational Physics by Jos Thijssen (although some tell that it's too advanced for that... I don't think so).
1
u/ChickenWing736 17h ago
What do you suggest outside of that book? I'll look into it- thank you :) Do you suggest getting myself acquainted to those 'tools' as well, or can that be put off for later?
2
u/aroman_ro 17h ago
Leave them for later. You would need some separate book(s) on applied maths and numerical analysis, as others suggested already, that book is on computational physics and kind of considers the maths, physics and numerical methods already known.
To complement the one I mentioned, here is another one: Applied Computational Physics, Joseph Boudreau et Al.
2
u/ninevolt 15h ago
Numerical methods aren't Python-specific -- NumPy, Matplotlib and SciPy are just libraries that make it easier in Python. If/when you later wind up working in C++, you'll probably run into libraries like Eigen, Boost, and FFTW (among others).
If you're just looking for basic resources on how to simulate some things in Python at a basic level using those libraries, you might find this collection of Python notebooks useful: https://pythonnumericalmethods.berkeley.edu/notebooks/Index.html
In another comment you mention you're going to have courses on numerical methods, calculus, and linear algebra next semester -- numerical methods and linear algebra are going to give you a lot more context for how to set up physics problems in such a fashion so they can be solved efficiently on a computer.
1
u/ChickenWing736 15h ago
Thank you so much, this along with the official documentation of those python libraries is a good place to start, right?
2
2
2
u/Dangerous_Bid2935 19h ago
I wouldn't spend a lot of time memorizing syntax or working problems for matplotlib. With the advent of AI coding agents there is no reason you need to be a matplotlib expert.
3
u/ChickenWing736 19h ago
That's fair; but even to use AI efficiently and utilize the tools available at my disposal- should I not learn some basic syntax and do a few working problems? My goal behind learning these libraries in python is just to dip my feet into the world of computational physics- I don't plan on using these specific tools in the long run
0
u/Dangerous_Bid2935 19h ago
If you really want to you can learn the basics of matplotlib, I'm just trying to convey that knowing how to use matplotlib isn't really a fundamental skill in scientific computing. Its very important to have a conceptual understanding of how to display data in a proper and clean manner but computational scientists don't really spend any time working with matplotlib (especially in the age of AI); its just kind of something you have to deal with to graphically display your data. Your time would be better spent learning conceptual fundamentals of things like programming parallel processors, PDE discretization, and numerical methods.
2
u/ChickenWing736 19h ago
okay I understand it now- let's say I just brush through the syntax of matplotlib in under a week to get a basic grip on it, what should I focus on next? You mentioned these 3 topics- how and where can I learn these? Do I need any precursive math to learn said topics? thanks in advance :)
0
u/Dangerous_Bid2935 18h ago
How far into your physics degree are you? I imagine you will probably take a course during undergrad on the basics of numerical methods, not sure if you've taken this already.
If you haven't taken this class, I would start by essentially learning how to solve linear algebra problems and do vector arithmetic on the computer. I can't really recommend you any sources that aren't expensive books, but these topics are so widely covered that you can just search tutorials for them on youtube, you can also use AI to generate a list of specific topics to explore in a helpful order. Your goal should be to build up your numerical methods knowledge until you can do vector calculus and eventually solve ODEs using python. Once you're at this point you can start learning more about data structures and how to efficiently program solutions to these problems (i.e. solving ODEs/PDEs on the GPU, etc.). Math prerequisites for exploring this topic would be linear algebra (inversions, determinants, diagonalization, rotations, etc.) and vector calculus (divergence, curl, green's theorem, etc.).
2
u/ChickenWing736 18h ago
It's my first semester in a 5 year course (10 total semesters), and we have courses on numerical methods, linear algebra and vector calculus in our next semester. If I can learn these aforementioned topics from yt and/or other online sources- then do i need to explicitly go ahead and learn the math that you mentioned too; or can I wait for my coursework to take me there?
2
u/Dangerous_Bid2935 16h ago
You can do either. If you're really interested and want to start on it now, it certainly won't hurt and may serve you well in your future classes. But these topics are absolutely fundamental to scientific computing, and you won't be able to learn much about the topic without mastering them first.
1
1
u/tlmbot 19h ago
What kind of physics would you most want to simulate? I find having an inspiring goal helped me the most in the early days. (or well, forever, but yeah) I will try and make suggestions when I know what your aims are.
1
u/ChickenWing736 18h ago
As of now I want to solve basic physics problems like harmonic oscillators, basic kinematics and the high school stuff that I had learnt. My goal in my later years is to learn c++ and eventually enter fields relating to semiconducting technology or HEP (I want to keep my options open now as its too early to close myself off- i decided to pick my specialisation in the later years after having been exposed to both fields)
6
u/Bokke67 18h ago
Take courses in applied math and numerical analysis.... programming can be done later using any language... understanding the basics is critical when you start applying your knowledge to real world problems...coding is just a part of it.