Search NASA⌕ Search

SEARCH · Search NASA

Results for “matlab”

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

PDMATLAB2D: A Peridynamics MATLAB Two-dimensional Code

PDMATLAB2D is a meshfree peridynamics implementation in MATLAB suitable for simulation of two-dimensional fracture problems. The purpose of this code is twofold. First, it provides an entry-level peridynamics computational tool for educational and training purposes. Second, it serves as an accessible and easily modifiable computational tool for peridynamics researchers who would like to adapt the code for a multitude of peridynamics simulation scenarios. The current version of the code implements a bond-based brittle elastic peridynamic model and a critical stretch criterion for bond breaking. However, the code is designed to be extendable for other peridynamic models and computational features. In this paper, we provide an overview of the code structure and functions with illustrative examples. In conclusion, due to the integrated computation and postprocessing MATLAB capabilities, PDMATLAB2D can serve as an effective testbed for testing new constitutive models and advanced numerical features for peridynamics computations.

97 MATHEMATICS AND COMPUTING↗

MatLab Package for Whispering Gallery Mode Data

Dye-doped whispering gallery mode resonator (WGMR) microspheres yield highly structured emission spectra that are extremely sensitive to their environment and are of intense interest for use in a variety of sensing applications. Efforts to leverage the unique sensitivities of WGMRs have relied on stringent experimental requirements to correlate specific spectral shifts/changes to an analyte/stimulus such as 1) precise positional knowledge, 2) reference spectra for each microsphere, and 3) high mechanical stability. Consequently, these can hinder adequate mixing or incorporation of analytes and creates challenges for remote sensing. The MATLAB codes provided here are to be used in conjunction with a continuous flow technique for measuring WGM spectra of dye-doped microspheres suspended in solution. One MATLAB script, smooths the data, automatically baseline corrects it to isolate the whispering gallery modes (WGM) from the unwanted bulk emission, and assesses the similarity of each spectrum to aid in selecting a set of unique WGM spectra for further analysis. The next script is designed to analyze WGM spectra to determine the size of the resonator and the refractive index (RI) of its local environment without a priori knowledge of the individual microsphere. The final script allows the user to cluster spheres based on the product of their RI and radius and the contrast ratio of the RI of the sphere material and that of its environment by using a shared nearest neighbor spectral clustering algorithm.

Lilley, Laura↗

Deep Lynx Matlab Adapter

The Deep Lynx MATLAB Adapter is a Python application that connects the Deep Lynx data warehouse with any MATLAB simulation.

Wilsdon, KatherineN [Idaho National Laboratory] (0↗

KSSOLV 2.0: An efficient MATLAB toolbox for solving the Kohn-Sham equations with plane-wave basis set

KSSOLV (Kohn-Sham Solver) is a MATLAB toolbox for performing Kohn-Sham density functional theory (DFT) calculations with a plane-wave basis set. KSSOLV 2.0 preserves the design features of the original KSSOLV software to allow users and developers to easily set up a problem and perform ground-state calculations as well as to prototype and test new algorithms. Furthermore, it includes new functionalities such as new iterative diagonalization algorithms, k-point sampling for electron band structures, geometry optimization and advanced algorithms for performing DFT calculations with local, semi-local, and hybrid exchange-correlation functionals. It can be used to study the electronic structures of both molecules and solids. So, we describe these new capabilities in this work through a few use cases. We also demonstrate the numerical accuracy and computational efficiency of KSSOLV on a variety of examples.

97 MATHEMATICS AND COMPUTING↗

baseflow: a MATLAB and GNU Octave package for baseflow recession analysis

baseflow is a MATLAB® toolbox designed for baseflow recession analysis, a technique used in hydrologic science to infer aquifer properties from streamflow. By leveraging widely available streamflow data, baseflow can be used to estimate aquifer properties such as hydraulic conductivity and drainable porosity over the modern instrumental stream gage record. The toolbox is intended for analysis of measured streamflow values recorded on a daily timestep, and is tailored for shallow, unconfined riparian aquifers that discharge groundwater laterally into adjacent streams. Additionally, baseflow can analyze the collective behavior of individual hillslope aquifers constituting hydrologic catchments, known as “watersheds”, from a nonlinear dynamical systems perspective. The toolbox incorporates recent advances in baseflow recession analysis to enable objective estimations of aquifer properties, and their sensitivity to methodological decisions, at both hillslope and catchment scales.

97 MATHEMATICS AND COMPUTING↗

Matlab implementation of a novel semi-structured kinetic model for methanotroph-photoautotroph cocultures

This paper presents the MatLab implementation details of a novel semi-structured kinetic model for methanotroph-photoautotroph cocultures. This includes the parameterization of the modeling equations, and the initialization of the simulation based on experimental conditions. More importantly, it provides details on how the differential equations governing mass balances in both gas and liquid phases are integrated together to simulate the system dynamics over time. The semi-structured kinetic model for methanotroph-photoautotroph coculture is validated using a wide range of experimental conditions. The model: Accurate predicts both the coculture growth in liquid phase and the gas composition changes in head space over time; Explicitly models the exchange of in situ produced O 2 and CO 2 within the coculture; Considers the self-shading effect on the growth of photoautotroph.

42 ENGINEERING↗

Version 2.0.0 - M-SPARC: Matlab-Simulation Package for Ab-initio Real-space Calculations

M-SPARC is a Matlab code for performing ab initio Kohn–Sham Density Functional Theory simulations. Version 2.0.0 of the software further extends its capability to include relativistic effects, dispersion interactions, and advanced semilocal/nonlocal exchange–correlation functionals. These features significantly increase the fidelity of first principles calculations that can be performed using M-SPARC.

97 MATHEMATICS AND COMPUTING↗

Ultrafast Laser Pulse Generation by Mode Locking: MATLAB-Based Demonstrations

Ultrafast laser spectroscopy is a valuable and increasingly accessible technique for studies of rapid chemical reactions. Critical to ultrafast spectroscopy is the concept of mode locking, a technique that enables a fixed phase relationship between laser modes, resulting in laser pulses with very short duration (in the fs or ps range). Despite the increasing importance of ultrafast lasers in chemistry, the introduction of key concepts behind their operation into the undergraduate and graduate chemistry coursework has been limited. To help the incorporation of these topics into chemistry courses, we report here a hands-on activity that helps students develop an intuitive understanding of the factors that impact electromagnetic wave evolution in optical cavities and the process of mode locking. We first provide the theoretical background by introducing cavity modes and contrasting them with well-known propagating electromagnetic waves. We then explore what happens when modes are added and how the relative phase between the modes affects their behavior. In the second section of this report, three teaching modules are provided, along with associated MATLAB codes and animated images, that can be used in the classroom to introduce concepts of cavity modes and mode locking. These teaching modules start by contrasting propagating electromagnetic waves with cavity modes and then illustrate what happens when multiple modes are present in the cavity and how the relative phase between the modes affects the overall electromagnetic field in the cavity.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

Teaching Nonradiative Transitions with MATLAB and Python

Nonradiative transitions are changes in energy states of atoms, ions, or molecules that do not involve the emission or absorption of photons. Despite their importance in understanding luminescent properties and photochemical reaction mechanisms, nonradiative transitions are rarely given more than a qualitative overview in undergraduate and even graduate physical chemistry curricula. To supplement the coverage of nonradiative transition topics, we provide here a set of active learning exercises to help students develop an intuitive understanding of the factors that determine the rate of nonradiative transitions. Here, we start by outlining the theoretical background through the formulations of the Franck–Condon factor and its relation to the rate of nonradiative transition. We then introduce three teaching modules, with associated MATLAB and Python codes, to explore how (1) the excited state nuclear displacement, (2) the electronic energy gap between excited and ground state and (3) the excited/ground state vibrational mode frequencies affect the magnitude of the Franck–Condon factor and thereby the rate of nonradiative transitions. The wave function overlap plots that accompany all teaching modules provide direct visualization of the effect of input parameters on the magnitude of Franck–Condon overlap integral.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

2-D Surface Temperature Simulation Data and Matlab Scripts

SAND2023-07249O The 2-D Surface Temperature Simulation Data and Matlab software can estimate 2D temperature fields from electrical measurements along the edge of the 2D domain. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Sjoberg, Carl Magnus↗

Neural Network Code MATLAB

SAND2022-12606 O Neural Network Code MATLAB reads in an excel file, processes the data, trains a neural network, and tests the neural network. The code generates predictions of diffusion constants based on the data in the excel file. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Allers, Joshua↗

MatLab Scripts

Explore the source record for details and available documents.

Ho, Clifford↗

FitIsoAndDeff and DeffCalculator Matlab Codes

These codes estimate effective diffusivity for species transport in materials and simultaneously fit multiple temperatures of measured isotherm and effective diffusivities for sorption transport of species through materials. Assumes triple-mode type sorption thermodynamics with mobile and immobile species in quasi-equilibrium.

Foley, BrandonR↗

HERO WEC 2024 Hydraulic Configuration Deployment Data

The following submission includes raw and processed data from the in water deployment of NREL's Hydraulic and Electric Reverse Osmosis Wave Energy Converter (HERO WEC), in the form of parquet files, TDMS files, CSV files, bag files and MATLAB workspaces. This dataset was collected in March 2024 at the Jennette's pier test site in North Carolina. This submission includes the following: - Data description document (HERO WEC FY24 Hydraulic Deployment Data Descriptions.doc) - This document includes detailed descriptions of the type of data and how it was processed and/or calculated. - Processed MATLAB workspace - The processed data is provided in the form of a single MATLAB workspace containing data from the full deployment. This workspace contains data from all sensors down sampled to 10 Hz along with all array Value Added Products (VAPs). - MATLAB visualization scripts - The MATLAB workspaces can be visualized using the file "HERO_WEC_2024_Hydraulic_Config_Data_Viewer.m/mlx". The user simply needs to download the processed MATLAB workspaces, specify the desired start and end times and run this file. Both the .m and .mlx file format has been provided depending on the user's preference. - Summary Data - The fully processed data was used to create a summary data set with averages and important calculations performed on 30-minute intervals to align with the intervals of wave resource data reported from nearby CDIP ocean observing buoys located 20km East of Jennette's pier and 40km Northeast of Jennette's pier. The wave resource data provided in this data set is to be used for reference only due the difference in water depth and proximity to shore between the Jennette's pier test site and the locations of the ocean observing buoys. This data is provided in the Summary Data zip folder, which includes this data set in the form of a MATLAB workspace, parquet file, and excel spreadsheet. - Processed Parquet File - The processed data is provided in the form of a single parquet file containing data from all HERO WEC sensors collected during the full deployment. Data in these files has been down sampled to 10 Hz and all array VAPs are included. - Interim Filtered Data - Raw data from each sensor group partitioned into 30-minute parquet files. These files are outputs from an intermediate stage of data processing and contain the raw data with no Quality Control (QC) or calculations performed in a format that is easier to use than the raw data. - Raw Data - Raw, unprocessed data from this deployment can be found in the Raw Data zip folder. This data is provided in the form of TDMS, CSV, and bag files in the original format output by the MODAQ system. - Python Data Processing Script - This links to an NREL public github repository containing the python script used to go from raw data to fully processed parquet files. Additional documentation on how to use this script is included in the github repository. This data set has been developed by the National Renewable Energy Laboratory, operated by Alliance for Sustainable Energy, LLC, for the U.S. Department of Energy (DOE) under Contract No. DE-AC36-08GO28308. Funding provided by the U.S. Department of Energy Office of Energy Efficiency and Renewable Energy Water Power Technologies Office.

16 TIDAL AND WAVE POWER↗

Simulink Model of a New Energy EVG-005 5kW Hydropower Turbine

Simulink model for a New Energy 5kW hydropower turbine. ADCP data ("ds_streamwise_7_13.nc") and DC voltage, DC current, and rotor rotation observed from the New Energy EVG-005 Current Energy Converter (CEC) ("electrical_7_13_10ohms.nc") were collected at the Tanana River Test Site (TRTS) near Nenana Alaska. - Data was collected on July 13th, 2023 with a constant 10 ohms resistance applied with a DC load bank. - Simulink model is meant to resemble the electrical setup at the TRTS. - Model is initialized by running the "NewEnergy_2023_10hz.m" Matlab script. Then the Simulink model ("New_Energy_Model_PMSM.slx") can be run. - Results are processed with the "NewEnergy_2023_processing.m" Matlab code. The Matlab results are also saved in the "New_Energy_7_13_model_validation_results.mat" Matlab file. This can be directly loaded into the Matlab Workspace using the "Load()" command. - The timetable variables "electrical_model_downsampled" is the model results and the "electrical_limited" is the experimental data from the TRTS.

16 TIDAL AND WAVE POWER↗

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↗