Updates on the equilibrium reconstruction

Minwoo has tested the equilibrium reconstruction procedure described in this post. He has noticed that the q-profile changes significantly when the direct solution is reconstructed from the inverse solution by the TEQ code. I can reproduce the Minwoo observations and confirm that the whole q-profile shifts by about 10% when the direct equilibrium is generated from the inverse equilibrium. It might be useful if the TEQ developers can address this problem. Meantime, I have modified the equilibrium reconstruction procedure to avoid the problem with the q-profile. In the modified procedure, we postpone the generation of the direct equilibrium until very last step:

  • Start with the original sav-file for this discharge:
    caltrans 007328_4400.sav  -probname ss-test kstar.bas
  • Update the pressure profile and generate new inverse solution:
    thetac=1e-3; epsrk=5.e-9; nht=5000; start_inv
    teq_inv(0,1); teq_inv(0,1)
  • Store the inverse solution in a new sav-file
  • The q-prifiles are being updated now:
    thetac=1e-3; epsrk=5.e-9; nht=5000; start_inv
    teq_inv(0,1); teq_inv(0,1)
  • Save the updated inverse equilibrium:
  • Update the bootstrap current:
    real ndens=psibar; ndens=2.6e19
    real prbs=psave/10./2.
    real tebs=prbs/ndens/1.602e-19
    real zeffbs=psave; zeffbs=1.
    real pbeambs=psibar; pbeambs=0.
    read jbootstrap.bas
    real jbs1 = jbootstrap(prbs,ndens,tebs,tebs,zeffbs, pbeambs, 1., 1., 0.)
    real jbs0 = jbs1(:,1)
    real foo1=tanh((1.01-psibar)/0.05)
    real foo2=(1+tanh((psibar-0.7)/0.05))/2.
  • Run a sequence of inverse and direct equilibrium solvers ensuring the the plasma current does not change:
    thetac=1e-3; residj=1e-9; nht=5000; start_inv
    nf; plot [jparsrf,jparsave], asrf+rsrf
    teq_inv(3,0); teq_inv(0,1); teq_inv(0,1)
    inv_eq=0; inv_k=0; run
  • Increase the resolution in the direct equilibrium solution to 257×257 (at least):
    gridup; run; saveq("s13-t00-04.sav")
    gridup; run; saveq("s13-t00-05.sav")
  • Save the new geqdsk file
  • In the plasma core region, the q-profile is not affected now. In the plasma edge region, the q-profile is modified. However, these changes are consistent with the bootstrap current model. It looks that the bootstrap current fractions computed in TEQ and TOQ does not agree well. In order to reproduce the TOQ bootstrap current, a scaling factor for the parallel current density is needed.