Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Draft PDF
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper.md
- name: Upload
uses: actions/upload-artifact@v4
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: paper.pdf
Binary file added example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
108 changes: 108 additions & 0 deletions paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
@article{Rother2025,
doi = {10.21105/joss.08158},
url = {https://doi.org/10.21105/joss.08158},
year = {2025},
publisher = {The Open Journal},
volume = {10},
number = {109},
pages = {8158},
author = {Rother, Milan},
title = {PathSim - A System Simulation Framework},
journal = {Journal of Open Source Software}
}

@misc{reactflow,
author = {Moritz Klack, Peter Kogo, et al.},
title = {React Flow - Powerful open source libraries for building node-based UIs with React},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
url = {https://github.com/xyflow/xyflow}
}


@misc{simulink,
title = {Simulink - {Simulation} and {Model}-{Based} {Design}},
url = {https://www.mathworks.com/products/simulink.html},
abstract = {Simulink is a block diagram environment for Model-Based Design. It supports simulation, automatic code generation, and continuous testing of embedded systems.},
language = {en},
urldate = {2025-08-13},
}

@misc{aspen,
title = {Aspen {Plus} {\textbar} {Leading} {Process} {Simulation} {Software} {\textbar} {AspenTech}},
url = {https://www.aspentech.com/en/products/engineering/aspen-plus},
abstract = {Advance circular economy initiatives and respond to global economic challenges, dynamic market conditions and competitive pressures by improving performance, quality and time-to-market with the best-in-class chemical engineering software / simulation software for chemicals, polymers, life sciences and new sustainability processes.},
language = {en},
urldate = {2025-08-13},
}

@article{delaporte-mathurin_festim_2024,
title = {{FESTIM}: {An} open-source code for hydrogen transport simulations},
volume = {63},
copyright = {All rights reserved},
issn = {0360-3199},
shorttitle = {{FESTIM}},
url = {https://www.sciencedirect.com/science/article/pii/S0360319924010218},
doi = {10.1016/j.ijhydene.2024.03.184},
abstract = {FESTIM (Finite Element Simulation of Tritium In Materials), is a versatile open-source finite element code developed in Python for simulating hydrogen transport in materials. FESTIM addresses limitations observed in existing codes by enabling multi-dimensional, multi-material simulations, leveraging the flexible finite element method and the open-source FEniCS library. Use cases illustrating FESTIM’s applicability and efficacy are presented: reproduction of thermo-desorption experiments, modelling plasma-facing components (divertor monoblocks), and modelling breeding blankets. A comparative analysis with two other numerical tools (TMAP8 and COMSOL®) is then performed. FESTIM is in very good agreement with these codes and shows similar (or better) computing performances. Finally, the thorough validation and verification (using the method of manufactured solutions) of the code is described, highlighting the code’s reliability.},
urldate = {2024-03-22},
journal = {International Journal of Hydrogen Energy},
author = {Delaporte-Mathurin, Rémi and Dark, James and Ferrero, Gabriele and Hodille, Etienne A. and Kulagin, Vladimir and Meschini, Samuele},
month = apr,
year = {2024},
keywords = {FESTIM, Finite element, Hydrogen transport, Modelling},
pages = {786--802},
}


@misc{jinja,
title = {pallets/jinja},
copyright = {BSD-3-Clause},
url = {https://github.com/pallets/jinja},
abstract = {A very fast and expressive template engine.},
urldate = {2025-08-13},
publisher = {Pallets},
month = aug,
year = {2025},
note = {original-date: 2010-10-17T13:41:17Z},
keywords = {jinja, jinja2, pallets, python, template-engine, templates},
}


@article{meschini_modeling_2023,
title = {Modeling and analysis of the tritium fuel cycle for {ARC}- and {STEP}-class {D}-{T} fusion power plants},
volume = {63},
copyright = {All rights reserved},
issn = {0029-5515},
url = {https://dx.doi.org/10.1088/1741-4326/acf3fc},
doi = {10.1088/1741-4326/acf3fc},
abstract = {The limited tritium resources available for the first fusion power plants (FPPs) make fuel self-sufficiency and tritium inventory minimization leading issues in FPP design. This work builds on the model proposed by Abdou et al (2020 Nucl. Fusion 61 013001), which analyzed the fuel cycle (FC) of a DEMOnstration nuclear FPP-class FPP with a time-dependent system-level model. Here, we use a modified version of their model to analyze the FC of an Affordable, Robust, Compact (ARC)-class tokamak and two versions of a Spherical Tokamak for Energy Production (STEP)-class tokamak. The ARC-class tokamak breeds tritium in a 2LiF + BeF2 liquid immersion blanket, while the STEP-class tokamak breeds tritium utilizing either a liquid-lithium blanket design or an encapsulated breeding blanket. A time-dependent system-level model is developed in Matlab Simulink® to simulate the evolution of tritium flows and tritium inventories in the FC. The main goals of this work are to assess tritium self-sufficiency of the ARC- and STEP-class designs and to determine quantitative design requirements that can be used to analyze the adequacy of a proposed FC system. These design requirements are aimed at achieving a low tritium inventory doubling time () and a low start-up inventory () while keeping the required tritium breeding ratio (TBR) as low as possible. We also consider how improvements in FC technology and POs affect TBR and . The model results show that TBR for ARC- and STEP-class FPPs should be achievable if the tritium burn efficiency (TBE) reaches 0.5\%–1\% (TBR1.2). This assumes significant, but attainable, improvements over current abilities. However, the model results indicate that an FPP must achieve ambitious performance targets, including FPP availability 70\%, tritium processing time 4 h, and the implementation of direct internal recycling (DIR). If future research yields major improvements to achievable TBE, it may be possible to achieve tritium self-sufficiency while operating at lower availability and without implementing DIR.},
language = {en},
number = {12},
urldate = {2023-12-22},
journal = {Nuclear Fusion},
author = {Meschini, Samuele and Ferry, Sara E. and Delaporte-Mathurin, Rémi and Whyte, Dennis G.},
month = sep,
year = {2023},
note = {Publisher: IOP Publishing},
pages = {126005},
}


@article{meschini_impact_2025,
title = {Impact of trapping on tritium self-sufficiency and tritium inventories in fusion power plant fuel cycles},
volume = {65},
issn = {0029-5515},
url = {https://dx.doi.org/10.1088/1741-4326/adacfa},
doi = {10.1088/1741-4326/adacfa},
abstract = {The dynamic analysis of fusion power plant (FPP) fuel cycles highlights the challenge of achieving tritium self-sufficiency in future FPPs. While state-of-the-art fuel cycle models offer valuable insights into the necessary design parameters for attaining tritium self-sufficiency, none of these models currently consider the impact of tritium trapping within fuel cycle components. However, detailed analysis of individual components reveals that substantial amounts of tritium can be trapped within the first wall, divertors, and breeding blanket systems, suggesting that tritium trapping may significantly influence the FPP ability to achieve self-sufficiency. The compounded effects of additional tritium traps generated by irradiation effects and component replacements further exacerbate this challenge. The novelty of this work is the integration of an explicit, physics-based model for tritium trapping, evolution of damage-induced traps, and component replacements into a dynamic, system-level model of a fuel cycle. The results show an increase of a factor of tritium inventory in the first wall and vacuum vessel of an ARC-class FPP when accounting for the aforementioned phenomena. This, coupled with the replacement of components subject to significant tritium trapping, slows down fuel cycle dynamics, resulting in an extended tritium doubling time (50\% increase), higher start-up inventory (30\% increase), and higher required tritium breeding ratio (2\%–5\%) compared to a scenario without tritium trapping.},
language = {en},
number = {3},
urldate = {2025-08-13},
journal = {Nuclear Fusion},
author = {Meschini, Samuele and Delaporte-Mathurin, Rémi and Tynan, George R. and Ferry, Sara E.},
month = feb,
year = {2025},
pages = {036010},
}
75 changes: 75 additions & 0 deletions paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: 'PathView: A Graphical User Interface for System Simulation'
tags:
- Python
- block diagram
- system modelling
authors:
- name: Remi Delaporte-Mathurin
orcid: 0000-0003-1064-8882
corresponding: true
affiliation: 1
- name: Tasnim Zulfiqar
affiliation: 1
- name: James Dark
orcid: 0000-0002-0456-7210
affiliation: 1
affiliations:
- name: Plasma Science and Fusion Center, Massachusetts Institute of Technology, Cambridge, 02139, USA
index: 1
ror: 042nb2s44
date: 12 August 2025
bibliography: paper.bib

---

# Summary

`PathView` is an interactive, browser-based graphical interface for the system simulation framework `PathSim` [@Rother2025]. It enables users to build models quickly in an intuitive, visual environment. Built with `ReactFlow` [@reactflow], `PathView` allows users to:

- Drag and drop simulation nodes onto a canvas.
- Connect nodes to define system structure.
- Create and manage subsystems for hierarchical modelling.
- Configure event detection and advanced simulation options.
- Configure solver parameters
- Easily extend functionality through a modular architecture.

In addition to mirroring nearly all of `PathSim`'s capabilities, `PathView` uses `Jinja2` [@jinja] templates to generate fully executable Python scripts from graphical models, enabling seamless transition between GUI-based and code-based workflows.

# Statement of need

`PathSim` is a powerful and flexible simulation framework for modelling complex systems. However, building large-scale or intricate models solely through Python scripting can be cumbersome and error-prone, particularly for new users or for projects that benefit from visual inspection of system layout. This is for example the case for nuclear fusion fuel cycle applications [@meschini_modeling_2023; @meschini_impact_2025].
Many established simulation platforms, such as MathWorks Simulink [@simulink] or Aspen Plus [@aspen], provide graphical user interfaces to enhance usability, model comprehension, and collaboration. Until now, such a visual modelling environment was missing for `PathSim`.
`PathView` fills this gap by providing a modern, interactive, and extensible GUI, reducing the barrier to entry for new users and improving productivity for experienced modellers.

# Examples

`PathView` includes several pre-built example graphs in the [example_graphs](https://github.com/festim-dev/pathview/tree/main/example_graphs) directory that demonstrate different functionalities:

- ``harmonic_oscillator.json`` - Simple oscillator simulation (see \autoref{fig:example} and \autoref{fig:example_results})
- ``pid.json`` - PID controller example
- ``linear_feedback.json`` - Linear feedback system
- ``pendulum.json`` - Pendulum example
- ``spectrum.json`` - Spectral analysis example
- ``bouncing_ball.json`` - Example showcasing event detection
- ``thermostat.json`` - Thermostat demo with event detection
- ``stick_slip.json`` - Example showcasing the use of the ``Switch`` block

![Graph editor tab (harmonic oscillator demo).\label{fig:example}](example.png){ width=100% }

![Results tab with interactive graph (harmonic oscillator demo).\label{fig:example_results}](example_results.png){ width=100% }

We also provide an example demonstrating the integration of external tools in``festim_two_walls.json``: a two-wall hydrogen diffusion model integrating the FESTIM hydrogen tranport code [@delaporte-mathurin_festim_2024].

# Features

- **Node creation and connection**: Choose from 60+ different simulation node types, configure parameters, and connect them visually.
- **Integrated simulation**: Run `PathSim` simulations directly from the GUI.
- **Interactive visualisation**: Embedded `plotly` plots for interactive data exploration. Export results data to CSV or export graph to HTML.
- **Advanced global variables**: Define global variables, including via an integrated Python editor for complex expressions.
- **Flexible I/O**: Save and load models in JSON format; export to Python scripts for advanced or automated use.
- **Modular and extensible**: Designed for easy integration of new node types and custom functionality.
- **Custom styling**: Change node colours for improved readability.


# References
Loading