-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poloidal Transit Time discrepancy between full orbit and guiding center orbit. #8
Comments
|
In the email that I forwarded from Jacob, he wrote that JET has it in the clockwise direction. " As we discussed with Luke and Mirko last time, I have now extracted the larger version of the FBM file for 94701V01. nsjdotb = 1 # so j and Bt are parallel to each other nsnccw = -1 # so Bt is not counterclockwise, ie clockwise, seen from above So this should mean that plasma current and magnetic field are parallel, and directed in a negative toroidal direction (ie clockwise, seen from above). This agrees with my picture of how it "usually" is on JET. Regards // Jacob I will double-check the nsnccw variable myself tomorrow. Probably misunderstood something. |
The |
I added a function called |
Alright. So we would need to implement higher-order corrections such as those in R. G. Littlejohn, Plasma Phys.29, 111(1983) and equation (14) of https://doi.org/10.1063/1.1592155 ? |
And (10) |
Maybe....it might be easier just to use the full orbit code and do all the callbacks on the guiding center position determined at each time step. But I'm not sure how much the jacobian calculation would like that. |
There could be a low-aspect ratio check/flag? |
Its not just a low-aspect ratio problem though. The problem seems to be that the gyro-radius is too large breaking the low-order approximations used in the formulations of the guiding center equations of motion. I think the ASCOT code does something to switch between guiding center and full orbit based on some criterion it may be a good idea to look into what they did. Actually, I think David Pfefferle worked on that. |
I think I figured out the issue. We are not scaling by the charge number in the boris push q_m_half_dt = (0.5*dt*e0/m) # <-------- where is the q factor? |
Including the charge number seems to fix most of the issue. There still is the problem that the poloidal transit times do not match. gcp = GCAlpha(3500,0.5,8.0,0.0)
o = get_orbit(S,gcp,maxiter=0)
path, stat = get_full_orbit(S,gcp,tmax=1.0*o.tau_p/cyclotron_period(S,gcp));
#oproj = orbit_projection(S,gcp)
plot(bdry.r,bdry.z,color="gray",ls="--")
plot(path.r,path.z)
plot(o.path.r,o.path.z)
#plot(oproj.r, oproj.z)
grid(true)
gca().set_aspect("equal") |
There seems to be a dependence on the initial gyro-angle gcp = GCAlpha(3500,0.5,8.0,0.0)
o = get_orbit(S,gcp,maxiter=0)
path1, stat = get_full_orbit(S,gcp,tmax=1.0*o.tau_p/cyclotron_period(S,gcp),gamma=0.0);
path2, stat = get_full_orbit(S,gcp,tmax=1.0*o.tau_p/cyclotron_period(S,gcp),gamma=pi/2);
path3, stat = get_full_orbit(S,gcp,tmax=1.0*o.tau_p/cyclotron_period(S,gcp),gamma=pi);
path4, stat = get_full_orbit(S,gcp,tmax=1.0*o.tau_p/cyclotron_period(S,gcp),gamma=3pi/2);
#oproj = orbit_projection(S,gcp)
fig,ax = plt.subplots(ncols=4)
fig.set_size_inches(12,5)
ax[1].plot(path1.r,path1.z)
ax[2].plot(path2.r,path2.z)
ax[3].plot(path3.r,path3.z)
ax[4].plot(path4.r,path4.z)
gamma = ["0","pi/2","pi","3pi/2"]
for i=1:4
ax[i].plot(bdry.r,bdry.z,color="gray",ls="--")
ax[i].plot(o.path.r,o.path.z)
ax[i].set_aspect("equal")
ax[i].set_title("gamma = $(gamma[i])")
end
fig.tight_layout() |
I think to get the end points to (approximately) match for the full-orbit and gc-orbit integrations, one might need to do something else than to just normalize
|
The poloidal transit times are only off by about 2%. I wonder if its caused by the lack of second order corrections in the guiding center equations. The GCDE check may not trigger but the transit times may be off |
Could also be how the starting position is determined. We aren't using the second order corrections to the larmor radius when we take a step away from the gc location |
Well it wasn't that. It helped a bit but the poloidal transit time discrepancy remains. |
How does the discrepancy change as function of particle energy? I was thinking if we need the lorentz factor factor when computing |
The lorentz factor is like 1.001 which isn't really relativistic 1.05 and above is. |
Using your gcde_check(S,o,verbose=true)
Evaluating gcde criterion for orbit path position 1 of 135...
Evaluating gcde criterion for orbit path position 2 of 135...
Evaluating gcde criterion for orbit path position 3 of 135...
--- Criterion violated! ---
Criterion > Threshold: 0.08300099551478635 > 0.073
- Gyroradius (r_g) at bad position: 0.14437908238201114 m
- |B| at bad position: 1.6225121821580957 T
- √(λmax) at bad position: 0.9327537211911904
√(λmax) * r_g / |B| > Threshold |
Alright, so we are walking on thin ice anyhow. Does the dependence on the initial gryo-angle persist with the second-order correction? |
The second order correction to they gyro step? Yeah it persists. The discrepancy also exists for orbits that GC valid but its much less pronounced. |
Notice the full orbit code should be integrating for the same amount of time but they don't match up.
It gets worse at higher energies
There is also a mass dependence



If I were to hazard a guess then maybe its a relativistic effect but I cant be sure. It could also be an error in setting the initial conditions for the full orbit integrator
The text was updated successfully, but these errors were encountered: