Giter VIP home page Giter VIP logo

Comments (9)

iwhoppock avatar iwhoppock commented on July 30, 2024

from boris-algorithm.

jhlq avatar jhlq commented on July 30, 2024

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?

from boris-algorithm.

iwhoppock avatar iwhoppock commented on July 30, 2024

from boris-algorithm.

iwhoppock avatar iwhoppock commented on July 30, 2024

from boris-algorithm.

jhlq avatar jhlq commented on July 30, 2024

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.

from boris-algorithm.

iwhoppock avatar iwhoppock commented on July 30, 2024

from boris-algorithm.

jhlq avatar jhlq commented on July 30, 2024

I cloned your dipole.py and plugged in a magnetic mirror field: https://gitlab.com/marcus.appelros/fusion/-/blob/main/dipole.py

There is no bounce..:
noMirror

from boris-algorithm.

jhlq avatar jhlq commented on July 30, 2024

The magnetic field I used was unphysical, when I fixed it so divergence is zero the Boris algorithm does bounce, but not at the correct place, also the point it bounces at shifts..:
Screenshot from 2024-07-02 09-16-33
It should bounce back and fourth between x=1 and -1

from boris-algorithm.

jhlq avatar jhlq commented on July 30, 2024

I used the mirror field from this repo: https://github.com/BoschSamuel/Simulation-of-a-Tokamak-Fusion-Reactor/blob/master/B1.m
I turned off the central coil and scaled so B=1 at the origin.
Now it bounces between fixed points but it still doesn't bounce when B=2 but rather when B=45...
The code is here: https://gitlab.com/marcus.appelros/fusion/-/blob/main/Bosch/t0.jl

from boris-algorithm.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.