Flacs-3 solver development and release plan

Size: px
Start display at page:

Download "Flacs-3 solver development and release plan"

Transcription

1 Flacs-3 solver development and release plan Michał Folusiak, Gexcon Software

2 Introduction

3 What is Flacs-3? pre-processor PDR pre-processor & solver FLACS package post-processor CASD 4 Flacs FlowVis 5 Porcalc 2

4 What is Flacs-3? pre-processor PDR pre-processor & solver FLACS package post-processor CASD 4 Flacs FlowVis 5 Porcalc 2 Flacs 3.0 FLACS CFD package current version 10.6 Flacs CFD solver, Flacs-3 will in future replace Flacs-2 (current version Flacs-2.5.4)

5 Key product features of Flacs-3 Adaptive Mesh Refinement speedup of order of magnitude when comparing to fully refined solution speedup of order of 2-4 comp. to manual refinement FLACS Geometry Calculator (FGC) integration New output/dump/porosity file format / reduced number of files More automation, less user input required MPI(cluster)-parallelised Side goals - modern software requires modern development techniques New architecture and modular design Refactoring the code and dealing with technical debt Improving the development process of the new software: Continuous integration, Code reviews and Automated Testing and Validation

6 Flacs - architectural limitations Software architecture is about making fundamental structural choices which are costly to change once implemented. Architectural decisions set limits for developers Less generic software developed faster Limited possibilities Important architectural decision Flacs-2 assumes: Only one, static, rectangular computational domain. Flacs-3 assumes: Multiple domains on each level of the grid. Multiple overlapping levels of grids. Grid changing in time.

7 Example

8 Original Flacs-2 case User must manually refine grid in region of interest For the best performance and accuracy this region is different for different leak positions Setting and verifying for 1000s of simulations may be challenging Then we end up with large refinement region

9 In Flacs-3 Build coarse base grid The same grid for all simulations

10 Flacs-2 manually refined grid (2m) 12 hours Spaghetti cells (cells of high aspect ratio)

11 Flacs-3 AMR1 base grid (8m) 20 minutes (34x less time) useful for pre-run useful in future steady-state solver

12 Flacs-3 AMR2 grid (4m) 2 levels max resolution = 8m / 2 = 4m 40 minutes - 1 hour 20 minutes (9-14x less time) Few clicks to increase resolution

13 Flacs-3 AMR3 grid (2m) 3 levels max resolution = 8m / 2 / 2 = 2m The same resolution as in reference case hours (2-3x less time) Few clicks to increase resolution

14 Other examples offshore module dispersion

15 Other examples urban canyon Speedup 3.5x

16 Other examples blast city

17 Workflow

18 Workflow - CASD AMR section in scenario file

19 Workflow - CASD Optimal settings for most users

20 Workflow - CASD Manual settings only for developers and advanced users

21 Minimal-user input Work in 2017 will concentrate on testing and finding best Optimal AMR setup for users Flacs-3 will be product plus expertise implemented through setup configurations Benefits of minimal user input Eliminate user input errors No need to have expertise where to refine No need to manually refine near leaks No manual grid-sensitivity check No need to look in the manual to find recommendations No need to verify porosities Efficient interaction with 3D Risk tools

22 Technical debt in Flacs

23 Technical debt Technical deb is a metaphor referring to the eventual consequences of any software architecture. The debt can be thought of as work that needs to be done before a particular job can be considered complete or proper If the debt is not repaid, then it will keep on accumulating interest, making it hard to implement changes later on. Wikipedia

24 Problems with technical debt We should have only 1-2 versions of Flacs We sell and maintain 10 versions 90% of the code is similar Most software is missing latest features Must be synced manually, takes more and more time to maintain

25 How to proceed? Flacs-3 should be collection of small components (toolbox) building blocks for applications Application is ideally only few files linked to appropriate components Small components easy to maintain Reduced side effects, better encapsulation Flacs-2 Explo Inert Flacs DDT BASE Heat Fire Desc Exhaust Blast Flacs Leaks External LEAK FGCR ALEA CGNS FlowSolvers LinearSolver ICES LSOL LSID OldFlacs SIMP Generic LSIN OLDF CLOU ARRY CombustionModels MaterialProperties CONS ENUM IGNI BETA DUMM ERRI DDAT GDAT MATR FLAM WATR MIXT NUMTR THRM VECT STRI SLAM Core BoxLib VERS BLCK COMM CCSE OpenMP EXPL FILE INIT MESG BXLB OPGU OPSU NAME NUMM Output PDRC PDRM OUT3 MCAL TIME WALL MPTS Testing BoundaryConditions FRUT ERTR BCON WIND DBCS HEM Fire Flacs-3 DustEx DDT

26 flacs Flacs fork Flacs-2 main repository Flacs-3 master JIP hem fire Flacs-traditional repository versions share source code with common Flacs-traditional-base base explo ddt desc exhaust inert pool Forgotten versions: Oil mist MPI version

27 Merging Flacs fork Flacs-3 master JIP hem fire Flacs-2 main base explo ddt desc exhaust inert pool Flacs traditional

28 Flacs-3 development process proposal Each new feature developed according to the following recipe Short fork-merge cycles Only new features, no new versions new feature 2 new feature 1 new feature 3 new feature 5 new feature 4

29 Flacs-3 development process We will adapt continuous integration for faster development less branching We will maintain quality by Code reviews Automatic testing Automatic validation new feature master

30 Roadmap to product

31 Progress on AMR implementation Refactored code BoxLib AMR library interfaced with Flacs AMR grid topology, not solving Only blast worked in AMR Poor geometry representation No porosity handling Terrible output All but few Flacs2 features implemented in Flacs3 Numerical part of AMR finished JIP MEASURE integration Internal testing & automation Release preparation R E L E A S E

32 Questions?