Search NASA⌕ Search

SEARCH · Search NASA

Results for “python 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 361 records · Page 20

Particle-in-cell/accelerator code for space-charge dominated beam simulation

Warp is a multidimensional discrete-particle beam simulation program designed to be applicable where the beam space-charge is non-negligible or dominant. It is being developed in a collaboration among LLNL, LBNL and the University of Maryland. It was originally designed and optimized for heave ion fusion accelerator physics studies, but has received use in a broader range of applications, including for example laser wakefield accelerators, e-cloud studies in high enery accelerators, particle traps and other areas. At present it incorporates 3-D, axisymmetric (r,z) planar (x-z) and transverse slice (x,y) descriptions, with both electrostatic and electro-magnetic fields, and a beam envelope model. The code is guilt atop the Python interpreter language.

Grote, D. P.↗

labquake_future_prediction

The labquake_future_prediction code is a collection of python modules and scripts that serves as supporting information for the article “Predicting future laboratory fault friction through deep learning” for publication in the journal of “Geophysical Research Letters”. It is designed to predict laboratory fault slips in the immediate future by scanning continuous acoustic emission (AE) waveforms recorded in laboratory biaxial shear experiments. The predictions are made with a deep learning model based on convolutional encoder-decoder (CED) models and the Transformer model primarily developed for Natural Language Processing (NLP). The deep learning model is trained with the tensorflow package using publicly available laboratory data sets in standard binary file format in numpy. The utility functions for reading data files, configuring model hyperparameters, constructing the CED and Transformer models, training and testing of the models are defined in python module files. The workflow of training the models for labquake future predictions and the multiple GPU’s rapid model hyperparameter optimization as described in the journal article, are demonstrated in accompanying python script files and Jupyter notebooks.

Wang, Kun↗

Control And Optimization Modular Modeling Application For Nuclear Deployment

The purpose of the COMMAND code is to provide a flexible, scalable tool for use in developing, integrating, and testing the technologies necessary for achieving autonomous operations of advanced nuclear reactors. The code enables users to efficiently implement custom simulations and experiments by combining key methods from different software modules. These modules are focused on: modeling and simulation tools, such as nuclear simulation tools used for high-fidelity modeling (e.g., Reactor Excursion and Leak Analysis Program [RELAP5-3D] and Monte Carlo N-Particle [MCNP]); machine learning and optimization tools (e.g., anomaly detection and data-driven modeling techniques); advanced control in its digital, high-performance, and supervisory control forms (e.g., proportional integral derivative (PID) control and model predictive control (MPC); and integration with hardware through industrial communication protocols. To ensure flexibility and scalability, COMMAND was designed to be both modular—the software “pieces” all inherit from generic building blocks and can be combined and connected to create complicated simulations—and high performing—designed for parallel processing, enabling simulations and experiments to take advantage of multi-core computers, servers, and nodes. The code is written in the Python programming language due to the language's popularity, active community, and open-source and cross-platform nature. Maintaining consistency with other simulation tools used within the nuclear energy community, users implement simulations and experiments through text input files, which define components, parameters, connections, etc., through lines of text. Given that COMMAND is written in Python, these input files are native Python scripts, and so use the standard Python structure and formatting. This also enables users to take advantage of Python's extensive package library to develop custom capabilities for their specific use cases.

Faber, Jacob [Idaho National Laboratory (INL), Ida↗

Emulsion droplets detection suite

The code is a set of Python libraries/scripts that leverage open source computer vision packages like YOLO and SAM2 to identify emulsion droplets in plate reader images and videos of microfluidic device flows.

Reddy, Tyler [LANL]↗

matsim-agents v1.0

matsim-agents is a multi-agent AI framework for atomistic materials simulation and discovery. It orchestrates large language models (LLMs), machine-learned interatomic potentials (MLIPs), and DFT codes into a single agentic loop running on laptops and DOE leadership-class supercomputers. MULTI-AGENT ORCHESTRATION A LangGraph state machine with three nodes: a Planner that converts a natural-language research objective into structured tasks; an Executor that dispatches atomistic tools and loops until the queue is empty; and an Analyst that summarizes results into a human-readable report. State is checkpointed after every step and human-in-the-loop gates can be inserted at any edge. HYPOTHESIS-DRIVEN DISCOVERY CHAT An interactive REPL (matsim-agents chat) that couples LLM dialogue with atomistic simulation. Chemical formulas are automatically detected in conversation turns and trigger a full crystal-phase exploration: structure generation → relaxation → stability scoring → result injection back into the conversation, creating a closed hypothesis-refinement loop. CRYSTAL PHASE ENUMERATION Given a composition, the phase explorer enumerates prototypes by stoichiometry: elemental (fcc/bcc/hcp/sc/diamond), binary 1:1 (rocksalt/CsCl/zincblende/ wurtzite/fluorite/rutile), ternary 1:1:3 (cubic perovskite), ternary 1:2:4 (perovskite + spinel), quaternary 1:1:2:6 (Fm-3m double perovskite). 2-D prototypes (graphene, h-BN, MoS2 2H/1T) and multilayer stacking are also supported via --include-2d and --num-layers. SUPERCELL GENERATION AND SITE DECORATION Auto-tiling to a minimum atom count (--min-atoms), explicit NxNxN tiling (--supercell), symmetry-distinct site decorations (--n-orderings), and isotropic lattice-scale sweeps (--lattice-scales) for volume bracketing. MLFF RELAXATION AND STABILITY SCORING HydraGNN (multi-headed GNN) drives structure relaxation via ASE with FIRE, BFGS, or BFGSLineSearch. Stability output: delta-E/atom ranking across phases and a max-residual-force dynamical-stability proxy. Other MLIPs (MACE, NequIP, Orb) can be plugged in through the same interface. DFT BACKENDS Quantum ESPRESSO pw.x and VASP 6.6 are first-class labellers. Both have validated GPU builds and SLURM/PBS launchers for three DOE platforms: Frontier (AMD MI250X, ROCm), Aurora (Intel PVC, oneAPI), Perlmutter (NVIDIA A100, CUDA). QE produces ~100 binaries (pw.x, ph.x, epw.x, ...). VASP supports scf, relax, vc-relax, and vc-relax-shape run types. ACTIVE-LEARNING LOOP matsim-agents al run CONFIG.yaml drives an iterative HydraGNN-DFT loop: MD generates candidates → ensemble/MC-dropout uncertainty selects the most informative → DFT labels them in parallel inside one allocation → dataset grows → HydraGNN retrains → repeat. DFT backend is a single YAML toggle (dft.backend: vasp | qe). LLM-generated seed structures are supported (no curated POSCAR library needed). Config uses ${VAR}, ${VAR:-default}, ${VAR:?msg} shell-style substitution for cross-user/cross-site portability. LLM BACKENDS Ollama (local, default), vLLM (HPC multi-GPU serving), OpenAI, Anthropic, HuggingFace Transformers+Accelerate. Selected at runtime via flag or env var with no code changes. HPC PORTABILITY Same Python entry points run on Frontier (ROCm 7.2), Aurora (oneAPI), and Perlmutter (CUDA 12). DFT and ML stacks are never co-loaded in the same shell; they couple through the scheduler and filesystem. Advanced multi-node launchers (serve, discovery-chat, single-relaxation, active-learning, QE warm-start) are provided for all three platforms. CODABENCH COMPETITION BUNDLE A self-contained benchmark: 159 atomistic test structures across 11 material classes, 5 tasks (formation energy, forces, ML relaxation, AI-DFT relaxation, phase stability ranking), public/private leaderboard split (30/70), and four ready-to-run baselines: MACE-MP-0, HydraGNN, UMA, AllScAIP.

Lupo Pasini, Massimiliano [Oak Ridge National Labo↗

ELM model simulations of Plum Island Ecosystems LTER low marsh site 2018-2020

Model simulations using the Department of Energy's Energy Exascale Earth System Model (E3SM) land model (ELM) with improved capabilities to represent vegetation response to salinity and inundation. The simulations were conducted for a tidal salt marsh at Plum Island Ecosystems Long Term Ecological Research (LTER) site near Rowley, Massachusetts, USA; the site is a low marsh dominated by Spartina alterniflora. The model was forced with site-specific meteorology, salinity and tidal cycles from 2018-2020. Four sets of model simulations are included and described below:1. Parameterization of the salinity response function. These simulations tested different combinations of values for optimal salinity and salinity tolerance.2. Model evaluation. This comparison conducted simulations using the default model, the salinity function only, the submergence function only, and both the salinity and submergence functions. 3. Salinity scenarios. These simulations used the 2018 salinity input data varied by -5 to +10 ppt salinity.4. Water level scenarios. These simulations used the tide height varied by -10 to +50 cm. These simulations were used to demonstrate how the salinity and submergence functions better represent carbon uptake by tidal salt marshes.The data package includes netCDF files used as forcing files for tide height and salinity, one for each year 2018-2020 at observed salinity concentrations, and an additional three forcing files in which salinity concentrations were varied 5 ppt lower, 5 ppt higher, and 10 ppt higher than the measured 2018 time series. Also included are python scripts for creating forcing files, plain text parameter and command files for running simulations, model outputs in netCDF format, and python scripts for visualizing outputs. Code for the modified E3SM model is archived in Sulman et al 2023 at doi:10.15485/1991625. More detail about files is provided in the README.md file.

54 ENVIRONMENTAL SCIENCES↗

PyFLOTRAN Documentation Release 1.0.0

This is the documentation for the PyFLOTRAN library. PyFLOTRAN is a set of classes and methods that the enable use of the massively parallel subsurface flow and reactive transport code PFLOTRAN (http://www.pflotran.org) within the Python scripting environment. This allows the use of a wide range of libraries available in Python for pre- and post-processing.

Computer Science↗

Micro Reactor Simulation Using the PROTEUS Suite in FY19

Two micro reactor cores were simulated using the MOC solver of PROTEUS: MegaPower for a heat pipe micro reactor and Holos-Quad for a high-temperature gas-cooled micro reactor. Verification of PROTEUS standalone was performed by simulating 2D and 3D core benchmark problems developed based on MegaPower and Holos-Quad. Simulation results indicated that PROTEUS successfully modelled 2D and 3D cores of the MegaPower and Holos-Quad micro reactors and PROTEUS eigenvalues agreed well with the SERPENT Monte Carlo solutions. For a heat pipe cooled micro reactor, multiphysics simulations were performed using PROTEUS / FLUENT / ANLHTP. The coupling system of the three codes were developed using Python-based drivers, which exchange the data (power, temperature, and heat rate) required for the coupling and control the boundary conditions of FLUENT and ANLHTP. The coupled system was qualitatively verified using a 3D unit assembly problem composed of six fuel rods and seven heat pipes, which was developed based on the MegaPower compositions. The steady-state problem was solved using FLUENT / ANLHTP with given asymmetric fuel powers, demonstrating the reasonable convergence of temperatures of 7 heat pipes. Transient simulations were also performed by making one out of 7 heat pipes fail. For the transient, the coupled system of PROTEUS / FLUENT / ANLHTP demonstrated reasonable changes of total power and heat pipe temperatures with time, accounting for temperature feedback effects. In this simulation, no effect of structural change was accounted for, which will be performed using ANSYS-mechanical in future along with further verification with larger or whole-core 3D problems.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

SLIA Reference Architecture Models

The SLIA Reference Architecture Models project, sponsored by the DOE CESER Energy CyberSense Program (Oct 2024–Sep 2025), advanced LLNL’s PySCES simulation tool to better support CyTRICS Prioritization and Initial Risk Assessment (PIRA) reference architectures. Key achievements include enhancements to the PySCES transmission substation facility model, expanded asset coverage, and enhancements to the PySCES code base. Software improvements reduced code complexity, migrated PySCES to Python version 3.11, introduced an object-oriented design, and added a schema database for easier updates and validation. New features support device criticality assessments and a more precise parametric simulation mode. Remaining gaps include model validation, workflow limitations, Monte Carlo convergence issues, full device criticality metric implementation, model fidelity, and general software improvements. Continued development is recommended to address these gaps and fully align PySCES with CyTRICS PIRA requirements.

97 MATHEMATICS AND COMPUTING↗

Advancing Neutrino Simulation Modeling with MARLEY: Insights from the NNSA-MSIIP Internship

Core-collapse supernovae are intense sources of tens-of-MeV neutrinos. However, there is no experimental data to validate the current event generator MARLEY (Model of Argon Reaction Low Energy Yields) that can model supernova neutrinos. To validate the model, I developed a new muon capture feature within the MARLEY simulation framework by coding key functions in C++, Python, and ROOT. I generated and analyzed one million simulated muon capture events and comparing the results to experimental data. To improve the model, I worked on optimizing the model’s parameters to improve its precision using statistical methods.

Wong, Baker [Fermilab]↗

Progress report for FACETS (Framework Application for Core-Edge Transport Simulations)

This role of this computer science SAP is to facilitate FACETS design and development by contributing CCA component technology and new application-specific technology. From a software perspective, the FACETS project is a very complex project. It is a combination of legacy software written in Fortran, Python, and C++ by various coding groups along with new software modules being written from scratch. The FACETS team is spread among 11 organizations and is geographically distributed from coast to coast. The fusion physics modules to be incorporated vary in terms of the model dimensions, typical time scale, and type of interactions with other components. Because FACETS is a complex project, it requires a component-based framework to facilitate the definition and composition of scientific applications from a suite of available fusion physics components. Component architectures have proven themselves in the business world and more recently in the scientific computing world. The CS SAP contributes fundamental tools like Babel to the FACETS framework and helps develop application-specific interfaces appropriate for the fusion physics modules.

99 GENERAL AND MISCELLANEOUS↗

100 TeV pp collisions, SM type, PYTHIA8 generator: tev100pp_qcd_pythia8_ptbins

Inclusive dijets in bins of PhaseSpace:pTHatMin. Cross sections depend on pT. 1000 events per file, 100 files per pT bin. How to decode name: Name: tev100_pythia8_ptPTMIN_PTMAX_NUMBER.promc where PTMIN is min pT for PhaseSpace:pTHatMin, PTMAX - PhaseSpace:pTHatMax*2, NUMBER corresponds to the cluster production node. When you run, use "PTMIN-PTMAX" ranges. The actual cut on PhaseSpace:pTHatMax=2*PTMAX to reduce fluctuations in the tails. How to use: To get a sample with a given pT, use "glob" regular expressions (in Jython, Python etc). Example for the code: pT>100 GeV corresponds to "glob.glob(*pt100_*)" . pT bins: # bins pt[1]=50 pt[2]=100 pt[3]=150 pt[4]=200 pt[5]=250 pt[6]=300 pt[7]=350 pt[8]=400 pt[9]=450 pt[10]=500 pt[11]=600 pt[12]=700 pt[13]=800 pt[14]=900 pt[15]=1000 pt[16]=1200 pt[17]=1400 pt[18]=1600 pt[19]=1800 pt[20]=2000 pt[21]=2200 pt[22]=2400 pt[23]=2600 pt[24]=2800 pt[25]=3000 pt[26]=3300 pt[27]=3600 pt[28]=3900 pt[29]=4200 pt[30]=4600 pt[31]=5000 pt[32]=5500 pt[33]=6000 pt[34]=7000 pt[35]=8000 pt[36]=9000 pt[37]=10000 pt[38]=12000 pt[39]=14000 pt[40]=16000 pt[41]=18000 pt[42]=20000 pt[43]=25000 pt[44]=30000 pt[45]=35000 pt[45]=40000. Slimmed as: Particle records are slimmed (all stable with pT>0.3 GeV) and (PID=5 || PID=6) or PID>22 && PID<38) or PID>10 && PID<17).

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

13 TeV pp collisions, SM type, PYTHIA8 generator: tev13pp_qcd_pythia8_ptbins

Inclusive dijets in bins of PhaseSpace:pTHatMin. Cross sections depends on pT. 1000 events per files, 100 files per pT bin. How to decode name: Name: tev100_pythia8_ptPTMIN_PTMAX_NUMBER.promc where PTMIN is min pT for PhaseSpace:pTHatMin, PTMAX - PhaseSpace:pTHatMax*2, NUMBER corresponds to the cluster production node. 50000 events per bin, 500 events per file. When you run, use "PTMIN-PTMAX" ranges. The actual cut on PhaseSpace:pTHatMax=2*TMAX to reduce fluctuations on the tails. How to use: To get a sample with a given pT, use "glob" regular expressions (in Jython, Python etc). Example for the code: pT>100 should corresponds to "glob.glob(*pt100_*)". Slimmed as: Particle records are slimmed (all stable with pT>0.3 GeV) and (PID=5 || PID=6) or PID>22 && PID<38) or PID>10 && PID<17).

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

100 TeV pp collisions, Top type, PYTHIA8 generator: tev100pp_ttbar_pythia8_ptbins

Top production in bins of PhaseSpace:mHatMin. Cross section depends on pT. Use the attached log files to find the cross sections. How to decode name: Name: tev100_pythia8_ptPTMIN_PTMAX_NUMBER.promc where PTMIN is min pT for PhaseSpace:ptHatMin, PTMAX - PhaseSpace:pTHatMax*2, NUMBER corresponds to the cluster production node. 2000 events in file, 50 files per bin. When you run, use "PTMIN-PTMAX" ranges. The actual cut on PhaseSpace:pTHatMax=2*TMAX to reduce fluctuations in the tails. How to use: To get a sample with a given pT, use "glob" regular expressions (in Jython, Python etc). Example for the code: pT>100 should corresponds to "glob.glob(*pt100_*)". Slimmed as: Particle records are slimmed (all stable with pT>0.3 GeV) and (PID=5 || PID=6) or PID>22 && PID<38) or PID>10 && PID<17).

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

100 TeV pp collisions, SM type, PYTHIA8 generator: tev100pp_wzjet_pythia8_ptbins

Z/W+jet production in bins of PhaseSpace:mHatMin. Cross sections depend on pT and not given. All Z/W decays are included. 1000 events per file, 100 files per pT bin. Cross sections are included in the log files. How to decode name: Name: tev100_pythia8_ptPTMIN_PTMAX_NUMBER.promc where PTMIN is min pT for PhaseSpace:ptHatMin, PTMAX - PhaseSpace:pTHatMax*2, NUMBER corresponds to the cluster production node. When you run, use "PTMIN-PTMAX" ranges. The actual cut on PhaseSpace:pTHatMax=2*PTMAX to reduce fluctuations in the tails. pT bins: pt[1]=50 pt[2]=100 pt[3]=150 pt[4]=200 pt[5]=250 pt[6]=300 pt[7]=350 pt[8]=400 pt[9]=450 pt[10]=500 pt[11]=700 pt[12]=900 pt[13]=1100 pt[14]=1300 pt[15]=1500 pt[16]=1700 pt[17]=1900 pt[18]=2100 pt[19]=2400 pt[20]=2700 pt[21]=3000 pt[22]=3400 pt[23]=3800 pt[24]=4200 pt[25]=4600 pt[26]=5000 pt[27]=5500 pt[28]=6000 pt[29]=6500 pt[30]=7000 pt[31]=7500 pt[32]=8000 pt[33]=8500 pt[34]=9000 pt[35]=10000 pt[36]=12000 pt[37]=14000 pt[38]=18000 pt[39]=22000 pt[40]=25000. How to use: To get a sample with a given pT, use "glob" regular expressions (in Jython, Python etc). Example for the code: pT>100 corresponds to "glob.glob(*pt100_*)". Slimmed as: Particle records are slimmed (all stable with pT>0.3 GeV) and (PID=5 || PID=6) or PID>22 && PID<38) or PID>10 && PID<17).

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

100 TeV pp collisions, Higgs type, PYTHIA8 generator: tev100pp_higgs_pythia8_ptbins

Higgs production in bins of PhaseSpace:mHatMin. Cross sections depend on pT and not given. All Higgs decays are included. 2000 events per file, 50 files per pT bin. Cross sections are included in the log files. How to decode name: Name: tev100_pythia8_ptPTMIN_PTMAX_NUMBER.promc where PTMIN is min pT for PhaseSpace:ptHatMin, PTMAX - PhaseSpace:pTHatMax*2, NUMBER corresponds to the cluster production node. When you run, use "PTMIN-PTMAX" ranges. The actual cut on PhaseSpace:pTHatMax=2*PTMAX to reduce fluctuations on the tails. How to use: To get a sample with a given pT, use "glob" regular expressions (in Jython, Python etc). Example for the code: pT>100 corresponds to "glob.glob(*pt100_*)". Slimmed as: Particle records are slimmed (all stable with pT>0.3 GeV) and (PID=5 || PID=6) or PID>22 && PID<38) or PID>10 && PID<17).

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

13 TeV pp collisions, Higgs type, PYTHIA8 generator: tev13pp_higgs_pythia8_ptbins

Higgs production in bins of PhaseSpace:mHatMin. Cross sections depend on pT and not given. All decays are included. 1000 events per file, 100 files per pT bin. Cross sections are included in the log files. How to decode name: Name: tev100_pythia8_ptPTMIN_PTMAX_NUMBER.promc where PTMIN is min pT for PhaseSpace:ptHatMin, PTMAX - PhaseSpace:pTHatMax*2, NUMBER corresponds to the cluster production node. The actual gen-level cut is PhaseSpace:pTHatMax=2*TMAX to reduce fluctuations on the tails. How to use: To get a sample with a given pT, use "glob" regular expressions (in Jython, Python etc). Example for the code: pT>100 corresponds to "glob.glob(*pt100_*)". Slimmed as: Particle records are slimmed (all stable with pT>0.3 GeV) and (PID=5 || PID=6) or PID>22 && PID<38) or PID>10 && PID<17).

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

100 TeV pp collisions, SM type, PYTHIA8 generator: tev100pp_gamma_pythia8_ptbins

All direct photon production in bins of PhaseSpace:mHatMin, in the range pT=50-25,000 GeV. Cross sections depend on pT and are not given. 2000 events per file, 50 files per pT bin. Cross sections are included in the log files. How to decode name: Name: tev100_pythia8_ptPTMIN_PTMAX_NUMBER.promc where PTMIN is min pT for PhaseSpace:ptHatMin, PTMAX - PhaseSpace:pTHatMax*2, NUMBER corresponds to the cluster production node. When you run, use "PTMIN-PTMAX" ranges. The actual cut on PhaseSpace:pTHatMax=2*PTMAX to reduce fluctuations in the tails. How to use: To get a sample with a given pT, use "glob" regular expressions (in Jython, Python etc). Example for the code: pT>100 corresponds to "glob.glob(*pt100_*)" <h3>Slimmed as</h3> Particle records are slimmed (all stable with pT>0.3 GeV) and (PID=5 || PID=6) or PID>22 && PID<38) or PID>10 && PID<17).

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗