An Object-Oriented Software Framework for Building Parallel Navier-Stokes Solvers Xing Cai Hans Petter Langtangen Otto Munthe University of Oslo.

Slides:



Advertisements
Similar presentations
CFD II w/Dr. Farouk By: Travis Peyton7/18/2015 Modifications to the SIMPLE Method for Non-Orthogonal, Non-Staggered Grids in k- E Turbulence Flow Model.
Advertisements

A Discrete Adjoint-Based Approach for Optimization Problems on 3D Unstructured Meshes Dimitri J. Mavriplis Department of Mechanical Engineering University.
1 Using ANN to solve the Navier Stoke Equations Motivation: Solving the complete Navier Stokes equations using direct numerical simulation is computationally.
03/29/2006, City Univ1 Iterative Methods with Inexact Preconditioners and Applications to Saddle-point Systems & Electromagnetic Maxwell Systems Jun Zou.
MULTISCALE COMPUTATIONAL METHODS Achi Brandt The Weizmann Institute of Science UCLA
Geometric (Classical) MultiGrid. Hierarchy of graphs Apply grids in all scales: 2x2, 4x4, …, n 1/2 xn 1/2 Coarsening Interpolate and relax Solve the large.
Parallel Solution of Navier Stokes Equations Xing Cai Dept. of Informatics University of Oslo.
Ground-Water Flow and Solute Transport for the PHAST Simulator Ken Kipp and David Parkhurst.
Extending the capability of TOUGHREACT simulator using parallel computing Application to environmental problems.
An efficient parallel particle tracker For advection-diffusion simulations In heterogeneous porous media Euro-Par 2007 IRISA - Rennes August 2007.
Multilevel Incomplete Factorizations for Non-Linear FE problems in Geomechanics DMMMSA – University of Padova Department of Mathematical Methods and Models.
CS267 L12 Sources of Parallelism(3).1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 12: Sources of Parallelism and Locality (Part 3)
Landscape Erosion Kirsten Meeker
Network and Grid Computing –Modeling, Algorithms, and Software Mo Mu Joint work with Xiao Hong Zhu, Falcon Siu.
Cache-Optimal Parallel Solution of PDEs Ch. Zenger Informatik V, TU München Finite Element Solution of PDEs Christoph Zenger Nadine Dieminger, Frank Günther,
Direct and iterative sparse linear solvers applied to groundwater flow simulations Matrix Analysis and Applications October 2007.
Numerical methods for PDEs PDEs are mathematical models for –Physical Phenomena Heat transfer Wave motion.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
1 Parallel Simulations of Underground Flow in Porous and Fractured Media H. Mustapha 1,2, A. Beaudoin 1, J. Erhel 1 and J.R. De Dreuzy IRISA – INRIA.
Tools for Multi-Physics Simulation Hans Petter Langtangen Simula Research Laboratory Oslo, Norway Department of Informatics, University of Oslo.
Lecture Objectives Review SIMPLE CFD Algorithm SIMPLE Semi-Implicit Method for Pressure-Linked Equations Define Residual and Relaxation.
An approach for solving the Helmholtz Equation on heterogeneous platforms An approach for solving the Helmholtz Equation on heterogeneous platforms G.
Object-Oriented Implementation of Reconciliations M.Sc. Seminar Talk by Costa Shapiro under supervision of Prof. Shmuel Katz Computer Science – Technion.
S.S. Yang and J.K. Lee FEMLAB and its applications POSTEC H Plasma Application Modeling Lab. Oct. 25, 2005.
Scalable Multi-Stage Stochastic Programming
1 Using the PETSc Parallel Software library in Developing MPP Software for Calculating Exact Cumulative Reaction Probabilities for Large Systems (M. Minkoff.
Page 1 JASS 2004 Tobias Weinzierl Sophisticated construction ideas of ansatz- spaces How to construct Ritz-Galerkin ansatz-spaces for the Navier-Stokes.
CADD: Component-Averaged Domain Decomposition Dan Gordon Computer Science University of Haifa Rachel Gordon Aerospace Engg. Technion January 13,
PDE2D, A General-Purpose PDE Solver Granville Sewell Mathematics Dept. University of Texas El Paso.
ParCFD Parallel computation of pollutant dispersion in industrial sites Julien Montagnier Marc Buffat David Guibert.
CFD Lab - Department of Engineering - University of Liverpool Ken Badcock & Mark Woodgate Department of Engineering University of Liverpool Liverpool L69.
Lecture Objectives: Explicit vs. Implicit Residual, Stability, Relaxation Simple algorithm.
The swiss-carpet preconditioner: a simple parallel preconditioner of Dirichlet-Neumann type A. Quarteroni (Lausanne and Milan) M. Sala (Lausanne) A. Valli.
Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Danny Dunlavy, Andy Salinger Sandia National Laboratories Albuquerque, New Mexico, USA SIAM Parallel Processing February 23, 2006 SAND C Sandia.
1 1 What does Performance Across the Software Stack mean?  High level view: Providing performance for physics simulations meaningful to applications 
A Software Strategy for Simple Parallelization of Sequential PDE Solvers Hans Petter Langtangen Xing Cai Dept. of Informatics University of Oslo.
Lecture Objectives Review Define Residual and Relaxation SIMPLE CFD Algorithm SIMPLE Semi-Implicit Method for Pressure-Linked Equations.
Parallel Solution of the Poisson Problem Using MPI
Parallelizing finite element PDE solvers in an object-oriented framework Xing Cai Department of Informatics University of Oslo.
Domain Decomposition in High-Level Parallelizaton of PDE codes Xing Cai University of Oslo.
Cracow Grid Workshop, November 5-6, 2001 Concepts for implementing adaptive finite element codes for grid computing Krzysztof Banaś, Joanna Płażek Cracow.
Connections to Other Packages The Cactus Team Albert Einstein Institute
Introduction to Scientific Computing II Multigrid Dr. Miriam Mehl.
High performance computing for Darcy compositional single phase fluid flow simulations L.Agélas, I.Faille, S.Wolf, S.Réquena Institut Français du Pétrole.
23/5/20051 ICCS congres, Atlanta, USA May 23, 2005 The Deflation Accelerated Schwarz Method for CFD C. Vuik Delft University of Technology
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Discretization for PDEs Chunfang Chen,Danny Thorne Adam Zornes, Deng Li CS 521 Feb., 9,2006.
Linear Algebra Operators for GPU Implementation of Numerical Algorithms J. Krüger R. Westermann computer graphics & visualization Technical University.
SAN DIEGO SUPERCOMPUTER CENTER at the UNIVERSITY OF CALIFORNIA, SAN DIEGO Advanced User Support for MPCUGLES code at University of Minnesota October 09,
A Software Framework for Easy Parallelization of PDE Solvers Hans Petter Langtangen Xing Cai Dept. of Informatics University of Oslo.
On the Performance of PC Clusters in Solving Partial Differential Equations Xing Cai Åsmund Ødegård Department of Informatics University of Oslo Norway.
Monte Carlo Linear Algebra Techniques and Their Parallelization Ashok Srinivasan Computer Science Florida State University
C OMPUTATIONAL R ESEARCH D IVISION 1 Defining Software Requirements for Scientific Computing Phillip Colella Applied Numerical Algorithms Group Lawrence.
Adaptive grid refinement. Adaptivity in Diffpack Error estimatorError estimator Adaptive refinementAdaptive refinement A hierarchy of unstructured gridsA.
Programming assignment # 3 Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Multipole-Based Preconditioners for Sparse Linear Systems. Ananth Grama Purdue University. Supported by the National Science Foundation.
Parallel Computing Activities at the Group of Scientific Software Xing Cai Department of Informatics University of Oslo.
A Software Framework for Easy Parallelization of PDE Solvers Hans Petter Langtangen Xing Cai Dept. of Informatics University of Oslo.
A Simulation Framework for Testing Flow Control Strategies Marek Gayer, Milan Milovanovic and Ole Morten Aamo Faculty of Information Technology, Mathematics.
Computational Fluid Dynamics Lecture II Numerical Methods and Criteria for CFD Dr. Ugur GUVEN Professor of Aerospace Engineering.
Application of Design Patterns to Geometric Decompositions V. Balaji, Thomas L. Clune, Robert W. Numrich and Brice T. Womack.
Hui Liu University of Calgary
Xing Cai University of Oslo
Soft Computing Applied to Finite Element Tasks
GENERAL VIEW OF KRATOS MULTIPHYSICS
Supported by the National Science Foundation.
A Software Framework for Easy Parallelization of PDE Solvers
Parallelizing Unstructured FEM Computation
Ph.D. Thesis Numerical Solution of PDEs and Their Object-oriented Parallel Implementations Xing Cai October 26, 1998.
Presentation transcript:

An Object-Oriented Software Framework for Building Parallel Navier-Stokes Solvers Xing Cai Hans Petter Langtangen Otto Munthe University of Oslo

Parallel CFD’99 Outline of the Talk Mathematical model for N-S equationsMathematical model for N-S equations Different numerical methodsDifferent numerical methods An O-O framework in DiffpackAn O-O framework in Diffpack ParallelizationParallelization A fast FEM N-S solverA fast FEM N-S solver A test caseA test case

Parallel CFD’99 Mathematical Model Incompressible Navier-Stokes equations:

Parallel CFD’99 Different Solution Methods Fully implicit methodsFully implicit methods Artificial compressibilityArtificial compressibility Operator splitting (discrete & continuous)Operator splitting (discrete & continuous) Solenoidal approachesSolenoidal approaches Pressure filteringPressure filtering Many choices and possibilities!

Parallel CFD’99 An Observation Most solution processes have sub-stepsMost solution processes have sub-steps Each sub-step solves one/several PDEsEach sub-step solves one/several PDEs Many PDEs in the sub-steps are of the same typeMany PDEs in the sub-steps are of the same type Re-usable simulatorsRe-usable simulators Small adjustments neededSmall adjustments needed

Parallel CFD’99 An O-O Framework Goal: Flexible and extensible simulatorsGoal: Flexible and extensible simulators Take advantages of OO programmingTake advantages of OO programming Unified implementation of different base PDE solversUnified implementation of different base PDE solvers Unified organization of common dataUnified organization of common data Separate administration of problem specific data (flow conditions)Separate administration of problem specific data (flow conditions)

Parallel CFD’99 Implementation Structure SomeCaseSomeSolver NsCaseNsBaseNsPrms Use of OOP only on high administration level Fortran construct and c-array at low-level

Parallel CFD’99 Diffpack O-O software environment for scientific computationO-O software environment for scientific computation Rich collection of PDE solution components - portable, flexible, extensibleRich collection of PDE solution components - portable, flexible, extensible H.P.Langtangen, Computational Partial Differential Equations, Springer 1999H.P.Langtangen, Computational Partial Differential Equations, Springer 1999

Parallel CFD’99 Straightforward Parallelization Develop a sequential simulator, without paying attention to parallelismDevelop a sequential simulator, without paying attention to parallelism Follow the Diffpack coding standardsFollow the Diffpack coding standards Use add-on libraries for parallelization specific functionalitiesUse add-on libraries for parallelization specific functionalities Add a few new statements for transformation to a parallel simulatorAdd a few new statements for transformation to a parallel simulator

Parallel CFD’99 Linear-algebra-level Approach Parallelize matrix/vector operationsParallelize matrix/vector operations –inner-product of two vectors –matrix-vector product –preconditioning - block contribution from subgrids Keeps original sequential Diffpack libraries almost intact needs inter-processor communication functionalities Keeps original sequential Diffpack libraries almost intact needs inter-processor communication functionalities Easy to useEasy to use –access to all existing Diffpack iterative methods, preconditioners and convergence monitors –need only to add a few lines of new code –arbitrary choice of number of procs at run-time

Parallel CFD’99 Work Load Distribution Through grid partitionThrough grid partition Need good load balanceNeed good load balance Flexibility & extensibilityFlexibility & extensibility –Global grid -> a set of subgrids Arbitrary number of procs determined at run-timeArbitrary number of procs determined at run-time Non-overlapping partitionNon-overlapping partition Controllable addition of overlap (if desired)Controllable addition of overlap (if desired) –An existing set of subgrids (input from files)

Parallel CFD’99 Partition example

Parallel CFD’99 An Add-on Parallelization Library Grid partition administrationGrid partition administration High-level inter-processor communication functionalities (hidden MPI)High-level inter-processor communication functionalities (hidden MPI) class GridPartAdmclass GridPartAdm –void GridPartAdm::prepareSubgrids() –void GridPartAdm::prepareCommunication() –void GridPartAdm::updateGlobalValues() –void GridPartAdm::matvec –void GridPartAdm::innerProd –void GridPartAdm::norm Fully portable (Origin 2000, IBM SP2, HP V )

Parallel CFD’99 A Simple Coding Example //... #ifdef PARALLEL_CODE adm->scan (menu); adm->prepareSubgrids (); adm->prepareCommunication (); lineq->attachCommAdm (*adm); #endif lineq->solve (); //... set subdomain list = DEFAULT set global grid = grid1.file set partition-algorithm = METIS set number of overlaps = 0

Parallel CFD’99 LAL Parallelization Example Highly unstructured grid Highly unstructured grid Discontinuity in the coefficient K Discontinuity in the coefficient K

Parallel CFD’99 Measurements for example one 130,561 degrees of freedom 130,561 degrees of freedom Overlapping subgrids Overlapping subgrids BiCGStab + (block) RILU prec. BiCGStab + (block) RILU prec.

Parallel CFD’99 A Fast FEM N-S Solver Operator splittingOperator splitting Calculation of an intermediate velocityCalculation of an intermediate velocity

Parallel CFD’99 A Fast FEM N-S Solver Solution of a Poisson EquationSolution of a Poisson Equation Correction of the intermediate velocityCorrection of the intermediate velocity

Parallel CFD’99 O-O Implementation NsBaseNsSolverPredictor PressureCorrectorNsCaseExplicit Case1 FEM Case2

Parallel CFD’99 Test Case: Vortex-Shedding

Parallel CFD’99 Simulation Snapshots Pressure

Parallel CFD’99 Simulation Snapshots Pressure

Parallel CFD’99 Animated Pressure Field

Parallel CFD’99 Simulation Snapshots Velocity

Parallel CFD’99 Simulation Snapshots Velocity

Parallel CFD’99 Animated Velocity Field

Parallel CFD’99 Some CPU-Measurements

Parallel CFD’99 Parallelization Approach 2: DD Parallelization of multilevel methodsParallelization of multilevel methods One subdomain is assigned with a sequential simulatorOne subdomain is assigned with a sequential simulator A generic implementation frameworkA generic implementation framework Systematic and flexibleSystematic and flexible –O-O programming enables extensive code reuse –Easy to incorporate multilevel algorithm modification –Different grid types, local solution methods etc. on different subdomains

Parallel CFD’99 Parallel DD Application One 2D pressure equation in reservoir simulation

Parallel CFD’99 2-phase porous media flow PEQ: SEQ: Multigrid V-cycle in subdomain solves

Parallel CFD’99 Nonlinear water waves Fully nonlinear 3D water waves Primary unknowns:

Parallel CFD’99 Parallel DD Application Two 3D Poisson equation in water wave simulation

Parallel CFD’99 Parallel efficiency Fixed number of subdomains M =16.Fixed number of subdomains M =16. Subdomain grids from partition of a global 41x41x41 grid.Subdomain grids from partition of a global 41x41x41 grid. Simulation over 32 time steps.Simulation over 32 time steps. DD as preconditioner of CG for the Laplace eq.DD as preconditioner of CG for the Laplace eq. Multigrid V-cycle as subdomain solver.Multigrid V-cycle as subdomain solver.

Parallel CFD’99 Summary O-O implementation framework for N-S solversO-O implementation framework for N-S solvers Flexible & user-friendly parallelization at the level of linear algebraFlexible & user-friendly parallelization at the level of linear algebra Parallelization at the level of DDParallelization at the level of DD