CLT
CLT (tokRZ_mpi.f90) with a full name of Ci-Liu-Ti (磁流体 in Chinese, and MHD in English), is a full MHD program developed for the tokamak MHD instablity simulations.
Install / Use
/learn @eatpotato123/CLTREADME
CLT
CLT (tokRZ_mpi.f90) with a full name of Ci-Liu-Ti (磁流体 in Chinese, and MHD in English), is a full MHD program developed for the tokamak MHD instablity simulations.
Table of Contents
Results presentation:
-
m/n=3/1 islands calculated with CLT:

-
Parameters for East shot#52340:

Development history:
- The 1st version is developed by Prof. Ma, Zhiwei & Dr. Wang, Sheng @Zhejiang University.
- This version code is written in 2th order finite difference method in space,
- while in the time-advance, 4th order Runge-Kutta scheme is chosen,
- in the phi(y) direction, either finite difference or pseudo-spectrum method is used,
- the equilibrium is loaded from the psi_xz.dat, q_p_g.dat, and wch.dat(optional).
- The 2nd version is upgraded by Dr. Zhang, Wei @Zhejiang University mainly with
- 4th order finite difference method is employed in the R and Z directions.
- The 3rd version is improved by Zhang, Haowei @Zhejiang University, following features are added:
- Cut-cell method is used in the boundary,
- Can be used for any triangularity like East or the Circle case. Fixed boundary is used,
- Can be used for any nprx and nprz ( grids and nprx(z) should be divisible),
- Can be used for including SOL region from EFIT-gfile equilibriums,
- Subroutines for RMP-EAST coils is added,
- Experiment equilibriums can be used (eq_pgfile_*.dat are read, transform by Matlab from p&g files).
- Ref: Physics of Plasmas 22, 122504 (2015); doi: 10.1063/1.4936977
Main parameters and coordinates
- mmode=2, nmode=1, qmode=mmode/nmode=2: set the q value of the mode you want to calculate.
- hall=true or flase: open the Hall term or not.
- mxt=256,myt=64,mzt=256: the grids numbers in each direction.
- cfl=1.2: decide the CFL condition number for the time step.
- x(1-8):total of rho,p,vx,vy(v_phi),vz,bx,by(b_phi),bz.
- x1(1-8):pertubation of rho,p,vx,vy(v_phi),vz,bx,by(b_phi),bz.
- xint(1-8):equilibrium of rho,p,vx,vy(v_phi),vz,bx,by(b_phi),bz.
- cur(1-3):pertubation of current (x,y(phi),z).
- cint(1-3):equilibrium of current _(x,y(phi),z).
- ef(1-3):pertubation of e-field _(x,y(phi),z).
- mxt: total X grids number.
- myt: total Y grids number.
- mzt: total Z grids number.
- npsi_pgfile: number of data rows in the eq_pgfile_1d.dat.
- nlim: number of data rows in the eq_pgfile_rzlim.dat.
- nbs: number of data rows in the eq_pgfile_rzbs.dat.
- nprx: the processes number in X direction.
- nprz: the processes number in Z direction.
- npry: the processes number in Y direction.
- initia_from_pgfile: true->read the initia equilibrium from Efit files; false->read the Nova files.
- use_stepon_cut_cell: true->use the cut-cell boundary by Zhang, Haowei; false->use the old boundary by Wang, Sheng.
- rmp_east: true->open the East-RMP coils,
- coordinate with large cylindrical coordinate system is used (R-\phi(Y)-Z)
- xx(mx),yy(my),zz(mz): coordinates(r,phi,z) in each processes,
- xxt(mxt),yyt(myt),zzt(mzt) for total,
- xxst(n2th+5,npsi),zzst(n2th+5,npsi) in (theta,psi) grid,
- xxs(n2th+5,mps4:mps),zzs(n2th+5,mps4:mps) in (theta,psi) bandary grid,
- thxz(mx,mz): theta coordinates in (r,z) grid, tht(mxt,mzt) for total,
- tpxz(mx,mz): r.z.<->s(psi).p(pol). transit angle in (r,z), tpt(mxt,mzt) for total,
- tcxz(mx,mz): tc=ing(jcb/r^2)dth,
- thst(n2th+5): theta coordinates in (theta,psi) grid,
- tpst(n2th+5,npsi): r.z.<->s(psi).p(pol). transit angle in (theta,psi), tps(n2th+5,mps4:mps) for bndry.
Terms of use
- CLT is a young but powerful scientific code, and we welcome peers around the world to use and improve this code.
- Before you start to use this CLT code, please inform us by emailing Zhang, Haowei at changhw@zju.edu.cn and Prof. Ma, Zhiwei at zwma@zju.edu.cn so that we can show you how to use this code in detail.
- If you want to modificate the CLT source code, or publish paper with any results calculated by CLT, please inform us by emailing Zhang, Haowei and Prof. Ma, Zhiwei, and we can help to check the modification or the result before we go to the next step.
- Thank you for your cooperation!
License
©2015-2035 Zhejiang University. All rights reserved.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
