Skip to content
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

BEAMS3D: Removed beam multi-pass option #345

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

lazersos
Copy link
Collaborator

@lazersos lazersos commented Feb 5, 2025

The pull request removes the multi-pass beam option from BEAMS3D. The multipass option was implemented by @kudav to deal with ASDEX-U tangential beams which 'scrapped' the inner stack. Here the beamline would allow some particles which are not ionized on the first pass to reenter the plasma from the inboard side. Unfortunately the implementation failed to properly catch the wall in some cases for shine-through particles. In particular @cfe316 demonstrated that particles for more radial beams would often find themselves on the other side of the torus before ionizing or being detected as wall hits. For this reason the modifications are being removed.

The ability to catch re-entrant particles is a worthwhile modificaiton to the code but must be done more rigerously. An issue related to this topic with a proposed test problem (not ASDEX-U) will be generated to properly develop and test such a feature.

This should close #332

@lazersos lazersos added the bug Something isn't working label Feb 5, 2025
@lazersos lazersos requested review from cfe316, lvanham and kudav February 5, 2025 07:48
@lazersos lazersos self-assigned this Feb 5, 2025
Copy link
Collaborator

@kudav kudav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deposition works as expected, changing the allocation between deposited/port/shinethrough particles slightly for the tangential beams at high energy. However, I would propose fixing the bug by moving the 'end do' statement of the multi-pass loop to the end of the function, before the return statement. From what I can tell, this recovers the desired behavior:
grafik
Left: old multipass, middle: this PR, right: old multipass with the proposed fix

@lazersos
Copy link
Collaborator Author

@kudav if you appove the merge, we can base a new pull request with your proposed modification for testing.

Copy link
Collaborator

@kudav kudav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me

@lazersos lazersos merged commit 49283a3 into develop Feb 20, 2025
2 checks passed
@lazersos lazersos deleted the bugfix/b3d_disable_multipass branch February 20, 2025 13:33
@cfe316
Copy link
Collaborator

cfe316 commented Feb 20, 2025

Thanks for addressing this issue! It looks like the middle image still has one particle from the yellow Q6/8 beam and about 5 particles from the blue Q3 beam which have escaped. So there's still something funny happening.

@kudav
Copy link
Collaborator

kudav commented Feb 20, 2025

I agree, and I dont want to rule out a bug with the wall collision algorithm, however note in the figure above that the red contours mark the plasma and not the wall, which in this case is a detailed 3D wall and not drawn. I think singular particles can pass through the ports (which are not closed) opposite to the NBI.
I do also remember seeing particles passing through walls for more simple wall structures in other runs I did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LSODE issues: particles outside wall?
3 participants