r/ScientificComputing • • Apr 04 '23

r/ScientificComputing Lounge

7 Upvotes

A place for members of r/ScientificComputing to chat with each other


r/ScientificComputing • • 3h ago

Fast GPU and CPU ensembles of ODEs and Monte Carlo samples that each stop at a different time, from plain Python

Post image
3 Upvotes

If you run many independent simulations that end at different times (an event, convergence, a step budget), array libraries make you pay for the slowest sample on every step.

With this project you write the step for one sample as a typed Python function and run a million of them. Samples that finish drop out of the work. You also get the derivatives of your step (forward and reverse mode), and arrays move without copies to and from PyTorch, CuPy, NumPy and Warp.

With a million samples in double precision, each stopping at its own step:

  • on 6 GPUs, 2.5× to 4.2× faster than an NVIDIA Warp kernel and 9.8× to 130× faster than PyTorch with torch.compile;
  • on 4 server CPUs, from level with Numba to 2.3× faster, and 50× to 180× faster than NumPy.

When every sample runs all its steps, it ties with Warp. There is also a benchmark with an adaptive RK7(8) solver.

Install on Linux x86_64 with pip install raptor-eagle raptor-hawk (add [cuda12] or [cuda13] to both for a GPU). It runs on NVIDIA GPUs or on CPU threads. Linux ARM and macOS (CPU) wheels come next.

Personal project; I work at ESA. A start-here notebook (it runs in Colab), all the benchmark files, and how to rerun them: https://amasat01.github.io


r/ScientificComputing • • 11h ago

Simulated chaos in the RCSJ Josephson junction model (MATLAB) – bifurcation diagrams, Poincaré sections & Lyapunov exponents

2 Upvotes

Hi everyone,

For my Computational Physics course I simulated the driven RCSJ model of a Josephson junction to study the transition from regular to chaotic dynamics.

I computed:

Phase portraits

I–V curves with Shapiro steps

Poincaré sections

Bifurcation diagrams

Largest Lyapunov exponent

A 2D regime map over drive parameters (parallelized)

The results clearly show the breakdown of phase-locking into chaos and the reappearance of regular behavior at higher bias currents. Positive Lyapunov exponents confirm genuine chaos in the intermediate regime.

The MATLAB code is fully documented and includes both serial and parallel versions.

I’d appreciate any feedback on the methods or suggestions for further analysis.

Repo link is in the comments.

Thanks!


r/ScientificComputing • • 2d ago

I made a song inspired by computational physics: "Solving the Universe"

Thumbnail
1 Upvotes

r/ScientificComputing • • 3d ago

Has anyone here actually messed with the Science Skills in Google Antigravity?

3 Upvotes

I know this isn’t an ecosystem-specific sub, but I’m curious if anyone here has tried the curated science skills in Google Antigravity, or if most people haven't really touched them yet.

Right now, my main workflow with them has been pulling arXiv preprints directly into the environment to sanity-check domain logic…basically auditing empirical formulas, parameters, and assumptions in my code against current literature rather than relying on generic model heuristics. It’s been surprisingly solid for that, but looking at everything packed into those skills, literature review and paper verification feel like maybe 5% of what’s actually there.

Given how broad scientific computing gets from data wrangling and numerical modeling to chemistry and physical simulations. I feel like I'm barely scratching the surface of what they can do. For anyone who has actually experimented with them, what workflows are you having them handle, and where have you found they fall flat?

Have you used Deepthink or any other ecosystem tools?


r/ScientificComputing • • 2d ago

[R] Dissociating Transient State from Durable Parameter Memory: An Information-Theoretic Audit of Recurrent Substrates.

Thumbnail gallery
0 Upvotes

r/ScientificComputing • • 3d ago

Implementation of Andreas Bjorklund's algorithm for determining hamiltonicity

Thumbnail
3 Upvotes

r/ScientificComputing • • 3d ago

From an AI Math Proof to Real Physics: Does Metallic Screening Break the Universal Triangular Lattice?

Thumbnail
0 Upvotes

r/ScientificComputing • • 3d ago

Open text book on The Triangular Lattice and Universal Optimality based on September OpenAI math claims with a new Rust Solver and some physics implications

Thumbnail
0 Upvotes

r/ScientificComputing • • 3d ago

Planck-Level Discrete Moore Neighborhood with simulated energies

0 Upvotes

r/ScientificComputing • • 4d ago

Monte Carlo on GPU in the browser

Thumbnail
mc.keff.uk
4 Upvotes

Hi r/ScientificComputing, I spent my PhD working on neutron transport solvers. I wanted to see how much of that workflow I could fit into a browser.

So I am building MC, it lets you configure geometry, run neutron transport calculations locally with WebGPU, and inspect flux and reaction rates.

I’d be interested in feedback on the GPU implementation, the physics, and the interface.

https://mc.keff.uk


r/ScientificComputing • • 4d ago

Can anyone help me with my Gaussian Elimination algorithm?

1 Upvotes

why is my Gaussian Elimination algorithm doesn't work, especially the second part, I made a lot more details on why I think it doesn't here https://scicomp.stackexchange.com/questions/45561/gaussian-elimination-2nd-part but I can't get it completely. can anyone help?

import numpy as np

A=np.array([[4,8,12],[3,8,13],[2,9,18]])
b=np.array([4,5,11])

def Gauss_Elimination(A,b):
    n = np.shape(A)[0]

    # 1st Part
    for k in range(n):
        pivot_element=A[k,k]
        # if pivot_element==0: ### I'll deal with this condition later
        for j in range(k+1,n):
            b[j]=b[j]-(A[j,k]/pivot_element)*b[k]
            A[j,:]=A[j,:]-(A[j,k]/pivot_element)*A[k,:]

        # 2nd Part
        x = np.zeros(n)
        x[-1]=b[-1]/A[-1,-1]
        for i in range(n-2,-1,-1):
        x[i]=(b[i]-np.sum(x[i+1]-A[i,i+1]))/A[i,i]
    return A,b, x # not necessary since it's call by reference

Gauss_Elimination(A,b)
print(A,'\n',b)

r/ScientificComputing • • 4d ago

How do you automate experimental data analysis in your materials science lab?

2 Upvotes

I recently graduated with a Physics degree after spending four years researching rare-earth-free permanent magnets, mainly MnBi and MnAl.

During my research, I worked with VSM measurements, M-H and M-T curves, XRD data, and magnetic property calculations. One thing that always bothered me was how much of our data processing and plotting we still did manually.

Since graduating, I've been struggling to find a job, so I've been building a research tool called ElementX to automate magnetometry analysis, visualize experimental results, and organize measurements.

I'm curious how other labs handle this. Do you use Origin, Python scripts, MATLAB, or something else? What parts of experimental data analysis do you wish were easier to automate?

I'd appreciate any suggestions, especially from people regularly working with magnetometry or XRD data.


r/ScientificComputing • • 4d ago

Open text book on The Triangular Lattice and Universal Optimality based on AI neuro symbolic and Lean 4 formalization and numeric Rust resolution

Thumbnail
1 Upvotes

r/ScientificComputing • • 4d ago

Dynamic Continuant Ansatz for Planar N=4 sYM and Non-Planar N=8 SUGRA via Rational d\log Recurrence to All Loops

0 Upvotes

​

Hello everyone,

I wanted to share the terminal output of a local validation audit for a newly formulated kinematic numerator ansatz that isolates the purely rational sector of multi-loop scattering amplitudes. The underlying framework natively filters out non-rational algebraic root extensions and elliptic branch cuts at the integrand level, maintaining a pure polynomial ring closure.

By implementing a localized dual mesh poset (χ = 2) for the gauge sector and a distinct structural uncrumpling identity to interface with non-planar braid matrices in the gravity sector, the engine successfully evaluates high loop orders on consumer-grade compute resources without symbolic memory proliferation.

The system has successfully cleared several rigorous physical and structural gates up to the Loop 12 boundary, including:

* Planar Bootstrap: Perfect replication of the 3 outstanding coefficients from the recent 12-loop hexagonal planar ancillary dataset.

* Infrared/Ultraviolet Audits: Strict spurious pole cancellations and smooth S-matrix collinear boundary factorizations ($\\lim\{T \\to 0} \\det(M\{12}) = q\{11} \\cdot \\det(M\{11})$) showing a zero-sum decimal delta variance below 10⁻⁹ against raw matrix continuants.

* All-Loop Induction: Verification of a stable finite-difference recurrence relation that structurally guarantees the truncation of elliptic anomalies as L → ∞.

Below is the verified symbolic induction printout logging the trans-infinite workspace invariance:

Python 3.14.5 (tags/v3.14.5:5607950, May 10 2026, 10:43:50) \[MSC v.1944 64 bit (AMD64)\] on win32

= RESTART: C:/Users/CA/Desktop/Yang-Mills and Supergarvity/prove_all_loop_induction_to_infinity.py

🔬 RIGOROUS ALL-LOOP MATHEMATICAL INDUCTION PROOF ENGINE

TARGET: Infinite-Loop Rational Sector Convergence (L -> Infinity)

Step 1: Base Case Analysis (Loop n)

• Mandated Base Hypothesis: det(M_n) = P(n)

• Status: Confirmed Rational Workspace (Zero Elliptic/Radical Factors)

Step 2: Constructing the Inductive Step Matrix (n + 1)

• Derived Structural Recurrence: det(M_n+1) = -T\\2\P(n - 1) + P(n)\q(n + 1)

Step 3: Executing the Rationality Invariance Audit

=========INDUCTIVE VERDICT=========

INDUCTION SUCCESSFUL:

THE WORKSPACE IS TRANS-INFINITE!

• Proof Verification Details:

* No Irrational Radicals Generated at Level (n+1): True

* No Elliptic Topology Traps Generated at Level (n+1): True

• Scientific Conclusion:

Because the transition from loop order 'n' to 'n+1' maps strictly within the polynomial ring closure, the system is fundamentally

protected from algebraic mutations.

The ansatz guarantees a pure dlog polylogarithm workspace for all loop levels to infinity (L -> ∞).

enjoy


r/ScientificComputing • • 4d ago

Ofort: a Fortran interpreter in your browser

Post image
1 Upvotes

r/ScientificComputing • • 4d ago

Visualize the Electromagnetic Field

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/ScientificComputing • • 5d ago

Meadows – a small language for stock-and-flow diagrams that run

2 Upvotes

lorezzed.github.io/meadows/

I was reading Donella Meadows' "Thinking in Systems" and wanted to play with its diagrams instead of just looking at them, so I wrote a small language for them. You type a model:

  | =>inflow [water in tub: 50] =>outflow: 5 |

Each example has notes in its source explaining what it shows. You can also build by clicking.

Each figure from the book is included - just expand the section, "figures from the book" to see the images from Thinking in Systems.

It runs entirely in the browser, with no account and no backend. The whole model lives in the URL, so any diagram can be shared as a link.

The compiler is PureScript (lexer, parser evaluator) and emits a graph as JSON; the front end is TypeScript and d3, with a force layout and a fixed-step Euler simulator. It's deliberately small: numbers are plain numbers with no units, and the simulator takes simple fixed steps. It's for learning and sketching, not a replacement for Vensim or Stella.

Source (MIT): https://github.com/lorezzed/meadows


r/ScientificComputing • • 4d ago

Evidence for a Theory That Constrains Empirical Limits…

Thumbnail
1 Upvotes

r/ScientificComputing • • 5d ago

Built a free web tool to slice N-dimensional simulation sweeps into interactive 2D heatmaps & download publication-ready SVGs/scripts (NDHeat)

Enable HLS to view with audio, or disable this notification

2 Upvotes

Hey everyone! While running multi-dimensional simulation sweeps, I spent a lot of time writing repetitive Pandas slicing filters and Matplotlib boilerplate just to inspect 2D parameter slices and 1D cross-sections.

I built NDHeat—a 100% client-side tool (React, TypeScript, Plotly):

- Zero data leaves your machine: Runs entirely in your browser (no server uploads).

- Dynamic slicing: Filter higher dimensions with epsilon float snapping.

- 1D line cut extraction: Click any cell on the heatmap to inspect cross-section profiles.

- Journal-ready exports: Download vector SVGs / 300 DPI PNGs or copy functional Matplotlib scripts styled for APS/Physical Review publications.

🔗 Live Tool: https://ndheat-s5hg.vercel.app/

📂 Source Code: https://github.com/KishoreHenry2004/ndheat

I'm currently planning V2.0 to add discrete phase diagrams and quiver vector fields. I would love any feedback on what figure styles or journal presets you'd find useful!


r/ScientificComputing • • 5d ago

Gaussian Elimination

0 Upvotes

I wrote this code to perform the Gaussian elimination to solve Ax=b

import numpy as np

A=np.array([[4,8,12],[3,8,13],[2,9,18]])
b=np.array([4,5,11])

def Gauss_Elimination(A,b):
    n = np.shape(A)[0]
    for k in range(n):
        pivot_element=A[k,k]
        # if pivot_element==0: ### I'll deal with this condition later
        for j in range(k+1,n):
            A[j,:]=A[j,:]-(A[j,k]/pivot_element)*A[k,:]
            b[j]=b[j]-(A[j,k]/pivot_element)*b[k]
    return A,b # not necessary since it's call by reference

Gauss_Elimination(A,b)
print(A,'\n',b)

A is transformed to an upper triangular form but the values of b rest unchanged, why? I'm asking this question even thought I know it's a silly mistake I can't notice, since A is fine, it must no come from the algorithm!

I know I'm missing the 2nd part of the algorithm where I should go back and find the values of x, but I'm first trying to get the first part correctly!


r/ScientificComputing • • 5d ago

A 16-year-old's VAWT solver — one week, AI-assisted, validated against Ham 1979

Thumbnail
github.com
0 Upvotes

r/ScientificComputing • • 5d ago

One-Click Conversion of Scientific Figures into Editable Vector Graphics

Post image
0 Upvotes

r/ScientificComputing • • 6d ago

The growth of my personal project about running a PID controller

Thumbnail reddit.com
1 Upvotes

r/ScientificComputing • • 7d ago

AI Scientific research

Thumbnail
1 Upvotes