Search NASA⌕ Search

SEARCH · Search NASA

Results for “multiphysics tool”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 145 records · Page 8

Investigations of an Aeroelastic Optimization Benchmark Problem with MPhys and FUN3D

High-fidelity aeroelastic optimization capabilities are becoming more common in recent years. In this field, researchers typically present results on the design problems of greatest interest to them. The lack of consistency with respect to baseline configurations, design variables, objectives and constraints, etc., makes it difficult to compare approaches and creates an obstacle for the community to work together to advance the state of the art. The High-Fidelity Aeroelastic Optimization Benchmark Working Group has been established to create and study a series of benchmark aeroelastic optimization problems that the community can utilize to compare methods on the same optimization problem. This paper presents optimization results from NASA Langley Research Center for the first benchmark case of this series with analysis based on MPhys, a multiphysics library for OpenMDAO, and FUN3D, an unstructured computational fluid dynamics suite of tools. For the optimization case presented, it is demonstrated that a progression of increasing aerodynamic model fidelity reduces the wall time required to complete the optimization.

CFD↗

Initial Engineering Framework for Species Tracking in MSRs Involving Fuel Salt and Structures

This report implements a high-fidelity multiphysics modeling framework using the Nuclear Energy Advanced Modeling and Simulation (NEAMS) program tools to track leaching and plating of materials between the fuel salt and structures in Molten Salt Reactors (MSRs). Specifically, this framework is demonstrated in modeling various processes within MSRs including hot and cold leg corrosion, redox potential driven corrosion, colloid precipitation and deposition, and noble metal plating and decay heat modeling. The model integrates neutronics, thermal-hydraulics, depletion, and thermochemistry to simulate the evolving chemical behavior of the fuel salt in interactions with structural materials. Initial findings suggest that hot-cold leg corrosion in MSR systems may become significant if the redox potential of the fuel salt is not sufficiently controlled. Additionally, the impact of noble metal decay heat deposition in large power reactors is explored. The resulting engineering framework for species tracking will be applied in the future toward specific validation work with ongoing experimental efforts focusing on both chloride and fluoride salt loop experiments with in-situ corrosion and redox control instrumentation.

11 - NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Structural Health Management of Damaged Aircraft Structures Using the Digital Twin Concept

The development of multidisciplinary integrated Structural Health Management (SHM) tools will enable accurate detection, and prognosis of damaged aircraft under normal and adverse conditions during flight. As part of the digital twin concept, methodologies are developed by using integrated multiphysics models, sensor information and input data from an in-service vehicle to mirror and predict the life of its corresponding physical twin. SHM tools are necessary for both damage diagnostics and prognostics for continued safe operation of damaged aircraft structures. The adverse conditions include loss of control caused by environmental factors, actuator and sensor faults or failures, and structural damage conditions. A major concern in these structures is the growth of undetected damage/cracks due to fatigue and low velocity foreign object impact that can reach a critical size during flight, resulting in loss of control of the aircraft. To avoid unstable, catastrophic propagation of damage during a flight, load levels must be maintained that are below a reduced load-carrying capacity for continued safe operation of an aircraft. Hence, a capability is needed for accurate real-time predictions of damage size and safe load carrying capacity for structures with complex damage configurations. In the present work, a procedure is developed that uses guided wave responses to interrogate damage. As the guided wave interacts with damage, the signal attenuates in some directions and reflects in others. This results in a difference in signal magnitude as well as phase shifts between signal responses for damaged and undamaged structures. Accurate estimation of damage size, location, and orientation is made by evaluating the cumulative signal responses at various pre-selected sensor locations using a genetic algorithm (GA) based optimization procedure. The damage size, location, and orientation is obtained by minimizing the difference between the reference responses and the responses obtained by wave propagation finite element analysis of different representative cracks, geometries, and sizes.

Seshadri, Banavara R.↗

Enabling the broader adoption of fusion simulation on complex geometry

This project addressed a key barrier to advanced fusion and nuclear simulation: the difficulty of performing high-fidelity Monte Carlo neutronics directly on complex, real-world CAD geometry. Traditional workflows require engineers to rebuild CAD models as simplified constructive solid geometry, a time-consuming and error-prone process that limits design iteration and broader adoption of simulation tools. The goal of this Phase I SBIR was to make CAD-based neutronics practical, accessible, and robust for industrial and research users. During the project, Coreform significantly enhanced the Direct Accelerated Geometry Monte Carlo (DAGMC) workflow and fully integrated it into Coreform Cubit as a first-class capability. Major achievements include optimized material assignment and surface meshing workflows, substantial performance improvements to geometry imprinting and preparation, native export of DAGMC models, and new visualization tools to support OpenMC source definition and lost-particle debugging. Coreform also expanded Cubit’s capabilities as a full OpenMC preprocessor, including the ability to convert OpenMC constructive solid geometry models back into CAD for visualization, multiphysics coupling, and debugging. In collaboration with Argonne National Laboratory, the project delivered comprehensive new DAGMC documentation and training materials, transforming DAGMC from a research-oriented tool into a production-ready workflow. Results were disseminated through tutorials, conference training, and multiple well-attended webinars demonstrating integrated CAD-based neutronics and multiphysics workflows. Overall, this project demonstrated that high-fidelity Monte Carlo simulations can be performed directly on complex CAD geometry, reducing setup time, improving usability, and enabling faster, more informed design decisions for fusion and nuclear energy systems.

42 ENGINEERING↗

Advancements in Multiphysics Microdepletion Analysis of an eVinci TM -like Microreactor Leveraging OpenMC-CRAB Workflow

Nuclear microreactors (MRs) are a class of nuclear reactor technology, characterized by reduced dimensions, modular design, and reduced power output in contrast to conventional Light Water Reactors (LWRs). MRs are proposed for supplying electricity and eventual process heat to remote locations, such as military installations and disaster-affected areas. Current research work sponsored by the US Department of Energy Microreactor Program (MRP) is devoted to the development of novel modeling and simulation tools to better support MR vendors and regulatory bodies. Notably, the NRC is projected to utilize the CRAB multiphysics software driver for executing both design and beyond-design-basis accident analyses. Furthermore, the NRC has been utilizing the MELCOR code to calculate mechanistic source terms during accidents. Since MELCOR relies on isotopic inventory and reactor temperature/power profiles under accident conditions, which theoretically can be derived from CRAB, the goal is to establish a comprehensive CRAB-MELCOR computational framework. Past work was focused on testing and demonstrating CRAB's capability to generate results that can be used to inform mechanistic source term calculations in MELCOR. In particular, a computational workflow leveraging OpenMC-generated microscopic cross sections and CRAB was first applied to perform multiphysics microscopic depletion calculation followed by an accident scenario for a stylized microreactor problem. In fiscal year 2024, the research work has been focused on applying the OpenMC-CRAB workflow, which was first tested in fiscal year 2023, to a realistic 3D heat-pipe cooled MR problem representative of the eVinci TM design. The latter computational problem was developed with inputs from WEC to conserve selected neutronic and thermal characteristics of the eVinci TM design without releasing proprietary data. The results of this simulation, encompassing isotopic inventory, power density distribution, and kinetic parameters, will inform both MELCOR and the WEC-developed FATE code for mechanistic source terms calculations. The results from the two codes will then be compared for code verification purposes. This report contains the design characteristics of the realist heat pipe cooled microreactor developed as a use-case for the verification exercise, and the current results for the multiphysics microscopic depletion performed with the OpenMC-CRAB workflow. The results include eigenvalue as a function of time, power distribution at EOL, in addition to nuclides inventory's time evolution and spatial distribution. Finally, we report improvements to the workflow efficiency achieved through a collaboration with the NEAMS programs. Through this collaborative effort, we were able to strongly decrease the computational time for the multiphysics microdepletion calculation (i.e., from 17.4 hours to 5.7 hours on 280 processors) in addition to simplifying the interface to generate isotopics spatial distribution utilizable by FATE and MELCOR. Future work, including the improvement of the current microscopic cross-sections' library and the simulation of an accident scenario at EOL, is also discussed.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Monte Carlo/CFD Coupling for Accurate Modeling of the Delayed Neutron Precursors and Compressibility Effects in Molten Salt Reactors

Multiphysics reactor analysis has become one of the leading activities of most nuclear engineering research groups. Coupled neutronics and thermal/hydraulics (T/H) simulations have traditionally been performed by adopting deterministic transport tools and reactor system T/H codes. The main reason for avoiding higher fidelity numerical methods like continuous-energy Monte Carlo analysis has been the high computational cost of coupled, full-scale simulations. Nowadays, high fidelity multiphysics simulations represent a hot research topic, with several applications involving advanced nuclear systems. Liquid fuel Molten Salt Reactors (MSRs) feature peculiar physical phenomena that are not present in solid fuel reactors. Some of these phenomena are not correctly resolved by legacy reactor physics tools, and require specific treatments. This work focuses in particular on the analysis of the effect of the delayed neutron precursors drift and the impact of liquid fluid thermal expansion and compressibility in postulated criticality excursion transients in fast-spectrum MSRs. A new modeling tool based on a Monte Carlo approach for neutronics (Serpent code) coupled to a Computational Fluid Dynamic (CFD) analysis (OpenFOAM) was developed to obtain accurate modeling and simulation of these phenomena. The development of the Serpent Monte Carlo code [1] at VTT in the past few years has made this code particularly attractive for performing multiphysics studies. The availability of a flexible multiphysics interface, on-the-fly Doppler broadening and density-based collision rejection, and Delta-tracking, proved of paramount importance for the computationally efficient performance of coupled Monte Carlo/CFD calculations [2]. OpenFOAM is a C++ multiphysics toolkit featured by automatic matrix construction and solution capabilities for scalar and vector partial differential equations (PDEs), adopting several possible differencing and interpolation schemes, based on the Finite-Volume method. The ease of implementing the constitutive equations of different physical phenomena makes OpenFOAM particularly suitable for the modeling of complex coupled phenomena. In the past, several research activities proposed the adoption of both Serpent and OpenFOAM for the modeling and simulation of MSRs and the associated fuel cycles. In this work, these tools have been internally coupled for the steady-state and transient analysis of fast-spectrum systems, accounting for the effect of delayed neutron precursors transport and the salt thermal expansion and compressibility.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

NEAMS Model Contributions in 2023 to the National Reactor Innovation Center Virtual Test Bed for Use by Industry and Other Stakeholders

The U.S. Department of Energy (DOE) Office of Nuclear Energy’s Advanced Modeling and Simulation (NEAMS) Program develops models of advanced reactor phenomena to demonstrate code applicability to challenging physics problems, drive code development through user assessment, and perform code verification and validation. Meanwhile, the U.S. DOE’s National Reactor Innovation Center (NRIC) hosts an open-source website and associated GitHub repository called the Virtual Test Bed (VTB) on which computational models for advanced reactors are documented and shared with the reactor community. This work documents NEAMS efforts to support industry adoption of advanced modeling tools through contribution of 10 NEAMS models to the NRIC Virtual Test Bed including models for the High Temperature Test Facility (HTTF), TRISO fuel failure in a microreactor, and multiphysics models of a molten chloride fast reactor, among others. The open sharing of these models benefits the reactor community by providing “best practice” examples using NEAMS tools for advanced reactor physics problems. In particular, the HTTF model is being used for code validation and benchmarking activities. The microreactor and molten chloride fast reactor models are representative of analysis that may be useful for current candidates of DOME and LOTUS, NRIC’s physical testbeds. This report summarizes and provides links to these new models, among others.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

Sodium-Cooled Fast Reactor Reference Plant Model

This report details the progress of Idaho National Laboratory (INL) in creating a reference plant multiphysics model for the Advanced Burner Test Reactor (ABTR). This model was developed under Task 13 of the U.S. Nuclear Regulatory Commission project “Development and Modeling Support for Advanced Non-Light Water Reactors,” and is an extension of the reference plant model developed in Task 4b, which was improved upon in the following ways. (1) The discrete ordinates method was used in lieu of the super-homogenization (SPH)-corrected diffusion approximation in order to better capture the anisotropic scattering contribution and the neutron leakage change due to thermal expansion. (2) The novel neutronic spatial discretization approach, termed the ring-heterogeneous (RH) approximation, was conceptualized and introduced to capture the differential expansion of the materials in the core. This new technique proved capable of preserving fission rates and maintaining the eigenvalue within 2.5% and 266 pcm with 9 neutron energy groups, respectively. Separating the different materials in the core enables the differential expansion of materials to be explicitly accounted for, eliminating the need for problem-specific cross-section functionalization techniques. (3) The SAM model for the core and system thermal-hydraulics analysis was updated to include 61 channels instead of just four representative ones. This enables users to obtain improved spatial resolution for sodium temperature and density scalar fields. (4) All the mesh files were created via the Multiphysics Object-Oriented Simulation Environment (MOOSE) Reactor module, eliminating all reliance on external tools for mesh creation. (5) Finally, the fuel axial expansion now leverages the HT9 and UPuZr material properties that have been validated against experimental data. The reference plant model was used to perform a full-core unprotected loss of flow (ULOF) transient calculation, including neutronics, thermal and mechanical feedback mechanisms. Future work will be devoted to further enhancements of the model. Potential improvements to the model include the addition of the control rod driveline expansion feedback and the upgrading of the support plate model so as to explicitly include 3D effects. Additionally, a Nuclear Energy Advanced Modeling and Simulation funded parallel effort has completely automated the creation of the ring-heterogeneous (RH) mesh from the fully heterogeneous (FH) geometry, thus maximizing user friendliness for the sodium fast reactor sodium-cooled fast reactor (SFR) workflow and will be incorporated in future work.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

SiC cladding R&D execution plan

To advance the development of accident-tolerant fuel cladding for light-water reactors, the Advanced Fuels Campaign actively addresses the R&D gap between the specialized technological progress in SiC-based composite materials, led by industrial partners, and the fundamental scientific understanding of material behavior under reactor operating conditions. The laboratory activities are systematically organized based on the Development Strategy document, which outlines critical barriers to the use of SiC composites in nuclear energy applications for the coming decade and beyond. To complement the strategy, this execution plan specifies a detailed year-by-year work package and establishes key milestones for assessing progress in technological advancement. This plan has been formulated in collaboration with principal investigators at national laboratories, stakeholders, and industry partners with the goal of closing technology gaps and readying SiC-based cladding technologies for full-scale commercial testing. The research conducted at the national laboratories is categorized into three primary subjects: (1) addressing challenges associated with the performance of SiC cladding under normal operating environments, (2) identifying the failure limits of SiC cladding under accident conditions, and (3) modeling fuel performance for SiC cladding systems. Comprehensive laboratory activities integrate the development of advanced modeling tools for SiC-based cladding systems with experimental validation via integrated testing of multiphysics phenomena. This document lays out the laboratory plan to support the development of SiC-based technologies, which have the potential for significant operational and safety benefits for the U.S. nuclear industry. This plan aligns with industry developer needs, relevant Nuclear Energy University Programs, and Nuclear Energy Advanced Modeling and Simulation Programs to ensure SiC cladding technologies are matured as efficiently as possible and will be maintained and updated to accommodate the dynamically evolving progress of development, capability needs, and resource availability.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Elk: A New MOOSE Framework Application for Radio-frequency Electromagnetics

A new tool in-development for general electromagnetic (EM) simulation for modeling radio-frequency (rf) systems is presented. The primary motivation for development of this tool is to leverage the flexibility and high-performance-computing capability of the Multiphysics Object-Oriented Simulation Environment (MOOSE) Framework developed by Idaho National Laboratory (INL) for complex EM problems. A MOOSE application (or MOOSE App) enables the end user to create a fully-functional simulation scenario without needing explicit knowledge of the underlying finite-element weak form implementation. MOOSE combines the libMesh library and the PetSc suite as the finite element and solver libraries, giving a robust platform for solving highly non-linear, coupled sets of PDEs such as those found in EM and plasma physics problems. Initial validation efforts have included standard waveguide and antenna benchmarks with the current focus being field validation against the well-known capacitively-coupled GEC Reference Cell (GEC-CCP). The results of this effort will be outlined and discussed. Future work plans including cold-plasma rf wave propagation studies and coupling to the plasma fluid MOOSE App, Zapdos [Lindsay et al 2016 J. Phys. D: Appl. Phys. 49 235204], will also be discussed.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Thermal-Mechanic Modeling of Fusion Components Using The MOOSE Framework

With fusion energy rapidly developing, there is a great need for an open source tool that can rapidly model different fusion tokamak designs. The open-source codes Multiphysics Object Oriented Simulation Environment (MOOSE), Tritium Migration Analysis Program Version 8 (TMAP8) , and Fusion ENergy Integrated Multiphysi-X (FENIX) are being used to demonstrate thermal-mechanic modeling of fusion components. In this study, an analysis is done on the fusion nuclear science facility (FNSF) blanket, and ITER toroidal magnet and diverter mono block. This study will lay the groundwork for fusion component analysis in the MOOSE framework and FENIX program.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Warthog: Coupling Nek5000 Thermal Hydraulics to BISON Fuel Performance through the Giraffe Interface

The Nuclear Energy Advanced Modeling and Simulation (NEAMS) program under the US Department of Energy (DOE) consists of three product lines. The Fuels Product Line (FPL), hosted at Idaho National Laboratory (INL), has produced a multiphysics framework with the name Multiphysics Object Oriented Simulation Environment (MOOSE) (Gaston et al. 2015). The FPL has also produced several high-fidelity physics codes including the fuel performance code Bison (Hales et al. 2016). The Reactors Product Line (RPL), hosted at Argonne National Laboratory (Argonne), has developed the high-order spectral-element Computational Fluid Dynamics (CFD) code Nek5000 (Fischer et al. 2015). The Integration Product Line (IPL), hosted at Oak Ridge National Laboratory (ORNL), is tasked with ensuring tools from the other product lines can be coupled together so that users may perform high-fidelity multiphysics simulations.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Initial Development of Fusion Magnet Simulation Capabilities for Performance and Safety Evaluation Using the MOOSE Framework

Fusion energy holds the promise of being a transformative technology as a carbon-neutral, sustainable source of energy. Whole device modeling and the development of fusion digital twins will be increasingly important for emerging fusion device concepts at both national laboratories and within the commercial fusion industry. However, meeting the challenge of whole device modeling of fusion energy devices requires robust, multiphysics, multiscale modeling and simulation technologies capable of running on large-scale supercomputers. Detailed analysis of individual systems at-scale is also required to ensure safe and efficient operation as well as provide the safety basis for future device designs and licensing activities. In a tokamak, toroidal and poloidal magnets confine and shape the fusion plasma to promote the fusion reaction. High plasma temperatures and high magnetic field requirements in modern design concepts (leading to high amounts of energy stored within each magnet) impose electrical, thermal, and mechanical loads on the magnet components, which in turn impacts the safety considerations of the magnet and their supporting systems. Idaho National Laboratory (INL) has a history of working in this space, including development and benchmarking of the Magnetic System Circuitry Analysis Program (MSCAP) and Magnet Arcing (MAGARC) codes to study magnet quench events; notably, MAGARC was used to study quenching during the ITER Engineering Design Activity. However, these legacy codes and capabilities are not parallel and scalable, and new tools are required for future advances in this area, which leads to the INL-developed Multiphysics Object-Oriented Simulation Environment (MOOSE) framework. Developed originally for fission reactor systems under United States Department of Energy, Office of Nuclear Energy modeling and simulation programs, the MOOSE framework has been well-suited to multiscale, multiphysics modeling and simulation needs for nuclear systems. The framework is open-source, well-tested, under continuous development and deployment, and developed to a Nuclear Quality Assurance, Level 1 software quality standard. MOOSE has also been used in the fusion space previously in several projects: INL’s Tritium Migration Analysis Program, Version 8 (TMAP8) for tritium migration, UK Atomic Energy Authority’s A Unified Resource for OpenMC (fusion) Reactor Applications (AURORA) code for fusion thermo-mechanical and neutronics analysis, and Argonne National Laboratory’s Cardinal for high-fidelity computational fluid dynamics and neutronics. However, to model superconducting magnets, several MOOSE enhancements are required: additions to the current MOOSE electromagnetic capabilities, new material libraries for superconductors of interest (such as YBCO), as well as fusion-specific models for thermo-mechanics. This talk will discuss initial development activities to build these capabilities in MOOSE, focusing on initial validation and benchmarking activities. Proposed coupling workflows and future work to support the simulation of fusion magnets and magnet structural assemblies for performance and safety evaluation in MOOSE will also be discussed.

70 - PLASMA PHYSICS AND FUSION TECHNOLOGY↗

NEAMS Workbench MOOSE Integration Update

The Nuclear Energy Advanced Modeling and Simulation (NEAMS) Workbench is a graphical user interface (GUI) that provides a common analysis environment for the accelerated use of the NEAMS toolkit. To improve design and analysis of current and future nuclear energy systems, the NEAMS Workbench provides an integrated development environment for model creation, review, execution, output review, and visualization for integrated tools. In addition to a GUI, the NEAMS Workbench provides the Workbench Analysis Sequence Processor, an open-source tool set that facilitates input-content assistance for supported domain-specific input languages and user-friendly syntaxes. These supported syntaxes enable accelerated development and deployment of enhanced user inputs and workflows. The Multiphysics Object-Oriented Simulation Environment (MOOSE) has been supported in the NEAMS Workbench since 2016 and receives continuous updates. Efforts to improve MOOSE-based tool integration in the NEAMS Workbench are ongoing. This document details the current and planned enhancements of the NEAMS Workbench and the MOOSE framework to improve integration and usability of MOOSE-based applications within the NEAMS Workbench.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Overview of Virtual Test Bed (VTB)

The Virtual Test Bed (VTB) was established to support the deployment of advanced reactors by facilitating the use of state-of-the-art modeling and simulation capabilities. These tools can solve previously prohibitive challenge problems with greater levels of fidelity and in a multiphysics framework. A VTB repository was recently set up to host models for a wide variety of reactor types and using a range of Nuclear Energy Advanced Modeling and Simulation-developed software. The repository currently includes models for High-Temperature Gas-Cooled Reactors, Sodium Fast Reactors, Fluoride-salt-cooled High-temperature Reactors, Molten Salt Reactors, and Heat-Pipe Microreactors. This article provides an overview of the capabilities currently in the VTB repository.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Multiscale Development and Validation of the Stainless Steel Alloy Corrosion (SStAC) Tool for High Temperature Engine Materials

The goal of this project was to create a simulation tool to assist in part design, reducing costs by eliminating the need for conservative material selection, and enabling alloy optimization to improve corrosion resistance. Thus, it helps decrease costs for existing engines and assists in the material and engine design for the engines of the future. To meet our stated goal, we developed the Stainless-Steel Alloy Corrosion (SStAC) tool, which: (1) Models corrosion of engine valves fabricated from 21-2N valve steel in an engine environment at temperatures up to 800 °C. (2) Runs in 1D for a fast estimate of the corrosion rate, and in 2D or 3D for more detailed simulations that represent any part geometry and predict the precise location and rate of corrosion and its impact on the mechanical and thermal behavior. (3) Was implemented using the open-source Multiphysics Object Oriented Simulation Environment (MOOSE). (4) Couples the corrosion model with mechanics and thermal transport models. The SStAC tool can predict the corrosion rate of 21-2N engine valves with less than 10% error.

36 MATERIALS SCIENCE↗

CG-Kit: Code Generation Toolkit for performant and maintainable variants of source code applied to Flash-X hydrodynamics simulations

CG-Kit is a new Code Generation tool-Kit that we have developed as a part of the solution for portability and maintainability for multiphysics computing applications. The development of CG-Kit is rooted in the urgent need created by the shifting landscape of high-performance computing platforms and the algorithmic complexities of a particular large-scale multiphysics application: Flash-X. To efficiently use computing resources on a heterogeneous node, an application must have a map of computation to resources and a mechanism to move the data and computation to the resources according to the map. Most existing performance portability solutions are focussed on abstracting the expression of computations so that a unified source code can be specialized to run on different resources. However, such an approach is insufficient for a code like Flash-X, which has a multitude of code components that can be assembled in various permutations and combinations to form different instances of applications. Similar challenges apply to any code that has composability, where a single specified way of apportioning work among devices may not be optimal. Additionally, use cases arise where the optimal control flow of computation may differ for different devices while the underlying numerics remain identical. This combination leads to unique challenges including handling an existing large code base in Fortran and/or C/C++, subdivision of code into a great variety of units supporting a wide range of physics and numerical methods, different parallelization techniques for distributed and shared memory systems and accelerator devices, and heterogeneity of computing platforms requiring coexisting variants of parallel algorithms. All of these challenges demand that scientific software developers apply existing knowledge about domain applications, algorithms, and computing platforms to determine custom abstractions and granularity for code generation. There is a critical lack of tools to tackle those problems. CG-Kit is designed to fill this gap by providing a user with the ability to express their desired control flow and computation-to-resource map in the form a pseudocode-like recipe. It consists of standalone tools that can be combined into highly specific and, we argue, highly effective portability and maintainability toolchains. Here we present the design of our new tools: parametrized source trees, control flow graphs, and recipes. The tools are implemented in Python. They are agnostic to the programming language of the source code targeted for code generation. In conclusion, we demonstrate the capabilities of the toolkit with two examples, first, multithreaded variants of the basic AXPY operation, and second, variants of parallel algorithms within a hydrodynamics solver, called Spark, from Flash-X that operates on block-structured adaptive meshes.

Algorithmic portability↗