Improvements to wave codes - Plasma Science and Fusion ... · PDF fileImprovements to wave...

14
Improvements to wave codes John C. Wright P. T. Bonoli Haru Kohno and Jungpyo Lee 1 1 Plasma Science and Fusion Center Massachusetts Institute of Technology Sep 2010 - PPPL 1 RF SciDAC PPPL 2010

Transcript of Improvements to wave codes - Plasma Science and Fusion ... · PDF fileImprovements to wave...

Improvements to wave codes

John C. Wright P. T. Bonoli Haru Kohno and Jungpyo Lee1

1Plasma Science and Fusion CenterMassachusetts Institute of Technology

Sep 2010 - PPPL

1 RF SciDAC PPPL 2010

Contents

CONTENTS

1 CONTENTS

2 SUMMARY

3 PARALLEL SHEATH CODE

4 IMPROVEMENTS IN TORLHdebuggingInput consistency and automationImproved v-mesh

5 NEXT STEPS

2 RF SciDAC PPPL 2010

Summary

SUMMARY

1 Sep2009 Relativistic Imχe with lookup table - Valeo2 Oct2009 Handle both signs of n‖ in Imχe - Valeo3 Nov2009-Mar2010 V&V Working Group. Establishment of LAPD

collaboration.4 Jan2010 Correct ACCOME eqdsk generation to conform to

standard for use in TORLH - Wright5 Aug-Sep2010 Generate Dqle in TORLH on u/unorm mesh for

better v-space sampling. -Valeo and Wright6 Jul-Aug2010 - Migrated TORLH from CVS(!) on desktop to SVN

on PSFC webserver - London and Wright7 New collaborations initiated with UCLA (Dec2009),

KSTAR(Aug2010)

3 RF SciDAC PPPL 2010

Summary

RECENT PAPERS

1 J-P Lee and J.C. Wright, "A versatile parallel solver for massiveblock-tridiagonal matrix system" - rejected by TOMS, submitted toJCP.

2 A. S. Richardson, P. T. Bonoli, and J. C. Wright Phys. Plasmas17, 052107 (2010) “The lower hybrid wave cutoff: A case study ineikonal methods”

3 Nersc 2009 Annual Report. P. Bonoli et al. “Harnessing PlasmaWaves Simulations of wave-plasma interactions pave the waytoward practical fusion energy”http://www.nersc.gov/news/annual_reports/annrep0809/climate/Harnessing_Plasma_Waves.html

4 J. Wright et al. JCP (2010) “Challenges in self-consistent fullwave simulations of lower hybrid waves” from ICNSP09 Lisbon.

4 RF SciDAC PPPL 2010

Parallel sheath code

INCREASE SHEATH CODE RESOLUTION - WRIGHT AND

KOHNO

1 Ported code to loki, converted to use of open source sparsedirect solvers: SuperLU, MUMPS

2 Tried two parallel solvers: parMUMPS and SuperLU3 MPI-1 bug for parMUMPS at large sizes: move to Nersc for more

nodes and MPI-24 Solve configuration problems at Nersc (famous

MPICH_UNEX_BUFFER_SIZE problem), missing parmetissupport, memory per node.

5 Now running very large problems and resolving physics - seeKohno’s talk.

6 Another lesson: with parMUMPS cannot increase ncpus withoutbound, causes communications explosion.

5 RF SciDAC PPPL 2010

Improvements in TORLH debugging

PROFILE CORRECTION OF Dqle

Bob Harvey pointed out what appears to be a factor of ≈ rdifference between CQL and QLDCE power profiles.Difference tracked down to consistent treatment of normalizedψpol in TORLH jacobian:

B = f (ψ̄)∇φ×∇ψ̄ + g(ψ̄)∇φ

Led to error in bounce average from d`/B ∝ dθ/B ·∇θ ∝ J wasmissing factor of q(ψ̄)

6 RF SciDAC PPPL 2010

Improvements in TORLH Input consistency and automation

PYTHON DRIVING SCRIPTS

See Jungpyo Lee’s talk3D reconstruction python driven with batch jobs dispatched foreach toroidal mode. Separate script for reconstruction and exportat VTK for visualization by VisIT.Python script for handling automation of CQL3D-TORLH iteration.

1 Runs CQL3D and TORLH and batch jobs2 Copies files, makes directories and links for next iteration3 Ensures input consistency across multiple input files. e.g. enorm

specified in torica.inp, cql3d_mapin.inp and cqlinput

Also handling input consistency.

7 RF SciDAC PPPL 2010

Improvements in TORLH Improved v-mesh

ITERATION WITH FOKKER-PLANCK DONE MANUALLY

0.0 0.2 0.4 0.6 0.8 1.0�pol

�50

0

50

100

150

200

250

300

350

Power_e

0.000000

0.000005

0.000010

0.000015

0.000020

0.000025

0.000030Poynting

Peld

<ExB>

0.0 0.2 0.4 0.6 0.8 1.0�pol

0

10

20

30

40

50

60

70

80

90Power_e

0.000000

0.000005

0.000010

0.000015

0.000020

0.000025

Poynting

Peld

<ExB>

0.0 0.2 0.4 0.6 0.8 1.0�pol

0

5

10

15

20

25

Power_e

0.000000

0.000005

0.000010

0.000015

0.000020

0.000025

0.000030

0.000035

Poynting

Peld

<ExB>

0.0 0.2 0.4 0.6 0.8 1.0�pol

0

20

40

60

80

100

Power_e

0.000000

0.000005

0.000010

0.000015

0.000020

0.000025

0.000030

0.000035

Poynting

Peld

<ExB>

Iteration #

Converges after some oscillations in damping strength.Power of 350 kW generates 150 kA. (n‖ = −2.5,Te = 2.5keV )

Resolution, TORLH 400Nr × 255Nm, CQL3D 60Nr × 88Nµ× 160Nu

8 RF SciDAC PPPL 2010

Improvements in TORLH Improved v-mesh

CONVERGED AT STEP 5.

�100 �50 0 50 100m

�10

�9

�8

�7

�6

�5

�4

�3

�2

log

10

scale

Poloidal spectrum on labeled flux surfaces

0.14

0.29

0.43

0.57

0.71

0.85

1.00

ant

0.0 0.2 0.4 0.6 0.8 1.0�pol

0

10

20

30

40

50

60

Power_e

0.000000

0.000005

0.000010

0.000015

0.000020

0.000025

0.000030

0.000035

Poynting

Peld

<ExB>

9 RF SciDAC PPPL 2010

Improvements in TORLH Improved v-mesh

VELOCITY POORLY SAMPLES RELATIVISTIC MOMENTUM

0 0.2 0.4 0.6 0.8 10

1

2

3

4

v/vth

u/c

v/c

10 RF SciDAC PPPL 2010

Improvements in TORLH Improved v-mesh

OSCILLATIONS SEEN IN FINAL ITERATION STEPS

Automated simulations oscillate about final end stateAgreement in power profiles poor at larger radii, but improvedwith more velocity space resolution in generated DqlProblem is that natural basis for torlh calculation (v/vte) is poorsampling for CQL, esp at lower temperatures (larger radii).Solution (under study), generate Dql on same momentum spacemesh that CQL uses.Valeo has modified mapper for this case and TORLH generateson u/unorm mesh. Looks promising, but still some bugs to workout. (normalizations, linear test case, better integrator in internalpower test of qldce in torlh)

11 RF SciDAC PPPL 2010

Improvements in TORLH Improved v-mesh

XML TO BE USED FOR INPUT TO PYTHON DRIVER

XML Schema (XSD) - forinput validationXML StylesheetLanguage Transforms(XSLT) - for conversionto legacy input formatsXForms for providinggraphical web interface 1 <parameter><name>aconc< / name><value>1.0< / value>

<help>Ion concen t ra t i on ar ray s ize nspec< / help>3 < / parameter>

<parameter><name>sp_xs1< / name><value>0.0< / value>5 <help>< / help>

< / parameter>7 <parameter><name>sp_xs1< / name><value>0.0< / value>

<help>< / help>9 < / parameter>

< / namel is t>11 < / namel is ts>

12 RF SciDAC PPPL 2010

Improvements in TORLH Improved v-mesh

EXAMPLE OF A INPUT TRANSFORMATION. XSLT:XML->NML

1 <?xml version=" 1.0 " ?>< x s l : s t y l e s h e e t version=" 1.0 "

3 xmlns :xs l= " h t t p : / /www.w3 . org /1999/XSL / Transform ">< x s l : o u t p u t method=" html " / >

5 < !−−>XML to NML generates f o r t r a n s t y l e namel is t from XML

7 wi th s t r u c t u r e :namel is ts / namel is t / [ name, parameter / [ name, value ] ]

9 −−>< x s l : t e m p l a t e match=" / "><html><body>

11 <pre>< x s l : t e x t >&#xA ; < / x s l : t e x t >< x s l : f o r−each s e l e c t = " namel is ts / namel is t ">

13 < x s l : t e x t > &amp; < / x s l : t e x t >< xs l : va l ue−of s e l e c t = "@name" / >

15 < x s l : t e x t >&#xA ; < / x s l : t e x t >< x s l : f o r−each s e l e c t = " parameter ">

17 < x s l : t e x t > < / x s l : t e x t >< xs l : va l ue−of s e l e c t = "name" / >=

19 < xs l : va l ue−of s e l e c t = " value " / >< x s l : t e x t >&#xA ; < / x s l : t e x t >

21 < / x s l : f o r−each>< x s l : t e x t > /&#xA ; < / x s l : t e x t >

23 < / x s l : f o r−each>< / pre>

25 < / body>< / html>< / x s l : t e m p l a t e >< / x s l : s t y l e s h e e t >

1 &tor ic_modetor icmode= t o r i c

3 /& t o r i c i n p

5 i s o l =1nvrb=3

7 nelm=230n t t =512

9 nmod=255nptvac=−1

11 mxmvac=15f reqcy =80.0E6

13 nphi=10Ant len =48.0

15 . . .

13 RF SciDAC PPPL 2010

Next steps

NEXT STEPS

1 Complete development of TORLH-CQL3D using momentumspace mesh.

2 Complete installation of new parallel solver already in use inTORIC in TORLH

3 Extend use of VisIT in GENRAY - TORLH comparisons4 Preparation for Non-Maxwellian ions

Build on current NonMax architecture in TORLH (which isimplemented as a separate set of modules and tools)Use SVN for continued development of NonMax with TORICcoming from IPP SVNUse CSWIM IPS for python driven iteration - IPS recently installedon PSFC Loki cluster.

14 RF SciDAC PPPL 2010