1. Code Name: PIES

2. Category: IIe. Plasma Equilibrium: 3D

3. Responsible Physicists: D. Monticello and A. Reiman

4. Others involved in code development: H. Greenside, C. Wang, P. Merkel (Germany), A. Salas (Spain), S. Deshpande (India).

5. One line description: 3D MHD equilibrium with islands and stochastic regions.

6. Computer systems which code runs on: Cray, Sun

7. Typical running time: 15 minutes to several hours.

8. Approximate number of code lines: 48,000 RATFOR, 78,000 Fortran (with common blocks).

9. Does this code read data files from another code? Yes. From EFIT (DIII-D), TRANSP, TSC, JSOLVER, and VMEC codes.

10. Does this code produce data files that can be read by another code? No.

11. 1-2 paragraph description of code: The PIES code solves for 3D MHD equilibria without making any assumptions about the form of the magnetic field. It is therefore capable of handling equilibria with islands and stochastic regions, and with a divertor. For tearing unstable plasmas, the code can solve directly for the nonlinearly saturated state of the island, and can be used to track the island as plasma profiles are varied. The code has been used to study error field effects, locked modes, and tearing modes in tokamaks, stellarator equilibria, and 3D tokamak equilibria with ripple.

12. Similar codes to this code, and distinguishing differences: VMEC and other conventional 3D equilibrium codes assume good flux surfaces (no islands or stochastic regions). The only other 3D equilibrium code capable of handling islands is the HINT code (Japan), which, unlike PIES, cannot handle equilibria with a net current, or free-boundary equilibria.

13. Journal References describing code (up to 3): A. Reiman and H. Greenside, Compt. Phys. Commun. 43, (1986). A. Reiman and H. Greenside, J. Comput. Phys. 75, 423 (1988). A. Reiman and N. Pomphrey, J. Comput Phys. 94, 225 (1991).

14. New code capabilities planned for next 1-2 years: Bootstrap current effects on tokamak islands. Newton convergence algorithm to speed up code.

15. Code users: A. Reiman, D. Monticello, J. Johnson, A. Salas (Madrid), Y. Nakamura (Kyoto), P. Merkel (Germany), S. Deshpande (India), S. Hudson (Australia), J. Hanson (Auburn, Alabama) 2 PIES

16. Present and recent applications of code: (1) Tearing modes in TFTR and TPX. (2) Beta limits in ITER-like DIII-D discharges. (3) Flux surface integrity in the W7-X, TJ-II, and MHH4 stellarators. (MHH4 was calculated for the Stellarator Pilot Plant study.)

17. Status of code input/output documentation. Check one: ( ) does not exist (X) incomplete ( ) exists

18 Year Code was first used and present frequency of use: 1985. Used daily.

19. Estimate of Man-Years invested in developing code: 10

20. Catagories of usage of Code (Check all that apply): (x) application code to do analysis and prediction of experiments (x) numerical testbed of theoretical ideas ( ) physics module to be used in integrated moddelling (x) code for machine design

21. Language code is writen in: Ratfor

22. Results of intercomparisons with other codes and results of validation against experiments. Good agreement with VMEC, JSOLVER, and Chodura-Schlueter codes. (Also benchmarked against numerous analytical solutions.) Agreement with ATF equilibria. For tokamak applications, agrees well with axisymmetric equilibrium. Calculated saturated island widths for tearing modes are typically off by a factor of 2. We are investigating the possibility that the discrepancy may be due to bootstrap current effects.