A Pilot Framework for Modern Reactor System Analysis Codes Haihua Zhao Idaho National Laboratory 2011 International RELAP5 User's.

Slides:



Advertisements
Similar presentations
Steady-state heat conduction on triangulated planar domain May, 2002
Advertisements

Fluent Overview Ahmadi/Nazridoust ME 437/537/637.
Outline Overview of Pipe Flow CFD Process ANSYS Workbench
Programming Paradigms and languages
EULER Code for Helicopter Rotors EROS - European Rotorcraft Software Romuald Morvant March 2001.
By Paul Delgado. Motivation Flow-Deformation Equations Discretization Operator Splitting Multiphysics Coupling Fixed State Splitting Other Splitting Conclusions.
Trellis: A Framework for Adaptive Numerical Analysis Based on Multiparadigm Programming in C++ Jean-Francois Remacle, Ottmar Klaas and Mark Shephard Scientific.
Parallel Computation of the 2D Laminar Axisymmetric Coflow Nonpremixed Flames Qingan Andy Zhang PhD Candidate Department of Mechanical and Industrial Engineering.
Generalization of Heterogeneous Multiscale Models: Coupling discrete microscale and continuous macroscale representations of physical laws in porous media.
TransAT – OLGA Coupling
1 Approved for unlimited release as SAND C Verification Practices for Code Development Teams Greg Weirs Computational Shock and Multiphysics.
A NEW ORIGINAL UNCODITIONALY STABLE MIXED FINITE ELEMENT APPROACH IN TRANSIENT HEAT ANALYSIS WITHOUT DIMENSIONAL REDUCTION Dubravka Mijuca, Bojan Medjo.
Coupled Fluid-Structural Solver CFD incompressible flow solver has been coupled with a FEA code to analyze dynamic fluid-structure coupling phenomena CFD.
Thermo-fluid Analysis of Helium cooling solutions for the HCCB TBM Presented By: Manmeet Narula Alice Ying, Manmeet Narula, Ryan Hunt and M. Abdou ITER.
Landscape Erosion Kirsten Meeker
Network and Grid Computing –Modeling, Algorithms, and Software Mo Mu Joint work with Xiao Hong Zhu, Falcon Siu.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 3 Programming and Software.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
A TWO-FLUID NUMERICAL MODEL OF THE LIMPET OWC CG Mingham, L Qian, DM Causon and DM Ingram Centre for Mathematical Modelling and Flow Analysis Manchester.
CHAPTER 8 APPROXIMATE SOLUTIONS THE INTEGRAL METHOD
Page - 1 Rocketdyne Propulsion & Power Role of EASY5 in Integrated Product Development Frank Gombos Boeing Canoga Park, CA.
1 CFD Analysis Process. 2 1.Formulate the Flow Problem 2.Model the Geometry 3.Model the Flow (Computational) Domain 4.Generate the Grid 5.Specify the.
Fabrice Laturelle, Snecma Moteurs
Tutorial 5: Numerical methods - buildings Q1. Identify three principal differences between a response function method and a numerical method when both.
Chapter 2 The process Process, Methods, and Tools
Processing of a CAD/CAE Jobs in grid environment using Elmer Electronics Group, Physics Department, Faculty of Science, Ain Shams University, Mohamed Hussein.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Report on Sensitivity Analysis Radu Serban Keith Grant, Alan Hindmarsh, Steven Lee, Carol Woodward Center for Applied Scientific Computing, LLNL Work performed.
A Framework for Distributed Model Predictive Control
Page 1 Trilinos Software Engineering Technologies and Integration Numerical Algorithm Interoperability and Vertical Integration –Abstract Numerical Algorithms.
IPE 2003 Tuscaloosa, Alabama1 An Inverse BEM/GA Approach to Determining Heat Transfer Coefficient Distributions Within Film Cooling Holes/Slots Mahmood.
In-term project presentation by Kanish Jindal Modeling of chlorine contact chamber at West Lafayette treatment plant.
Brookhaven Science Associates U.S. Department of Energy MUTAC Review April , 2004, LBNL Target Simulation Roman Samulyak, in collaboration with.
International Centre for Theoretical Physics (ICTP)
Discontinuous Galerkin Methods and Strand Mesh Generation
Efficient Integration of Large Stiff Systems of ODEs Using Exponential Integrators M. Tokman, M. Tokman, University of California, Merced 2 hrs 1.5 hrs.
Component-Based Implementation of STOMP Yilin Fang Bruce Palmer Pacific Northwest National Laboratory Silver Spring, July 2007.
Strategies for Solving Large-Scale Optimization Problems Judith Hill Sandia National Laboratories October 23, 2007 Modeling and High-Performance Computing.
Discontinuous Galerkin Methods for Solving Euler Equations Andrey Andreyev Advisor: James Baeder Mid.
A System Analysis Code to Support Risk-Informed Safety Margin Characterization: Rationale, Computational Platform and Development Plan Nam Dinh, Vince.
Developing An Educational Rigid Body Dynamics Physics Engine By Neal Milstein.
An Adaptive-Stochastic Boussinesq Solver With Safety Critical Applications In Nuclear Reactor Engineering Andrew Hagues PhD Student – KNOO Work Package.
CFD Refinement By: Brian Cowley. Overview 1.Background on CFD 2.How it works 3.CFD research group on campus for which problem exists o Our current techniques.
Modeling and simulation of cryogenic processes using EcosimPro
1 1 What does Performance Across the Software Stack mean?  High level view: Providing performance for physics simulations meaningful to applications 
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Parallel Solution of the Poisson Problem Using MPI
Domain Decomposition in High-Level Parallelizaton of PDE codes Xing Cai University of Oslo.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Process Asad Ur Rehman Chief Technology Officer Feditec Enterprise.
Transient multiphase flow modelling
Brookhaven Science Associates U.S. Department of Energy MUTAC Review April , 2004, BNL Target Simulations Roman Samulyak in collaboration with Y.
School of Aerospace Engineering MITE Numerical Simulation of Centrifugal Compressor Stall and Surge Saeid NiaziAlex SteinLakshmi N. Sankar School of Aerospace.
Adaptive grid refinement. Adaptivity in Diffpack Error estimatorError estimator Adaptive refinementAdaptive refinement A hierarchy of unstructured gridsA.
ERT 216 HEAT & MASS TRANSFER Sem 2/ Dr Akmal Hadi Ma’ Radzi School of Bioprocess Engineering University Malaysia Perlis.
Nonlinear balanced model residualization via neural networks Juergen Hahn.
Computational Fluid Dynamics Lecture II Numerical Methods and Criteria for CFD Dr. Ugur GUVEN Professor of Aerospace Engineering.
Xing Cai University of Oslo
Specificity of Closure Laws and UQ
Objectives of the Presentation
Fluent Overview Ahmadi/Nazridoust ME 437/537/637.
Meros: Software for Block Preconditioning the Navier-Stokes Equations
HPC Modeling of the Power Grid
Deflated Conjugate Gradient Method
Trilinos Software Engineering Technologies and Integration
GENERAL VIEW OF KRATOS MULTIPHYSICS
Ph.D. Thesis Numerical Solution of PDEs and Their Object-oriented Parallel Implementations Xing Cai October 26, 1998.
CASA Day 9 May, 2006.
Presentation transcript:

A Pilot Framework for Modern Reactor System Analysis Codes Haihua Zhao Idaho National Laboratory International RELAP5 User's Group Seminar and Meeting July 25-28, 2011 Salt Lake City, Utah

Major Contributors Vincent Mousseau (original PI, now at Sandia) Glen Hansen (original software architect, now at Sandia) George Griffith (strategy) Paul Bayless ( user requirement, validation and test) Scott Lucas (neutronics models) Bob Martin ( consulting, now at B&W) Ling Zou ( heat conduction models, CFD)

Outline Motivations and goals RELAP5 capabilities to inherit and extend Overview of software design Examples Path forwards Conclusions

Motivations The workforce to support RELAP5 is aging; therefore the knowledge to maintain, improve, and run the code is deteriorating. R7, supported by LWRS and LDRD, is a research project with the long term goal of creating and implementing RISMC. There is a need for a modern software framework (R6), with early/middle career engineers to support it, that captures the RELAP5 capability and preserves its knowledge base. This project will focus on quickly capturing RELAP5 capability while providing a quality production software framework to implement the research of R7.

Goals Modern software engineering that enables an easy and scalable development environment. Using modern numerical methods that utilize the horse power of modern computers and decades of research on solution methods. Providing a bridge between High Performance Computing and the nuclear reactor thermal hydraulics. Providing the foundation for future reactor safety production code development.

RELAP5 Capabilities to Inherit Breadth of capabilities - it is easy to do one of the many things RELAP5 does better; it is this breadth of capabilities that makes it one of the most used system codes for reactor safety world wide. Extensive knowledge based on 2 billions dollars of experimental research, such as closure laws for single phase and two-phase flow, flow regimes models, special process models, and physical properties for fluids and solids. Six equation two phase flow model, staggered grid, finite volume “like” discretization. Others...

RELAP5 Capabilities to Extend Modern software structure based on Object Oriented Programming paradigm: –easy to develop, maintain, and improve, scalable –easy to couple with other modern codes Modern numerical methods based on parallel nonlinear solvers: –implicit vs. semi implicit: long transient, mass error –tight coupling vs. loose coupling: multi-physics problems –parallel vs. serial Improved or extended physics models: –remove inconsistent models –add new higher dimensional models for large volumes

Overview of Software Design Solver and Input Processing Abstract component interface Concrete components EquationsParametersStencils Terms Based on Trilinos Interface between Trilinos and a component class More stable Component developers can reuse or write their own models EOSClosures The center goal is to form residual vector Different grid and spatial discretization methods can be mixed here

Trilinos as the Computational Engine for R6 Trilinos is a modern parallel, linear and nonlinear solver package developed at Sandia National Lab. Comparing to other popular solver packages, like PETSC from ANL and Sundials from LLNL, Trilinos is the newest one with full support of OOP. Open source. Large user base. Input processing capability. Additional capabilities like sensitivity analysis and uncertainty quantification.

Solver Technology: Jacobian-free Newton- Krylov nonlinear solver (JFNK) Time step loop (number of time steps or final time) –Nonlinear iteration (number of nonlinear iterations or nonlinear convergence criteria) Preconditioner initial guess Linear iteration (number of linear iterations or linear convergence criteria) –Preconditioner (RELAP5 solution) Choosing different nonlinear and linear iterations provides a variety of solvers that can be optimized to purpose (speed vs. accuracy)

Component Design Component contains a vector of state variables and functions to form and update residuals vector. Boundary information is passed between components through an interface function. No other component needs to know about your grid, spatial discretization, or residual equations. Coupling information through the JFNK solver. // Here is the base Component interface that all children must implement virtual void initialState(std::map ComponentMap, std::vector &initial) = 0; virtual void updateComponent(const double *soln, const double *oldsoln) = 0; virtual void evaluate(std::vector &rhs, const double *soln, const double *oldsoln) = 0; virtual Teuchos::RCP exchPtrIntFunc(std::string end, IntFunc *GlueInterfaceFunc) = 0; virtual void PrintSolution(int &cnt, std::ofstream &output) = 0; virtual const double getDx() = 0; virtual int ndofs() = 0; virtual const std::string getName() = 0;

Two Types of Template Components Assuming a staggered grid finite volume “like” discretization. Glue – components with momentum equations on the end. Phys – components with mass and energy equations on the end. This is a generalization of the RELAP5 pipe and single junction. Phys components connect to Glue components. Overall component hierarchy

Pipe Class Hierarchy PipeBase PipeT No of Eqs: 2 Mass, Mom PipeErgBase PipeErgT No of Eqs: 3 Mass, Mom, Erg WallPipeBase WallPipeT No of Eqs: 4 Mass, Mom, Erg, Solid conduction CorePipeT No of Eqs: 6 Mass, Mom, Erg, Solid conduction 2 Neuron Eq. SteamGenT No of Eqs: 7 2 sets of Mass, Mom, Erg, Solid conduction

Other Structures ComponentParams: check and store input parameters for each concrete component. Equations and Terms: equations are built from terms; grid independent. Stencils: process grid dependent information for the equation terms to use. EOS and Closure classes: –Fluid and solid material properties –Friction, wall and interface –Heat transfer, wall and interface –Mass transfer

Software working environment and quality control Whole open source working environment: –Linux system –Trilinos –SVN: version control and repository –lcov: line coverage testing (near 100% no unused software) –valgrind: memory leak detection –Zero cost to collaborators Export controlled or proprietary models employ the same interfaces as the open source part and can be easily managed. Regression tests: 15 and keep growing, 90% line coverage

One Example: A Simple Reactor Loop System TypATR input deck built by Paul Bayless. Snapshot of input deck

Steady State Temperature Distribution Along Control Volumes

Steady State Pressure Distribution Along Control Volumes

Path Forward Capture the existing RELAP5 capabilities step by step by adding models and functions for more transients of more types of reactors. –Start with ATR steady state –Add single-phase ATR transients –Add two-phase ATR transients –Add transients for other reactors –Address current problems in RELAP5 –Reduce uncertainty by new numeric methods and better physics

Path Forward Near term efforts (6 months): –Refining the framework, such as optimizing structures, enhancing input/out processing and adding other utilities. –Adding more components models and closure models. –Adding control system models. –Establishing collaboration with Sandia, which can contribute the development with their expertise in Trilinos and advanced numeric methods, such as parallel computing, preconditioning, uncertainty qualification and optimization.

Path Forward Midterm efforts (6 months to 2 years): –Adding a general 6-equation 2-phase flow model. –Adding water steam EOS and two phases closure models. –Adding multi-dimensional models for large volumes such as containment space. –Refining code structures. –Training users, V&V the code, and applying the code for selected transients. –Improving numerical methods.

Path Forward Long term efforts: –Based on the success of R6, developing a new production version of RELAP. –Testing new nearly matured methods and models with the R6 framework. –Combing R6 and matured R7 research into one system.

Conclusions This project aims at creating a new production software foundation that can grow and improve in the future, based on low risk matured new techniques in software engineering, advanced numerical methods and successfully validated physical models. This is different from those high risk projects working on new cutting-edge methods. The first goal is to capture the capabilities of current codes like RELAP5 and to encapsulate the knowledge to validate, improve, and run the existing codes (hold ground). The project also aims at providing a good framework to harvest low hanging fruits in the related research areas and allow efficiently testing new capabilities (grow).

Back-up

Component Makeup Initialization – load the components local time zero information into the state vector. Update – load the state vector into the components local variables. Boundaries – exchange boundary information with neighboring components. Evaluate – load the r.h.s. vector with the residuals evaluated with the updated state vector and boundary information.

Preconditioning Consistent Physics-Based Preconditioning The RELAP5 operator split (neutronics and thermal conduction) semi-implicit algorithm is the basis of the preconditioner. The preconditioner uses the same spatial discretization as the nonlinear residuals. Instead of linearizing about the last time level, the operator split and semi-implicit algorithms are linearized about the last nonlinear iteration. This provides a fully coupled, fully implicit version of RELAP5 by adding a nonlinear iteration.

Equations First partition into transient term and steady state term. The steady state equation can then be solved directly when needed (pseudo transient, continuation methods, dynamic time scale) This enables higher order in time methods. Two Steady State Equations

Equations Dimension0123 Momentum Eq. or fluxes per phase # inlets + #outlets 1 inlet 1 outlet 2 inlets 2 outlets 3 inlets 3 outlets These two equations generalize to 3-D and 2 phase. Spatial accuracy can be improved with more accurate fluxes and forces.

Mass Error Damp void fraction change to prevent over shoot and under shoot Implicit solution to remove 2 ∆t instabilities Nonlinear iteration removes mass error caused by linearization of the equation of state

Ill posed & phase appearance disappearance Mixture mass Mixture momentum Mixture energy Drive disappearing phase to saturation

Programming Paradigms Name of Programming Paradigm Descriptions Examples of Programming Language Supporting the paradigm Procedural Programming Decide which procedures you want; use the best algorithms you can find. FORTRAN in 50s, 60s C Modular Programming Decide which modules you want; partition the program so that data is hidden within modules FORTRAN 77, C, Pascal Data AbstractionDecide which types you want; provide a full set of operations for each type C++, JAVA, FORTRAN 90, 95, 2000 Class HierarchiesDecide which classes you want; provide a full set of operations for each class; make commonality explicit by using inheritance C++, JAVA, FORTRAN 90, 95, 2000 Generic Programming Decide which algorithms you want; parameterize them so that they work for a variety of suitable types and data structures C++