demonstration of the integration of bout++ into the omfit ...€¦ · xming software. 4 t.m....

32
1 T.M. Wilks/BOUT++ Workshop/August 2018 by T.M. Wilks 1 with O. Meneghini 2 , S. Smith 2 , C. Moynihan 4 , O. Izacard 3 , X. Q. Xu 5 , J. W. Hughes 1 1 MIT-PSFC 2 General Atomics 3 PPPL 4 UIUC 5 LLNL Presented at the 2018 BOUT++ Workshop Livermore, CA August 14, 2018 Demonstration of the Integration of BOUT++ into the OMFIT Framework

Upload: others

Post on 12-May-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

1 T.M. Wilks/BOUT++ Workshop/August 2018

by

T.M. Wilks1

with

O. Meneghini2, S. Smith2, C. Moynihan4, O. Izacard3, X. Q. Xu5, J. W. Hughes11MIT-PSFC2General Atomics3PPPL4UIUC5LLNL

Presented at the2018 BOUT++ WorkshopLivermore, CAAugust 14, 2018

Demonstration of the Integration of BOUT++ into the OMFIT Framework

Page 2: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

2 T.M. Wilks/BOUT++ Workshop/August 2018

Overview of Tutorial

• OMFIT overview

• OMFIT setup options

• BOUT++ module overview

• Grid generation with Hypnotoad

• Running BOUT++

• Post-processing tools

Page 3: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

3 T.M. Wilks/BOUT++ Workshop/August 2018

Overview of Tutorial

• OMFIT overview

• OMFIT setup options

• BOUT++ module overview

• Grid generation with Hypnotoad

• Running BOUT++

• Post-processing tools

Active Participationü NERSC user ID and

password (train##)

ü NoMachine or some Xming software

Page 4: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

4 T.M. Wilks/BOUT++ Workshop/August 2018

Overview of Tutorial

• OMFIT overview

• OMFIT setup options

• BOUT++ module overview

• Grid generation with Hypnotoad

• Running BOUT++

• Post-processing tools

Page 5: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

5 T.M. Wilks/BOUT++ Workshop/August 2018

- One Modeling Framework for Integrated Tasks

O. Meneghini, S. Smith, et. al. Nuclear Fusion 55, 083008 (2015)

Page 6: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

6 T.M. Wilks/BOUT++ Workshop/August 2018

• Framework– Physics independent API to

manage data and run codes– Defines common set of

functionality and capabilities• Physics module

– Collection of scripts for the execution of physics codes and workflows

– Re-used for different physics studies

• User project– Collection of modules and

data for specific physics studies

Separation of framework, modules, and projects allows each to evolve independently

Page 7: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

7 T.M. Wilks/BOUT++ Workshop/August 2018

Overview of Tutorial

• OMFIT overview

• OMFIT setup options

• BOUT++ module overview

• Grid generation with Hypnotoad

• Running BOUT++

• Post-processing tools

Page 8: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

8 T.M. Wilks/BOUT++ Workshop/August 2018

Launch OMFIT on NERSC (Edison)

>> cd /global/project/projectdirs/atom/atom-install-edison/bin>> ./omfit-dev

• Use suggested file location and id_rsa filename• Press “enter” three times to leave password blank and continue

launching OMFIT

Page 9: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

9 T.M. Wilks/BOUT++ Workshop/August 2018

Welcome to OMFIT

Accept license:(emails Sterling and Orso to help keep

track of usage)

Page 10: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

10 T.M. Wilks/BOUT++ Workshop/August 2018

Add your email and user names into preferences

This helps connect you to: – the OMFIT community for help and error reports

– Other accounts like github and remote servers

Page 11: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

11 T.M. Wilks/BOUT++ Workshop/August 2018

Overview of Tutorial

• OMFIT overview

• OMFIT setup options

• BOUT++ module overview

• Grid generation with Hypnotoad

• Running BOUT++

• Post-processing tools

Page 12: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

12 T.M. Wilks/BOUT++ Workshop/August 2018

OMFIT allows easy setup and data management for BOUT++

• Goal is to reduce the learning curve for running complex codes like BOUT++– OMFIT handles details

like input file setup, remote server connections, and data management

– Allows user to focus on physics inputs and results and minimize user errors in setup

OMFIT Framework

BOUT++ Module- Grid generation- BOUT++ input handling- Post-processing

BOUT++ Code

profiles

kEFITs

BOUT.inpBout.grid.ncBout.exe(restart.nc)

Bout.dmp.ncBout.restart.ncBout.log

Server independent

Page 13: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

13 T.M. Wilks/BOUT++ Workshop/August 2018

Import BOUT++ Module

Fileà Import module …

Page 14: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

14 T.M. Wilks/BOUT++ Workshop/August 2018

In “Terminal” Tab: >echo $SCRATCH

Double Check Scratch Folder is Set Correctly

Right click àedit tree entry

OMFIT[‘MainSettings’][‘SERVER’][‘edison’][‘workdir’] = ‘/scratch#/scratchdirs/username/….

Page 15: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

15 T.M. Wilks/BOUT++ Workshop/August 2018

Open main GUI

Double click on “BOUT++” to

open GUI

Can explore available scripts, settings, and data

in python tree

Page 16: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

16 T.M. Wilks/BOUT++ Workshop/August 2018

Load example input files into project

Shared folder: /global/homes/t/twilks/Share/BOUTworkshop18/

Load cxx and BOUT.inp “from file”

in share folder

Page 17: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

17 T.M. Wilks/BOUT++ Workshop/August 2018

Compile the cxx file

Compile!

Page 18: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

18 T.M. Wilks/BOUT++ Workshop/August 2018

Overview of Tutorial

• OMFIT overview

• OMFIT setup options

• BOUT++ module overview

• Grid generation with Hypnotoad

• Running BOUT++

• Post-processing tools

Runs IDL procedure by B. Dudson

Page 19: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

19 T.M. Wilks/BOUT++ Workshop/August 2018

Generate BOUT++ gridfile with Hypnotoad

• Change Grid File(create new)

- Hypnotoad Grid generator

• Load gfile and pfile from share folder

• Run hypnotoad

Shared folder: /global/homes/t/twilks/Share/BOUTworkshop18/

Page 20: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

20 T.M. Wilks/BOUT++ Workshop/August 2018

Generate Mesh with Hypnotoad

• Read geqdsk (will be in the same folder)

• Set number of radial and poloidal points

• Generate mesh

Page 21: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

21 T.M. Wilks/BOUT++ Workshop/August 2018

Output Mesh and load into OMFIT tree

• Need to interface with the terminal to exit out of Hynotoad

Profile option: 1Temperature (eV): 1000Is this ok? YesIDL>exit

• This ends your OMFIT command that is running IDL and brings the gridfile back into the OMFIT tree

root[‘GRIDGEN’][‘OUTPUTS’][‘GRID’]

Page 22: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

22 T.M. Wilks/BOUT++ Workshop/August 2018

Prepare gridfile to be passed to BOUT++

Write profiles from pfile to the grid

Page 23: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

23 T.M. Wilks/BOUT++ Workshop/August 2018

Overview of Tutorial

• OMFIT overview

• OMFIT setup options

• BOUT++ module overview

• Grid generation with Hypnotoad

• Running BOUT++

• Post-processing tools

Page 24: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

24 T.M. Wilks/BOUT++ Workshop/August 2018

Prepare BOUT++ simulation inputs

• “Parameters” tab handles BOUT++ input file options for physics assumptions

• “Server Settings” tab handles batch run settings

• “Run Settings” tab handles data fetching and convergence studies (still under development)

Run BOUT++

Page 25: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

25 T.M. Wilks/BOUT++ Workshop/August 2018

Run BOUT++

Console prints run status

Page 26: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

26 T.M. Wilks/BOUT++ Workshop/August 2018

OMFIT fetches the BOUT++ data back to the python tree

Possible to fetch a trimmed number of time slices for

analysis

Data, restart, and log files are fetched into

root[‘OUTPUTS’]

With data available in “OUTPUTS”, the “Analysis” tab becomes available

Page 27: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

27 T.M. Wilks/BOUT++ Workshop/August 2018

Overview of Tutorial

• OMFIT overview

• OMFIT setup options

• BOUT++ module overview

• Grid generation with Hypnotoad

• Running BOUT++

• Post-processing tools

Page 28: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

28 T.M. Wilks/BOUT++ Workshop/August 2018

Several simple analysis tools available• Visualization of

evolved quantities (e.g. pressure perturbation)

• Growth rate calculation

• Mode structure visualization

Page 29: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

29 T.M. Wilks/BOUT++ Workshop/August 2018

OMFIT can be used to simplify the process of running BOUT++

• Has potential to be coupled to entire pedestal workflow– Profile fitting– Kinetic EFITs– Varyped/ELITE/EPED

• GRIDGEN module has potential to be coupled with other codes– UEDGE– SOLPS

OMFIT Framework

BOUT++ Module- Grid generation- BOUT++ input handling- Post-processing

BOUT++ Code

profiles

kEFITs

BOUT.inpBout.grid.ncBout.exe(restart.nc)

Bout.dmp.ncBout.restart.ncBout.log

Server independent

Page 30: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

30 T.M. Wilks/BOUT++ Workshop/August 2018

• This summer, SULI student Cody Moynihan developed– Saving (large amounts of) data into easily accessible tree structures for analysis

of different scanned parameters– Quantitative checks on convergence with scripts to rerun if criteria is not met

• Users (you guys) can add analysis tools for the OMFIT BOUT++ community!

Always improving: BOUT++ module still under development

Page 31: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

31 T.M. Wilks/BOUT++ Workshop/August 2018

• This summer, SULI student Cody Moynihan developed– Saving (large amounts of) data into easily accessible tree structures for analysis

of different scanned parameters– Quantitative checks on convergence with scripts to rerun if criteria is not met

• Users (you guys) can add analysis tools for the OMFIT BOUT++ community!

Always improving: BOUT++ module still under development

Page 32: Demonstration of the Integration of BOUT++ into the OMFIT ...€¦ · Xming software. 4 T.M. Wilks/BOUT++ Workshop/August 2018 Overview of Tutorial • OMFIT overview • OMFIT setup

32 T.M. Wilks/BOUT++ Workshop/August 2018

Questions/Comments