Hacker News new | ask | show | jobs
by rwlincoln 1885 days ago
Recently, I was able to get Andes v1.3.5 (a Python package for power system transient dynamics simulation using SymPy) to run in WebAssembly using Pyodide v0.16.1.

https://andesapp.github.io/

1 comments

I'm not your target user, but I'm curious what happens to the pjm5bus_out.txt file that's generated. Can you somehow make that available to JS so it can be downloaded by the user?
The file is written to the in-memory virtual file system provided by Emscripten. It can be accessed from the console:

  pyodide._module.FS.readFile("/pjm5bus_out.txt", { encoding: 'utf8' })
I published this just to demonstrate that Time Domain Simulation was working to Hantao Cui, the author of Andes. Small Signal Stability Analysis will require SciPy and an ARPACK package. I would like to create a PWA that runs Andes in a web worker, like I did for MATPOWER:

https://matpower.app/

Yeah that can be done with BrowserFS - probably among other ways https://github.com/pyodide/pyodide/issues/613