Is computational Physics a hard major?

Click For Summary
SUMMARY

Computational Physics is a challenging major that requires a solid understanding of mathematics, computer science, and physics. Students must learn Java programming to utilize Open Source Physics libraries and must be proficient in using Eclipse IDE for coding. Key numerical methods, such as Euler integration and the RK4 ODE solver, are essential for simulating physical systems, with the RK4 method being favored for its superior accuracy. Understanding the relationship between numerical methods and physical phenomena is crucial for success in this field.

PREREQUISITES
  • Java programming skills for utilizing Open Source Physics libraries
  • Familiarity with Eclipse IDE for coding and debugging
  • Understanding of ordinary differential equations (ODEs)
  • Basic knowledge of numerical methods, particularly Euler integration and RK4 ODE solver
NEXT STEPS
  • Research the implementation of numerical methods in computational physics
  • Learn about the differences between Euler integration and RK4 ODE solver
  • Explore advanced features of Eclipse IDE for efficient coding
  • Study the impact of numerical errors in physical simulations
USEFUL FOR

Students pursuing a degree in Computational Physics, educators teaching physics and programming, and professionals interested in numerical simulations and modeling of physical systems.

MOKHTAR
Messages
19
Reaction score
0
TL;DR
Is computational Physics a hard major? To what extend I should learn mathematics and Computer Science besides learning Physics?
Is computational Physics a hard major? To what extend I should learn mathematics and Computer Science besides learning Physics?
 
Physics news on Phys.org
It’s hard in the sense that you’re combining fields and learning things you haven’t learned before. In the course I took, the student needed to understand java programming so they could work with the Open Source Physics libraries and Classical Physics at the Goldstein level.

Www.compadre.org/osp

Coding was done using Eclipse IDE which had excellent development features ie a syntax coloring editor, transformation functions to promote, demote methods, add getters and setters, reformat code and provide visual cues of bad/wrong coding via incremental compiles and a good code stepping and breakpoint debugger.

Most of your coding will be around implementing the step method ie converting an ODE into a method and then setting up other code to activate the ODE solver that uses the specific ODE step method.

The hard part for me was understanding how the numerical method actually related to the physics.

Early in the course we implemented a simple Euler integration method for the simple harmonic oscillator and saw how it introduces some error into the simulation which appears as energy added or removed. From it we learned that we need to choose the ODE solver based on the kind of problem we were simulating to reduce the effects of error.

Later we used the RK4 ODE solver which we only needed to know how to use it and not what magic it used under the covers. It became the one to slit for most of our problems as it worked so much better than any Euler variant.

An example of error effects would be a planetary simulation where the planet started to spiral toward the sun ie energy lost vs the planet spiraling outward ie energy added thanks to error. The best solver would add some error and then take it away so that the simulation was stable and represented the planetary system.

We even got too philosophical with the prof asking if we could say all energy in the universe was in fact information error introduced into the simulation. He just laughed. I guess he saw The Matrix movie too.

Hope this helps.
 
Last edited:
  • Like
Likes   Reactions: anorlunda

Similar threads

  • · Replies 52 ·
2
Replies
52
Views
4K
  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K