Search NASASearch

SEARCH · Search NASA

Results for “functional programming”

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

Idiomatic Correctness-Checking via Julienne in Fortran 2023

This paper presents a unified approach to unit testing and runtime assertion checking using Fortran 2023. The paper describes the support for our approach in the Julienne framework. Julienne leverages recent Fortran standards to implement object-oriented design patterns, support testing parallel programs, and implement functional programming patterns in order to craft idioms inspired by natural-language expressions. The presented idioms employ novel operators to write expressions that evaluate to a test-diagnosis object encapsulating two components: (1) the test outcome or assertion outcome and (2) an automatically generated diagnostic string. Two other novel aspects of the approach include (1) the ability to enforce assertions inside pure procedures and (2) the ability to output rich diagnostic information inside pure procedures during error termination when assertions fail. The latter capability mitigates against a reason that Fortran programmers commonly cite for not writing pure procedures: difficulty obtaining useful program output inside pure procedures when debugging code. This paper demonstrates how the adoption of the proposed idioms leads naturally to a unifying theme across two otherwise disparate technologies: unit testing and runtime assertion checking. Finally, this paper describes the usage of the Julienne testing framework for writing unit tests and assertions in the Matcha high-performance computing application and the Fiats deep learning library.

Rouson, Damian

Phlex: Parallel, Hierarchical, and Layered EXecution of data-processing algorithms

Phlex is a computing framework supporting the parallel, hierarchical, and layered execution of data-processing algorithms. It is based on the functional-programming paradigm, thus guaranteeing thread-safety when invoking user-defined pure functions. Phlex allows users to specify arbitrary graph-based hierarchies of data organization, enabling more flexible processing of data as required by the constraints of the program.

Knoepfel, KyleJ. [Fermi National Accelerator Labor

Automatically parallelizing batch inference on deep neural networks using Fiats and Fortran 2023 `do concurrent`

This paper introduces novel programming strategies that leverage features of the Fortran 2023 standard of the International Standards Organization (ISO) to automatically parallelize computations on deep neural networks. The paper focuses on the interplay of object-oriented, parallel, and functional programming paradigms in the Fiats deep learning library. We demonstrate how several infrequently used language features play a role in enabling efficient, parallel execution. Specifically, the ability to explicitly declare that a procedure is pure facilitates inference in the context of the language’s loop-parallelism construct `do concurrent`. Also, explicitly prohibiting the overriding of a parent type’s type-bound procedures eliminates the need for dynamic dispatch in performance-critical code. Finally, this paper uses batch inference calculations on a neural network surrogate for atmospheric aerosol dynamics to demonstrate that LLVM Flang compiler’s automatic parallelization of `do concurrent` achieves roughly the same performance and scalability as achieved by OpenMP compiler directives. We also demonstrate that double-precision inference costs 37–72% longer runtime than default-real precision with most values in the range 57-60%.

Rouson, Damian

Proximal Galerkin: A Structure-Preserving Finite Element Method for Pointwise Bound Constraints

The proximal Galerkin finite element method is a high-order, low iteration complexity, nonlinear numerical method that preserves the geometric and algebraic structure of pointwise bound constraints in infinite-dimensional function spaces. This paper introduces the proximal Galerkin method and applies it to solve free boundary problems, enforce discrete maximum principles, and develop a scalable, mesh-independent algorithm for optimal design with pointwise bound constraints. This paper also introduces the latent variable proximal point (LVPP) algorithm, from which the proximal Galerkin method derives. When analyzing the classical obstacle problem, we discover that the underlying variational inequality can be replaced by a sequence of second-order partial differential equations (PDEs) that are readily discretized and solved with, e.g., the proximal Galerkin method. Throughout this work, we arrive at several contributions that may be of independent interest. These include (1) a semilinear PDE we refer to as the entropic Poisson equation; (2) an algebraic/geometric connection between high-order positivity-preserving discretizations and certain infinite-dimensional Lie groups; and (3) a gradient-based, bound-preserving algorithm for two-field, density-based topology optimization. The complete proximal Galerkin methodology combines ideas from nonlinear programming, functional analysis, tropical algebra, and differential geometry and can potentially lead to new synergies among these areas as well as within variational and numerical analysis. Open-source implementations of our methods accompany this work to facilitate reproduction and broader adoption.

97 MATHEMATICS AND COMPUTING

PyFaults: A Python Toolkit for Stacking Fault Screening

PyFaults is an open-source Python library designed to model stacking fault disorder in crystalline materials and qualitatively assess the characteristic selective broadening effects in powder X-ray diffraction (PXRD). Here, the main capabilities of PyFaults are presented, including unit cell and supercell model construction, PXRD pattern calculation, assessment against experimental PXRD, and methods for rapid screening of candidate models within a set of possible stacking vectors and fault occurrence probabilities. This program aims to serve as a computationally inexpensive tool for identifying and screening potential stacking fault models in materials with planar disorder. Three diverse case studies, involving GaN, Li2MnO3 and Li3YCl6, are presented to illustrate the program functionality across a range of structure types and stacking fault modalities.

MATHEMATICS AND COMPUTING

Optimizing district energy systems by integrating Borehole Thermal Energy Storage Using a Mixed-Integer Linear Programming g-function framework with a Multi-Timescale Rolling Horizon method

Shallow geothermal has gained increasing attention in recent years; however, a reliable framework for its accurate incorporation into large-scale energy system optimization remains lacking. This study proposes a Mixed-Integer Linear Programming (MILP) framework combined with the g-function approach to integrate Borehole Thermal Energy Storage (BTES) technology into energy system optimization. Validation against a Modelica-based reservoir network simulation demonstrates that the proposed framework effectively captures the ground thermal response under varying energy loads and accurately estimates the borefield energy supply. To enhance scalability, a Rolling Horizon with Multi-Timescale (RH-MTS) method is further introduced, reducing computational time by 73 % for the 1-year optimization model with only minor loss of optimality. The framework is demonstrated through the case study of the UC Berkeley campus. Results indicate that BTES is a cost-effective and low-carbon solution: two borefields comprising 382 boreholes can meet 8.0 % and 6.6 % of the total campus heating and cooling demand, respectively, at an average energy rate of 0.70–0.77 USD/kWh and carbon intensity of 0.54 kg-CO2/kWh. Short-term analysis reveals a 35%–65% decline in BTES energy flow after 3–6 months of continuous heating/cooling operation, while long-term simulation shows that annual energy production of BTES can vary by up to 12.0 % after four years before stabilizing. Overall, this study develops a novel optimization framework that couples physics-based g-function method with MILP optimization framework, thereby advancing methodological development for shallow-geothermal integration and providing actionable guidance for BTES deployment in district-energy systems.

Yang, Jiahui

Achieving designed texture and flows in bulk active nematics using optimal control theory

Being intrinsically nonequilibrium, active materials can potentially perform functions that would be thermodynamically forbidden in passive materials. However, active systems have diverse local attractors that correspond to distinct dynamical states, many of which exhibit chaotic turbulent-like dynamics and thus cannot perform work or useful functions. Designing such a system to choose a specific dynamical state is a formidable challenge. Motivated by recent advances enabling optogenetic control of experimental active materials, we describe an optimal control theory framework that identifies a spatiotemporal sequence of light-generated activity that drives an active nematic system toward a prescribed dynamical steady state. Active nematics are unstable to spontaneous defect proliferation and chaotic streaming dynamics in the absence of control. We demonstrate that optimal control theory can compute activity fields that redirect the dynamics into a variety of alternative dynamical programs and functions. This includes dynamically reconfiguring between states, selecting and stabilizing emergent behaviors that do not correspond to attractors, and are hence unstable in the uncontrolled system. Furthermore, our results provide a roadmap to leverage optical control methods to rationally design structure, dynamics, and function in a wide variety of active materials.

Complex systems theory

YAP1 Dysfunction Promotes Molecular Properties Linked to Breast Cancer Susceptibility

YAP1 is a cotranscription factor that promotes malignant and stem cell properties in cancer. We previously found that YAP1 dysregulation is associated with aging in human mammary epithelia. With increased age, YAP1 expression changes in luminal epithelial cells, the prospective breast cancer cell of origin. Because age is a significant risk factor for breast cancer, we tested whether YAP1 dysregulation acted early in cancer progression by conferring cellular states associated with increased cancer susceptibility. In this study, we find that with increased age and genetic risk for developing cancer, human breast tissues showed significantly increased YAP1 expression, and cultured primary human mammary epithelial cells (HMEC) showed significantly increased expression of both YAP1 and its transcriptional targets. Increased YAP1 expression in cultured HMEC induced gene expression changes associated with increased cancer susceptibility, such as genes associated with stem cell states, increased telomerase activity, breast cancer progression, and increased age and genetic breast cancer risk. Furthermore, overexpression of YAP1 in post-stasis HMEC—finite lifespan cells that have bypassed a retinoblastoma-mediated senescence barrier—promoted properties related to increased growth potential. We found that YAP1 dysregulation in finite epithelial cells allows for access to gene programs and functions that are typically thought to be restricted to stem cells. We hypothesize that YAP1 acts early in breast cancer progression, long before the development of a tumor, to impose cancer-susceptible molecular states.

YAP1

Security Licensing Basis Framework Development

This report summarizes a technology-inclusive and performance-based method to determine the physical security licensing basis for a commercial nuclear reactor under the proposed 10 CFR 73.100 for Part 53 licensees. The method focuses on the identification of security functions, the contributing security systems and programs to meet those functions, the identification of security events that will provide the foundation for the security licensing basis and includes a risk-informed performance-based defense in depth adequacy method. The method can also be employed to justify performance-based alternative measures to traditional security requirements found in 10 CFR 73.55.

98 - NUCLEAR DISARMAMENT, SAFEGUARDS, AND PHYSICAL

Computational Determination of the Refractive Index of TATB, LLM-105, β-HMX, & α-RDX

In this study, we use Materials Studio CASTEP, an ab initio quantum mechanical (QM) program employing density functional theory (DFT), to compute the refractive index (RI) of solid energetic materials, specifically, PETN (tetragonal phase), TATB, LLM-105, β-HMX, and α-RDX. The use of quantum mechanical DFT methods affords the investigation of the optical mate rial properties of a system without the need for any experimental input. The RI values of PETN and TATB have been experimentally determined previously and are compared here to the QM derived RI values as validation of the theoretical approach in determining material optical proper ties. To date, experimental measurements to determine the RI values for LLM-105 have yet to be determined. This fact obviates the need to determine LLM-105 RI values using quantum mechanical means.

36 MATERIALS SCIENCE

Bounds on spectral gaps of Hyperbolic spin surfaces

We describe a method for constraining Laplacian and Dirac spectra of two dimensional compact orientable hyperbolic spin manifolds and orbifolds. The key ingredient is an infinite family of identities satisfied by the spectra. These spectral identities follow from the consistency between 1) the spectral decomposition of functions on the spin bundle into irreducible representations of SL(2,R) and 2) associativity of pointwise multiplication of functions. Applying semidefinite programming methods to our identities produces rigorous upper bounds on the Laplacian spectral gap as well as on the Dirac spectral gap conditioned on the former. In several examples, our bounds are nearly sharp; a numerical algorithm based on the Selberg trace formula shows that the [0;3,3,5] orbifold, a particular surface with signature [1;3], and the Bolza surface nearly saturate the bounds at genus 0, 1 and 2 respectively. Under additional assumptions on the number of harmonic spinors carried by the spin-surface, we obtain more restrictive bounds on the Laplacian spectral gap. In particular, these bounds apply to hyperelliptic surfaces. We also determine the set of Laplacian spectral gaps attained by all compact orientable two-dimensional hyperbolic spin orbifolds. We show that this set is upper bounded by 12.13798; this bound is nearly saturated by the [0;3,3,5] orbifold, whose first non-zero Laplacian eigenvalue is λ^(0)_1 ≈ 12.13623.

Spectral theory

Models and Algorithms for Equilibrium Analysis of Mixed-Material Nucleic Acid Systems

Dynamic programming algorithms within the NUPACK software suite enable analysis of equilibrium base-pairing properties for complex and test tube ensembles containing arbitrary numbers of interacting nucleic acid strands. Currently, calculations are limited to single-material systems that are either all-RNA or all-DNA. Here, to enable analysis of mixed-material systems that are critical for modern applications in vitro, in situ, and in vivo, we develop physical models and dynamic programming algorithms that allow the material of the system to be specified at nucleotide resolution. Free energy parameter sets are constructed for both RNA/DNA and RNA/2'OMe-RNA mixed-material systems by combining available empirical mixed-material parameters with single-material parameter sets to enable treatment of the full complex and test tube ensembles. New dynamic programming recursions account for the material of each nucleotide throughout the recursive process. For a complex with N nucleotides, the mixed-material dynamic programming algorithms maintain the O(N 3 ) time complexity of the single-material algorithms, enabling efficient calculation of diverse physical quantities over complex and test tube ensembles (e.g., complex partition function, equilibrium complex concentrations, equilibrium base-pairing probabilities, minimum free energy secondary structure(s), and Boltzmann-sampled secondary structures) at a cost increase of roughly 2.0-3.5×. The results of existing single-material algorithms are exactly reproduced when applying the new mixed-material algorithms to single-material systems. Accuracy is significantly enhanced using mixed-material models and algorithms to predict RNA/DNA and RNA/2'OMe-RNA duplex melting temperatures from the experimental literature as well as RNA/DNA melt profiles from new experiments. In conclusion, mixed-material analyses can be performed online using the NUPACK web app (www.nupack.org) or locally using the NUPACK Python module.

2′OMe-RNA

Flexible Integration of Diverse HVAC Technologies in EnergyPlus via Python-Enabled Workflows

Analysis of advanced controls and novel system types is often not directly feasible in building energy simulation tools. Various techniques extend building energy simulation tool capabilities to allow the use of user-defined scripts and programs, but these approaches have limitations. The EnergyPlus Python plugin offers users new flexibility to use EnergyPlus to call an external Python module at specific points in the simulation, as well as to use Python to call EnergyPlus functionality through an application programming interface (API). This paper presents four case studies leveraging the EnergyPlus Python plugin to facilitate analysis of advanced controls and system types. The use of the Python plugin offers greater modularity and flexibility relative to previous approaches, is less error prone, and is simpler for users to adopt. The Python plugin allows EnergyPlus to be used in a more flexible manner and to accommodate the expanding realm of energy modeling applications.

32 ENERGY CONSERVATION, CONSUMPTION, AND UTILIZATI

Characterizing the surface compositions of supported bimetallic PtSn clusters: Effects of cluster-support interactions and surface adsorbates

PtSn bimetallic clusters on TiO2(110) and highly oriented pyrolytic graphite (HOPG) surfaces have been characterized by scanning tunneling microscopy, low energy ion scattering (LEIS), Xray photoelectron spectroscopy, and temperature programmed desorption (TPD); density functional theory (DFT) calculations have also been performed to better understand adsorption of CO and D2 on the PtSn surfaces. On TiO2 at coverages of 2 ML of Pt and 2 ML of Sn, exclusively bimetallic clusters are formed for both orders of deposition because clusters of the first metal completely cover the surface such that all atoms of the second metal are incorporated into the existing clusters. In contrast, on HOPG, the high mobility and weak cluster-support interactions on HOPG result in much larger 2 ML monometallic clusters (~30 Å high) that do not completely cover the surface, and deposition of the second metal produces larger clusters as well as smaller ones. Despite the difference in cluster morphologies for the different orders of deposition and supports, the LEIS experiments demonstrate that in all cases, the PtSn clusters are rich in Sn at the surface, as expected based on the lower surface free energy for Sn compared to Pt. Furthermore, the +0.2 eV shift in the Sn(3d5/2) binding energy observed on all surfaces in the presence of Pt is consistent with PtSn alloy formation. Deposition of 2 ML of Sn on TiO2 produces two-dimensional clusters with oxidation of Sn and reduction of titania at the clustersupport interface, but addition of Pt to the Sn clusters causes Sn to diffuse away from this interface, leaving Sn in the metallic state. TPD experiments on 2 ML Pt/TiO2 with increasing coverages of Sn show that the number of adsorption sites for D2 sharply decreases to nearly zero at 0.5 ML, while CO adsorption decreases to zero only at much higher Sn coverages of 2 ML. DFT studies for Sn modified Pt surfaces and bulk structures demonstrate that for CO adsorption at low Sn coverages (<0.25 ML), the strong Pt-CO interactions induce diffusion of Pt to the cluster surface and the formation of a bulk Pt3Sn alloy, whereas D2 adsorption does not lead to interactions with the Pt surface that are strong enough to induce alloy formation. A single Sn adatom prevents D2 adsorption on four neighboring Pt atoms via site-blocking and the donation of electron density to Pt.

Li, Fangliang

Scan2Sim: Software to Convert Network Scans to Emulations

Within operational technology (OT) systems design, the construction of testing environments for simulation is often a tedious, manual process that slows down safety and security evaluations. This document details the design and functionality of Scan2Sim, a program designed to construct high-fidelity topological schematics for OT systems without significant manual human input. Scan2Sim may take as input a detailed network scan of a system, and produces an instruction set to re-create the original scanned network within a virtualized simulation network. This construction is achieved via heuristic methods of machine template selection, which allows for a fast, performant approach to automated environment construction. The current tool is designed to produce topology schematics compatible with the Minimega, a tool designed by Sandia National Laboratories for repeatable experimentation management.

97 MATHEMATICS AND COMPUTING

Fiats: Functional inference and training for surrogates

Fiats provides a platform for research on the training and deployment of neural-network surrogate models for computational science. Fiats also supports exploring, advancing, and combining functional, object-oriented, and parallel programming patterns in Fortran 2023. As such, the Fiats name has dual expansions: “Functional Inference And Training for Surrogates” or “Fortran Inference And Training for Science.” Fiats inference and training procedures are pure and therefore satisfy a language constraint imposed on procedure invocations inside Fortran’s parallel loop construct: do concurrent. Furthermore, the Fiats training procedures are built around a do concurrent parallel reduction. Several compilers can automatically parallelize do concurrent on Central Processing Units (CPUs) or Graphics Processing Units (GPUs). Fiats thus aims to achieve performance portability through standard language mechanisms.

Rouson, Damian [Lawrence Berkeley National Laborat

Stage-resolved gene regulatory network analysis reveals developmental reprogramming and genes with robust stem-preferred expression in sorghum

Sorghum bicolor is a deep-rooted, heat- and drought-tolerant crop that thrives on marginal lands and is increasingly valued for its applications in biofuel, bioenergy, and biopolymer production. The sorghum stem, which can reach 4–5 m in length, serves as the primary reservoir of both lignocellulosic biomass and soluble sugars, making it a promising bioenergy feedstock. Although recent advances in genetic, genomic, and transcriptomic resources have improved our understanding of sorghum biology, comprehensive genome-wide analyses of functional dynamics across diverse organ types and developmental stages remain limited. In particular, candidate genes with stem preferred expression pattern or their associated cis-regulatory elements, which may program key stem-related functions and enable organ- or tissue-specific engineering, have not yet been identified.

59 BASIC BIOLOGICAL SCIENCES

Shorter function summaries for finite state machine-based high consequence systems using logic synthesis and tautologies (Final Report LDRD 24-1302)

Computer programs are often viewed as collections of functions – each function has parameters (inputs) and computes a return value, and each has potential side effects that modify program state (outputs). In this research, a Sandia symbolic execution tool designed to support “human-in-the-loop” analysis was modified to automatically create “function summaries,” and a new tool, “diaboolical,” was created to support enhancing readability of the summary using a novel approach to bit-vector simplification that leverages logic synthesis and tautologies. For this effort, students at Auburn University created several finite state machines (FSMs) to serve as exemplars for high-consequence systems. Function summaries for each of the machines were obtained, and then portions of the summaries were simplified using both diaboolical and the simplification procedure of a popular SMT solver. A comparison of the results shows that diaboolical can often produce smaller function summaries, with expression length improvements over the unsimplified function summaries ranging from 0% to 90% for diaboolical and 0% to 65% for the SMT solver, though diaboolical had a significantly greater cost in time. Diaboolical was evaluated against a collection of “arbitrary” C-code as well as FSM exemplars, and for both datasets it achieved an approximately 10% improvement in expression length compared to simplifications that could be obtained using existing techniques. Function summaries can assist assurance efforts that evaluate existing systems and their executable code. A smaller function summary is likely easier for humans to understand and could thus increase the ability and efficacy of assurance practices centered around the analysis of executable artifacts.

97 MATHEMATICS AND COMPUTING