Giter Club home page Giter Club logo

Comments (8)

miekkasarki avatar miekkasarki commented on July 30, 2024

In tutorials there is this plot which is obtained in the same way as the buggy plot you posted, but the one in the tutorials seem fine. https://ascot4fusion.github.io/ascot5/_images/tutorials_markergen_13_0.png

This makes me think that the bug is actually in the BBNBI distribution output. Did you plot the distribution you get from a5_run_tcv.data.active.getdist("5d") in momentum space and did it look ok?

from ascot5.

miekkasarki avatar miekkasarki commented on July 30, 2024

Just to clarify: even if BBNBI distribution is broken, the result (i.e. marker output) seems fine, so it is likely that only the diagnostics is broken and nothing is wrong in the physics.

from ascot5.

miekkasarki avatar miekkasarki commented on July 30, 2024

I managed to reproduce this. The BBNBI distribution is ok, so the bug is somewhere within the markergen.

from ascot5.

miekkasarki avatar miekkasarki commented on July 30, 2024

Ok, it does not appear to be a bug, but an artefact produced by having a too coarse (ppar, pperp) grid. @Antonjvv what where your distribution settings in the options? I used 100 x 200 grid for (ppar,pperp) and that produced tolerable results. Eventually we will have implement (ekin,pitch) grid fro BBNBI and Ascot.

from ascot5.

Antonjvv avatar Antonjvv commented on July 30, 2024

Thanks @miekkasarki !
It looks like I made a mistake setting up the (ppar, pperp) grid, which ended up being quite coarse and also I set the wrong mass (H instead of D) when I called markergen. Now the results look much better. Attached is the results, with blue markers from mrk = a5_run_tcv.data.active.getstate_markers("gc") and orange markers from mrk = a5_run_tcv.markergen.generate(nmrk, mass, charge, anum, znum, dist).
image

My (ppar, pperp) grid is 200x100, with ppar from negative to positive np.sqrt(2m_a const["elementary charge"][0]E); with E=100keV, and pperp is from 0 to np.sqrt(2m_a* const["elementary charge"][0]*E).
The beam main injection energy is around 28keV.

I notice the markers from markergen have a grid cell like structure, could this be due to the ppar, pperp grid?
image

from ascot5.

miekkasarki avatar miekkasarki commented on July 30, 2024

Yeah, that's unfortunately from the grid. We will have to implement (energy,pitch) distributions directly in Ascot's C-kernel (so that BBNBI and AFSI output can be in these coordinates) to make better use of the marker generator tool.

from ascot5.

lcarbajal-t1e avatar lcarbajal-t1e commented on July 30, 2024

@miekkasarki I'm having an issue with the function a5.markergen.rhoto5d(), after running an AFSI simulation for a 3-D stellarator case (via a5.afsi.thermal() function), I can generate well the markers (alpha-particles) only when running this on a Mac (Sonoma 14.5) but every time I try to run it on a linux machine it crashes with the error "Segmentation fault (core dumped)", I've tried three different linux systems all with the same result. Any chance this is related to this issue? is there any way to diagnose what could be going wrong?
I'm using ASCOT 5.5.4, and installing with conda (h5cc wrapper using gcc (conda-forge gcc 12.3.0-7) 12.3.0 ). Please, advice if I should file a new issue.
Thanks!

from ascot5.

miekkasarki avatar miekkasarki commented on July 30, 2024

@miekkasarki I'm having an issue with the function a5.markergen.rhoto5d(), after running an AFSI simulation for a 3-D stellarator case (via a5.afsi.thermal() function), I can generate well the markers (alpha-particles) only when running this on a Mac (Sonoma 14.5) but every time I try to run it on a linux machine it crashes with the error "Segmentation fault (core dumped)", I've tried three different linux systems all with the same result. Any chance this is related to this issue? is there any way to diagnose what could be going wrong? I'm using ASCOT 5.5.4, and installing with conda (h5cc wrapper using gcc (conda-forge gcc 12.3.0-7) 12.3.0 ). Please, advice if I should file a new issue. Thanks!

@lcarbajal-t1e I'll make a new issue from this as it could be stellarator-specific.

from ascot5.

Related Issues (20)

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.