Search NASA⌕ Search

SEARCH · Search NASA

Results for “openFOAM”

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 19 records

Model, data, and code for paper "Modeling of streamflow in a 30-kilometer-long reach spanning 5 years using OpenFOAM 5.x"

The data package includes data, model, and code that support the analyses and conclusions in the paper titled “modeling of streamflow in a 30-kilometer-long reach spanning 5 years using OpenFOAM 5.x”. The primary goal of this paper is to demonstrate that key streamflow properties such as water depth, flow velocity, and dynamic pressure in a natural river at 30-kilometer scale over 5 years can be reliably and efficiently modeled using the computational framework presented in this paper. To support the paper, various data types from remote sensing, field observations, and computational models are used. Specific details are described as follows. Firstly, the river bathymetry data was obtained from a Light Detection and Ranging (LiDAR) survey. This data is then converted to a triangulated surface format, STL, for mesh generation in OpenFOAM. The STL data can be found in Model_Setups/BaseCase_2013To2015/constant/triSurface. The OpenFOAM mesh generated using this STL file can be found in constant/polyMesh. Other model setups, boundary and initial conditions can be found in /system and /0.org under folder BaseCase_2013To2015. A similar data structure can also be found in BaseCase_2018To2019 for the simulations during 2018 and 2019. Secondly, the OpenFOAM simulations need the upstream discharge and water depth information at the upstream boundary to drive the model. These data are generated from a one-dimensional hydraulic model and the data can be found under the folder Model_Setups /1D model Mass1 data. The mass1_65.csv and mass1_191.csv files include the results of the 1D model at the model inlet and outlet, respectively. The Matlab source code Mass1ToOFBC20182019.m is used to convert these data into OpenFOAM boundary condition setups.With the above OpenFOAM model, it can generate data for water surface elevation, flow velocity, and dynamic pressure. In this paper, the water surface elevation was measured at 7 locations during different periods between 2011 and 2019. The exact survey locations (see Fig1_SurveyLocations.txt) can be found in folder Fig_1. The variation of water stage over time at the 7 locations can be found in folder /Observation_WSE. The data type include .txt, .csv, .xlsx, and .mat. The .mat data can be loaded by Matlab.We also measured the flow velocities at 12 cross-sections along the river. At each cross-section, we recorded the x, y locations, depth, three velocity components u,v,w. These data are saved to a Matlab format which can be found under folder /Observation_Velocity and /Fig_1. The relative locations of velocity survey locations to the river bathymetry can be found in Figure 1c.The water stage data at the 7 locations from OpenFOAM, 1D, and 2D hydraulic models are also provided to evaluate the long-term performance of 3D models vs 1D/2D models. The water stage data for the 7 locations from OpenFOAM have been saved to .mat format and can be found in /OpenFOAM_WSE. The water stage data from the 1D model are saved in .csv format and can be found in /Mass1_WSE. The water stage from the 2D model is saved as .mat format and can be found in / Mass2_WSEIn addition, the OpenFOAM model outputs the information of hydrostatic and hydrodynamic pressure. They are saved as .mat format under folder /Fig_11/2013_1. As the files are too large, we only uploaded the data for January 2013. The area of different ratio of dynamic pressure to static pressure for all simulation range, i.e., 2013-2015, are saved to .mat format. They can be found in /Fig_11/PA. Further, the data of wall clock time versus the solution time of the OpenFOAM modeling are also saved to .mat format under folder /Fig_13/LogsMat. In summary, the data package contains seven data types, including .txt, .csv, .xlsx, .dat, .stl, .m, and .mat. The former 4 types can be directly open using a text editor or Microsoft Office. The .mat format needs to be read by Matlab. The Matlab source code .m files need to be run with Matlab. The OpenFOAM setups can be visualized in ParaView. The .stl file can be opened in ParaView or Blender. The data in subfolders Fig_1 to Fig_10 and Fig_12 are copied from the aforementioned data folders to generate specific figures for the paper. A readME.txt file is included in each subfolder to further describe how the data in each folder are generated and used to support the paper.Please use the data package's DOI to cite the data package. Please contact yunxiang.chen@pnnl.gov if you need more data related to the paper.

54 ENVIRONMENTAL SCIENCES↗

PythonFOAM: In-situ data analyses with OpenFOAM and Python

Here, we outline the development of a general-purpose Python-based data analysis tool for OpenFOAM. Our implementation relies on the construction of OpenFOAM applications that have bindings to data analysis libraries in Python. Double precision data in OpenFOAM is cast to a NumPy array using the NumPy C-API and Python modules may then be used for arbitrary data analysis and manipulation on flow-field information. We highlight how the proposed wrapper may be used for an in-situ online singular value decomposition (SVD) implemented in Python and accessed from the OpenFOAM solver PimpleFOAM. Here, 'in-situ' refers to a programming paradigm that allows for a concurrent computation of the data analysis on the same computational resources utilized for the partial differential equation solver. In addition, to demonstrate parallel deployments, we deploy a distributed SVD, which collects snapshot data across the ranks of a distributed simulation to compute the global left singular vectors. Crucially, both OpenFOAM and Python share the same message passing interface (MPI) communicator for this deployment which allows Python objects and functions to exchange NumPy arrays across ranks. Subsequently, we provide scaling assessments of this distributed SVD on multiple nodes of Intel Broadwell and KNL architectures for canonical test cases such as the large eddy simulations of a backward facing step and a channel flow at friction Reynolds number of 395. Finally, we demonstrate the deployment of a deep neural network for compressing the flow-field information using an autoencoder to demonstrate an ability to use state-of-the-art machine learning tools in the Python ecosystem.

97 MATHEMATICS AND COMPUTING↗

Developing And Scaling an OpenFOAM Model to Study Turbulent Flow in a HFIR Coolant Channel

Improving the understanding of how computational fluid dynamics (CFD) direct numerical simulations (DNS) of flows in the High Flux Isotope Reactor (HFIR) perform when run in parallel using the high performance computing (HPC) platform Summit at the Oak Ridge Leadership Computing Facility (OLCF) is of particular importance to boost the computational tools used to support HFIR conversion to low enriched fuel (LEU). Evaluation of scaling performance was driven by the increasing importance of graphics processing unit (GPU) usage in HPC, which is becoming the standard for modern supercomputers such as Summit. The desired results are to obtain a strong positive correlation between the computational resources dedicated to a problem and the relative speed-up of the simulation in comparison to a benchmark. This capability will allow substantially improvement in HFIR flow analytical capabilities, specifically when predicting turbulence properties at high Reynolds numbers. The study leverages previous simulation results performed with code PHASTA (finite element) on HPC platforms Cori (NERSC) and Theta (ALCF) [1] with computing options provided in the computing platform OpenFOAM (finite volume) at OLCF. Transitioning from PHASTA to OpenFOAM will (1) eliminate dependence on third-party software for mesh generation and manipulation, (2) reduce resource needs by employing modern architectures, and (3) build expertise for future modeling of HFIR-specific problems like heat transfer in involute geometry, entrance effects, flow structure in channel corners, and so on—all important issues when defining the available thermal margins in the transition to LEU. CPUs and GPUs differ significantly in their architecture and utilization, as discussed in the literature [2]. The most important differences are in the approach to computations and their memory. A single GPU contains a large quantity of cores, enabling it to perform with a much higher throughput than a CPU, but execution requires a different approach. GPU codes execute instructions using the Single-Instruction Multiple-Thread (SIMT) approach in which a single instruction is used for groups of threads called warps. A warp typically consists of 32 threads which must execute the same set of instructions, although on separate threads. Alternately, a CPU has far fewer cores that are much more flexible in their operation, excelling at quickly performing more complex serial computations. This is why GPUs have greater throughput when properly utilized. The second important difference is seen when comparing their memory spaces. Limited memory allocations and CPU–GPU communications cause a significant bottleneck in GPU-accelerated programs. Further study was required to properly take advantage of GPU resources. A comprehensive analysis of code performance and the model-specific features of turbulence constitutes the core of this work. In this study, a DNS simulation of HFIR channel turbulence was performed with the finite volume CFD code OpenFOAM v2112 and CUDA v11.0 on Red Hat Enterprise Linux v8.2. The OpenFOAM installation had AMGx integrated to enable GPU acceleration and utilizes the PETSc4FOAM library. The computational resources and the problem size were scaled on CPU and CPU + GPU architectures to gain a better understanding of the performance of a DNS problem on modern computing hardware. The study aimed to analyze the scaling of the code exclusively on CPUs and then to examine the scaling of the codes with GPU acceleration enabled. Scaling studies included CPU and GPU acceleration on a mesh of varying resolution to analyze the impact of problem size relative to computational resources. In the course of preparing the GPU configuration on Summit, mainly using the AMGX solvers, difficulties were encountered stemming from constant changes resulting from extensive ongoing development activities and the changing environment. This resulted in the inability to complete the GPU portion of the work. The code was compiled and tested, but production runs to assess acceleration were not performed because the used discretional compute time allocation expired as year-end approached. The Summit HPC platform is scheduled for decommissioning in 2024, making it unattractive for future use with Nvidia-based GPUs. Therefore, the work will be moved onto NERSC machines in FY24. An application was prepared and submitted, and sufficient node-hours were awarded to continue the research in the next calendar year. This report summarizes work performed thus far, which mostly focused on CPU OpenFOAM computing.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

CFD Simulation of Floating Body Motion with Mooring Dynamics: Coupling MoorDyn with OpenFOAM

It is increasingly popular to use Computational Fluid Dynamics (CFD) models to study floating structures subjected to ocean waves, especially when it comes to applications of floating offshore wind turbines and Wave Energy Converters (WECs). Mooring dynamics are currently lacking in most of these applications. This paper presents a coupled simulation study of moored floating body motion by coupling two open-source libraries: a finite volume CFD toolbox, OpenFOAM, and a lumped-mass mooring model, MoorDyn. The instantaneous floating body position and velocity are passed from the body motion solver in the CFD model to the mooring model to calculate the fairlead kinematics. The mooring reaction forces, which are calculated by MoorDyn after updating the mooring system states, are then returned to the body motion solver to update the floating body motion. Both mesh deformation and overset mesh methods are used as the mesh motion solver in the CFD model to account for the floating body motion. The coupled model was validated against experimental measurements for a floating box moored with four catenary lines under the action of regular waves, which came from a preliminary test campaign for WECs. Apart from the lumped-mass mooring model, the present work also coupled a quasi-static mooring model and a finite element model with the floating body motion solver in OpenFOAM. The mooring line tensions predicted by these models were compared. The coupled model equipped with three mooring line codes may be further used to carry out survivability studies of FOWTs and WECs subject to severe sea states.

floating body↗

GeN-ROM—An OpenFOAM®-based multiphysics reduced-order modeling framework for the analysis of Molten Salt Reactors

This work presents a projection-based multiphysics Model Order Reduction (MOR) framework for the analysis of nuclear systems and its application to parametric simulations of Molten Salt Reactors (MSR). The framework, named GeN-ROM, is developed using OpenFOAM® and employs a Proper Orthogonal Decomposition aided Reduced-Basis technique (POD-RB). It can be used to reduce steady-state and transient multiphysics problems involving parametric fluid dynamics, heat exchange, and neutronics phenomena. For the treatment of structural elements in the hydraulic systems, a porous medium approach has been adopted. The reduction process is data-driven and snapshot information is extracted via POD to learn the solution manifold and to build global spatial basis functions. At the data collection phase, GeN-ROM makes use of the solvers available in GeN-Foam, a similarly OpenFOAM®-based multiphysics framework developed for the analysis of nuclear reactors. The global bases are used both to approximate the solution fields and to project the full-order equations onto lower-dimensional subspaces, thus considerably reducing the number of unknowns in a numerical system. This reduction leads to significant computational speedups, which is ideal for multi-query applications such as uncertainty quantification or design optimization. The developed tool has been tested using a 2D multiphysics model of the Molten Salt Fast Reactor (MSFR) with steady-state and transient scenarios, with speedups on the order of 10 – 10 5 .

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Development, Verification, and Validation of an OpenFOAM-Based Solver for Modeling Inertial Fusion Energy Chambers

Our work seeks to introduce a computational tool tailored to the physics of inertial fusion energy chambers, in particular, those concepts based on thick liquid walls. In this approach, the structural materials are protected by several neutron mean-free-paths of renewable liquid and thus will be able to survive much longer than un-shielded walls, with virtually all structures lasting for the life of the plant and enabling the use of commercially available and qualified materials. The OpenFOAM-based solver named rhoCentralFoam has been used as a starting point. rhoCentralFoam belongs to the standard OpenFOAM solver toolset. It is a high-speed, explicit compressible flow solver with shock-capturing capability. While the main features have been retained, the solver had to be restructured to make use of tabular data for equations of states, a necessary addition to model the complex thermo-physical properties of ionized gasses. This entailed the need to change the independent state variables used by the solver, resulting in a new thermodynamic library and slightly different solution algorithm. Moreover, a radiation heat transfer model based on the P-1 approximation was added to the solver. The solver is verified against an analytical solution from the Sedov-Taylor-Neumann test problem to showcase the ability of the hydrodynamic solvers to handle strong shocks, whereas the P-1 model was verified using a simple one-dimensional problem with an analytical solution. Additionally, a validation case involving shock-wave propagation through jet array is presented, and the results are compared with experimental data from the open literature. Lastly, in order to showcase the utility of the solver for practical cases, we applied the refined solver to two representative scenarios: gas venting within the HYLIFE-II chamber and the compression of the gas following the partial ablation of the liquid wall.

Chamber dynamics↗

Scalability of OpenFOAM Density-Based Solver with Runge–Kutta Temporal Discretization Scheme

Compressible density-based solvers are widely used in OpenFOAM, and the parallel scalability of these solvers is crucial for large-scale simulations. In this paper, we report our experiences with the scalability of OpenFOAM’s native rhoCentralFoam solver, and by making a small number of modifications to it, we show the degree to which the scalability of the solver can be improved. The main modification made is to replace the first-order accurate Euler scheme in rhoCentralFoam with a third-order accurate, four-stage Runge-Kutta or RK4 scheme for the time integration. The scaling test we used is the transonic flow over the ONERA M6 wing. This is a common validation test for compressible flows solvers in aerospace and other engineering applications. Numerical experiments show that our modified solver, referred to as rhoCentralRK4Foam, for the same spatial discretization, achieves as much as a 123.2% improvement in scalability over the rhoCentralFoam solver. As expected, the better time resolution of the Runge–Kutta scheme makes it more suitable for unsteady problems such as the Taylor–Green vortex decay where the new solver showed a 50% decrease in the overall time-to-solution compared to rhoCentralFoam to get to the final solution with the same numerical accuracy. Finally, the improved scalability can be traced to the improvement of the computation to communication ratio obtained by substituting the RK4 scheme in place of the Euler scheme. All numerical tests were conducted on a Cray XC40 parallel system, Theta, at Argonne National Laboratory.

Li, Sibo↗

Modeling of streamflow in a 30 km long reach spanning 5 years using OpenFOAM 5.x

Abstract. Developing accurate and efficient modeling techniques for streamflow at the tens-of-kilometers spatial scale and multi-year temporal scale is critical for evaluating and predicting the impact of climate- and human-induced discharge variations on river hydrodynamics. However, achieving such a goal is challenging because of limited surveys of streambed hydraulic roughness, uncertain boundary condition specifications, and high computational costs. We demonstrate that accurate and efficient three-dimensional (3-D) hydrodynamic modeling of natural rivers at 30 km and 5-year scales is feasible using the following three techniques within OpenFOAM, an open-source computational fluid dynamics platform: (1) generating a distributed hydraulic roughness field for the streambed by integrating water-stage observation data, a rough wall theory, and a local roughness optimization and adjustment strategy; (2) prescribing the boundary condition for the inflow and outflow by integrating precomputed results of a one-dimensional (1-D) hydraulic model with the 3-D model; and (3) reducing computational time using multiple parallel runs constrained by 1-D inflow and outflow boundary conditions. Streamflow modeling for a 30 km long reach in the Columbia River (CR) over 58 months can be achieved in less than 6 d using 1.1 million CPU hours. The mean error between the modeled and the observed water stages for our simulated CR reach ranges from −16 to 9 cm (equivalent to approximately ±7 % relative to the average water depth) at seven locations during most of the years between 2011 and 2019. We can reproduce the velocity distribution measured by the acoustic Doppler current profiler (ADCP). The correlation coefficients of the depth-averaged velocity between the model and ADCP measurements are in the range between 0.71 and 0.83 at 75 % of the survey cross sections. With the validated model, we further show that the relative importance of dynamic pressure versus hydrostatic pressure varies with discharge variations and topography heterogeneity. Given the model's high accuracy and computational efficiency, the model framework provides a generic approach to evaluate and predict the impacts of climate- and human-induced discharge variations on river hydrodynamics at tens-of-kilometers and decadal scales.

58 GEOSCIENCES↗

A Large Eddy Simulation Study of Flow Turbulence, Alumina Transport, and Bath Temperature Evolution in Conventional Aluminum-Smelting Cell Using OpenFOAM

In this study, a Large Eddy Simulation (LES) of the aluminum-smelting process is performed using OpenFOAM. To understand the coupled behavior of heat transfer, mass transfer, and flow of the smelting process, a multi-physics computational fluid dynamics (CFD) model based on the Eulerian–Eulerian multi-fluid approach is adopted. The model accounts for CO 2 bubble and magnetohydrodynamics (MHD)-driven flow, along with alumina dissolution, transport, and bath temperature evolution. The simulation predictions show small-scale turbulent vortical structures in the anode–cathode space caused by combined effect of MHD and CO 2 bubble-bath interactions and relatively large-scale asymmetric vortices in the inter-anode space caused by the CO 2 bubble-bath interactions. The vortex formation at the edges of the anodes evidently aids in transporting alumina from the central channel to the bottom of the anodes and prevents accumulation of gas bubbles in the periphery of the anode bottom. Symmetric bath cold spots are observed in the vicinity of the feeder. Cold spots are also observed in the anode–cathode distance space below the anode bottom due to the transport of undissolved solid to this region by the flow. The findings from the work are useful in developing and designing alumina-feeding strategy leading to reduced anode effects and smooth operation of the cell. The work also highlights the important flow structures in conventional aluminum-smelting cell.

36 MATERIALS SCIENCE↗

Exploring the impact of surface topography on Rayleigh-Bénard dry convection in the Pi cloud chamber using OpenFOAM: In cylindrical and rectangular geometries

The Pi convection-cloud chamber can generate steady-state turbulence in both rectangular and cylindrical shapes via Rayleigh-Bénard convection (RBC) by maintaining warm bottom and cold top surfaces. Although most experiments in the Pi chamber were conducted in cylindrical shapes, all previous Pi chamber simulations were conducted in a rectangular shape due to the limitations of those models to discretize a cylindrical domain when using the finite difference method therein. Here, we use OpenFOAM, an open-source finite-volume-based Computational Fluid Dynamics (CFD) software package, to conduct Large-Eddy Simulation (LES) of dry RBC in the Pi chamber at high Rayleigh numbers (10 8 to 10 9 ). Results show that large-scale circulation (LSC) direction varies in the chamber with a constant side wall temperature. Imposing a slight temperature imbalance at the side wall ranging from 0.1 to 0.7 degrees can lock the LSC, aligning better with Pi chamber observations, particularly at higher Rayleigh numbers. In addition, we examine the impact of surface topography on LSC and heat transfer in RBC systems within cylindrical and rectangular shapes under varying conditions. Results show that roughing top/bottom surfaces by adding bars of a few tens millimeters height can strengthen thermal plumes and enhance temperature fluctuations in the chamber. Furthermore, we observe that different bar height configurations lead to notable changes in LSC orientation and thermal stratification, highlighting the complex interactions between surface features and convection patterns. This finding highlights how surface topography and chamber geometry affect Rayleigh-Bénard convection, improving understanding of turbulent heat transfer and atmospheric boundary-layer processes. Direct Numerical Simulations (DNS) are also conducted to validate LES results. In conclusion, while LES effectively captures qualitative behaviors seen in DNS, it tends to underestimate velocity variances near walls, illustrating a trade-off between computational efficiency and accuracy.

54 ENVIRONMENTAL SCIENCES↗

Multiphysics analysis system for heat pipe cooled micro-reactors employing PRAGMA-OpenFOAM-ANLHTP

A multiphysics analysis system for neutronics/thermo-mechanical/heat-pipe analysis of heat pipe cooled micro-reactors was developed using the PRAGMA code as the neutronics engine. PRAGMA, which used to be a GPU-based continuous-energy MC code for power reactor applications, now has an extended geometry package to handle geometries with unstructured meshes generated by the ANSYS Design-Modeler and Meshing. The NVIDIA ray tracing engine OptiX was exploited for efficient neutron transport on unstructured geometry. On the multiphysics side, the open-source CFD tool OpenFOAM and one-dimensional heat pipe analysis code ANLHTP were adopted. The manager-worker system based on the MPI dynamic process management (DPM) model enables efficient coupling of codes employing different parallelization schemes. With all the features, the multiphysics analysis of the one-sixth symmetrical MegaPower 2D core was performed and it demonstrated the benefit of the tight integration of the three-way coupling system and one-to-one geometry coupling strategy. (authors)

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

NMACFoam (Numerical-model for Membrane-spacer Assemblies and Configurations in OpenFOAM) [SWR-23-57]

NMACFoam is a computational fluid dynamics tool for simulating flow and solids transport in membrane-spacer channels pertaining to reverse osmosis or nanofiltration applications. It is developed on the OpenFOAM framework and allows for simulating spacers with complex geometries. It includes porous wall boundary conditions for membranes and can accurately capture concentration polarization effects. One can perform large calculations at module-scale domain sizes using high performance computing resources with NMACFoam, which scales to 1000s of processors for problems with 1-10 million cells.

Sitaraman, Hariswaran↗

SOMAFOAM: An OpenFOAM based solver for continuum simulations of low-temperature plasmas

Here, we report the development of SOMAFOAM, a finite volume framework for performing continuum simulations of low-temperature plasmas. The primary goal of this work is to discuss the features of SOMAFOAM along with representative results provided as examples for a range of operating conditions and geometries. This includes plasma and plasma–dielectric systems operating in direct current, radio frequency, and microwave regimes from pressures as low as 100 mTorr to atmospheric pressure. The code has several useful features including the ability to run massively parallel simulations using arbitrary geometries, structured/unstructured meshes, choice of models such as drift–diffusion/full-momentum at runtime, and species-dependent timesteps to name a few. The verification/validation studies presented include comparison with previously published continuum simulations (low-pressure direct current and radio frequency plasma), with experiments (Gaseous Electronics Conference Reference Cell and microwave microplasma ignited in a split ring resonator), and previously published kinetic simulations (low-pressure radio frequency plasma). Other examples provided include a direct current atmospheric pressure microplasma bounded by dielectric sidewalls and a helium–nitrogen plasma ignited using a needle electrode facing a dielectric. The performance of the code is also discussed with serial and distributed memory parallel runs demonstrated up to 512 cores. The design and implementation of the code in a modular object-oriented framework allows for easy extension and seamless coupling with other codes and can be expected to play an important role in both academia and industry.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗