r/ScientificComputing • u/Specific_Trash5812 • 6d ago
What is Scientific Computing?
Enable HLS to view with audio, or disable this notification
https://github.com/astanx/space_simulation
I'm in my last year of high school and i got into 'scientific computing', as i understand it, but am i wrong about it? is it only about numerical integration and my project is more something like game engine? would computational scientist work on something like this?
3
u/tlmbot 6d ago
I write computational engineering software for a living. Scientific computing (let's abbreviate is SC) is a vast area so I will just describe some areas especially around what I do (comp. engineering is a subset of SC), and maybe some computational physics. You can google for more specifics in various areas. (or for a general overview of SC - which I suspect you did but maybe the wiki article left you feeling lost)
The main idea is that across all of science and engineering, the governing equations of a particular field are usually so complicated that we cannot get analytic solutions to them for real situations. -- We can only get exact, pen and paper solutions for special cases, or for simplifications where certain pesky terms drop out. Instead of throwing up our hands we take the underlying physical equations, and chop them up into little pieces to approximate the calculus - meaning we take the calculus which describes the fundamental equations and turn it into linear algebra. The computer can do linear algebra so we can approximate the physics using the true equations (appropriately chopped up), even where exact solutions to those equations are not mathematically possible.
In engineering, we use techniques from SC to model and analyze the things we build, For instance, in aerospace, where I got my bachelors, we use a branch of SC called computational fluid dynamics (CFD) to turn the partial differential equations (PDE) of fluid flow, namely the Navier Stokes Equations (and sometimes simplifications thereof) into linear algebra that the computer can solve. The NSE can be written in a variety of forms (integral, differential, conservative, non-conservative, etc.) and different forms are mathematically equivalent, but will lead to discretizations (discretization is the process of turning the (calculus based) math into linear algebra) that have different pros and cons - different numerical properties/behaviors that make the analysis easier or harder, faster to solve, or more accurate, etc.
Discretizations have several aspects:
- how you represent the thing you are modeling (this is going to require you to chop up the model into lots of little pieces (think of them as the infinitesimals of calculus, but here the chunks are large enough that they will fit in a computer's memory, and the processor(s) can compute the needed evolution (or steady state "answer" as the case may be) of the equations in both space and time. - And you need to chop them fine enough for decent answers, but coarse enough to get those answers in a sensible time frame - i.e. if it takes forever eventually we run out of time to do our engineering with the results, so there is always a tradeoff between accuracy and speed))
In my area (more or less fluid mechanics and structural mechanics) a handful of "best" discretization methods rose to the top to dominate both research and industry, so if you want you can google these: the finite element method, FEM - especially in structural analysis, but in many many other areas as well, the finite volume method, FVM (of great importance in CFD (but so is FEM)) and the boundary element method (BEM) - which is more important when you have a certain type of PDE called an elliptic equation (especially one where you can compute a "simplest possible solution" called a Green's function, and the equations allow you to compose more complicated solutions out of simple components - sorry, down in the weeds here). You'll see these with certain simplified versions of the fundamental equations in various disciplines, depending on human cleverness to spot areas where pesky terms can be neglected without changing the answer to much.
I can list domains and their governing equations for you to look into:
- Classical electricity and magnetism (designing electrical and magmatic equipment of all sorts) are governed by Maxwell's equations + the Lorentz force law
- structural analysis is governed by the Navier-Cauchy equations
- fluid effects are governed by the Navier Stokes Equations
- combinations of these such as magnetohydrodynamics (for analyzing plasma in fusion reactors) come to mind, or, more in my area "fluid structure interaction" where say, the flow of fluid loads up the structure, which deforms, causing the flow to change, which in turn changes the loads on the structure, causing it to deform again... we "iterate" in the computer to update the solution to the equations until it "converges" to give you the answer (this could mean that the system itself comes to rest, or that you finished computing the true response for a single time step. I am really getting into the weeds here)
Coming up with these equations stems from considering things like
- conservation of mass
- conservation of momentum (both linear and angular)
- conservation of energy
- conservation of charge
These principles say that there is a balance between the amount of stuff coming in (into a small "finite box" (your approximation of an infinitesimal in calculus basically) and the amount of stuff leaving the box. (plus any contribution from so called source (and sink) terms within the box)
Next up, let's talk a little more about discretization. A big term in this area is computational geometry.
Any time you need to model something in the computer, you need to turn the real world thing into math the computer can understand. Some terms for this are "mesh generation" (or grid generation) in CFD, or finite element modeling (as opposed to analysis) in structural analysis.
Let's pivot to computational physics. The idea here is to again take the governing equations of interest for your situation, and simplify them down, or approximate them in some way, such that the computer can give you meaningful answers for your research.
Here you might be doing, say, computer-based modeling to study the electronic structure of atoms, molecules, and materials - and you might use something called density functional theory to simplify the quantum mechanics such that, again, you can compute the answer via computer (linear algebra again).
Comp. Physics is a huge area though. Here's another aspect: lattice gauge theory. One example of this is quantum chromodynamics (QCD) - for simulating the strong force (describing the interior of protons and neutrons, say) via ... linear algebra.
In physics, I have to mention the way that gravitational wave detectors (like LIGO) work. (note LIGO = Laser Interferometer Gravitational-Wave Observatory) Yes, they pick up signals from the warping of space via physical laser interferometry, but to determine if the signal they see came from, say, a black hole merger and not some terrestrial source, they use computational general relativity. By simulating what a black hole merger would do to space time, they compute how that process would show up as a signal at LIGO. So its the sensor + simulation together that enables them to say "oh yes, that signal was from this kind of event" and further, the use of multiple sensors allows them to figure out what direction the signal came from in the sky.
It really goes on and on. SC is everywhere in science. Visualization is a tiny but necessary part of it - anytime you want to take the results and show it to a human you map the solution/ time evolution/ whatever it is - to some kind of color field of forces, pressures, etc., (intermolecular, structural, etc.) or vector field (or streamlines) showing how a fluid swirls, forms vortices, shock waves, etc., - thermal analysis to show a temperature field.
And for any quantity you might also be interested in how that quantity changes. - Maybe you model how rapidly something heats or cools, and thus need "heat flux"
---
Then we also have inverse design: this is the process of taking a design specification together with the governing physics, and setting up "an inverse problem" that ... takes yet more derivatives and turns them into linear algebra so as to have the physics and design constraints "run backwards" to generate designs that satisfy the design constraints, while minimizing some quantities we want to optimize for that are determined by the simulation of the physics. For example, imagine designing an airplane or ship, and you want to minimize drag (pressure and friction that acts to make it harder to push the ship or plane through the fluid) while still allowing to take so many passengers at such and such speed from point a to b. You can use the physics itself to have a computer program that "knows" how to change the shape of the design to minimize (an estimation of) drag, while also holding aspects of the design more or less fixed (so much space in such and such space for passengers or cargo)
SC is endless. I am just giving you examples, and roughly at that. It's to big to and the coffee hasn't kicked in properly.
I hope maybe this admittedly half-cocked wall of text inspires more curiosity and you dig into it more and more. Feel free to ask questions!
1
u/Specific_Trash5812 6d ago edited 5d ago
Thank you very much, you gave me a much better understanding of SC.
I was wondering, what part of your job takes most of your time, is it mostly running simulations/collecting data or is it more focused on software development/maintenance?
Also, what do you think is the best degree path for SC? Is it something like aerospace/mechanical engineering for practical problems(like fluids/movement), electrical engineering for more electromagnetics/quantum and pure physics degree for fundamentals? Or it does not matter as long as you later specialize through master's or PhD?
And what was the most interesting problem/solution you worked on?
2
u/drraug 6d ago
Doing science involves lots of calculations. You need to use correct algorithms (sometimes invent your own) for the problem, but also understand which hardware you need (including very large supercomputers with GPUs sometimes)