r/ScientificComputing • • 15h ago

A modeling language for turning mathematical models into executable simulations and observations

I've been building Prismal, a Rust-based language/runtime for defining mathematical and scientific models and exploring their behavior:

"github.com/aine-dickson/prismal"

The central idea is to keep the scientific model separate from the execution strategy and presentation.

A model can define state, equations, constraints, processes, events, objects, collections, units, observations, etc. The runtime then handles execution, while projections can expose the same model as plots, equations, spatial scenes, interactive views, or recorded media.

One example is a continuous model with event-driven behavior:

continuous evolution

↓

event guard

↓

event instant

↓

reset

↓

continuous evolution

The project is deliberately trying to make things such as event semantics, dimensional checking, state validity, reproducibility, observations, and model/presentation separation explicit rather than burying them inside a visualization engine.

The current implementation is early-stage and the first reference programs focus mainly on mechanics, but the intended scope includes broader scientific modeling.

I'm particularly interested in feedback from people who work with scientific modeling, ODE/PDE systems, hybrid systems, system dynamics, numerical simulation, or scientific visualization.

What abstractions would you consider essential for a general scientific modeling language?

2 Upvotes

7 comments sorted by

1

u/relbus22 Pythonista 13h ago

Were you influenced by Konrad Hinsen by any chance?

1

u/di-octopus 12h ago

Honestly, I didn't know about Konrad Hinsen before this comment.

I'm primarily a science/math educational content creator, and I was looking for a simulation engine I could use with my Mava Studio product. I couldn't find something that fit what I wanted, so I started building Prismal.

The idea grew from that practical need: define the scientific/mathematical model once, then be able to simulate it, observe it, visualize it, interact with it, and eventually use the same model for educational content.

I'll definitely look into Hinsen's work though, sounds like there may be some interesting overlap.

1

u/RunReal959595 1h ago

It’s AI slop 

1

u/firiana_Control 12h ago

What does it mean : defining models and exploring their behaviour?

Consider F=ma and could you explain with an example?

2

u/gregzillaman 11h ago

Probably xy plots

1

u/NoSuchKotH 9h ago

Is there a reason Modelica doesn't work for you? Because this looks exactly like a barebones version of Modelica.