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

Add emission due to CX with neutral hydrogen to the TotalRadiatedPower model #455

Conversation

vsnever
Copy link
Member

@vsnever vsnever commented Jul 30, 2024

Cherab atomic data repository support three types of total radiated power coefficients:

  • line power due to electron impact excitation, LineRadiationPower,
  • continuum and line power due to recombination and Bremsstrahlung, ContinuumPower,
  • line power due to charge exchange (CX) with thermal neutral hydrogen and its isotopes, CXRadiationPower.

However, only the first two coefficients are used in the TotalRadiatedPower model. Adding a third source of power loss does not seem difficult. Taking into account CX, the emissions calculated by this model will be as follows:

$$\epsilon_{\mathrm{total}} = \frac{1}{4 \pi \Delta\lambda} \left( n_{Z_\mathrm{i}} n_\mathrm{e} C_{\mathrm{excit}}(n_\mathrm{e}, T_\mathrm{e}) + n_{Z_\mathrm{i} + 1} n_\mathrm{e} C_{\mathrm{recomb}}(n_\mathrm{e}, T_\mathrm{e}) + n_{Z_\mathrm{i} + 1} n_\mathrm{hyd} C_{\mathrm{cx}}(n_\mathrm{e}, T_\mathrm{e}) \right)$$

where nhyd is the total density of all hydrogen isotopes in the plasma.

This PR adds CX radiated power for hydrogen donors to the TotalRadiatedPower model, thus fixing #370.

Also, the evaluate() method of the _RadiatedPower core class was defined as cdef instead of cpdef. A changed it to cpdef just like in other atomic rate classes, because with cdef definition I could not create MockAtomicData class for the unit test.

@vsnever vsnever linked an issue Jul 30, 2024 that may be closed by this pull request
Copy link
Member

@Mateasek Mateasek left a comment

Choose a reason for hiding this comment

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

Hi @vsnever , thanks for adding the CX radiated power. There are two points I would like you to look into and consider changes. Otherwise this is good to go.

cherab/core/model/plasma/total_radiated_power.pyx Outdated Show resolved Hide resolved
cherab/openadas/rates/radiated_power.pyx Show resolved Hide resolved
cherab/openadas/rates/radiated_power.pyx Show resolved Hide resolved
cherab/openadas/rates/radiated_power.pyx Show resolved Hide resolved
cherab/openadas/rates/radiated_power.pyx Show resolved Hide resolved
cherab/openadas/rates/radiated_power.pyx Show resolved Hide resolved
cherab/openadas/rates/radiated_power.pyx Show resolved Hide resolved
Copy link
Member

@Mateasek Mateasek left a comment

Choose a reason for hiding this comment

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

Thanks fof the improvement @vsnever , this can be merged

Copy link
Member

@jacklovell jacklovell left a comment

Choose a reason for hiding this comment

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

Looks good: the documentation and test coverage is particularly welcome! Just a couple of small comments before merging.

cherab/core/model/plasma/total_radiated_power.pyx Outdated Show resolved Hide resolved
@jacklovell jacklovell merged commit cee4bbe into cherab:development Aug 1, 2024
8 checks passed
@vsnever vsnever deleted the enhancement/add_cx_to_total_radiated_power branch August 30, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add charge exchange to TotalRadiatedPower
3 participants