Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “C CODES”

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 883 records · Page 49

P52D-1583 - Further Improvements to Constraints on Titan’s Atmospheric n-Butane, via Ground-Based Observations

We have acquired high spectral resolution ground-based observations of Titan in the mid-infrared from NASA Infrared Telescope Facility’s Texas Echelon Cross Echelle Spectrograph instrument , designed to constrain the abundances of new molecules within Titan’s atmosphere. The target molecule for this work, n-butane (n-C H ), though predicted by photochemical models of Titan’s atmosphere , has never been detected. Using the NEMESIS radiative transfer code , we retrieved a disk-averaged temperature profile for Titan by modeling CH emission in the 1248 cm region. Using this temperature profile, we then retrieved disk-averaged profiles of ethene (C H ), propane (C H ), and propene (C H ) in the 956 and 965 cm regions, which are also home to the strong and vibrational features of n-butane. We used an n-butane pseudoline list from JPL in order to systematically introduce a range of n-butane mixing ratios into the model, to constrain the molecule’s abundance based on the model’s changing fit to the data. We derive 3-confidence upper limits at an altitude of 150 km of 48 and 31 ppb for n-butane, via the and bands in the 956 and 965 cm regions, respectively. These are significantly tighter upper limits when compared to the ~300 ppb upper limit found in our recent work which used the same methodology but on much lower resolution limb data collected by the Cassini spacecraft. Upper limits on gas abundances are important for continued improvement of photochemical models of Titan’s atmosphere, which is understood to be an important analog for the prebiotic Earth atmosphere . They are also important for understanding the composition of Titan’s lakes and seas, which are likely to contain these larger hydrocarbons . Finally, as larger molecules like C ’s are thought to be able to serve as formation sites for building haze particles, constraining their abundances is important for understanding the process of haze formation at Titan and at Earth Ref: [1] J. H. Lacy, et al., PASP, 2002. [2] Y.L. Yung, et al., ApJS, 1984. [3] M. Dobrijevic, et al., Icarus, 2021. [4] P. G. J. Irwin et al., JQSRT, 2008. [5] K. Sung, et al., JQSRT, 2020. [6] B. L. Steffens, et al., PSJ, 2022. [7] Clarke & Ferris, Origins Life Evol. Biosphere, 1997. [8] D. Cordier, et al., ApJ, 2008. [9] D. B. Curtis, et al., JPCA, 2005.

Brendan Steffens↗

The spore coat is essential for Bacillus subtilis spore resistance to pulsed light, and pulsed light treatment eliminates some spore coat proteins

Microbial surface contamination of equipment or of food contact material is a recurring problem in the food industry. Spore-forming bacteria are far more resistant to a wide variety of treatments than their vegetative forms. Understanding the mechanisms underlying decontamination processes is needed to improve surface decontamination strategies against endospores potentially at the source of foodborne diseases or food-spoilage. Pulsed light (PL) with xenon lamps delivers high-energy short-time pulses of light with wavelengths in the range 200 nm-1100 nm and a high UV-C fraction. Bacillus subtilis spores were exposed to either PL or to continuous UV-C. Gel electrophoresis and western blotting revealed elimination of various proteins of the spore coat, an essential outer structure that protects spores from a wide variety of environmental conditions and inactivation treatments. Proteomic analysis confirmed the elimination of some spore coat proteins after PL treatment. Transmission electron microscopy of PL treated spores revealed a gap between the lamellar inner spore coat and the outer spore coat. Overall, spores of mutant strains with defects in genes coding for spore coat proteins were more sensitive to PL than to continuous UV-C. This study demonstrates that radiations delivered by PL contribute to specific damage to the spore coat, and overall to spore inactivation. Keywords Decontamination, UV, proteins, proteomics, microscopy Journal Pre-proof

59 BASIC BIOLOGICAL SCIENCES↗

Model-Based Diagnostics and Mitigation of Cyber Threats

The report summarizes key tasks performed to develop a toolkit for detecting cyber-attack events in instrumentation and control (I&C) systems of nuclear power plants. The toolkit connects the state-of-the-art GPWR Simulator with the RELAP5 code providing best-estimate nuclear steam supply system (NSSS) analyses, via the application programming interface (API), and allows users to introduce potential cyber-attack scenarios into power plant operational simulation. This summary for the project reflects topical reports submitted during the project as well as a journal paper published in 2022. The focus areas of the summary include: (1) modeling I&C systems for the AP1000 Generation III+ nuclear plant and GPWR simulator, (2) simulation and monitoring of plant response to cyber-attack events, (3) API structure for the toolkit interfacing the GPWR simulator and RELAP5 code, and (4) restructuring of the three-loop NSSS software of GPWR to model the two-loop AP1000 structure. Discussed in some details are (a) the attack tree analysis assessing the susceptibility of the AP1000 I&C system, resulting in reactor trips, in terms of the attack possibility and component sensitivity and (b) realistic estimation of the time to steam generator trip due to cyber-intrusions in the GPWR Simulator. Finally, sample demonstrations of the cyber-security tool kit, in the form of the GPWR-RELAP5 API, are summarized.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

On the numerical simulation of spatial disturbances in blunt-nose flat plate flow

The feasibility of the simulation of the evolution of spatially amplified disturbances in realistic airfoil flows using a standard Navier-Stokes airfoil code is considered for a blunt-nose flat plate flow. A basic stationary flow and its linear-stability-theory characteristics are analyzed. A computational C-grid is generated using an algebraic grid-generation technique. It is concluded that further improvements to the computational grid and to the code are necessary to make the proposed simulations economical.

Laurien, Eckart↗

Transition in Turbine Flows

We have further developed our capabilities to analyze transition in turbine boundary layers from first principles by integrating the nonlinear parabolized stability equations (PSE) with improved initial and boundary conditions. With modified iteration schemes, we are able to proceed deeper into the transition region where skin friction coefficient and heat transfer coefficient significantly increase. Initial and boundary conditions at elevated turbulence levels can be derived by receptivity analysis. Test runs for ERCOFTAC test case T3A at 2.4\% turbulence level provide results in good agreement with the experimental data. The sharper minimum of the skin coefficient also shown by DNS results is likely due to the missing intermittency. The method has been applied to various experimentally studied turbine blades (UTRC, VKI, Zierke, Langston, Hippensteele, and others). The PSE results, though physically reasonable, do not agree as well as expected with the experimental findings. We have, therefore, performed an extensive search for the reasons of the seemingly systematic deviations. A first source of uncertainty has been found in the often insufficient documentation of the experiments (e.g. on blockage by end-wall boundary layers). However, variation of the relevant parameters does not lead to more satisfactory agreement. A second reason has been found in the "standard procedure" which considers a 2D flow at midspan and uses a panel code and subsequent boundary-layer code to obtain the laminar basic flow for the transition analysis. Comparison with the pressure distribution obtained with a 3D design code (RVC3D) shows significant three-dimensionality of the flow (e.g. in the UTRC experiments). The spanwise variation has been neglected in our original PSE code. To overcome this problem, we have developed the PSE/3D for fully 3D boundary layers to account for streamwise and spanwise variations. Since the design code does not provide the boundary-layer flow with sufficient resolution, we have generated the Euler solution and employed a 3D boundary-layer code to obtain the viscous basic flow. Although only the linear stability level of PSE/3D has been implemented so far, the discrepancies with the experiments change but do not disappear. We still find deviations between the computed and experimental variations of C(sub f), and St along the blade for laminar flow. The main reason can be seen by comparing the solution of the boundary-layer code with the viscous results of the design code. The conventional boundary-layer solution exhibits an asymptotic behavior appropriate in external aerodynamics but does not match the steep gradients of the inviscid flow through the passage and consequently provides biased results for C(sub f), and St. An attempt is currently being made to correct this deficiency. Before attempting to perform the transition analysis for the viscous flow provided by the design code, we have analyzed the implementation and "best possible" results. Code and results exhibit flaws that may negatively affect the design and are intolerable for transition analysis. Therefore, we have decided to develop a new code to obtain a reliable basis for stability and transition studies. We expect to report improved results by the time of the meeting.

Herbert, Thorwald↗

Code-to-code-to-experiment validation of LES-ALM wind farm simulators

The aim of this work is to present a detailed code-to-code comparison of two Large-Eddy Simulation (LES) solvers. Corresponding experimental measurements are used as a reference to validate the quality of the CFD simulations. The comparison highlights the effects of solver order on the solutions, and it tries to answer the question of whether a high order solver is necessary to capture the main characteristics of a wind farm. Both solvers were used on different grids to study their convergence behavior. While both solvers show a good match with experimental measurements, it appears that the low order solver is more accurate and substantially cheaper in terms of computational cost.

17 WIND ENERGY↗

Using program visualization to enhance maintainability and promote reuse

Our intuition is that comprehension of visual representations is often quicker than of equivalent text. In the work described in this paper, we explore the application of this intuition to programming languages. The goal of this project is to create visual representation of segments of computer programs that improve the maintenance and reusability of this code. We describe a software tool, a program browser, that provides a visual representation of the function call graph of any C program. This tool is the first in a series of tools that aids program comprehension, making reuse of existing programs more likely. The development of the program browser is itself an example of code reuse as described in the section on implementation. Although our intuition is that some visual display of programs aid understandability, we are looking for experimental verification. Several human factors experiments in this area have contradicted this intuition. We describe reasons for these contradictions, and potential solutions to overcome them.

Ames, Chuck↗

Indoor air quality in new and renovated low-income apartments with mechanical ventilation and natural gas cooking in California

This work presents pollutant concentrations and performance data for code-required mechanical ventilation equipment in 23 low-income apartments at 4 properties constructed or renovated 2013-2017. All apartments had natural gas cooking burners. Occupants pledged to not use windows for ventilation during the study but several did. Measured airflows of range hoods and bathroom exhaust fans were lower than product specifications. Only eight apartments operationally met all ventilation code requirements. Pollutants measured over one week in each apartment included time-resolved fine particulate matter (PM 2.5 ), nitrogen dioxide (NO 2 ), formaldehyde and carbon dioxide (CO 2 ) and time-integrated formaldehyde, NO 2 and nitrogen oxides (NO X ). Compared to a recent study of California houses with code-compliant ventilation, apartments were smaller, had fewer occupants, higher densities, and higher mechanical ventilation rates. Mean PM 2.5 , formaldehyde, NO 2 , and CO 2 were 7.7 µg/m 3 , 14.1 ppb, 18.8 ppb, and 741 ppm in apartments; these are 4% lower, 25% lower, 165% higher, and 18% higher compared to houses with similar cooking frequency. Four apartments had weekly PM 2.5 above the California annual outdoor standard of 12 µg/m 3 and also discrete days above the World Health Organization 24-h guideline of 25 µg/m 3 . Two apartments had weekly NO 2 above the California annual outdoor standard of 30 ppb.

32 ENERGY CONSERVATION, CONSUMPTION, AND UTILIZATI↗

MechElastic: A Python library for analysis of mechanical and elastic properties of bulk and 2D materials

We report the MechElastic Python package evaluates the mechanical and elastic properties of bulk and 2D materials using the elastic coefficient matrix ( C ij ) obtained from any ab-initio density-functional theory (DFT) code. The current version of this package reads the output of VASP, ABINIT, and Quantum Espresso codes (but it can be easily generalized to any other DFT code) and performs the appropriate post-processing of elastic constants as per the requirement of the user. This program can also detect the input structure's crystal symmetry and test the mechanical stability of all crystal classes using the Born-Huang criteria. Various useful material-specific properties such as elastic moduli, longitudinal and transverse elastic wave velocities, Debye temperature, elastic anisotropy, 2D layer modulus, hardness, Pugh's ratio, Cauchy's pressure, Kleinman's parameter, and Lame's coefficients, can be estimated using this program. Another existing feature of this program is to employ the ELATE package (2016) [29] and plot the spatial variation of several elastic properties such as Poisson's ratio, linear compressibility, shear modulus, and Young's modulus in three dimensions. Further, the MechElastic package can plot the equation of state (EOS) curves for energy and pressure for a variety of EOS models such as Murnaghan, Birch, Birch-Murnaghan, and Vinet, by reading the inputted energy/pressure versus volume data obtained via numerical calculations or experiments. This package is particularly useful for the high-throughput analysis of elastic and mechanical properties of materials.

2D materials↗

ifbeam

This is a C++ library for acessing the beams database REST api at Fermilab. Example client code is in the demos directory.

Garren, Lynn [Fermi National Accelerator Laborator↗

Assessment of Existing Transportation Packages for Use with HALEU

Commercial light water reactor operators and fuel vendors in the United States are pursuing changes to fuel that include increased 235 U enrichment. Economic studies generally anticipate maximum near-term fuel assembly designs with up to 8 wt.% 235 U. Many next-generation nuclear reactor designs require high-assay low-enriched uranium (HALEU) (19.75 wt.% > 235 U > 5 wt.%) fuel. One necessary element for the commercial-scale use of HALEU is the ability to safely transport large quantities of enriched fuel material in multiple forms. However, there is uncertainty as to whether subcriticality requirements can be satisfied with existing package designs and whether existing critical benchmark experiment data are sufficient to support criticality safety code validation for HALEU transportation applications. This study assesses the potential to use currently licensed transportation packages for the transportation of increased enrichment unirradiated U fuel forms. The assessment uses selected package designs that represent the five categories of fuel form-boiling water reactor pins and assemblies, pressurized water reactor pins and assemblies, UF 6 , U-metal and tristructural isotropic (TRISO) particles, and UO 2 pellets or powder-and focuses on demonstrating subcriticality and identifying benchmark critical experiments appropriate for use in criticality computer code validation. Key quantities of interest that relate to subcriticality are limiting conditions (e.g., optimum moderation), package or package array k eff , package capacity, and package transportation array size. The SCALE TSUNAMI-3D and TSUNAMI Indices and Parameters codes are used for sensitivity and uncertainty calculations and for identification of candidate critical benchmark experiments for code validation. The primary metric for identifying candidate benchmarks is the similarity coefficient, c k . For each fuel form category, a representative package is evaluated. Results provided for each package evaluation include enrichment and packaging limits (e.g., maximum transportation array size as a function of enrichment) and benchmark critical experiment similarity coefficients. Results indicate that there are viable means for increasing enrichments into the HALEU range across the spectrum of fuel forms with differing increase amounts available for different packages. Sources of subcriticality margin to offset increased enrichment reactivity include reduced transportation array size, reduced fissile mass, burnable absorber credit, and safety analysis margin harvesting. For all packages except the DN-30, numerous critical benchmark experiment candidates for validation were identified.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Continued development and correlation of analytically based weight estimation codes for wings and fuselages

The implementation of the changes to the program for Wing Aeroelastic Design and the development of a program to estimate aircraft fuselage weights are described. The equations to implement the modified planform description, the stiffened panel skin representation, the trim loads calculation, and the flutter constraint approximation are presented. A comparison of the wing model with the actual F-5A weight material distributions and loads is given. The equations and program techniques used for the estimation of aircraft fuselage weights are described. These equations were incorporated as a computer code. The weight predictions of this program are compared with data from the C-141.

Mullen, J., Jr.↗

Charon Message-Passing Toolkit for Scientific Computations

Charon is a library, callable from C and Fortran, that aids the conversion of structured-grid legacy codes-such as those used in the numerical computation of fluid flows-into parallel, high- performance codes. Key are functions that define distributed arrays, that map between distributed and non-distributed arrays, and that allow easy specification of common communications on structured grids. The library is based on the widely accepted MPI message passing standard. We present an overview of the functionality of Charon, and some representative results.

VanderWijngaart, Rob F.↗

The NASA Auralization Framework and Plugin Architecture

NASA has a long history of investigating human response to aircraft flyover noise and in recent years has developed a capability to fully auralize the noise of aircraft during their design. This capability is particularly useful for unconventional designs with noise signatures significantly different from the current fleet. To that end, a flexible software architecture has been developed to facilitate rapid integration of new simulation techniques for noise source synthesis and propagation, and to foster collaboration amongst researchers through a common releasable code base. The NASA Auralization Framework (NAF) is a skeletal framework written in C++ with basic functionalities and a plugin architecture that allows users to mix and match NAF capabilities with their own methods through the development and use of dynamically linked libraries. This paper presents the NAF software architecture and discusses several advanced auralization techniques that have been implemented as plugins to the framework.

Aumann, Aric R.↗

NetCDFFile v.1.0

SAND2024-02969O The NetCDFFile provides a generic interface to NetCDF and/or PnetCDF library calls, allowing the user to write generic code to read and write from NetCDF files. The NetCDFFile library requires a C++20 compliant compiler as well as NetCDF and PnetCDF libraries installed on the machine. 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.

Preston, Leiph↗

Investigation of secondary γ -ray angular distributions using the N 15 ( p , α 1 γ ) C * 12 reaction

The observation of secondary γ-rays provides an alternative method of measuring cross sections that populate excited final states in nuclear reactions. The angular distributions of these γ-rays also provide information on the underlying reaction mechanism. Despite a large amount of data of this type in the literature, publicly available R-matrix codes do not have the ability to calculate these types of angular distributions. In this report, the mathematical formalism derived in Brune and deBoer is implemented in the R-matrix code AZURE2 and calculations are compared with previous data from the literature for the 15 N( p, α1γ ) 12 C* reaction. In addition, new measurements, made at the University of Notre Dame Nuclear Science Laboratory using the Hybrid Array of Gamma Ray Detectors (HAGRiD), are reported that span an energy range from E p = 0.88 to 4.0 MeV. Excellent agreement between data and the phenomenological fit is obtained up to the limit of the previous fit at E p = 2.0 MeV and the R-matrix fit is extended from E x ≈ 13.5 up to E x ≈ 15.3 MeV, where 15 N+p and 12 C+α reactions are fit simultaneously for the first time. An excellent reproduction of the 15 N( p, α1γ ) 12 C* and 12 C(α, α) 12 C data is achieved, but inconsistencies and difficulty in fitting other data is encountered and discussed.

6 ≤ A ≤ 19↗

Experimental study and improved modeling of high-temperature air radiation

Spectral emission measurements were conducted in an atmospheric pressure air plasma. The thermodynamic state of the plasma was determined to be close to local thermodynamic equilibrium (LTE), and the temperature profile was measured. The spectrum emitted by the plasma over the range 2,000 to 8,000 A was recorded and calibrated. This spectrum comprises the major radiating molecular bands and atomic lines in air, and is therefore proposed as a benchmark to test radiative calculations. A comparison of these results with the predictions of the NEQAIR code induced several modeling improvements in the code. In particular, radiative transition probabilities and spectroscopic constants were updated, and additional band systems of NO (NO Delta, Epsilon, Beta prime and Gamma prime) were included. Since the C state from which the NO Delta transition originates is predissociated, a simplified collision-predissociation model for this state was added to the code. These changes are presented, and their effect discussed.

Laux, Christophe O.↗

FUN-BioCROP model with litter decomposition parameters derived from the LIDET dataset

This repository contains the code and data necessary to run the FUN-BioCROP (Fixation and Uptake of Nitrogen-Bioenergy Carbon, Rhizosphere, Organisms, and Protection) model with litter decomposition parameters derived from a modified Monte Carlo simulation that used the Long-term Intersite Decomposition Experiment Team dataset. Related publication:Juice, S.M., Ridgeway, J.R., Hartman, M.D., Parton, W.J., Berardi, D.M., Sulman, B.N., Allen, K.E., & Brzostek, E.R. Reparameterizing litter decomposition using a simplified Monte Carlo method improves litter decay simulated by a microbial model and alters bioenergy soil carbon estimates. Description of Files: FUNBioCROP_LIDET Study.Rmd R code with FUN-BioCROP model that can be run with 10 different sets of parameters for litter decomposition (Baseline, LIDET, or eight other best parameter sets identified in the modified Monte Carlo simulation. CORPSE Functions_Bioenergy_V2.R Code with CORPSE model functions, called by FUNBioCROP_LIDET Study.Rmd Model Input Data: bulk.csv, bulk_till.csv, rhizo.csv, rhizo_till.csv, litter.csv Initial C and N (kg C or N/m2) pool values for each soil compartment, final values from spin up. All five files have the same columns: (Column - Description - Units) uFastC - Unprotected fast decomposing carbon - kg carbon/m2 uSlowC - Unprotected slow decomposing carbon - kg carbon/m2 uNecroC - Unprotected necromass carbon - kg carbon/m2 pFastC - Protected fast decomposing carbon - kg carbon/m2 pSlowC - Protected slow decomposing carbon - kg carbon/m2 pNecroC - Protected necromass carbon - kg carbon/m2 livingMicrobeC - Carbon in living microbial biomass - kg carbon/m2 uFastN - Unprotected fast decomposing nitrogen - kg nitrogen/m2 uSlowN - Unprotected slow decomposing nitrogen - kg nitrogen/m2 uNecroN - Unprotected necromass nitrogen - kg nitrogen/m2 pFastN - Protected fast decomposing nitrogen - kg nitrogen/m2 pSlowN - Protected slow decomposing nitrogen - kg nitrogen/m2 pNecroN - Protected necromass nitrogen - kg nitrogen/m2 inorganicN - Inorganic nitrogen - kg nitrogen/m2 CO2 - Carbon in carbon dioxide - kg carbon/m2 livingMicrobeN - Nitrogen in living microbial biomass - kg nitrogen/m2 Model Input Data: FluxTower_AvgSoilT.csv: Average daily soil temperature (oC) at 10 cm depth at University of Illinois Urbana-Champaign (UIUC) Energy Farm flux tower from 7/2008-3/2016. (One year of averaged data) Model Input Data: FluxTower_AvgSoilVWC.csv: Average daily soil volumetric water content (VWC) at 10 cm depth at UIUC Energy Farm flux tower from 7/2008-3/2016. (One year of averaged data) Model Input Data: input_CCS_LIDET Study.csv: This file has daily data to run FUN-BioCROP (Column - Description - Units): yr - calendar year - year doy - day of year (1 to 365) (no leap year) - day anpp - aboveground NPP (DayCent) - kg C/m2/day bnpp - belowground NPP (DayCent) - kg C/m2/day aglivc - live aboveground biomass carbon (DayCent) - kg C/m2 bglivcj - live juvenile fine root biomass carbon (DayCent) - kg C/m2 bglivcm - live mature fine root biomass carbon (DayCent) - kg C/m2 aglivn - live aboveground biomass nitrogen (DayCent) - kg N/m2 bglivnj - live juvenile fine root biomass nitrogen (DayCent) - kg N/m2 bglivnm - live mature fine root biomass nitrogen (DayCent) - kg N/m2 nyr - simulation year - year cult - indicates a cultivation event (0 or 1) crop - indicates a new crop (0 or 1) fert - indicates a fertilizer event (0 or 1) frst - indicates the first day of the growing season (0 or 1) harv - indicates a harvest event (0 or 1) last - indicates the end of the growing season (0 or 1) croptype - crop type (0=none; 1=alfalfa; 2=corn; 3=grass clover pasture; 4=soybean; 5=wheat) cropsrl - crop specific root length - mm/g root cultrhizmix - fraction of rhizosphere mixed with bulk soil during cultivation (0.0-1.0) - fraction cultlitmix - fraction of litter mixed with bulk soil during cultivation (0.0-1.0) - fraction harvremov - fraction of above ground biomass removed during harvest (0.0-1.0) - fraction fertamt - fertilization amount - g N/m2 lifehist - plant life history (0 = annual, 1 = perennial) froot_turnover_c - amount of C in fine root turnover - kg C/m2 froot_turnover_n - amount of N in fine root turnover - kg N/m2 agrd_turnover_c - amount of C in aboveground biomass turnover - kg C/m2 agrd_turnover_n - amount of N in aboveground biomass turnover - kg N/m2 leaf_litter_fastfrac - Fast decomposing fraction of leaf litter (0.0-1.0) - fraction root_litter_fastfrac - Fast decomposing fraction of root litter (0.0-1.0) - fraction root_diameter - root diameter - mm root_length - root length - mm root/m2 rhizo_frac - fraction of total soil volume that is rhizosphere (0.0 - 1.0) - fraction date - date in format YYYY-MM-DD Instructions: Save the model code ("FUN-BioCROP_LIDET Study.Rmd") and accompanything files (data streams and CORPSE function code) in the same folder. In model code "Chunk 3: Load CORPSE Data Streams" set the working directory (setwd) to the folder with the files saved in step #1. In "Chunk 5: Define LIDET parameter sets" select the litter decomposition parameter set to be used in the run, and comment out all other sets. If changing any parameter values, edit them in "Chunk 6: Load parameters." Run all chunks up to and including "Chunk 10: Prepare Data for Export." In "Chunk 11: Export Output Data" edit data frames for export and filenames, as necessary. "Chunk 12: Graph Total Soil C" makes a figure of C remaining over the model run period. Description of each model chunk (in file FUN-BioCROP_LIDET Study.Rmd): Chunk 1: Remove all functions, clear memory. Removes all functions from R environment, clears the memory. Chunk 2: Load Packages. Loads packages necessary to run the code. Chunk 3: Load CORPSE Data Streams. Sets the working directory and loads the data files necessary to run CORPSE. Chunk 4: Load CORPSE Functions. Loads the R script with CORPSE functions from the working directory, "CORPSE Functions_Bioenergy_V2.R". Chunk 5: Define LIDET parameter sets. Has ten different parameter sets for litter decomposition tested in this study: Baseline parameters, LIDET parameters, and the other 8 best performing parameter sets identified in the modified Monte Carlo. To run the model, all but one parameter set must be commented out. Chunk 6: Load Parameters. Loads all fixed parameters to run the model. Data frame with definitions of parameters is in the CORPSE function script "CORPSE Functions_Bioenergy_V2.R" Chunk 7: Prepare Data Streams. Takes data streams loaded in Chunk 3 and puts them in the format necessary to run the model. The model is coded to run at least two sites at a time, so if only one site is being run it must be run in duplicate. Individual data tables of daily values are created in this chunk from the input data file. Chunk 8: Set Initial Conditions. Creates data tables of soil C and N pools for each soil compartment (rhizo_till, rhizo, bulk_till, bulk, litter) and loads initial values into the data tables. Creates lists for each soil compartment to hold model output. Chunk 9: Load FUN Data and Set Up Matrices. Uses DayCent data to calculate FUN input data: root and leaf N demand, total N demand, plant CN, leaf N available for retranslocation, and litter production. Creates matrices for FUN model outputs. Chunk 10: Run Model. Runs the model. Chunk 11: Prepare Data for Export. Combines data from each day saved as lists into data frames for each soil compartment. Adds values from all soil compartments together to calculate total soil values, creates separate data frames for each soil C and N pool (e.g., protected slow C) for the total soil value. Adds different C and N pools together to calculate total soil C and N for all layers. Creates data frame of ratio of protected to unprotected SOC. Organizes FUN data for export. Chunk 12: Export Results. Exports CSV files of model results to the working directory. Chunk 13: Graph Total Soil C. Makes figure of C remaining over time. Related Links: Original FUN-BioCROP model: https://github.com/BrzostekEcologyLab/FUN-BioCROP LIDET dataset: https://andlter.forestry.oregonstate.edu/data/abstract.aspx?dbcode=TD023

Juice, Stephanie↗