Search NASASearch

SEARCH · Search NASA

Results for “Python 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

An Expanded Role for Python in Expediting System Simulation Development

The Python programming language has traditionally been used as a “scripting” language and is not generally recognized as a language for building system simulations, where C++, Java, and other compiled languages are typically used. While very powerful and gaining favor for a large set of programming tasks, Python is generally regarded as not having the speed to directly do the extensive numeric computations required in large-scale simulation. This paper aims to present an approach, supported by case studies, to re-think this assertion. Directly using Python in this new role has the potential to expedite an agile, spiral cycle of development of design-test-modify for systems simulation.

programming language

Advancement of the General Aviation Synthesis Program Using Python to Enable Optimization-Based Hybrid-Propulsion Aircraft Design

In support of the Electrified Powertrain Flight Demonstrator and Advanced Air Transport Technologies projects at NASA, a new tool has been developed at NASA’s Ames and Glenn Research Centers to enable coupled engine and airframe optimization and analysis. The new tool combines the engineering-level analysis methods and empirical models of the FORTRAN General Aviation Synthesis Program (GASP) with the Python-based OpenMDAO framework to provide a modular framework for efficient gradient-based optimization with the aim of incorporating new subsystem models for unconventional configurations. The tool has been verified against GASP analyses of several aircraft models and mission formulations. Preliminary efforts have been made to integrate pyCycle, a thermodynamic cycle analysis tool, to enable simultaneous optimization of hybrid propulsion system and vehicle parameters while taking full mission performance and constraints into account. This will improve current capabilities to assess impacts of electrified powertrain technologies on future aircraft designs.

Kenneth R. Lyons

Advancement of the General Aviation Synthesis Program Using Python to Enable Optimization-Based Hybrid-Propulsion Aircraft Design

In support of the Electrified Powertrain Flight Demonstrator and Advanced Air Transport Technologies projects at NASA, a new tool has been developed at NASA's Ames and Glenn Research Centers to enable coupled engine and airframe optimization and analysis. The new tool combines the engineering-level analysis methods and empirical models of the FORTRAN General Aviation Synthesis Program (GASP) with the Python-based OpenMDAO framework to provide a modular framework for efficient gradient-based optimization with the aim of incorporating new subsystem models for unconventional configurations. The tool has been verified against GASP analyses of several aircraft models and mission formulations. Preliminary efforts have been made to integrate pyCycle, a thermodynamic cycle analysis tool, to enable simultaneous optimization of hybrid propulsion system and vehicle parameters while taking full mission performance and constraints into account. This will improve current capabilities to assess impacts of electrified powertrain technologies on future aircraft designs.

Kenneth R Lyons

Advancement of the General Aviation Synthesis Program Using Python to Enable Optimization-Based Hybrid-Propulsion Aircraft Design

In support of Electrified Powertrain Flight Demonstrator and Advanced Air Transport Technologies programs at NASA, engineers at NASA Ames and NASA Glenn Research Centers have developed a new tool for coupled engine and airframe optimization and analysis. The new tool combines the engineering-level analysis methods of the FORTRAN General Aviation Synthesis Program (GASP) with the OpenMDAO framework to handle highly coupled problems that legacy tools struggle to optimize. The tool has been verified to match GASP with good agreement on a 737 MAX8 baseline vehicle closure problem, and preliminary efforts have been made to integrate the pyCycle thermodynamic cycle analysis tool for electrified engine optimization in the context of a vehicle optimization problem.

Kenneth R. Lyons

System and Method for Providing a Climate Data Analytic Services Application Programming Interface

A system, method and computer-readable storage devices for providing a climate data analytic services application programming interface. The system includes a programming library that enables client device software to invoke the capabilities of a climate data analytics system through requests to various services supported by the climate data analytics system, and also includes a client-side communications interface that enables the programming library's methods to interact with a climate data analytics system's server interface to obtain access to the capabilities of the system. In one implementation, the programming library is implemented in the Python programming language. The programming library can include basic utilities that call a single, server-side method implemented by one of the various services supported by the climate data analytics system, and extended utilities that call a series of basic utilities and/or other extended utilities that have been placed under programmatic control in order to create client-side convenience methods and workflows.

Schnase, John L.

Re-imagining a Stata/Python Combination

At last year's Stata Conference, I presented some ideas for combining Stata and the Python programming language within a single interface. Two methods were presented: in one, Python was used to automate Stata; in the other, Python was used to send simulated keystrokes to the Stata GUI. The first method has the drawback of only working in Windows, and the second can be slow and subject to character input limits. In this presentation, I will demonstrate a method for achieving interaction between Stata and Python that does not suffer these drawbacks, and I will present some examples to show how this interaction can be useful.

Fiedler, James

Stata Hybrids: Updates and Ideas

At last year's Stata conference I presented two projects for using Python with Stata: a plugin that embeds the Python programming language within Stata and code for using Stata data sets in Python. In this talk I will describe some small improvements being made to these projects, and I will present other ideas for combining tools with Stata. Some of these ideas use Python, some use JavaScript and a web browser.

Fieldler, James

The M-Integral for Computing Stress Intensity Factors in Generally Anisotropic Materials

The objective of this project is to develop and demonstrate a capability for computing stress intensity factors in generally anisotropic materials. These objectives have been met. The primary deliverable of this project is this report and the information it contains. In addition, we have delivered the source code for a subroutine that will compute stress intensity factors for anisotropic materials encoded in both the C and Python programming languages and made available a version of the FRANC3D program that incorporates this subroutine. Single crystal super alloys are commonly used for components in the hot sections of contemporary jet and rocket engines. Because these components have a uniform atomic lattice orientation throughout, they exhibit anisotropic material behavior. This means that stress intensity solutions developed for isotropic materials are not appropriate for the analysis of crack growth in these materials. Until now, a general numerical technique did not exist for computing stress intensity factors of cracks in anisotropic materials and cubic materials in particular. Such a capability was developed during the project and is described and demonstrated herein.

Warzynek, P. A.

Multiscale Simulations of Magnetic Island Coalescence

We describe a new interactive parallel Adaptive Mesh Refinement (AMR) framework written in the Python programming language. This new framework, PyAMR, hides the details of parallel AMR data structures and algorithms (e.g., domain decomposition, grid partition, and inter-process communication), allowing the user to focus on the development of algorithms for advancing the solution of a systems of partial differential equations on a single uniform mesh. We demonstrate the use of PyAMR by simulating the pairwise coalescence of magnetic islands using the resistive Hall MHD equations. Techniques for coupling different physics models on different levels of the AMR grid hierarchy are discussed.

Dorelli, John C.

Utilizing Commercial Hardware and Open Source Computer Vision Software to Perform Motion Capture for Reduced Gravity Flight

Long duration space travel to Mars or to an asteroid will expose astronauts to extended periods of reduced gravity. Since gravity is not present to aid loading, astronauts will use resistive and aerobic exercise regimes for the duration of the space flight to minimize the loss of bone density, muscle mass and aerobic capacity that occurs during exposure to a reduced gravity environment. Unlike the International Space Station (ISS), the area available for an exercise device in the next generation of spacecraft is limited. Therefore, compact resistance exercise device prototypes are being developed. The NASA Digital Astronaut Project (DAP) is supporting the Advanced Exercise Concepts (AEC) Project, Exercise Physiology and Countermeasures (ExPC) project and the National Space Biomedical Research Institute (NSBRI) funded researchers by developing computational models of exercising with these new advanced exercise device concepts. To perform validation of these models and to support the Advanced Exercise Concepts Project, several candidate devices have been flown onboard NASAs Reduced Gravity Aircraft. In terrestrial laboratories, researchers typically have available to them motion capture systems for the measurement of subject kinematics. Onboard the parabolic flight aircraft it is not practical to utilize the traditional motion capture systems due to the large working volume they require and their relatively high replacement cost if damaged. To support measuring kinematics on board parabolic aircraft, a motion capture system is being developed utilizing open source computer vision code with commercial off the shelf (COTS) video camera hardware. While the systems accuracy is lower than lab setups, it provides a means to produce quantitative comparison motion capture kinematic data. Additionally, data such as required exercise volume for small spaces such as the Orion capsule can be determined. METHODS: OpenCV is an open source computer vision library that provides the ability to perform multi-camera 3 dimensional reconstruction. Utilizing OpenCV, via the Python programming language, a set of tools has been developed to perform motion capture in confined spaces using commercial cameras. Four Sony Video Cameras were intrinsically calibrated prior to flight. Intrinsic calibration provides a set of camera specific parameters to remove geometric distortion of the lens and sensor (specific to each individual camera). A set of high contrast markers were placed on the exercising subject (safety also necessitated that they be soft in case they become detached during parabolic flight); small yarn balls were used. Extrinsic calibration, the determination of camera location and orientation parameters, is performed using fixed landmark markers shared by the camera scenes. Additionally a wand calibration, the sweeping of the camera scenes simultaneously, was also performed. Techniques have been developed to perform intrinsic calibration, extrinsic calibration, isolation of the markers in the scene, calculation of marker 2D centroids, and 3D reconstruction from multiple cameras. These methods have been tested in the laboratory side-by-side comparison to a traditional motion capture system and also on a parabolic flight.

Biodynamics

Finite Element Modeling and Analysis of Mars Entry Aeroshell Baseline Concept

The structure that is developed and analyzed in this project must be able to survive all the various load conditions that it will encounter along its course to Mars with the minimal amount of weight and material. At this stage, the goal is to study the capability of the structure using a finite element model (FEM). This FEM is created using a python script, and is numerically solved in Nastran. The purpose of the model is to achieve an optimization of mass given specific constraints on launch and entry. The generation and analysis of the baseline Rigid Mid-Range Lift to Drag Ratio Aeroshell model is a continuation and an improvement on previous work done for the FEM. The model is generated using Python programming with the axisymmetric placement of nodes for beam and shell elements. The shells are assigned a honeycomb sandwich material with an aluminum honeycomb core and composite face sheets, and the beams are assigned the same material as the shell face sheets. There are two load cases assigned to the model: Earth launch and Mars entry. The Earth launch case consists of pressure, gravity, and vibration loads, and the Mars entry case consists of just pressure and gravity loads. The Earth launch case was determined to be the driving case, though the analyses are performed for both cases to ensure the constraints are satisfied. The types of analysis performed with the model are design optimization, statics, buckling, normal modes, and frequency response, the last of which is only for the Earth launch load case. The final results indicated that all of the requirements are satisfied except the thermal limits, which could not yet be tested, and the normal modes for the Mars entry. However, the frequency limits during Mars entry are expected to be much higher than the lower frequency limits set for the analysis. In addition, there are still improvements that can be made in order to reduce the weight while still meeting all requirements.

Ahmed, Samee W.

Infrared Free Space Communication - The Autonomous Testing of Free Space Infrared Communication

Fiber optics has been a winning player in the game of high-speed communication and data transfer in cable connections. Yet, in free space RF has been the repeated choice of communication medium of the space industry. Investigating the benefits of free space optical communication over radio frequency is worthwhile. An increase in science data rate return capabilities could occur if optical communication is implemented. Optical communication systems also provide efficiencies in power, mass, and volume over RF systems1. Optical communication systems have been demonstrated from a satellite in orbit with the moon to earth, and resulted in the highest data rates ever seen through space (622Mbps)2. Because of these benefits, optical communication is far superior to RF. The HiDRA (High Data Rate Architecture) project is researching Passive Misalignment Mitigation of Dynamic Free Apace Optical Communication Links. The goal of this effort is to enable gigabit per second transmission of data in short range dynamic links (less than 100 meters). In practice this would enhance data rates between sites on the International Space Station with minimal size, weight, and power requirements. This paper will focus on an autonomous code and a hardware setup that will be used to fulfill the next step in the research being conducted. The free space optical communications pointing downfalls will be investigated. This was achieved by creating 5 python programs and a top-level code to automate this test.

Heldman, Christopher

Stochastic Reduced Order Models with Python (SROMPy)

Stochastic Reduced Order Models with Python (SROMPy) is a software package developed to enable user-friendly utilization of the stochastic reduced order model (SROM) approach for uncertainty quantification. A SROM is a low dimensional, discrete approximation to a random quantity that enables efficient and non-intrusive stochastic computations. With SROMPy, a user can easily generate a SROM to approximate a random variable or vector described by several different types of probability distributions using the Python programming language. Once a SROM is constructed, the software can be used to propagate uncertainty through a user-defined computational model to estimate statistics of a given quantity of interest. This report is meant to introduce the SROMPy module and brie y demonstrate its capabilities. A simple example of a spring-mass system with a random input is included to illustrate the practicality of the SROM approach to uncertainty quantification and relative ease of applying it with SROMPy. The example includes a comparison with a solution obtained using classical Monte Carlo simulation, demonstrating the similarities and advantages of using the SROM approach.

Warner, James E.

A Modified Algorithm and Open-Source Computational Package for the Determination of Infrared Optical Constants Relevant to Astrophysics

Infrared (IR) telescopes, such as Spitzer and SOFIA, have revealed a rich variety of chemical species trapped in interstellar ices. The most fundamental parameters to be derived from observed IR spectra are the identity and abundance of each component. Several compounds have been conclusively or tentatively identified, but the band strengths and optical constants needed to derive accurate abundances for many of these are poorly constrained. We have developed a modified approach to the extraction of the real and imaginary parts of the refractive index (optical constants) of a thin film from a single transmission spectrum measured in the IR spectral range. Our algorithm is similar to those implemented by previous authors, with some major changes that yield results for strong absorptions where previous approaches fail: (1) an adaptive k-correction step size, (2) the use of a root-finding algorithm to obtain a more accurate k-correction at each iteration, and (3) a k-correction step that prevents non-physical results such as negative n-values that prevent convergence in the calculation algorithm. The algorithm is presented and described, with examples to show agreement with some existing results and improvements upon others. New optical-constants calculations for CH3OH, CO2, N2O, and CH4 are presented, and potential implications for the modeling of interstellar and planetary ice data from space telescopes are discussed. With the objective of being open-source and transparent, the full source code in the free Python programming language is made available along with the compiled version and the laboratory data used to produce the results shown.

Perry A. Gerakines

Imagining a Stata / Python Combination

There are occasions when a task is difficult in Stata, but fairly easy in a more general programming language. Python is a popular language for a range of uses. It is easy to use, has many high ]quality packages, and programs can be written relatively quickly. Is there any advantage in combining Stata and Python within a single interface? Stata already offers support for user-written programs, which allow extensive control over calculations, but somewhat less control over graphics. Also, except for specifying output, the user has minimal programmatic control over the user interface. Python can be used in a way that allows more control over the interface and graphics, and in so doing provide a roundabout method for satisfying some user requests (e.g., transparency levels in graphics and the ability to clear the results window). My talk will explore these ideas, present a possible method for combining Stata and Python, and give examples to demonstrate how this combination might be useful.

Fiedler, James

Improving Access to the GEOS Composition Forecast Model with API Development and Ingestion into Google Earth Engine

The GEOS Composition Forecast (GEOS-CF) model produces forecast and historical estimates of atmospheric composition and meteorology fields, which provide useful insight into air quality issues and events. In a year for which Canadian wildfires created adverse air quality conditions in the eastern United States, access to model fields such as PM2.5 are in high demand. The GEOS-CF team at the NASA Global Modeling and Assimilation Office (GMAO) first developed in-house solutions to improve data access via the CF API, and recently partnered with Google to ingest a collated set of model diagnostics into the Google Earth Engine (GEE) data repository. GEOS-CF model output is also being ingested into AWS storage. Creating these various open access points to GEOS-CF model diagnostics provides the public with an opportunity to easily interact with air quality information. Users are able to use a temporally consistent global grid of air quality fields in machine learning applications, mapping tools, and data informatics. Hosting GEOS-CF forecasts and the historical timeseries of these chemistry and meteorology fields in GEE allows users to create dynamic JavaScript-based air quality applications in the GEE code editor. GEOS-CF users can also access the model output via the GEE Python application programming interface (API), making it easy to perform various analyses with Python. This presentation will show two examples of accessing the GEOS-CF model through GEE. The first is an example application made in the GEE code editor which allows users to view time series plots and downscaled maps of surface level NO2. The second example exhibits using the GEE Python API to create a machine learning model to temporally gap-fill between air quality observations. These examples are an introduction to the many possible benefits of having open access to the GEOS-CF model through multiple platforms.

Callum Wayman

Improving Access to the GEOS Composition Forecast Model with API Development and Ingestion into Google Earth Engine

The GEOS Composition Forecast (GEOS-CF) model produces forecast and historical estimates of atmospheric composition and meteorology fields, which provide useful insight into air quality issues and events. In a year for which Canadian wildfires created adverse air quality conditions in the eastern United States, access to model fields such as PM2.5 are in high demand. The GEOS-CF team at the NASA Global Modeling and Assimilation Office (GMAO) first developed in-house solutions to improve data access via the CF API, and recently partnered with Google to ingest a collated set of model diagnostics into the Google Earth Engine (GEE) data repository. GEOS-CF model output is also being ingested into AWS storage. Creating these various open access points to GEOS-CF model diagnostics provides the public with an opportunity to easily interact with air quality information. Users are able to use a temporally consistent global grid of air quality fields in machine learning applications, mapping tools, and data informatics. Hosting GEOS-CF forecasts and the historical timeseries of these chemistry and meteorology fields in GEE allows users to create dynamic JavaScript-based air quality applications in the GEE code editor. GEOS-CF users can also access the model output via the GEE Python application programming interface (API), making it easy to perform various analyses with Python. This presentation will show two examples of accessing the GEOS-CF model through GEE. The first is an example application made in the GEE code editor which allows users to view time series plots and downscaled maps of surface level NO 2 . The second example exhibits using the GEE Python API to create a machine learning model to temporally gap-fill between air quality observations. These examples are an introduction to the many possible benefits of having open access to the GEOS-CF model through multiple platforms.

Callum Wayman

Service-Oriented Architecture for NVO and TeraGrid Computing

The National Virtual Observatory (NVO) Extensible Secure Scalable Service Infrastructure (NESSSI) is a Web service architecture and software framework that enables Web-based astronomical data publishing and processing on grid computers such as the National Science Foundation's TeraGrid. Characteristics of this architecture include the following: (1) Services are created, managed, and upgraded by their developers, who are trusted users of computing platforms on which the services are deployed. (2) Service jobs can be initiated by means of Java or Python client programs run on a command line or with Web portals. (3) Access is granted within a graduated security scheme in which the size of a job that can be initiated depends on the level of authentication of the user.

Jacob, Joseph