Skip to content

Symmetrize STRIDE Δ matrices#191

Open
d-burg wants to merge 7 commits intodevelopfrom
stride_sym
Open

Symmetrize STRIDE Δ matrices#191
d-burg wants to merge 7 commits intodevelopfrom
stride_sym

Conversation

@d-burg
Copy link
Collaborator

@d-burg d-burg commented Feb 4, 2025

The procedure outlined in sym.f follows the procedure written by Fitzpatrick through equation (16) (see: Benchmark.pdf). On this first pass and as far as I can tell, I've implemented all GPEC equilibrium quantities, integrals, and matrix multiplies correctly – however, the resulting matrices do not yet follow the desired symmetry properties.

One question for now: does this look like I'm calculating the J(psi_N) contour integral correctly? I'm also not totally sure about the need for jac in this case.

GPEC/stride/sym.f

Lines 148 to 165 in 4568a5c

! Calculate J(psi_N) contour integral
dtheta = twopi / real(mthsurf)
DO itheta=0,mthsurf
CALL bicube_eval(rzphi,psilim,theta(itheta),1)
rfac=SQRT(rzphi%f(1))
angle=twopi*(theta(itheta)+rzphi%f(2))
r(itheta)=ro+rfac*COS(angle)
z(itheta)=zo+rfac*SIN(angle)
jac=rzphi%f(4)
w(1,1)=(1+rzphi%fy(2))*twopi**2*rfac*r(itheta)/jac
w(1,2)=-rzphi%fy(1)*pi*r(itheta)/(rfac*jac)
delpsi=SQRT(w(1,1)**2+w(1,2)**2)
J(ising)=J(ising)+
$ (1.0/(delpsi**2))*(dtheta/twopi)!/jac !DB !!
ENDDO

And in the meantime, I'll continue checking through the rest of the algebra (f_S, f_L, etc) for any issues.

@d-burg d-burg changed the title WIP: symmetrize STRIDE Δ matrices Symmetrize STRIDE Δ matrices Feb 4, 2025
@logan-nc
Copy link
Contributor

logan-nc commented Feb 6, 2025

Your J does indeed look to be the theta integral of 1/(delpsi)^2, which is what Richard defines it as here,
image

What do you think @parkjk ?

@logan-nc
Copy link
Contributor

Any progress here @d-burg?

@d-burg
Copy link
Collaborator Author

d-burg commented Jun 24, 2025

Any progress here @d-burg?

I think I have a shot if I can set up the psi_tor spline correctly! I'll return to it this week @logan-nc

@logan-nc
Copy link
Contributor

Status @d-burg?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants