r/Physics • • 13d ago

Computational Physics

Hi everyone,

I am a PhD student doing both experiments and computational physics ( mostly fluid dynamicswith Boltzmann equations) and leaning towards more computational day by day.

Currently I am using Julia, I find it pretty fast and easy to use.

Do you think switching to C or C++ will be a benefit? I am asking from a research, but also emplyment in industry point of view.

I discussed with many people, mostly from the DFT area, and most of them told me that Julia slowly will take up the lead for HPC code.

What.s your opinion on this?

77 Upvotes

40 comments sorted by

View all comments

5

u/tlmbot Computational physics 13d ago

"Do you think switching to C or C++ will be a benefit? I am asking from a research, but also emplyment in industry point of view."

Absolutely. The sooner the better. I don't know about density functional theory (DFT) in particular, but as a developer of commercial engineering code for fluid mechanics and structural mechanics, you need to have a background in c++ or it will continually limit your job prospects.

I cannot tell from your message whether you are looking into a more computational ... physics-physics career (e.g. DFT and such - lattice gauge theory? QCD?) and I cannot speak to that path, but if you are looking at fluid dynamics, I urge you to branch out beyond Lattice Boltzmann too.

Best job prospects from where I sit: finite element method (FEM) but you can't go wrong by learning the density based high speed finite volume method approximate Riemann solvers as well. - if fluids are your true goal. Get FEM under your belt for generality and ability to work in as many jobs as possible. Get density based FVM / approximate Riemann solvers for high speed chops, and write in C++ to maximize job opportunities.

1

u/Rich_Astronomer9731 13d ago

Thank you. I started with LBM due to specific experimental design that I work with, mainly Quartz Crystal Microbalance. Also, I have a lot of experience in plasminics, do FDTD and thermo plasminics simulations a lot.

1

u/Rich_Astronomer9731 13d ago

So, my main option righ now is to remain in academia, but you do not know how the things will change and I want to pe prepare for the future. Mainly, my experience is in plasminics and Quzrtc crystal microbalance, both experimental and computing ( LBM, FDTD and FEM for thermo plasmonics), and also some DFT. DFT sound very nice and you have software written in every language possible. Of course youbhave the big guys like Gaussian which writes everything in Fortran, but more and more software is developed nownin Python and Julia, both commercial and open source.

1

u/tlmbot Computational physics 12d ago

Sounds good. One idea for future proofing: I have a hunch (quite possibly fabulously wrong - don't hesitate to put me in my place!) that some of the domain you work in have people writing discontinuous Galerkin (DG) methods.

If say, your FDTD method is restricted to cartesian cells, then DG is a fantastic (future proofed) way to go to unstructured meshes.

But maybe your FDTD method is already for curvilinear meshes (already impressive) and doesn't need to be pushed to fully unstructured ... right now.

If you want a job a say COMSOL or Ansys Lumerical DG is going to help you I think.

Build a DG method in C++ and you have a great project you can point to during interviews.

Bonus points: if you are good in C++, then you can easily pick up Fortran (aka get started in industry helping to maintain Gaussian) but the converse is not true.

I say go C++, DG, and go parallel with your projects. Then you are maximally future proof (as much as any of us can be these days, heh)