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

Clarification of units used in example parameters for plasma_source #112

Open
rworrall-ukaea opened this issue Dec 12, 2024 · 2 comments
Open

Comments

@rworrall-ukaea
Copy link

The example values for the major and minor radius seem to be in cm, but the densities match the example values in the Fausser paper which quotes the units as m^-3.

Some clarification on the units and ensuring constency for the user could increase clarity for the user.

@RemDelaporteMathurin
Copy link
Member

That's a good point! I would be in favour of using metres everywhere for consistency... !

@RemDelaporteMathurin
Copy link
Member

@rworrall-ukaea checking the code for the ion density, it appears that as long as major, minor radii, and r have the same units (here cm) then everything is fine since the dimensions cancel out:

if mode == "L":
density = (
ion_density_centre
* (1 - (r / major_radius) ** 2) ** ion_density_peaking_factor
)
elif mode in ["H", "A"]:
density = np.where(
r < pedestal_radius,
(
(ion_density_centre - ion_density_pedestal)
* (1 - (r / pedestal_radius) ** 2) ** ion_density_peaking_factor
+ ion_density_pedestal
),
(
(ion_density_pedestal - ion_density_separatrix)
* (major_radius - r)
/ (major_radius - pedestal_radius)
+ ion_density_separatrix
),
)

Same for ion temperature:

if mode == "L":
temperature = (
ion_temperature_centre
* (1 - (r / major_radius) ** 2) ** ion_temperature_peaking_factor
)
elif mode in ["H", "A"]:
temperature = np.where(
r < pedestal_radius,
(
ion_temperature_pedestal
+ (ion_temperature_centre - ion_temperature_pedestal)
* (1 - (np.abs(r / pedestal_radius)) ** ion_temperature_beta)
** ion_temperature_peaking_factor
),
(
ion_temperature_separatrix
+ (ion_temperature_pedestal - ion_temperature_separatrix)
* (major_radius - r)
/ (major_radius - pedestal_radius)
),
)

So everything should be fine. But still, I agree that for clarity everything should be in the same units.

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

2 participants