Skip to content

KratosMultiphysics/Flowgraph

Repository files navigation

Kratos FlowGraph

npm version npm downloads Publish to NPM Deploy Docs Documentation License: AGPL-3.0-or-later Node.js

A visual node editor for configuring KratosMultiphysics simulations.

Instead of authoring a Kratos ProjectParameters.json by hand, you wire together nodes — analysis stages, solvers, materials, processes, model parts and outputs — on a canvas, and FlowGraph generates the JSON (and material files) for you.

The Kratos FlowGraph editor

Quick start

Run the editor without installing anything:

npx kratos-flowgraph

Then open http://localhost:8182 in your browser.

📖 Full documentation: https://kratosmultiphysics.github.io/Flowgraph/

Features

  • 🧩 Visual, node-based configuration — build a Kratos case by connecting nodes; the graph is the configuration.
  • ⚙️ Rich Kratos node library (~85 node types) — analysis stages & orchestrators, fluid / structural / thermal / potential-flow solvers, serial & MPI linear solvers, constitutive laws (elastic, plasticity, damage), boundary-condition processes, modelers and output processes.
  • 🔁 Round-trip — import an existing ProjectParameters.json and FlowGraph reconstructs the graph, or export the current graph as a zipped, ready-to-run case.
  • 🖥️ Live JSON viewer — inspect the generated JSON as you build.
  • 🚀 No build step — a small Node/Express server serves the editor; launch it with one command.

Installation

Run instantly (recommended)

npx kratos-flowgraph

Global install

npm install -g kratos-flowgraph
kratos-flowgraph

From source

git clone https://github.com/KratosMultiphysics/Flowgraph.git
cd Flowgraph
npm install
npm start        # node app.js
# or
npm run devstart # nodemon app.js (auto-reload)

Requires Node.js 18+.

Configuration

Configuration lives in config/default.json (via the config package):

{
    "host" : "127.0.0.1",
    "port" : "8182",
    "kratos_root": "/path/to/Kratos/bin/Release",
    "working_dir": "/path/to/working_dir",
    "python_binary": "python3"
}

Switch config files with NODE_ENV, e.g. NODE_ENV=debug npm start loads config/debug.json.

The editor UI needs no Kratos installation. kratos_root, working_dir and python_binary are only used by the optional "run simulation" backend route.

Documentation

The full documentation — installation, a getting-started walkthrough, the complete node reference, and developer/architecture guides — is published with VitePress at:

https://kratosmultiphysics.github.io/Flowgraph/

The sources live in doc/:

npm run docs:dev          # local docs dev server
npm run docs:build        # build the static docs
npm run docs:screenshots  # regenerate UI screenshots with Playwright

Contributing

Contributions are welcome! When adding a feature or node, please keep the documentation in sync — this is a project rule (see CLAUDE.md):

Whenever a new feature, node, or user-facing change is added, update CLAUDE.md, README.md and the doc/ documentation in the same change (and regenerate screenshots if the UI changed). A feature is not complete until the docs reflect it.

Adding a node is easy: drop a .js file under public/js/nodes/<category>/ that calls LiteGraph.registerNodeType(...) — it is auto-discovered. See the developer guide.

Publishing

Publishing to NPM is automated: bump version in package.json and create a GitHub Release — the publish.yml workflow publishes kratos-flowgraph using the NPM_TOKEN secret. Docs deploy to GitHub Pages on every push to master.

License

AGPL-3.0-or-later.

About

A node editor for Kratos Problemtypes

Resources

License

Stars

7 stars

Watchers

20 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages