-
Notifications
You must be signed in to change notification settings - Fork 2
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
Meaning of vAc #2
Comments
No, it is the alfven velocity divided by the speed of light, and you can
see this in the C code in the repo.
I am not sure I understand what you mean by the interpretation in the
algorithm. Look at equation 3.1 here: https://arxiv.org/pdf/1811.08873
you can go to the original paper by Boris which you can find in the
citations.
…On Fri, 28 Jun 2024 at 21:19, Marcus Appelros ***@***.***> wrote:
Is vAc volts AC power? What is its physical interpretation in the
algorithm?
—
Reply to this email directly, view it on GitHub
<#2>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBR3ZAIMFT7IKKULRFIGF3ZJWZNTAVCNFSM6AAAAABKCMJBFKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DCMBTGU2DGNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Ok, thanks. |
You divide velocity by c to make the code dimensionless, which allows for
normalization. Dig into the C code: You’ll see how things are set up (eg
mass is just 1 — normalized and dimensionless). It’s much more efficient
for the computer to not carry absurdly small numbers that can cause issues
with the machine precision. You can make the alfven speed / speed of light
ratio what ever you want, but it’s probably good to keep it physical and
non-relativistic. I believe Boris is not the standard for relativistic
particle tracing. Again, if you look in the code, it’s there. You can also
look at the blogs and get a more basic version of this. There is one linked
in the readme that is great.
…On Sun, 30 Jun 2024 at 18:18, Marcus Appelros ***@***.***> wrote:
Ok, thanks.
This article: https://edutinker.com/glossary/alfven-speed/
Says:
"The Alfvén speed is given by the equation:
V_A = B / (4πρ)^(1/2)
where B is the magnetic field, and ρ is the mass density of the plasma."
Is that what I should set vAc to?
Why did you divide by the speed of light?
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBR3ZA7M2SORI7LTUZKCXLZKAVXBAVCNFSM6AAAAABKCMJBFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGYYTCNBRGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Here is this snippet from the dipole code:
The units are normalised: speed is in terms of the Alfven speed,
frequencies the proton cyclotron frequency, lengths the proton inertial
length, etc. To change to an alpha, replace mass with 4 and charge with 2.
Change the velocities gradually. This code implements the Boris algorithm
for non-relativistic particle tracing. The quantity vAc is the ratio of the
alfven speed by the speed of light (c).
…On Sun, 30 Jun 2024 at 18:18, Marcus Appelros ***@***.***> wrote:
Ok, thanks.
This article: https://edutinker.com/glossary/alfven-speed/
Says:
"The Alfvén speed is given by the equation:
V_A = B / (4πρ)^(1/2)
where B is the magnetic field, and ρ is the mass density of the plasma."
Is that what I should set vAc to?
Why did you divide by the speed of light?
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBR3ZA7M2SORI7LTUZKCXLZKAVXBAVCNFSM6AAAAABKCMJBFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGYYTCNBRGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Alright, thanks. Another question, can the Boris algorithm handle spatially varying magnetic fields? It doesn't take into account the gradient of B so I guess not? I set up a magnetic mirror simulation and particles don't bounce no matter how large B gets. |
Of course it can: Just put what ever magnetic field you want in. The
magnetic dipole repo is this exact thing.
…On Mon, 1 Jul 2024 at 09:02, Marcus Appelros ***@***.***> wrote:
Alright, thanks.
Another question, can the Boris algorithm handle spatially varying
magnetic fields? It doesn't take into account the gradient of B so I guess
not? I set up a magnetic mirror simulation and particles don't bounce no
matter how large B gets.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBR3ZADZWSVZIOVKFBWEL3ZKD5H7AVCNFSM6AAAAABKCMJBFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJZGM4DSMRQHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I cloned your dipole.py and plugged in a magnetic mirror field: https://gitlab.com/marcus.appelros/fusion/-/blob/main/dipole.py |
I used the mirror field from this repo: https://github.com/BoschSamuel/Simulation-of-a-Tokamak-Fusion-Reactor/blob/master/B1.m |
Is vAc volts AC power? What is its physical interpretation in the algorithm?
The text was updated successfully, but these errors were encountered: