Comments (8)
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.
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.
I managed to reproduce this. The BBNBI distribution is ok, so the bug is somewhere within the markergen.
from ascot5.
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.
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).
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?
from ascot5.
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.
@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 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)
- rho5d distribution for bbnbi5 runs only populates the first theta bin HOT 18
- Markergen support for rho5d distributions. HOT 1
- Distribution slicing preserves range of dimension in the abscissa edges
- 2D wall leaks when first and last points in the input are not the same
- Import MARS-F should support both data formats HOT 1
- BBNBI5 resulting markers and distribution weights don't match HOT 1
- Bug in atomic model HOT 1
- Distributions not properly updated when using adaptive timestep HOT 1
- Alternative definition for Coulomb logarithm
- Stellarator test case and tutorial
- Improve input error detection HOT 2
- ICRH operator
- Serpent-AFSI interface
- Segfault in markergen rhoto5d HOT 1
- Bug in afsi.thermal HOT 9
- Some features to analyse 2D wall loads HOT 4
- No n_phi dependence in afsi_get_volume HOT 2
- Major cleanup of a5py (and some plans for ASCOT5's future)
- Restart option for very time consuming jobs HOT 3
- Upgrade to numpy 2.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ascot5.