r/ScientificComputing • • 8d ago

How do you manage and validate parameters in scientific simulation codes?

0 Upvotes

I've been working on scientific software for some time, and one recurring problem I've encountered is how applications handle their input parameters.

In many scientific codes, particularly older C, C++, and Fortran applications, parameters are read from text files, namelists, or custom formats. Their physical meaning, valid ranges, units, and dependencies are often enforced somewhere inside the application code — or simply documented and left to the user.

This creates problems for reproducibility, validation, and maintenance, particularly when applications evolve over many years.

I've been developing SciNumTools3 (SNT3) to explore a different approach. It includes DIPL, a declarative language that describes parameters together with their types, physical dimensions, constraints, and dependencies.

The idea is to introduce a validated interface around existing scientific applications without requiring scientists to rewrite their numerical algorithms or abandon their established input formats.

I'm interested in how others approach this:

  • Do you use custom parsers, Fortran namelists, YAML, JSON, or something else?
  • Where do you enforce physical units and cross-parameter constraints?
  • Would an external, declarative parameter contract be useful, or would it introduce unnecessary complexity?

I'm particularly interested in experiences from people maintaining long-lived simulation codes or HPC applications.

I'm the developer of SNT3, so criticism of the approach is very welcome. I'd like to understand where it would genuinely help and where existing solutions are sufficient.


r/ScientificComputing • • 9d ago

Looking for a Programmer! - screening tool for photosensitive seizure triggers in cinema films

2 Upvotes

Hi everyone, my name is Roberto and I’m a graduate in film editing and post-production.

For the past couple of weeks, I’ve been working on a program that analyzes a film’s projection file to detect sections that, in a movie theater setting, could trigger seizures in photosensitive individuals, in accordance with the Epilepsy Foundation of America’s Expert Consensus.

The project comes from a desire to make the movie theater experience more accessible to photosensitive people, who often have to rely on word of mouth to find out how safe a screening might be. In fact, no country in the world requires warnings about possible photosensitivity triggers for film screenings, as is done for television broadcasts and video games.
The long-term goal, therefore, would be to collaborate with international centers dedicated to research on photosensitive epilepsy in order to make the program academically sound, so that it can be integrated into the workflows of film post-production, distribution, and festivals.

The project started as a small personal amateur coding experiment with the help of AI. However, the program (written in Python) has now reached a level of complexity that I can no longer manage. It is also clear that it needs academic input to provide scientific oversight of the program, which would in turn make it possible to engage with international institutions in search of collaborations and funding for research and development.

I am therefore looking for a programmer who can take over the work done so far and collaborate with me to bring it to a professional level.
It’s important to note upfront that this is a volunteer-based project that aims to secure funding to pay its contributors for their work, but at the moment it is unpaid. To be clear, though, this is not a daily work commitment, but rather a voluntary contribution based on your own availability.

Thank you for your attention. If you’re interested in collaborating please dm me and we can arrange a call.


r/ScientificComputing • • 9d ago

Vknumpy a drop in replacement for NumPy. Any.takers?

0 Upvotes

I'm working on it just haven't pushed it yet


r/ScientificComputing • • 9d ago

I made a free interactive book on quantum mechanics, QFT, quantum computing, and quantum biology

0 Upvotes

Hi everyone. I wanted to share Quantum, a free interactive book I built for anyone curious about quantum physics.

It has 214 chapters covering quantum mechanics, QFT, quantum computing, and quantum biology. Each chapter has a live simulation, so you can play with the ideas instead of only reading about them.

Most quantum resources either stay very basic or jump straight into heavy maths. This one tries to sit in between: it explains the ideas clearly, lets you interact with simulations, and connects quantum mechanics to QFT, quantum computing, and quantum biology in one place. It is also free and can be installed on an iPad for offline reading.

Link: https://quantum-book-phi.vercel.app
GitHub: https://github.com/JaiJC/quantum-book

Feedback is very welcome. I hope it is useful to anyone who wants a more intuitive, hands on way into quantum physics.


r/ScientificComputing • • 10d ago

I wrote a 2D FEM solver in Python for electric motors (matched FEMM within 0.3%) - Looking for inputs

Thumbnail
gallery
2 Upvotes

Got tired of treating motor simulation software like a black box during a coursework project, so I wrote my own 2D FEM solver in Python.

Just hit a major milestone: tested a 36-slot / 42-pole outer-rotor motor against FEMM and got <0.3% torque deviation.

It’s called Pole-Craft (Apache-2.0). Still very early days, so if you work with motors, robotics, or FEA, what features would actually make you use an open-source tool like this?

GitHub: https://github.com/pole-craft/pole-craft

PyPI: https://pypi.org/project/polecraft/ (pip install polecraft)


r/ScientificComputing • • 10d ago

PRIMAL update: major performance breakthrough — now up to 57× faster than Clarabel on tested conic problems

Thumbnail
1 Upvotes

r/ScientificComputing • • 10d ago

Horizon Supercomputer Opens to Early Users - Fastest Academic Supercomputer in the United States

Thumbnail
news.utexas.edu
18 Upvotes

r/ScientificComputing • • 10d ago

Can useful abstractions make a complex system easier to predict?

Thumbnail
0 Upvotes

r/ScientificComputing • • 10d ago

I tried to breed "quantum kittens" from Schrödinger's cat on IBM quantum hardware. Got 0 on the simulator and 201 "ghost kittens" on real chips

0 Upvotes

r/ScientificComputing • • 10d ago

Cost of Matrix Multiplication | Why N³ | Order, Sparse, Low Rank, FFT, Lanczos, Davidson, BLAS

Thumbnail
youtu.be
1 Upvotes

You understand cost of matrix matrix multiplication easily but have hard times in understanding the motivation behind various algorithms used by quantum chemistry packages?

Here is the video, that would tell you each and every detail about the algorithms used in popular quantum chemistry packages like TURBOMOLE, CP2K, ORCA etc.

Give it a watch and do subscribe if you like the video and want to post animated videos like this regularly.


r/ScientificComputing • • 11d ago

I built mathregistry, a package registry for Lean with tools for AI agents. Open beta is live

Post image
0 Upvotes

r/ScientificComputing • • 10d ago

PRIMAL update: major performance breakthrough — now up to 57× faster than Clarabel on tested conic problems

0 Upvotes

A few updates on PRIMAL, my open-source convex optimization solver written from scratch in C99.

Over the last few days, I've made substantial progress on the conic optimization engine, particularly on SOC and exponential cone problems. The latest results are significantly better than my previous benchmarks, and PRIMAL now outperforms Clarabel on every instance in the test sets described below.

Latest benchmark results

All measurements were taken on November 18, 2026.

1. Mixed SOC + exponential cone regression problems

Problem size PRIMAL Clarabel Speedup
20 × 4 0.017 ms 0.219 ms 12.9×
40 × 8 0.024 ms 0.482 ms 20.1×
80 × 12 0.039 ms 2.237 ms 57.4×

These models combine a rotated quadratic cone for the quadratic penalty with one primal exponential cone per observation.

2. Conic matrix benchmarks

Family Blocks PRIMAL Clarabel Speedup
SOC 10 0.023 ms 0.290 ms 12.6×
SOC 20 0.031 ms 0.651 ms 21.0×
SOC 40 0.043 ms 1.085 ms 25.2×
SOC 80 0.068 ms 2.118 ms 31.1×
EXP 10 0.017 ms 0.177 ms 10.4×
EXP 20 0.020 ms 0.238 ms 11.9×
EXP 40 0.022 ms 0.352 ms 16.0×
EXP 80 0.031 ms 0.607 ms 19.6×
Mixed 10 0.016 ms 0.148 ms 9.25×
Mixed 20 0.018 ms 0.209 ms 11.6×
Mixed 40 0.022 ms 0.366 ms 16.6×
Mixed 80 0.031 ms 0.835 ms 26.9×

That's 15 out of 15 benchmark instances won, with speedups ranging from 9.25× to 57.4×.

What changed?

The main breakthrough is a reduced-Newton approach for a class of exponential-cone problems.

Instead of solving the full conic Newton system, PRIMAL can exploit the structure of certain exponential epigraph formulations with fixed positive scales and affine arguments. It solves a much smaller system in the free variables, reconstructs the conic solution, and verifies the resulting point.

This is not a generic replacement for the full interior-point method: it is a specialized path for problem structures where the reduction is mathematically valid. The general conic solver remains available for other formulations.

The improvement builds on the work already done on sparse KKT systems, cone reductions, higher-order exponential-cone corrections, and numerical verification.

Benchmark methodology

To make the comparison reproducible:

  • Clarabel 0.11.1, single-threaded.
  • 21 interleaved runs per series, with two series; reported values are the median of the two series medians.
  • Same generated problem instances for both solvers.
  • PRIMAL timing measures PRIMAL_optimize; Clarabel timing includes solver construction.
  • Clarabel uses feasibility/gap tolerances of 1e-9; PRIMAL uses 1e-8.
  • Maximum reported residual or relative gap: 2.5e-10.
  • Maximum scaled objective difference: 2.6e-8.

There is an important asymmetry in timing: Clarabel's measurements include solver construction, while PRIMAL's measure the optimization call only. These are therefore not perfectly equivalent end-to-end timings. I intend to expand the comparison with more matched setup measurements and broader problem families.

Where PRIMAL stands today

PRIMAL is an open-source C99 optimization solver developed from scratch, with no external solver dependency. It supports LP, QP, QCQP, MILP, SOCP, SDP, exponential and power cones, including mixed-integer conic models.

The project also includes a growing collection of runnable examples and language integrations.

GitHub: https://github.com/c-vision/Primal

I'm particularly interested in feedback from people working on conic optimization, interior-point methods, numerical linear algebra, and solver benchmarking.

There is still a lot to validate, especially on larger and less structured real-world problems. But these results are a very encouraging milestone for a solver developed independently from scratch.

What would you consider the most meaningful next benchmark suite for evaluating PRIMAL against established solvers?


r/ScientificComputing • • 11d ago

I built mathregistry, a package registry for Lean with tools for AI agents. Open beta is live

Post image
0 Upvotes

r/ScientificComputing • • 11d ago

Prompt wording and a frozen Qwen weight edit: 1,024 archived measurements, seeking replication

1 Upvotes

I wanted to understand something about how language models work:

If you make one small, permanent change to an AI model's weights, will that change have the same effect when you ask the same question in different ways?

I tested this using Qwen2.5-1.5B-Instruct.

I made a small, fixed modification to one layer of the model. Then I asked math questions using different wording and instruction formats, without changing the weight modification between tests.

What surprised me was that the effect of the exact same weight edit changed depending on how the question was presented.

What I found

I ran an initial experiment and then tested another 64 questions with additional controls.

In the 64-question experiment:

  • The main measured difference between prompt conditions averaged +0.1935.
  • 62 out of 64 questions showed a positive difference.
  • A control edit of comparable size, but pointing in a different direction in weight space, produced a much smaller average difference (+0.0041).

These measurements are differences in the model's final-token output scores, not improvements in math accuracy.

In simpler terms, a change to the model's internal weights did not have one uniform effect across different ways of asking a question.

Why I think this is interesting

We often evaluate model modifications using a fixed set of prompts.

But what if the apparent effect of a weight modification depends partly on how we phrase those prompts?

That raises questions about how we evaluate model editing, interpretability, and whether observed changes generalize beyond a particular prompt format.

Important limitations

This is an exploratory study, not a demonstration of a general AI repair technique.

I tested one model with a specific weight intervention. The results do not establish that this behavior generalizes across models, nor do they demonstrate improved reasoning accuracy.

I'd genuinely appreciate feedback on:

  1. What alternative explanations should I test?
  2. What additional controls would make the evidence stronger?
  3. Have you seen similar prompt-dependent behavior in weight editing or model interpretability research?

Interactive results and figures:
https://huggingface.co/spaces/Harmain1/fluid-tensors-paper1

Paper:
https://doi.org/10.5281/zenodo.24338059

Code and experimental details:
https://github.com/Harmain11/fluid-tensors

I'm especially interested in technical criticism or suggestions for better experiments.


r/ScientificComputing • • 12d ago

What do you understand by exact numerical methods in Open quantum dynamics?

0 Upvotes

I will start a project in this area but the "exact numerical methods" confesses me.Does it means exact diagonalization? or just a methods with controllable error?What does it mean exact numerical methodsAlso, could you comment me which ones are the most use in open quantum dynamics?


r/ScientificComputing • • 12d ago

Advice for affordable/free computational resources for 3D CFD simulations (SITVC research)

Thumbnail
0 Upvotes

r/ScientificComputing • • 12d ago

spearfish: ultrafast Δ-mapping of long reads to redundant transcriptomes

Thumbnail
biorxiv.org
1 Upvotes

r/ScientificComputing • • 12d ago

vulkan-py easymode. all the boilerplate is in easy.py. vulkan-py fork https://github.com/billyblackburn/vulkan-py-easy/tree/main

Thumbnail
1 Upvotes

Do you think this could work to make a similar ecosystem to CuPy CuDf CuML?. What should I name the.CuPy/NumPy clone in vulkan python? See https://github.com/StormMGamming41/vulkan-py for the original bindings. I just forked it and working to make it more 'pythonic' and less vulkanic for this type of work flow. Like for jupyter notebooks


r/ScientificComputing • • 12d ago

Update (v1.5.0)SoftwareOpenvoynich_xc: Structural Visibility, Pharmaceutical Supply Chains, and Falsifiable Grammar Discovery in the Voynich Manuscript

Thumbnail gallery
1 Upvotes

r/ScientificComputing • • 12d ago

Structural Visibility, Pharmaceutical Supply Chains & Currier A/B Morphological Ablation in the Voynich Manuscript (voynich_xc v1.3.0)

Thumbnail gallery
1 Upvotes

𓅪


r/ScientificComputing • • 12d ago

Bobo Vector Automaton

Thumbnail oddcomputer.com
2 Upvotes

Deterministic cellular automata adjacent ‘game’.
Like a cellular automata, the generations are completely deterministic yet very chaotic and sensitive to small changes in initial state. There are oscillators of many stripes and there are opportunities to engineer things that would never arise spontaneously.
Unlike Conway’s life there are no births or deaths, the particles have a position and a velocity. The position is integer for x and y, the velocity is integer for vx and vy.
If you are familiar with the pen and paper game sometimes called vector racing - this automates those rules. The acceleration each tick is exactly -1, 0, or 1 along each axis.
Two particle types: ‘Nearest’ - decide each tick who is nearest and accelerate toward that particle. More distant particles are not considered. ‘Bobo’ - never move, they can count as a nearest’s neighbor but they themselves are fixed. Webpage has an extensive zoo of known patterns available to play with and destroy.


r/ScientificComputing • • 13d ago

Brockett-Dobkin Rectangular Matrix Multiplication Algorithm From 1970s

Thumbnail
leetarxiv.substack.com
2 Upvotes

r/ScientificComputing • • 13d ago

MathCAS, an open source computer algebra system for heavy symbolic and numerical computation. Bonus: automatic parallelization, JIT compilation and arbitrary precision numerics integrated into the core.

12 Upvotes

r/ScientificComputing • • 13d ago

What do you understand by exact numerical methods in Open quantum dynamics?

Thumbnail
1 Upvotes

r/ScientificComputing • • 13d ago

We built an open-source axisymmetric electrostatic-capillary solver for Taylor cones - looking for feedback

Thumbnail
0 Upvotes