Importing a ProjectParameters.json
FlowGraph can work in both directions. Besides generating a Kratos ProjectParameters.json from a graph, it can reconstruct a graph from an existing ProjectParameters.json — useful for inspecting, editing or documenting cases you already have.
This is handled by the "from-JSON converter" in public/js/extensions/load_project_parameters.js, which adds LGraph.prototype.configure_project_parameters() and a KratosProblemParametersBuilder class.
How it works
When you load a Kratos ProjectParameters.json, the builder:
- Detects node types from the JSON structure. Well-known keys map to nodes —
problem_data,solver_settings,linear_solver_settings,model_import_settings, the orchestrator and the analysisstageseach become the corresponding FlowGraph node. - Recreates each node with its widget values populated from the JSON (problem name, parallel type, echo level, solver options, linear-solver parameters, and so on).
- Auto-positions the reconstructed nodes into columns so the graph is readable immediately.
- Auto-connects the nodes to reflect the references in the original file (solver → linear solver, stage → solver → problem data, etc.).
The result is a graph equivalent to the input case, which you can then edit visually and re-export.
Typical workflow
- Open FlowGraph.
- Load your existing
ProjectParameters.jsonthrough the import entry point. - Review the reconstructed graph, adjust widgets or connections as needed.
- Click Generate and open the Viewer to confirm the regenerated JSON.
- Export a case to produce an updated, runnable bundle.
Round-tripping
Because import and export are symmetric, FlowGraph is a convenient editor for cases authored by hand or by other tools — import, tweak visually, and export back to JSON.
Related
- Exporting a Case — the reverse direction.
- Analysis Stages & Orchestrators — the top-level structure the importer reconstructs.