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

SOLPS-ITER impurity density plotting issue #79

Open
roni-maenpaa opened this issue Mar 7, 2023 · 3 comments
Open

SOLPS-ITER impurity density plotting issue #79

roni-maenpaa opened this issue Mar 7, 2023 · 3 comments

Comments

@roni-maenpaa
Copy link

Hi,

I'm encountering an issue with Aurora when trying to plot the density of nitrogen charge state (say, N⁺) from a SOLPS-ITER run using plot2d_b2:

import numpy as np
import matplotlib.pyplot as plt
import aurora

case = aurora.solps_case(
    b2fstate_path="./b2fstate",
    b2fgmtry_path="./b2fgmtry",
)

fig, axis = plt.subplots()

# B2 fluid species are D, D+, N, N+ -> plot the third species, i.e. N+
data = case.data("na")[3]
case.plot2d_b2(data, ax=axis, scale="log", lb = 1e13, ub = 1e19, label="Density [$m^{-3}$]")
plt.show(block=True)

I attached two figures, one which shows the issue where one row of cells is missing from the PFR and instead extends into the main plasma. The other shows how I would expect the density distribution to appear (from solpspy).

plotting_issue_with_aurora
reference_plot_from_solpspy

I also attached the code and the b2-files I used:
aurora_plotting_issue.zip

I'm using aurora(fusion) 2.2.0.

Br,
Roni

@fsciortino
Copy link
Owner

Ah, sorry to hear that there seems to be a bug... I thought that all those had been solved by now.

Unfortunately I don't have capacity to look into this now, but @Reksoatr may be able to have a look?

@Reksoatr
Copy link
Collaborator

Reksoatr commented Mar 8, 2023

I'll take a look. Is this problem occurring only when plotting the density contour of an impurity, like nitrogen, or when plotting any 2d quantity?

@roni-maenpaa
Copy link
Author

The issue seems to appears only when I'm plotting a density from the case.data("na")-array, but not when I plot e.g the electron density from case.data("ne") or the electron temperature from case.data("te").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants