r/ScientificComputing • u/zenineasa • 2d ago
Konjugate: A new approach to making simulation models
Hello r/ScientificComputing community,
In the past month, I have been working on creating a simulation software from scratch. The idea came to me when I was working a on a few projects that, when I looked at the math, essentially required me to solve the same kind of problems. The equation looks like the following, and it's generally referred to as generic networked dynamical system equation.
ẋᵢ = Σⱼ fᵢⱼ(xᵢ, xⱼ) + sᵢ(xᵢ, u)
Essentially, this is a graph equation. i is a node, xᵢ is a vector of states in a node, fᵢⱼ(xᵢ, xⱼ) is an edge connect nodes i to j, and sᵢ(xᵢ, u) is a source term where you can hook up an input or define a function at a node that affects itself.
I discussed this idea with a few friends before going ahead to implement; it went over the head for some, while others thought it would be interesting to see. There are applications for this in robotics, power grids, heat exchange, etc. And, the idea is inherently interdisciplinary; the node states can be from cross-domains and edges too. We can simulate a motor and it's kinematics; the motor may get heated up due to resistances, and the air pocket near it may get heated up while trying to cool it down... A real cross-domain simulation could be done with this kind of a setup.
The following is the link to the GitHub page. It's licensed under MPL 2.0.
https://github.com/zenineasa/Konjugate
I would love to hear your thoughts about this. Bug reports, workflow issues, new ideas to build on top of it... I look forward to hearing it all.