Search NASA⌕ Search

SEARCH · Search NASA

Results for “Computational fluid dynamics code”

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 253 records · Page 14

SIERRA/Aero Theory Manual - V.5.10

SIERRA/Aero is a compressible fluid dynamics program intended to solve a wide variety compressible fluid flows including transonic and hypersonic problems. This document describes the commands for assembling a fluid model for analysis with this module, henceforth referred to simply as Aero for brevity. Aero is an application developed using the SIERRA Toolkit (STK). The intent of STK is to provide a set of tools for handling common tasks that programmers encounter when developing a code for numerical simulation. For example, components of STK provide field allocation and management, and parallel input/output of field and mesh data. These services also allow the development of coupled mechanics analysis software for a massively parallel computing environment.

42 ENGINEERING↗

The Athena++ Adaptive Mesh Refinement Framework: Design and Magnetohydrodynamic Solvers

The design and implementation of a new framework for adaptive mesh refinement calculations are described. It is intended primarily for applications in astrophysical fluid dynamics, but its flexible and modular design enables its use for a wide variety of physics. The framework works with both uniform and nonuniform grids in Cartesian and curvilinear coordinate systems. It adopts a dynamic execution model based on a simple design called a "task list" that improves parallel performance by overlapping communication and computation, simplifies the inclusion of a diverse range of physics, and even enables multiphysics models involving different physics in different regions of the calculation. We describe physics modules implemented in this framework for both nonrelativistic and relativistic magnetohydrodynamics (MHD). These modules adopt mature and robust algorithms originally developed for the Athena MHD code and incorporate new extensions: support for curvilinear coordinates, higher-order time integrators, more realistic physics such as a general equation of state, and diffusion terms that can be integrated with super-time-stepping algorithms. The modules show excellent performance and scaling, with well over 80% parallel efficiency on over half a million threads. The source code has been made publicly available.

79 ASTRONOMY AND ASTROPHYSICS↗

Benchmarking NIMROD continuum kinetic formulations through the steady-state poloidal flow

In this work, continuum kinetic formulations are employed as a mechanism to include closure physics in an extended magnetohydrodynamics model. Two continuum kinetic approaches have been implemented in the plasma fluid code NIMROD [Sovinec et al., “Nonlinear magnetohydrodynamics with high-order finite elements,” J. Comput. Phys. 195, 355 (2004)] including a Chapman–Enskog-like (CEL) formulation and a more conventional df approach. Ion kinetic closure schemes are employed to describe the neoclassical flow properties in axisymmetric toroidal geometry. In particular, predictions for steady-state values of poloidal flow profiles in tokamak geometry are provided using both the df formulation and two different solution techniques for the CEL approach. These results are benchmarked against analytic theory predictions as well as results from the drift kinetic code DK4D. The continuum kinetic formulations employed here show agreement with both the analytic theory and DK4D results, and offer a novel velocity space representation involving higher-order finite elements in pitch angle.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Completion of initial reduced-order model for flammable refrigerant dispersal in residential spaces

Environmental regulations aimed at reducing global warming impacts of HVAC&R refrigerants have resulted in the phase-out of chlorofluorocarbons (CFCs) in 2010 and hydrochlorofluorocarbons (HCFCs) by 2030 in developed countries with additional restrictions on the use of hydrofluorocarbons (HFCs) set to take effect in 2036. Many of the remaining alternative refrigerants that have lower global warming potential (GWP) and that are suitable for use in HVAC&R systems (e.g., propane, difluoromethane) are flammable to some degree. Flammable refrigerants introduce new challenges and hazards to property and personal safety related to potential deflagration during system maintenance or due to leakage of the refrigerant accumulating in the conditioned space. Standards have been developed to set maximum charge limits for flammable refrigerants in HVAC&R systems; however, existing safety standards and codes still restrict their use. The bodies that maintain and update these codes need publicly available, science-based information to enable credible guidelines for setting safe charge limits for different flammable refrigerants in different HVAC&R applications. In 2016, the Alliance for Responsible Atmospheric Policy, the Air-Conditioning Heating and Refrigeration Institute (AHRI), ASHRAE, the U.S. Department of Energy (DOE), and the State of California began efforts to develop such information. As part of this effort, Oak Ridge National Laboratory (ORNL) began the current, ongoing project to examine imposed charge limits for flammable refrigerants and identify reasonable adjustments to these limits when found appropriate. Past tasks under this project have included development of experimentally vetted, computational fluid dynamics (CFD) simulation approaches to study the results of leakage of flammable refrigerants from various HVAC&R systems into different types of commercial and residential spaces. In this report, we discuss recent efforts to develop a predictive model of the flammable volume fraction and accumulated refrigerant mass in a single-room residential space resulting from the leak of a flammable refrigerant from a small room air conditioning (RAC) unit. The eventual goal is development of a model suitable for public release which could simulate a range of scenarios. In discussions with the AHRTI Flammable Refrigerant Subcommittee (FRS) at the beginning of this effort, a total of 9 input parameters were chosen for consideration including room area, room/door opening area, ventilation fan flow rate, unit/leak height, leak area, leak rate, total refrigerant charge, refrigerant molecular weight, and state of the unit fan.

42 ENGINEERING↗

The high explosives & affected targets (HEAT) dataset

Artificial Intelligence (AI) surrogate models offer a computationally efficient alternative to full-physics simulations, yet no existing datasets are publicly available for training, testing, and validation of machine learning models of the dynamics of high-explosive driven shocks through multiple materials. Shock propagation through materials is a computationally challenging problem because simulations must include material-specific equations of state (EOS) along with descriptions of other physical processes such as plastic deformation, phase change, damage processes, fluid instabilities, and multi-material interactions. Shocks are typically initiated by high-velocity impacts or explosive loading. The latter case necessitates the addition of models of reactive materials to represent high-explosive (HE) detonation. Here, to address the lack of an expansive dataset for multi-material shock propagation in the AI/ML community, we present the High-Explosives and Affected Targets (HEAT) Dataset. HEAT is a physics-rich collection of two-dimensional, cylindrically symmetric, simulations generated using an Eulerian, multi-material, shock-propagation code developed at Los Alamos National Laboratory. The dataset includes two partitions: (1) the expanding shock-cylinder (CYL) simulations, Figs. 1, and (2) the Perturbed Layered Interface (PLI) simulations, Fig. 2. Entries in both partitions consist of time series of arrays of thermodynamic fields (pressure, density, and temperature), kinematic fields (position and velocity), and additional fields that depend on thermodynamic and/or kinematic fields (e.g., material stress). Materials in the CYL partition include solids (aluminium, copper, depleted uranium, stainless steel, tantalum, and a generic polymer), a liquid (water), gases (air, nitrogen), and a generic detonating material (high explosive, HE). The PLI partition spans a highly varying geometry but consists of fixed materials across entries: Copper, aluminium, stainless steel, generic polymer, and generic HE. HEAT captures critical phenomena such as momentum transfer, shock propagation, plastic deformation, and thermal effects, making HEAT a valuable benchmark for development of AI/ML emulation of multi-material shock propagation.

36 MATERIALS SCIENCE↗

Progress on Demonstration of a MOOSE-Based Coupled Capability for Hot Channel Factors in Fast Reactors

Hot channel factors (HCFs) are computed values that account for the impact on predicted peak fuel, cladding, and coolant temperatures due to uncertainties in the as-built reactor’s material properties and geometry as well as uncertainties due to modeling approximations. Reduction in computed HCF values via reduction or elimination of modeling approximations may translate to significant economic savings if the reactor power can be raised due to the extra temperature margin gained. While limited historical datasets exist for sodium-cooled fast reactors (SFRs), there are no available HCF data for lead-cooled fast reactors (LFRs) outside of work generated previously within NEAMS. The computation of HCFs involves insights from reactor physics, thermal fluids and heat conduction calculations to determine how the peak temperatures respond to various uncertainties in the design. Due to the significant advantages for multi-physics coupling offered by the MOOSE framework, Griffin (MOOSE-based reactor physics code), MOOSE Heat Conduction Module, and Cardinal (MOOSE-wrapped multi-physics application which includes the NekRS thermal fluids code) are being coupled together using the MOOSE MultiApp System to develop a highfidelity multi-physics modeling capability for HCF simulations. This high-fidelity coupling workflow may also be beneficial for other fast reactor applications in the future. In previous work, Griffin and NekRS were individually assessed to ensure the necessary capabilities were in place. This work describes initial efforts to couple the codes (including folding in the MOOSE Heat Conduction Module) and determining the workflow for the perturbed calculations which will leverage the Stochastic Tools Module (STM). To our knowledge, this is the first coupling of Griffin and NekRS as well as the first exploratory use of Stochastic Tools Module for Cardinal. In this report, the neutronics code Griffin, the heat conduction solver in MOOSE, and the MOOSE-wrapped application containing NekRS (Cardinal) are linked together to demonstrate the coupled capability. Griffin and Cardinal are linked dynamically by specifying shared libraries. Different coupling hierarchies are tested for selecting the most appropriate coupling strategy. A coupling scheme is selected based on the efficiency of calculation and ease of data communication. Multiple tests are performed to choose suitable mesh structure, model configurations, scheme setup and boundary conditions to avoid loss of energy due to data interpolation between different modules or weak imposition of fluxes in finite element codes. Computational experiments are performed to study the tolerance control of each type of iteration to avoid false convergence. The coupled capability is demonstrated in both single pin and 7-pin models based on LFR materials and geometry. The study finds that the use of too large a time step size in the heat conduction module can lead to temperature oscillation even though the heat conduction equation does not have a time-derivative kernel, but only the time-dependent boundary condition. A 7-pin model without duct region achieved good convergence in the coupled calculation while a 7 pin model with duct region experienced data communication issues which need to be resolved.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Preliminary modeling of triply periodic minimal surface (TPMS) structures using RELAP5-3D

With the United States Department of Energy (DOE)’s goal of quadrupling the nation’s nuclear energy supply by 2050, and with the Advanced Fuels Campaign pushing for new types of advanced reactor fuels and geometries, the need has arisen for new nuclear fuel designs. One such design is to swap out current nuclear fuel geometries in exchange for another type of geometry, called a Triply Periodic Minimal Surface (TPMS). TPMSs are self-supporting, infinitely repeating lattices—attributes that lend themselves well to additive manufacturing. These surfaces also possess enhanced heat transfer properties thanks to their internal area changes and large surface-area-to-volume ratios. Their drawback, however, is an increased pressure drop. Given the small amount of correlations and data (Reynolds numbers in the 2,000–8,000 range), and the minimal amount of experience so far obtained by modeling TPMS structures using 1D systems codes such as the Reactor Excursion and Leak Analysis Program (RELAP5-3D), further research into this topic was needed. Using data from the University of Wisconsin - Madison (UW), curve fits were created for both a Heat Transfer Coefficient (HTC) correlation and a Darcy friction factor empirical coefficient correlation. The curves’ coefficients and multipliers were then output and utilized in RELAP5-3D models of two upcoming experiments—Flow Loop for INFLUX Pressure drop (FLIP) and Microreactor Agile Non-nuclear Experimental Test (MAGNET)—aimed at increasing the available data for Reynolds numbers to the 16,000–36,000 range for TPMS structures. The models were run under the conditions utilized by a Computational Fluid Dynamics (CFD) analysis performed by another group at Idaho National Laboratory. Only CFD pressure drop values were obtained from the FLIP test, and those values showed that the RELAP5-3D models had a lower rate of pressure increase in comparison to the CFD values. In addition, there seemed to be a vertical shift upward in the pressure drop for both models whenever the TPMS porosity decreased, and the RELAP5-3D models showed a higher vertical shift in comparison to the CFD values. The MAGNET results did not correspond to any CFD or experimental results against which they could be compared, so they were instead compared against the proposed CFD input conditions. These values were then compared with each other to make sure the model seemed to be performing as expected, paving the way for future tests that can be run for the purpose of further analyses and comparisons. The pressure drop increased with temperature and mass flow rate independently. The temperature change would decrease with increasing mass flow rate and temperature, which was just as we expected based on the fact that the lower viscosity and decreased density would result in higher friction and churning losses. The last metric that was assessed was the enthalpy flow change, which increased with increasing mass flow rate and decreasing temperature.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

SUNDIALS time integrators for exascale applications with many independent systems of ordinary differential equations

Many complex systems can be accurately modeled as a set of coupled time-dependent partial differential equations (PDEs). However, solving such equations can be prohibitively expensive, easily taxing the world’s largest supercomputers. One pragmatic strategy for attacking such problems is to split the PDEs into components that can more easily be solved in isolation. This operator splitting approach is used ubiquitously across scientific domains, and in many cases leads to a set of ordinary differential equations (ODEs) that need to be solved as part of a larger “outer-loop” time-stepping approach. The SUNDIALS library provides a plethora of robust time integration algorithms for solving ODEs, and the U.S. Department of Energy Exascale Computing Project (ECP) has supported its extension to applications on exascale-capable computing hardware. In this paper, we highlight some SUNDIALS capabilities and its deployment in combustion and cosmology application codes (Pele and Nyx, respectively) where operator splitting gives rise to numerous, small ODE systems that must be solved concurrently.

97 MATHEMATICS AND COMPUTING↗

CTF Theory Manual (V.4.2)

Coolant-Boiling in Rod Arrays—Two Fluids (COBRA-TF) is a thermal/hydraulic (T/H) simulation code designed for light water reactor (LWR) vessel analysis. It uses a two-fluid, three-field (i.e. fluid film, fluid drops, and vapor) modeling approach. Both sub-channel and 3D Cartesian forms of 9 conservation equations are available for LWR modeling. The code was originally developed by Pacific Northwest Laboratory in 1980 and had been used and modified by several institutions over the last few decades. COBRA-TF also found use at the Pennsylvania State University (PSU) by the Reactor Dynamics and Fuel Modeling Group (RDFMG) and has been improved, updated, and subsequently re-branded as CTF. As part of the improvement process, it was necessary to generate sufficient documentation for the open-source code which had lacked such material upon being adopted by RDFMG. This document serves mainly as a theory manual for CTF, detailing the many two-phase heat transfer, drag, and important accident scenario models contained in the code as well as the numerical solution process utilized. Coding of the models is also discussed, all with consideration for updates that have been made when transitioning from COBRA-TF to CTF. Further documentation outside of this manual is also available at RDFMG which focus on code input deck generation and source code global variable and module listings

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

3D CFD Model Validation Using Benchmark Data of 1/16th Scaled VHTR Upper Plenum and Development of Wall Heat-Transfer Correlation For Laminar Flow

With support from the U.S. Department of Energy-Office of Nuclear Energy’s (DOE-NE’s) Nuclear Energy Advanced Modeling and Simulation (NEAMS) program, an effort has been pursued to support high-temperature gas-cooled reactor (HTGR) technology development and its modeling and simulation needs. There is a particular need for advanced modeling and simulation tools to predict thermal-fluid behavior in the nuclear reactor primary system, especially in the core and the lower and upper plena, during safety-related transients. In this report, two main such activities are presented relevant to the HTGRs: (1) three-dimensional (3D) computational fluid dynamics (CFD) validation using benchmark data from the upper plenum of Texas A&M University’s 1/16th scaled very-high-temperature gas-cooled reactor (VHTR), and (2) development of wall heat-transfer correlation for laminar flow in a wall-heated pipe. The CFD tool validation exercises can be helpful to choose the models and CFD tools to simulate and design specific components of the HTRGs such as upper plenum where jet mixing is a complex phenomenon. In a loss of forced circulation event, the laminar flow can be observed during the development of natural circulation flow. This work includes the development and validation of heat transfer correlations for laminar flow using the Nek5000 CFD code due to limited available experimental data for laminar flow conditions to guide low-order models (1D). In this report, the flow characteristics of a single isothermal jet discharging into the upper plenum was investigated using the Nek5000 Large-Eddy Simulation (LES) CFD tool. Several numerical simulations were performed for various jet-discharged Reynolds numbers ranging from 3,413 to 12,819. A grid-independent study was performed. The numerical results of mean velocity, root-mean-square fluctuating velocity, and Reynolds stress were compared against the benchmark data. Good agreement was obtained between simulated and measured data for axial mean velocities, except near the upper plenum hemisphere. The maximum predicted errors for axial mean velocities at various normalized coolant channel diameter heights of 1, 5, and 10 are 1.56%, 1.88%, and 3.82%, respectively. In addition, the predicted root-mean-square fluctuating velocity and Reynolds stress are qualitatively in agreement with the experimental data. The Nek5000 code was used to develop wall-heat transfer correlation for laminar flow in a cylindrical tube. Several simulations were performed for various Reynolds flow and wall-heat fluxes. A new heat transfer correlation was developed using data from Nek5000 simulation results and regression functions in Matlab. The developed heat transfer correlation is valid for various Reynolds flows from 200 to 2000. The predicted R² value for model fit was 0.875, which ensures that 87.5% of the model data lies on the Nek5000 data. Moreover, a machine learning (ML) tool was used to train and test the Nek5000 data. A good fit of the ML-based model was observed with the test data.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

An arbitrary Lagrange-Eulerian investigation of HRAM shallow jet pre-spurt formation and time sensitivities to impact plate dynamics

With dry bay fires persisting as a significant contributor to aircraft vulnerability despite chronicled developments in survivability technologies, an accurate fire prediction capability remains paramount for credible vulnerability assessments. Physics based modeling of the hydrodynamic ram (HRAM) fluid deposition process is a key component of such capability, wherein capturing the first instance of fluid spurt, referred to herein as shallow jet spurts, is a core focus. Such pre-spurts as they have been formerly identified have only been witnessed sporadically in HRAM spurt experiments. In this work, ALE3D, a first-principles multi-physics code was employed to model the shallow jet spurt phenomenon with spherical projectiles impacting water-filled tanks faced with aluminum panels, such that the underlying physics and sensitivities could be explored. Development and verification of the 2D axisymmetric model is described relative to trends observed in a prior experimental campaign. Results from the verified model suggest shallow jet spurts have at least a quadratic sensitivity to the fundamental vibrational mode of the impact plate across impact velocities 610–1829 m/s (2000–6000 ft/s). It is further explained how shallow jet spurts are arrested for impacts at the two extremes of plate rigidity. This research constitutes the first fluid-structure modeling of shallow jet spurts which future three-dimensional analyses will expound upon.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

An Open-Source Python Package for CFD Solution Verification

Informed decision-making using computational fluid dynamics (CFD) results requires quantifying the errors and uncertainties of a simulation. Verification, validation, and uncertainty quantification (VVUQ) methods were developed to address this need and have matured. However, these VVUQ analyses are often non-trivial and require CFD analysts and practitioners to have specific skill sets. This has led to the uneven adoption of VVUQ analyses, in part, based on the availability of software tools to aid CFD analysts and practitioners. Solution verification, a procedure to evaluate the accuracy of a simulation by estimating potential errors arising from the computational model and computing the uncertainties without comparing to results from a physical system, is one of the lagging VVUQ analyses as the absence of software has forced CFD analysts and practitioners to develop their own codes or piece together incomplete software from across the internet. This work presents an opensource Python package, CFDverify, to lower the barrier of entry and fill in the technological gap in solution verification. CFDverify also provides a streamlined framework to remove some potential errors in post-processing CFD results. The hope is that CFDverify can improve the quality and quantity of CFD solution verification in scientific and research studies and attract interest in developing a communal tool. This paper describes the design, features, and an example use of CFDverify.

Weinmeister, Justin [ORNL] (ORCID:0000000160090237↗

A fast, matrix-based method to perform omnidirectional pressure integration

Abstract Experimentally-measured pressure fields play an important role in understanding many fluid dynamics problems. Unfortunately, pressure fields are difficult to measure directly with non-invasive, spatially resolved diagnostics, and calculations of pressure from velocity have proven sensitive to error in the data. Omnidirectional line integration methods are usually more accurate and robust to these effects as compared to implicit Poisson equations, but have seen slower uptake due to the higher computational and memory costs, particularly in 3D domains. This paper demonstrates how omnidirectional line integration approaches can be converted to a matrix inversion problem. This novel formulation uses an iterative approach so that the boundary conditions are updated each step, preserving the convergence behavior of omnidirectional schemes while also keeping the computational efficiency of Poisson solvers. This method is implemented in Matlab and also as a GPU-accelerated code in CUDA-C++. The behavior of the new method is demonstrated on 2D and 3D synthetic and experimental data. Three-dimensional grid sizes of up to 125 million grid points are tractable with this method, opening exciting opportunities to perform volumetric pressure field estimation from 3D PIV measurements.

42 ENGINEERING↗

SAM: A Modern System Code for Advanced Non-LWR Safety Analysis

The System Analysis Module (SAM), developed at Argonne National Laboratory and by collaborators at other organizations, is for advanced non–light water reactor safety analysis. SAM aims to provide fast-running, modest-fidelity, whole-plant transient analysis capabilities that are essential for fast-turnaround design scoping and engineering analyses of advanced reactor concepts. To facilitate code development, SAM utilizes the MOOSE object-oriented application framework, its underlying finite element library, and linear and nonlinear solvers to leverage modern advanced software environments and numerical methods. SAM aims to solve tightly coupled physical phenomena, including fission reaction, heat transfer, fluid dynamics, and thermal-mechanical responses in advanced reactor structures, systems, and components with high accuracy and efficiency. Finally, this paper gives an overview of the SAM code development, including goals and functional requirements, physical models, current capabilities, verification and validation, software quality assurance, and examples of simulations for advanced nuclear reactor applications.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Observation of shock-front separation in multi-ion-species collisional plasma shocks

We observe shock-front separation and species-dependent shock widths in multi-ion-species collisional plasma shocks, which are produced by obliquely merging plasma jets of a He/Ar mixture (97% He and 3% Ar by initial number density) on the plasma liner experiment. Visible plasma emission near the He-I 587.6-nm and Ar-II 476.5–514.5-nm lines is simultaneously recorded by splitting a single visible image of the shock into two different fast-framing cameras with different narrow bandpass filters (589 ± 5 nm for observing the He-I line and 500 ± 25 nm for the Ar-II lines). For conditions in these experiments (pre-shock ion and electron densities ≈5×10 14 cm –3 , ion and electron temperatures of ≈2.2 eV, and relative plasma-merging speed of 22 km/s), the observationally inferred magnitude of He/Ar shock-front separation and the shock widths themselves are <1 cm, which correspond to ~50 post-shock thermal ion–ion mean free paths. These experimental length scales are in reasonable qualitative and quantitative agreement with results from 1D multi-fluid simulations using the CHICAGO code. However, we note there are differences between the experimentally inferred and simulation-predicted ionization states and line emission intensities, particularly in the post-shock region. Overall, the experimental and simulation results are consistent with theoretical predictions that the lighter He ions diffuse farther ahead within the overall shock front than the heavier Ar ions.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Advances in 3D transient plasma dynamics and control through MHD and hybrid fluid-kinetic simulations with JOREK

Transient phenomena and their control are of high relevance in magnetic confinement fusion plasmas to guarantee a stable and safe plasma operation. Interpretative simulations can maximize the insights gained from experiments on present machines and predictive simulations can help in the preparation of design, mitigation techniques and operational scenarios for future devices. In this article, we provide an overview of recent advances and novel scientific results obtained with the 3D non-linear hybrid fluid-kinetic code JOREK, covering physics of plasma transients from the core to the scrape-off layer (SOL) both for tokamak and stellarator devices. Substantial progress was made in the physics understanding, model validation with experiments and experiment interpretation, thus, giving confidence for predictions to devices like DTT, ITER and DEMO. The topics addressed comprise a wide range: the edge physics of new operation scenarios and edge localized mode suppression; major disruptions with a focus on runaway electrons and vertical displacement events as well as disruption mitigation by shattered pellet injection; the physics mechanisms and operational limits of the flux pumping regime for sawtooth control; MHD limits of stellarators and work towards incorporating advanced edge/SOL/exhaust dynamics; continuing improvements of the code for more efficient hybrid simulations on conventional and accelerated high performance computing architectures.

disruptions↗

Unified Language Frontend for Physic-Informed AI/ML

Artificial intelligence and machine learning (AI/ML) are becoming important tools for scientific modeling and simulation as in several other fields such as image analysis and natural language processing. ML techniques can leverage the computing power available in modern systems and reduce the human effort needed to configure experiments, interpret and visualize results, draw conclusions from huge quantities of raw data, and build surrogates for physics based models. Domain scientists in fields like fluid dynamics, microelectronics and chemistry can automate many of their most difficult and repetitive tasks or improve the design times by use of the faster ML-surrogates. However, modern ML and traditional scientific highperformance computing (HPC) tend to use completely different software ecosystems. While ML frameworks like PyTorch and TensorFlow provide Python APIs, most HPC applications and libraries are written in C++. Direct interoperability between the two languages is possible but is tedious and error-prone. In this work, we show that a compiler-based approach can bridge the gap between ML frameworks and scientific software with less developer effort and better efficiency. We use the MLIR (multi-level intermediate representation) ecosystem to compile a pre-trained convolutional neural network (CNN) in PyTorch to freestanding C++ source code in the Kokkos programming model. Kokkos is a programming model widely used in HPC to write portable, shared-memory parallel code that can natively target a variety of CPU and GPU architectures. Our compiler-generated source code can be directly integrated into any Kokkosbased application with no dependencies on Python or cross-language interfaces.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

CompLaB v1.0: a scalable pore-scale model for flow, biogeochemistry, microbial metabolism, and biofilm dynamics

Abstract. Microbial activity and chemical reactions in porous media depend on the local conditions at the pore scale and can involve complex feedback with fluid flow and mass transport. We present a modeling framework that quantitatively accounts for the interactions between the bio(geo)chemical and physical processes and that can integrate genome-scale microbial metabolic information into a dynamically changing, spatially explicit representation of environmental conditions. The model couples a lattice Boltzmann implementation of Navier–Stokes (flow) and advection–diffusion-reaction (mass conservation) equations. Reaction formulations can include both kinetic rate expressions and flux balance analysis, thereby integrating reactive transport modeling and systems biology. We also show that the use of surrogate models such as neural network representations of in silico cell models can speed up computations significantly, facilitating applications to complex environmental systems. Parallelization enables simulations that resolve heterogeneity at multiple scales, and a cellular automaton module provides additional capabilities to simulate biofilm dynamics. The code thus constitutes a platform suitable for a range of environmental, engineering and – potentially – medical applications, in particular ones that involve the simulation of microbial dynamics.

58 GEOSCIENCES↗