Skip to content

Add nu_star (collisionality) to post-processed outputs#2103

Open
AndrewTKent wants to merge 1 commit intogoogle-deepmind:mainfrom
AndrewTKent:andrew/add-nu-star-output-v3
Open

Add nu_star (collisionality) to post-processed outputs#2103
AndrewTKent wants to merge 1 commit intogoogle-deepmind:mainfrom
AndrewTKent:andrew/add-nu-star-output-v3

Conversation

@AndrewTKent
Copy link
Copy Markdown
Contributor

Summary

  • Exposes electron-ion collisionality (nu_star) as a post-processed output on the face grid
  • Uses the existing collisions.calc_nu_star() with collisionality_multiplier=1.0 (physical value, not the QLKNN model-specific calibration factor)
  • Single file change: torax/_src/output_tools/post_processing.py (import, dataclass field + docstring, zeros(), make_post_processed_outputs())

Closes #2094

Notes for reviewers

  • Test data regeneration required: Adding a new field to PostProcessedOutputs means the .nc reference files need regeneration (same pattern as the P_LH_delabie addition in 83197e3). test_full_output_matches_reference and test_simulation_with_restart will fail until then.
  • collisionality_multiplier=1.0: The QLKNN multiplier is a model-calibration factor (e.g., 0.25 for qlknn_10d to compensate for a legacy collision operator mismatch). The output exposes the true physical collisionality — comment in code explains this choice.

Test plan

  • Regenerate .nc reference files
  • pytest torax/_src/output_tools/tests/post_processing_test.py
  • pytest torax/_src/output_tools/tests/output_test.py
  • pytest torax/tests/sim_test.py

Exposes the electron-ion collisionality (nu_star) already computed by
collisions.calc_nu_star() as a post-processed output on the face grid.
Uses collisionality_multiplier=1.0 for the physical value (the non-unity
multiplier in QLKNN is a model-specific calibration factor, not physics).

Useful for particle transport predictions and analysis.

Closes google-deepmind#2094
Copy link
Copy Markdown
Collaborator

@Nush395 Nush395 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! Can you also regenerate the references? This should be straightforward to do following https://torax.readthedocs.io/en/v1.3.0/contribution_tips.html#regenerating-unit-test-references

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.

Add the collisionallity nu_star to the outputs

2 participants