Skip to content

(PR 2/2) Add main_ions contribution to output core_profiles mapping#2227

Open
MateoBell wants to merge 1 commit into
imas_output_extra_quantitiesfrom
imas_output_fast_ions_pressure
Open

(PR 2/2) Add main_ions contribution to output core_profiles mapping#2227
MateoBell wants to merge 1 commit into
imas_output_extra_quantitiesfrom
imas_output_fast_ions_pressure

Conversation

@MateoBell

Copy link
Copy Markdown
Collaborator

Splits #1827 to add fast_ions contributions separately.

Include main_ions to compute total ion density and pressure and the individual ions pressure and densities.

@MateoBell MateoBell linked an issue Jul 7, 2026 that may be closed by this pull request
cp_state.pressure_thermal_e.cell_plus_boundaries()
)
ids.profiles_1d[i].electrons.pressure_thermal = pressure_thermal_e
ids.profiles_1d[i].pressure_ion_total = pressure_thermal_i

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also include pressure_fast_i?

# Retrieve fast ion contribution to main ion density and pressure.
n_species_fast = np.zeros_like(n_species)
ion_pressure_fast = np.zeros_like(n_species)
for fast_ion in fast_ions:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this loop is duplicated below I believe, can it be extracted into a separate helper?

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

Successfully merging this pull request may close these issues.

Populate remainder of IMAS core profiles output

2 participants