Code for “Mapping the Global Flow of Fiber-Reinforced Polymer Composites and Supply Chain Energy Requirements”

(University of Michigan) We implemented Bayesian inference (BI)-based material flow analysis (MFA) on the global fiber reinforced polymer composite supply chain to quantify the material and energy efficiency of the supply chain. The code contains necessary functions to generate a BI-based MFA model structure and run posterior sampling using a Markov Chain Monte Carlo (MCMC) algorithm (No-U-Turn (NUTs)). The results (posteriors) of the sampling are used to guide our understanding of material flows and energy requirements in any MFA network defined with quantified uncertainties for guiding future data collection and risk-informed decision-making. Users of the code will be able to construct the MFA structure by specifying node-node connections (processes) in the first place, and specifying prior distributions of the MFA model’s external inputs (uniform distributions by default, more details of definitions can be found in the manuscript) and transfer coefficients (flat Dirichlet Distributions). Following prior definition, the users can input data records with built in functions to implement any data records necessary and the pedigree matrix quality scores of the respective data records, after which the code will use the scores automatically calculate the data uncertainties (coefficient of variation for (truncated) normal distributions and uncertainty factors of lognormal distributions, methodology originally developed by Laner et al. (2016)). After the above data import steps, the users can run the statistical sampling and optionally save the sampling result raw data (trace) to .p and .csv files. The last section of the code also contains functions to automatically summarize the trace files and save as a .csv file by calculating the mean and standard deviation of each model parameters defined. This code is built on the BI-based MFA frameworks by Lupton and Allwood (2017) and Dong et al. (2023). The users of the code may find it helpful to refer to Lupton and Allwood (2017) and Dong et al. (2023) regarding understanding our framework. References: Laner, David, et al. “A novel approach to characterize data uncertainty in material flow analysis and its application to plastics flows in Austria.” Journal of industrial ecology 20.5 (2016): 1050-1063. Lupton, R. C.; Allwood, J. M. Incremental material flow analysis with Bayesian infer- ence. Journal of Industrial Ecology 2018, 22, 1352–1364. Dong, J.; Liao, J.; Huan, X.; Cooper, D. Expert elicitation and data noise learning for material flow analysis using Bayesian inference. Journal of Industrial Ecology 2023, 27, 1105–1122.