Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c1a7cd8
A new branch for snu students to incorporate local developments into …
Jun 20, 2025
4623164
Merge branch 'develop' into snu_offshoot
jaesun57 Jul 20, 2026
985c69e
Remove nametag file from documentation
jaesun57 Mar 11, 2026
d21b863
GPEC - WIP - add curvature, shear, K value calculation for recon_flag
jaesun57 Mar 13, 2026
87c58e8
GPEC - WIP - add docs for reconsturction
jaesun57 Mar 13, 2026
af7bb2a
GPEC - WIP - modify shear calculation and add some C value calculatio…
jaesun57 Mar 18, 2026
b3428df
GPEC - docs - Add variable naming convention and mathematical symbols…
jaesun57 Mar 18, 2026
a636970
GPEC- WIP - fix curvature calcuation and make allocation process alig…
jaesun57 Mar 18, 2026
d95f29f
GPEC - FEATURE - Update core calculations
jaesun57 Apr 23, 2026
4e8c211
GPEC - FEATURE - Add Python analysis and plotting tools
jaesun57 Apr 23, 2026
fe92331
GPEC - MINOR - Update example configurations and documentation
jaesun57 Apr 23, 2026
c90ef3a
GPEC - WIP - Update recon coordinate derivation
jaesun57 May 18, 2026
47482ea
GPEC - FEATURE - Add recon energy diagnostics
jaesun57 May 18, 2026
6b27832
GPEC - MINOR - Document recon input settings
jaesun57 May 18, 2026
f4ccfb8
GPEC - MINOR - Update external perturbation flags in gpec.in
jaesun57 May 19, 2026
08a326b
GPEC - FEATURE - Add configurable recon integration method
jaesun57 May 19, 2026
0101e98
GPEC - MINOR - Document recon integration option in input
jaesun57 May 19, 2026
a62982c
GPEC - MINOR - Fix recon ep summary for selected mode
jaesun57 May 19, 2026
63ee563
GPEC - MINOR - Remove recon completion banner
jaesun57 May 19, 2026
cb85c36
GPEC - MINOR - Align recon ep summary labels
jaesun57 May 19, 2026
a22f2af
GPEC - MINOR - Document C verify identity in reconstruction note
jaesun57 May 19, 2026
2107a54
GPEC - FEATURE - Add optional C verify diagnostics for recon
jaesun57 May 19, 2026
bcbdd0a
GPEC - MINOR - Document cveri_flag in input
jaesun57 May 19, 2026
c993772
GPEC - MINOR - Refine C verify output wording
jaesun57 May 19, 2026
219a752
GPEC - MINOR - Refine recon summary formatting
jaesun57 May 19, 2026
4afa45b
GPEC - MINOR - Add recon output control and reuse C verify state
jaesun57 May 19, 2026
648e6c3
GPEC - MINOR - Document recon_out input control
jaesun57 May 19, 2026
d87ff4b
GPEC - RECON2 - 2026-05-22 add recon_flag2 entrypoint
jaesun57 May 26, 2026
72bce24
GPEC - RECON2 - 2026-05-25 add first-form energy kernel
jaesun57 May 26, 2026
a33f708
GPEC - RECON2 - 2026-05-25 add first-form recon output
jaesun57 May 26, 2026
bebefe5
GPEC - RECON2 - add template input flag
jaesun57 May 27, 2026
f9e6acf
GPEC - WIP add recon xi input flags
jaesun57 May 27, 2026
fdf3afd
DOCS - Remove DIIID ideal example Python scripts from repo
jaesun57 May 27, 2026
ce7c7d4
GPEC - RECON3 - add |C|^2 Bernstein decomposition diagnostic
jaesun57 Jun 2, 2026
daeabf6
GPEC - RECON1 - add per-(psi,theta) terms R-Z output
jaesun57 Jun 5, 2026
8a40f7e
DOCS - recon: C effective-field figure + Eulerian/Lagrangian derivation
jaesun57 Jun 16, 2026
3bf3334
DOCS - recon: fix H4 appendix A.2 (|V|^2 residual =, block labeling)
jaesun57 Jun 16, 2026
029dad9
DOCS - recon: frame V as the rotated edge current + triple-product rule
jaesun57 Jun 16, 2026
42f2ddb
GPEC - recon: covariant bare-Q (qvmn) output + fix QvsC figure
jaesun57 Jun 17, 2026
1826608
GPEC - recon: remove unused xi injection input flags (xi_flag, xifile)
jaesun57 Jun 19, 2026
a676e56
Merge origin/develop into recon
jaesun57 Jul 20, 2026
192f758
INSTALL - MINOR - regenerate install/DEPENDENCIES.inc
actions-user Jun 25, 2026
3b14c8a
GPEC - recon: review fixes for gpeq/gpout recon routines
jaesun57 Jul 20, 2026
6e2c2c2
GPEC - recon: document recon_flag3 in the reference input
jaesun57 Jul 20, 2026
0e1f875
DOCS - recon: document recon_out/recon_int/cveri_flag in main.tex
jaesun57 Jul 20, 2026
d814320
FEATURE - Add sol_num parameter to match routine. Adding sol_num para…
jaesun57 Jun 24, 2025
12f50f6
FEATURE - Add sol_num parameter to match input file. This change init…
jaesun57 Jun 24, 2025
ccf446c
Clarify comment for sol_num in match.in regarding DCON eigen function…
jaesun57 Mar 11, 2026
a49c79a
MATCH - recon: unify sol_num index wording (1 = most unstable)
jaesun57 Jun 25, 2026
2c03f04
MATCH - recon: validate sol_num/mripple, drop debug print
jaesun57 Jul 20, 2026
94547e9
GPEC - recon: factor psi-local C-state setup into gpeq_prep_c
jaesun57 Jul 21, 2026
58173ef
GPEC - recon: keep p1/q scratch local to recon kernels
jaesun57 Jul 27, 2026
3f2d03f
MATCH - MINOR - Header comment reflects sol_num selection
jaesun57 Jul 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/tex/recon/QvsC_quant_n1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,383 changes: 3,383 additions & 0 deletions docs/tex/recon/main.tex

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions docs/tex/recon/references.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@techreport{chance1992mhd,
author = {Chance, M. S. and Jardin, S. C. and Kessel, C. E. and Okabayashi, M. and others},
title = {Mhd stability of tokamak plasmas},
institution = {Princeton Univ., NJ (United States). Plasma Physics Lab},
year = {1992},
type = {Technical Report}
}
@article{RevModPhys.76.1071,
title = {Physics of magnetically confined plasmas},
author = {Boozer, Allen H.},
journal = {Rev. Mod. Phys.},
volume = {76},
issue = {4},
pages = {1071--1141},
numpages = {0},
year = {2005},
month = {Jan},
publisher = {American Physical Society},
doi = {10.1103/RevModPhys.76.1071},
url = {https://link.aps.org/doi/10.1103/RevModPhys.76.1071}
}
@phdthesis{Park2009Ideal,
author = {Park, Jong-Kyu},
title = {Ideal Perturbed Equilibria in Tokamaks},
school = {Princeton University},
year = {2009},
month = {June},
address = {Princeton, NJ},
note = {Advisers: Jonathan E. Menard and Allen H. Boozer},
department = {Department of Astrophysical Sciences, Program in Plasma Physics}
}
@incollection{Bernstein1983,
author = {Bernstein, I. B.},
title = {Basic Plasma Physics I},
booktitle = {Handbook of Plasma Physics, Volume 1},
editor = {A. A. Galeev and R. N. Sudan},
publisher = {North-Holland},
address = {Amsterdam},
year = {1983},
pages = {421}
}
@article{10.1063/1.4958328,
author = {Glasser, A. H.},
title = {The direct criterion of Newcomb for the ideal MHD stability of an axisymmetric toroidal plasma},
journal = {Physics of Plasmas},
volume = {23},
number = {7},
pages = {072505},
year = {2016},
month = {07},
abstract = {A method is presented for determining the ideal magnetohydrodynamic stability of an axisymmetric toroidal plasma, based on a toroidal generalization of the method developed by Newcomb for fixed-boundary modes in a cylindrical plasma. For toroidal mode number n≠0, the stability problem is reduced to the numerical integration of a high-order complex system of ordinary differential equations, the Euler-Lagrange equation for extremizing the potential energy, for the coupled amplitudes of poloidal harmonics m as a function of the radial coordinate ψ in a straight-fieldline flux coordinate system. Unlike the cylindrical case, different poloidal harmonics couple to each other, which introduces coupling between adjacent singular intervals. A boundary condition is used at each singular surface, where m = nq and q(ψ) is the safety factor, to cross the singular surface and continue the solutions beyond it. Fixed-boundary instability is indicated by the vanishing of a real determinant of a Hermitian complex matrix constructed from the fundamental matrix of solutions, the generalization of Newcomb's crossing criterion. In the absence of fixed-boundary instabilities, an M × M plasma response matrix WP, with M the number of poloidal harmonics used, is constructed from the Euler-Lagrange solutions at the plasma-vacuum boundary. This is added to a vacuum response matrix WV to form a total response matrix WT. The existence of negative eigenvalues of WT indicates the presence of free-boundary instabilities. The method is implemented in the fast and accurate DCON code.},
issn = {1070-664X},
doi = {10.1063/1.4958328},
url = {https://doi.org/10.1063/1.4958328},
eprint = {https://pubs.aip.org/aip/pop/article-pdf/doi/10.1063/1.4958328/14131506/072505_1_online.pdf},
}


29 changes: 25 additions & 4 deletions gpec/gpec.f
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PROGRAM gpec_main
$ arbsurf_flag,angles_flag,surfmode_flag,rzpgrid_flag,
$ singcurs_flag,m3d_flag,cas3d_flag,test_flag,nrzeq_flag,
$ arzphifun_flag,xbrzphifun_flag,pmodbmn_flag,xclebsch_flag,
$ filter_flag,gal_flag,delpsi_flag,use_res_spot,
$ filter_flag,gal_flag,delpsi_flag,recon_flag,use_res_spot,
$ singthresh_callen_flag,singthresh_slayer_flag,singthresh_flag
LOGICAL, DIMENSION(100) :: ss_flag
COMPLEX(r8), DIMENSION(:), POINTER :: finmn,foutmn,xspmn,
Expand Down Expand Up @@ -73,7 +73,9 @@ PROGRAM gpec_main
$ xclebsch_flag,pbrzphi_flag,verbose,max_linesout,filter_flag,
$ netcdf_flag,ascii_flag,singthresh_flag,
$ singthresh_callen_flag,singthresh_slayer_flag,
$ singthresh_slayer_inpr,singthresh_slayer_inpr_prof
$ singthresh_slayer_inpr,singthresh_slayer_inpr_prof,
$ recon_flag,recon_int,cveri_flag,recon_out,
$ recon_flag2,recon_flag3
NAMELIST/gpec_diagnose/singcurs_flag,xbcontra_flag,
$ xbnobo_flag,d3_flag,div_flag,xbst_flag,jacfac_flag,
$ pmodbmn_flag,rzphibx_flag,radvar_flag,eigen_flag,magpot_flag,
Expand Down Expand Up @@ -199,6 +201,12 @@ PROGRAM gpec_main
test_flag=.FALSE.
eigm_flag=.FALSE.
mutual_test_flag=.FALSE.
recon_flag=.FALSE.
recon_flag2=.FALSE.
recon_flag3=.FALSE.
recon_int="spline"
cveri_flag=.FALSE.
recon_out=.TRUE.

majr=10.0
minr=1.0
Expand Down Expand Up @@ -229,6 +237,12 @@ PROGRAM gpec_main
READ(in_unit,NML=gpec_output)
READ(in_unit,NML=gpec_diagnose)
CALL ascii_close(in_unit)
SELECT CASE(TRIM(recon_int))
CASE("spline","trapezoid")
CASE DEFAULT
CALL gpec_stop("gpec_output recon_int must be spline or "//
$ "trapezoid")
END SELECT
galsol%gal_flag=gal_flag
IF(timeit) CALL gpec_timer(0)
c-----------------------------------------------------------------------
Expand Down Expand Up @@ -619,7 +633,15 @@ PROGRAM gpec_main
IF (arzphifun_flag) THEN
CALL gpout_arzphifun(mode,xspmn)
ENDIF

IF (recon_flag) THEN
CALL gpout_recon(mode,xspmn)
ENDIF
IF (recon_flag2) THEN
CALL gpout_recon2(mode,xspmn)
ENDIF
IF (recon_flag3) THEN
CALL gpout_recon3(mode,xspmn)
ENDIF
c-----------------------------------------------------------------------
c diagnose.
c-----------------------------------------------------------------------
Expand Down Expand Up @@ -775,4 +797,3 @@ PROGRAM gpec_main
CALL gpec_dealloc
CALL gpec_stop("Normal termination.")
END PROGRAM gpec_main

Loading
Loading