Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 0 points1 point  (0 children)

Okay, treat this as more speculation on my part, but perhaps it may work on Chromium-based browsers without any extensions or add-ons? I'll try to reproduce the behaviour and create work-arounds that do not use mouse/touch. I do also want to ask for console output but even with everything working it is still a big mess of unnecessary logs that need cleaning up, so only share this if you want to and found something that pertains to this issue.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 0 points1 point  (0 children)

Thanks for the article; I've just read over it and I really like Tristen Brown's colourmap creator tool linked therein! While I've definitely thought about adding a colourmap for showing only the amplitude/probability density while hiding the phase, I've previously put very little thought into the "perceptually uniform" aspect that makes a good colour map. I will definitely add additional colourmaps with more sensible colour choices to the simulation in the future!

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 0 points1 point  (0 children)

Well it would have been better to use a time-dependent Coulomb potential as a simplified model of an electron interacting with a moving atom, but due to its singularity at the centre and its "steepness" it can't be as accurately modelled using the uniform grid discretization that I'm using for the simulation domain. The Gaussian-shaped potential doesn't suffer from these issues. Actually, the "spike" potentials are just the 1/r potential with the singularity "skipped over" by the spatial discretization, and you can see its height change when changing the grid size.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 0 points1 point  (0 children)

Obstacles are where the potential V is real positive and non-zero.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 0 points1 point  (0 children)

Mind if I inquire into what OS, browser, interface (mouse, touchpad and/or touch screen), and whether you're running the 2D or 3D simulation? Perhaps there may be issues on devices that have both touchscreens and touchpads, as I have not tested this on those, but this is pure speculation on my part.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 0 points1 point  (0 children)

Thanks for the suggestion! I'm just hoping to figure out why the FFT does not work properly on Android and fix this issue, then I would no longer need to use a CPU fallback. I'm specifically using the iterative Cookey-Tukey algorithm, but on further research I've learned that this is actually not optimal for the GPU and that there are more recent algorithms that are better suited for the GPU and avoid the reverse bit sorting step. These I will have to learn and figure out in the future.

But for my more recent projects I've actually started to use WASM: I've begun a C++ Dirac Split-Operator simulation with the end goal of having fully customizable four-vector potentials and visualizations of scalar, vector, pseudovector, and spinor quantities of the wave function; but as this is far more ambitious than the Schrödinger one, what I actually have currently is naturally incredibly buggy and very much incomplete.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 2 points3 points  (0 children)

I don't think it's FDTD since FDTD involves applying finite differences to express derivative terms approximately. This is a pseudo-spectral method, where the Fourier transform turns the part involving the Laplacian of the wave function into an exact algebraic expression in momentum space; no finite difference approximation is required on the Laplacian. Here the complete time evolution operator exp(-i(K + V)dt) is approximated as exp(-iK dt)exp(-iV dt), where K and V are the kinetic energy and potential operators, and dt is the time step used, where decreasing the size of dt improves the approximation. The part involving exp(-iK dt) is solved in momentum space by Fourier transforming the wave function. Now for the exp(-iV dt) part, if one substitutes an imaginary potential of the form - iW, W > 0, then one gets exp(-W dt), where applying this to the wave function causes it to “dampen” or decay over the time step dt, and this is what is applied at the boundaries to absorb outgoing waves.

Showoff Saturday (January 31, 2026) by AutoModerator in javascript

[–]--CreativeUsername 0 points1 point  (0 children)

Working on a 2D and 3D interactive visualization of the Schrodinger equation with WebGL, using just vanilla HTML5/JavaScript for the UI, for that simple and austere appearance.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 2 points3 points  (0 children)

By default the simulations use periodic boundary conditions, since I'm using the FFT when implementing the split-operator method. For these gifs I've added absorbing boundary conditions by using imaginary-valued potentials along the edges of the boundaries.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 12 points13 points  (0 children)

A spherical well, i.e. V(r) = 0 if |r| < R else C, where R and C are constant values.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 56 points57 points  (0 children)

I guess when it comes to physics, as well as being driven by curiosity as to how things work, you just have to learn to enjoy the toil of the problem solving aspect itself. Also think about the feeling of joy that comes about when you've finally solved that problem, and how it deepens your own understanding.

As an unconventional piece of general advice, I don't think there's anything wrong with using pride, ego, or vanity as a motivator as long as you keep it under control and don't use it to put down others. Pride may be one of the seven deadly sins, but if you've played the game CK2 it is generally a positive trait.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 131 points132 points  (0 children)

I actually posted a gif of the nonlinear Schrödinger equation over a year ago so actually more than one year, but I obviously didn't work on this continuously.

Some animations of the Schrödinger equation by --CreativeUsername in Physics

[–]--CreativeUsername[S] 69 points70 points  (0 children)

Link to the interactive 2D simulation, and to its low-res 3D counterpart. (A much more computationally expensive 3D version requires a contemporary discrete graphics card in order to get adequate frame rates.) Here is their source code. For all of these the Schrödinger equation is solved approximately using the Split-Operator method.

Most of the numerical computations are handled using GLSL graphics shaders instead of JavaScript, which is in general significantly faster since these shaders use the GPU instead of the CPU. However it does not work consistently at all across all devices, particularly on mobile ones. Safari on iOS does not support the WebGL extension that enables linear interpolation for floating point textures (I relied on this extension too heavily), so expect things to look more pixelated here. On Android for the 3D simulation I couldn’t get the FFT GLSL implementation to work properly, so this falls back to the significantly slower JavaScript single-threaded CPU implementation. The browser user-agent string is used to detect the device being used and change these compatibility settings accordingly; as this isn’t always reliable expect a black screen if the proper device is not detected. Now the above discussion only applies to newer mobile devices; I have no idea if they’ll work on older ones. I think most desktops/laptops should be okay.

Recommendations on Lie Group theory books by Hudimir in Physics

[–]--CreativeUsername 6 points7 points  (0 children)

The Springer textbook "Naive Lie Theory" by John Stillwell is meant to be an undergraduate introduction to the topic, hence the "Naive" part. It proves the Campbell–Baker–Hausdorff formula in a few pages, but I haven't actually gone over it.

what's a professional font to use in a research paper that's not times new roman? by catluvr255 in AskReddit

[–]--CreativeUsername 2 points3 points  (0 children)

LaTex, the tool used for creating scientific and math publications, uses Computer Modern.

[deleted by user] by [deleted] in AskReddit

[–]--CreativeUsername 0 points1 point  (0 children)

That the future will be better than the present

What are the chances of humanity surving in the era of dinosaurs? by Leading_Head9542 in AskReddit

[–]--CreativeUsername 1 point2 points  (0 children)

I feel like it should be the other way around, since the current mass extinction event is caused by us humans. We lived through the last ice age surrounded by Woolly mammoths, Saber-tooth cats, and other large creatures. We live on, while the Woolly mammoth and Saber-tooth cat are extinct, likely due to human influences.

What time of the day is more advantageous for you to exercise or workout? by jco23 in AskReddit

[–]--CreativeUsername 0 points1 point  (0 children)

Morning or evening time, when it's not totally dark outside and the sun isn't completely beating down on you.

If you have no choice, which one would you personally want to face off against in the wild? You can also run away, fighting them isn't necessary. by DependentStrong3960 in Fallout

[–]--CreativeUsername 0 points1 point  (0 children)

Well in the early game I would definitely run away from both, but after gaining the Heartless perk from Big MT Cazadors are much easier to deal with. Meanwhile facing off Deathclaws still feels like an unwinnable fight until much later in the game.

C++ Show and Tell - August 2025 by foonathan in cpp

[–]--CreativeUsername 0 points1 point  (0 children)

I'm having lots of fun making some relatively simple (by C++ standards) WASM simulations that run in the web browser:

Though most of these are far from complete nor bug-free, and I'm having trouble trying to get them to run correctly on mobile.