TASK: Integrated Simulation Code - Kyoto U
Transcript of TASK: Integrated Simulation Code - Kyoto U
Workshop on Kinetic Theory in StellaratorsKyoto University, 2006/09/20
TASK: Integrated Simulation Code
A. Fukuyama and M. HondaDepartment of Nuclear Engineering, Kyoto University
presented byN. Nakajima (NIFS)
Contents
• BPSI: Burning Plasma Simulation Initiative
• TASK: Core Code for Integrated Modeling
• Consideration on TASK/3D
• Summary
Burning Plasma Simulation
•Why needed?◦ To predict the behavior of burning plasmas◦ To develop reliable and efficient schemes to control them
•What is needed?◦ Simulation describing a burning plasma:— Whole plasma (core & edge & divertor & wall-plasma)— Whole discharge
(startup & sustainment & transients events & termination)— Reasonable accuracy (validation with experimental data)— Reasonable computer resources (still limited)
• How can we do?◦ Gradual increase of understanding and accuracy◦ Organized development of simulation system
BPSI: Burning Plasma Simulation Initiative
Research Collaboration among Universities, NIFS and JAEA
Since 2002
Targets of BPSI
• Framework for collaboration of various plasma simulation codes
◦ Common interface for data transfer and execution control◦ Standard data set for data transfer and data storage◦ Reference core code: TASK◦ Helical configuration: included
• Physics integration with different time and space scales
◦ Transport during and after a transient MHD events◦ Transport in the presence of magnetic islands◦ Core-SOL interface and . . .
• Advanced technique of computer science
◦ Parallel computing: PC cluster, Scalar-Parallel, Vector-Parallel◦ Distributed computing: GRID computing, Globus, ITBL
Integrated Code Development Based on BPSIFramework
Integrated code: TASK and TOPICS
UniversitiesNIFS JAEA
BPSI
TASK/3D TASK TOPICS
OFMCMARG2D
- - -
HINTMEGA
- - -
GNETGRM- - -
TASK Code
• Transport Analysing System for TokamaK
• Features◦ Core of Integrated Modeling Code in BPSI— Modular structure— Reference data interface and standard data set◦ Various Heating and Current Drive Scheme— EC, LH, IC, AW, NB◦ High Portability— Most of library routines included (except LAPACK and MPI)— Own graphic libraries (X11, eps, OpenGL)◦ Development using CVS (Concurrent Version System)— Open Source (Pre-release with f77: http://bpsi.nucleng.kyoto-u.ac.jp/task/)◦ Parallel Processing using MPI Library◦ Extension to Toroidal Helical Plasmas
Modules of TASK
EQ 2D Equilibrium Fixed/Free boundary, Toroidal rotation
TR 1D Transport Diffusive transport, Transport models
WR 3D Geometr. Optics EC, LH: Ray tracing, Beam tracing
WM 3D Full Wave IC, AW: Antenna excitation, Eigen mode
FP 3D Fokker-Planck Relativistic, Bounce-averaged
DP Wave Dispersion Local dielectric tensor, Arbitrary f (u)
PL Data Interface Data conversion, Profile database
LIB Libraries
Under Development
TX Transport analysis including plasma rotation and ErWA Global linear stability analysisWI Integro-differential wave analysis (FLR, k · ∇B � 0)
All developed in Kyoto U
Modular Structure of TASK
Data Interface Layer PL
• Role of Interface Layer◦ To keep the present status of plasma◦ To store the history of plasma◦ Interface to file system◦ Interface to experimental profile database◦ Interface to simulation profile database
• Data to be stored◦ Standard dataset— Shot data, Device data— Equilibrium data, Metric data— Fluid plasma data, Kinetic plasma data— Dielectric tensor data, Full wave data, Ray/Beam tracing data◦ User-defined data
Standard Dataset (interim)
Shot dataMachine ID, Shot ID, Model ID
Device data: (Level 1)RR R m Geometrical major radiusRA a m Geometrical minor radiusRB b m Wall radiusBB B T Vacuum toroidal mag. fieldRKAP κ Elongation at boundaryRDLT δ Triangularity at boundaryRIP Ip A Typical plasma current
Equilibrium data: (Level 1)PSI2D ψp(R, Z) Tm2 2D poloidal magnetic fluxPSIT ψt(ρ) Tm2 Poloidal magnetic fluxPSIP ψp(ρ) Tm2 Poloidal magnetic fluxPPSI p(ρ) MPa Plasma pressureTPSI T (ρ) Tm BφRQPSI 1/q(ρ) Safety factor
Metric data1D: V ′(ρ), 〈∇V〉(ρ), · · ·2D: gi j, · · ·3D: gi j, · · ·
Fluid plasma dataNSMAX s Number of particle speciesPA As Atomic massPZ0 Z0s Charge numberPZ Zs Charge state numberPN ns(ρ) m3 Number densityPT Ts(ρ) eV TemperaturePU usφ(ρ) m/s Toroidal rotation velocity
Kinetic plasma dataFP f (p, θp, ρ) momentum dist. fn at θ = 0
Dielectric tensor dataCEPS ↔ε (ρ, χ, ζ) Local dielectric tensor
Full wave field dataCE E(ρ, χ, ζ) V/m Complex wave electric fieldCB B(ρ, χ, ζ) Wb/m2 Complex wave magnetic field
Ray/Beam tracing field dataRRAY R(�) m R of ray at length �ZRAY Z(�) m Z of ray at length �PRAY φ(�) rad φ of ray at length �CERAY E(�) V/m Wave electric field at length �PWRAY P(�) W Wave power at length �DRAY d(�) m Beam radius at length �VRAY u(�) 1/m Beam curvature at length �
Execution Control Interface in BPSI
• Example for TASK/TRTR INIT Initialization (Default value) BPSX INIT(’TR’)TR PARM(ID,PSTR) Parameter setup (Namelist input) BPSX PARM(’TR’,ID,PSTR)TR PROF(T) Profile setup (Spatial profile, Time) BPSX PROF(’TR’,T)TR EXEC(DT) Exec one step (Time step) BPSX EXEC(’TR’,DT)TR GOUT(PSTR) Plot data (Plot command) BPSX GOUT(’TR’,PSTR)TR SAVE Save data in file BPSX SAVE(’TR’)TR LOAD load data from file BPSX LOAD(’TR’)TR TERM Termination BPSX TERM(’TR’)
• Module registrationTR STRUCT%INIT=TR INITTR STRUCT%PARM=TR PARMTR STRUCT%EXEC=TR EXEC· · ·BPSX REGISTER(’TR’,TR STRUCT)
&��� '�(� ��������! ���"#�
���� ���� ������� ������ ���� 0�� �� �2
� +������5����� ��%��� �(-���.� �/�����
� � � � � �
��� � � � ��� �� �
� ������ ���������� �� ���� �
Æ0�"�+�������� ���� � ��� ��� � ����������
Æ ���� �� 1 !����+�� ����[
���� ���� � ��� � ��� � � ���
����� � � �� � ���
�
]
�� � �
� 3����� ��� ������ ���� �(�� ���
Æ �������� ��������� �� �
� �������� ��������� ������( ���� ���/�� �� )"� " ��$���4�
)��� ��������� � #$�� �$ ������ ��������� � ��� ��� �������
��$& #�(�� �� ����� )������ ������
���� ����� �����
&�! 0�� � � �� � ���2
� � ����� ��� � ��� ��� � � �������� ������� � ��� � �����
���� � ���� ���� � �� 0� � �� � � � �2� ���� � 0� � ��� ��� �2
0�"� �������� ,��� 0��������� ���� ������ ������2
��-�� ��������� ���,�� 0������� ��2
&**��+ ����* �������� ! ���"&
� ������+��� �� �/�����
� "������� ������$���� �� ���� � ���� ��� �� ��
� ���� � � � ��� � � � �� � � � �� � �
Æ � � �� � �������� ���� ��� � �� ��� ��� #���
Æ �� � �� ����% ������ ����
Æ �� � �� 7����5������ ���� ��� � )���5����� �� ������ �
Æ �� � �� ������� ������ ����
� ��� ��+�"������� ������� ����� �� �� �� 4�� %����� )���"
� )�����"������ ������� �� )��!�� ����������� ������ ����
� 2� �� ��� �������� � ������� � ������ ���������
� �#���+���� ��� ��� ������� ������ 0�� ����� ��� ���%�����2
#�(� ��� ����� �������� ! ���"�
� ������ ����� �� !��������� �� ���� ��� �� ���
Æ )������"� �! �����
Æ �������� �� ���� ������ �����
Æ �������� �� -��� ������ �����
Æ �� ���� ������ ����� 3�(-����� � +������"�����4
Æ �� ���� ������ ����� 3��$������ � ��� ������"�����4
Æ 5���+�� ���� ������ ����� 3�(-����� 4
Æ 5���+�� ���� ������ ����� 3��$������ � ��� � +������"�����4
� ��$������ � ���1
Æ )�����"����� �(-�����
Æ %����� �� ����6��
Self-Consistent Wave Analysis with Modified f (u)
• Modification of velocity distribution from Maxwellian
◦ Absorption of ICRF waves in the presence of energetic ions◦ Current drive efficiency of LHCD◦ NTM controllability of ECCD (absorption width)
• Self-consistent wave analysis including modification of f (u)
Development of Self-Consistent Wave Analysis
• Code Development in TASK◦ Ray tracing analysis with arbitrary f (v): Already done◦ Full wave analysis with arbitrary f (v): Completed◦ Fokker-Plank analysis of ray tracing results: Already done◦ Fokker-Plank analysis of full wave results: Almost competed◦ Self-consistent iterative analysis: Preliminary
• Tail formation by ICRF minority heatingMomentum Distribution Tail Formation Power deposition
-10 -8 -6 -4 -2 0 2 4 6 8 100
2
4
6
8
10
PPARA
PPERP
F2 FMIN = -1.2931E+01 FMAX = -1.1594E+00
0 20 40 60 80 10010-8
10-7
10-6
10-5
10-4
10-3
10-2
10-1
100
p**2
Pabs with tail
Pabs w/o tail
Pab
s [a
rb. u
nit]
r/a
�������(� ���� �� ��������! ���"$
� ��� ����� '/����� ����� � 5����� �+���( )������
���� �#����� �������� �:�: ��� ���� �� �� 1�
& �������� �"����� ������� 0������ ������2
Æ �-� $��� ����� � ��� +��� ��� �������� �
&�������� ������ ������
Æ 2������� �) ������ 0 �� ��� "�2� ������ �'�����
Æ ��������� �"����� ��� ��� � #$�� ��#��
� ��� ����� ����
Æ 2������������ /����� 1���� ; 1�4������� ������� ��8���
Æ ���$��� �� ��+� 0 ������ ������� %������� ���2� 68(<=
0>-:,-2� �(�*3338� /������
� � ������� �� '(������ ��� !���
Æ �(�8� 0��3� ��#�� �+2
CDBM Transport Model: CDBM05
• Thermal Diffusivity (Marginal: γ = 0)
χTB = F(s, α, κ, ωE1)α3/2 c2
ω2pe
vA
qR
Magnetic shear s ≡ rq
dqdr
Pressure gradient α ≡ − q2Rdβdr
Elongation κ ≡ b/a
E × B rotation shear ωE1 ≡ r2
svA
ddr
ErB
• Weak and negative magnetic shear,Shafranov shift, elongation,
and E × B rotation shearreduce thermal diffusivity.
s − α dependence ofF(s, α, κ, ωE1)
0.0
0.5
1.0
1.5
2.0
2.5
-0.5 0.0 0.5 1.0
F ωE1
=0.2
ωE1
=0.3
ωE1
=0.1
ωE1
=0
s - α
F(s, α, κ, ωE1) =
(2κ1/2
1 + κ2
)3/2
×
⎧⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎩
11 +G1ω
2E1
1√2(1 − 2s′)(1 − 2s′ + 3s′2)
for s′ = s − α < 0
11 +G1ω
2E1
1 + 9√
2s′5/2√2(1 − 2s′ + 3s′2 + 2s′3)
for s′ = s − α > 0
Comparison of Transport Models: ITPA Profile DB
Deviation of Stored EnergyCDBM CDBM05
GLF23 Weiland
TFTR #88615 (L-mode, NBI heating)CDBM CDBM05 GLF23 Weiland
*+* *+, *+- *+. *+/ 0+**
0
,
1
-
2
34
3467489
:
;<=>?@
*+* *+, *+- *+. *+/ 0+**
0
,
1
-
2
34
3467489
:
;<=>?@
*+* *+, *+- *+. *+/ 0+**
0
,
1
-
2
34
3467489
:
;<=>?@
*+* *+, *+- *+. *+/ 0+**
,
-
.
12
1245267
8
9:;<=>
*+* *+, *+- *+. *+/ 0+**
,
-
.
/
12
3256
789:
;*+* *+, *+- *+. *+/ 0+*
*
,
-
.
12
3256
789:
;*+* *+, *+- *+. *+/ 0+*
*+*
*+1
0+*
0+1
,+*
,+1
23
4367
89:;
<*+* *+, *+- *+. *+/ 0+*
*+*
*+,
*+-
*+.
*+/
12
3256
789:
;
*+* *+, *+- *+. *+/ 0+**
,
-
.
12
1245678
9
:;<=>?
*+* *+, *+- *+. *+/ 0+**
,
-
.
12
1245678
9
:;<=>?
*+* *+, *+- *+. *+/ 0+**
,
-
.
12
1245678
9
:;<=>?
*+* *+, *+- *+. *+/ 0+**
,
-
.
12
1245678
9
:;<=>?
*+* *+, *+- *+. *+/ 0+**
,
-
.
/
12
3256
789:
;*+* *+, *+- *+. *+/ 0+*
*
,
-
.
12
3256
789:
;*+* *+, *+- *+. *+/ 0+*
*
1
0*
01
,*
,1
23
4367
89:;
<*+* *+, *+- *+. *+/ 0+*
1*+2
*+*
*+2
0+*
0+2
,+*
34
5478
9:;<
=
Common Profiles
*+* *+, *+- *+. *+/ 0+**+*
*+,
*+-
*+.
12
13
156
7879
:;<
=*+* *+, *+- *+. *+/ 0+*
*
0
,
1
-
2343
267
89:
;<
=*+* *+, *+- *+. *+/ 0+*
*
0
,
1
2
2
3*+* *+, *+- *+. *+/ 0+*
*+*
*+0
*+,
*+1
*+-
234562
89:
;<=>
?
2345@
*+* *+, *+- *+. *+/ 0+**
,*
-*
.*
/*
12344
167
898:
;<=;7
>
?
DIII-D #78316 (L-mode, ECH and ICH heatings)CDBM CDBM05 GLF23 Weiland
*+* *+, *+- *+. *+/ 0+**
0
,
1
-
23
2356378
9
:;<=>?
*+* *+, *+- *+. *+/ 0+**
0
,
1
-
2
34
3467489
:
;<=>?@
*+* *+, *+- *+. *+/ 0+**
0
,
1
23
2356378
9
:;<=>?
*+* *+, *+- *+. *+/ 0+**
0
,
1
-
2
.
34
3467489
:
;<=>?@
*+* *+, *+- *+. *+/ 0+**
,
-
.
/
12
3256
789:
; *+* *+, *+- *+. *+/ 0+**
,
-
.
12
3256
789:
; *+* *+, *+- *+. *+/ 0+**
-
/
0,
12
3256
789:
; *+* *+, *+- *+. *+/ 0+**+*
*+-
*+/
0+,
0+.
12
3256
789:
;
*+* *+, *+- *+. *+/ 0+**+*
*+-
*+/
0+,
121245678
9
:;<=>?
*+* *+, *+- *+. *+/ 0+**+*
*+-
*+/
0+,
121245678
9
:;<=>?
*+* *+, *+- *+. *+/ 0+**+*
*+,
*+-
*+.
*+/
0+*
121245678
9
:;<=>?
*+* *+, *+- *+. *+/ 0+**+*
*+,
*+-
*+.
*+/
0+*
12
1245678
9
:;<=>?
*+* *+, *+- *+. *+/ 0+*
*
,
-
.
/
0*
12
3256
789:
; *+* *+, *+- *+. *+/ 0+*
*
,
-
.
12
3256
789:
; *+* *+, *+- *+. *+/ 0+*
*
,
-
.
12
3256
789:
; *+* *+, *+- *+. *+/ 0+*
*
0
,
1
-
23
4367
89:;
<
Common Profiles
*+* *+, *+- *+. *+/ 0+**+*
*+0
*+,
*+1
*+-
23
24
267
898:
;<=
>*+* *+, *+- *+. *+/ 0+*
*+*
*+1
0+*
0+1
,+*
2343
267
89:
;<
= *+* *+, *+- *+. *+/ 0+**
0
,
1
-
2
.
3
3
4 *+* *+, *+- *+. *+/ 0+**+*
*+0
*+,
*+1
*+-
*+2
*+.
3453
789
:;<=
> *+* *+, *+- *+. *+/ 0+**
0
,
1
23455
278
9:9;
<=><8
?
@
�� ��������� ����� �������
� %� ���� ��� ����� $&����� " �������� �� � ���� �����
Æ �'� (��� �&����� ��� ������� � � � �� �
� )��( ���� � ��������
� ������ *��' ��(*��� �������
� ������� ������ �������
Æ )����������� ��� �����
Æ ���*��� � ��� �����
�������� ������� #������� ���
� +�#����� ������ �'���' ������ ������� �������
� �'����� ���������� %������� ���� ��� ����
� '���+� �&����� ������ +� �&�����
Æ ���'��' �&����� ��� *��� ����� � �
Æ %������� �&����� ��� ������ ���������
����� � !����� "�#
� ����� �&����� � $��� ���� ��� ���&
���
����
��
����������� � � �
���������������
��
����������
��� ��
�������
�� � ������� � ���� � ����� �
������
���������������
���
���������������� � ������� � ����� ��
���
��
(
��������
���
����
)����
�� � ��
�� � ��
�� � ��
�� � ��
��
���
(
�������
)
��
��
���������������� � ������� � ����� ��
��
��
(
�������
������
)
���
�� � ��
�� � ��
�� � ��
��
���
�������
��
����
(
�������� � ����
����
)� ���������� � ������
���
�
� ��
�
� �
�
����� � !����� "$#
� %������� �&����� ��� ,���� � � ���'- ������ ���������
����� �
��
���
(
�� ��
��
)
� �
� � '���+� �&�����
��
�������� �
��
∑
�
����
��
���
���
���
��
��� �
��
��������
���
���
��� �
���� � �
∑�
��������
���
���
���
��
������� � �
∑
�
�������
%����������� ��������� �����
� )����������� ��� �����
Æ ,�� ���� � � ������ *'�� ������ ������ �� �'� ������ ���� -
���.
Æ /�����-%������ ������
����� � � ��������
���
��
���
� � ���
���
��� �����
�������
� �"�� �������� #�������� ����� � �����
Æ �� ����� �� ������ ������
Æ �� ����� �� �����������
Æ /������ ������
Æ0��� ��� '
$��������� �� ���� �������� �� �� ��� �������� *��
� 0)�12� #�������� /15 ��2��6������ � �������2��6������
� �������� �������� �� /������� � �� (������ ��7���
� ���34�5 �������� (���������� �������" 5�� ��������� ������
Transport Modeling in Helical Plasma
• Neoclassical toroidal viscosity
• Negative magnetic shear
• Preliminary Result◦ NBI heating (P = 5 MW) : Order of magnitude slower rotation
0.0 0.2 0.4 0.6 0.8 1.00.0
0.1
0.2
0.3
0.4
0.5
r [m]
n e [1
020 m
-3]
0.0 0.2 0.4 0.6 0.8 1.0
−1.6
−1.2
−0.8
−0.4
0.0
r [m]
u iφ
[m/s
]
0.0
0.4
0.8
1.2
1.6
0.0 0.2 0.4 0.6 0.8 1.0r [m]
Te
[keV
]
0.0 0.2 0.4 0.6 0.8 1.0
−4
−2
0
2
4
r [m]
Er [
kV/m
]
Future Plan of TASK code
Fixed/Free Boundary Equilibrium EvolutionEqulibrium
Core Transport 1D Diffusive TR
1D Dynamic TR
Kinetic TR 2D Fluid TR
SOL Transport 2D Fluid TR
Neutral Tranport 1D Diffusive TR Orbit Following
Energetic Ions Kinetic Evolution Orbit Following
Ray/Beam Tracing Beam PropagationWave Beam
Full Wave Kinetic ε Gyro Integral ε Orbit Integral ε
Stabilities Tearing ModeSawtooth Osc.
Resistive Wall Mode
Turbulent Transport
ELM Model
CDBM Model Linear GK + ZF
Diagnostic Module
Control Module
Plasma-Wall Interaction
Present Status In 2 years In 5 years
Systematic Stability Analysis
Start Up Analysis
Nonlinear ZK + ZF
Extension to TASK/3D
• 3D Equilibrium:
◦ Interface to equilibrium data from VMEC or HINT
• Modules 3D-ready:
◦WR: Ray and beam tracing◦WM: Full wave analysis
• Modules to be updated:
◦ TR: Diffusive transport (with an appropriate model of Er)◦ TX: Dynamical transport (with neoclassical toroidal viscosity)◦ FP: Fokker-Planck analysis (with helical ripple trapping)
• Modules to be added:
◦ EI: Time evolution of current profile in helical geometry
Summary
•We are developing TASK code as a reference core code for burningplasma simulation based on transport analysis.
• Standard dataset and module interface are being implemented.
• Preliminary results of self-consistent analysis of wave heatingand current drive describing the time evolution of the momentumdistribution function and its influence on the wave propagation andabsorption have been obtained.
• Extension to 3D configuration is on-going in collaboration withDr. Y. Nakamura and NIFS. (See Next Presentation)
Access to TASK code
• Required Environment◦ Unix-like OS (Linux, Mac OSX, · · ·)◦ X-window system◦ Fortran95 compiler (gfortran, g95, ifort, pgf95, xlf95, sxf90, · · ·)
• Source code◦ Stable version: Web site (http://bpsi.nucleng.kyoto-u.ac.jp/task/)◦ Latest version: CVS tree (Read only) [password required]◦ Developer: CVS tree (R/W) [account required]
• User support◦ Uniform user interface◦ English guidebook in preparation: by the end of 2006