Skip to content

Conversation

@RyanWollaeger
Copy link
Collaborator

@RyanWollaeger RyanWollaeger commented May 23, 2024

Background

  • One goal of SuperNu 4.x is to use coronal emissivity data tabulated from the LANL suite of relativistic atomic physics codes.
  • This will require storing emissivity or emission opacity separately from absorption opacity, breaking the usual LTE assumption.

Changes

  • Add in_doemiss input to switch to using separate emissivity data.
  • Parse optional emissivity tables as subsets of element-density point space.
  • Generate maps of element-density subset to full element-density absorption set.
  • Add gas_em_cap and grd_em_cap array (de)allocations.
  • Add MPI commands for tabular, gas, and grid-based emission opacity data and index maps.
  • Add emissivity table interpolation in GAS/tabular_opacity.f.
  • Incorporate grey emission opacity in Fleck factor calculation, temperature update, and setting particle weights.
  • Set pointers to either absorption or emission opacity for use in particle sourcing and effective scattering.

Merge Requirements

  • Review by a 4.x developer.
  • No 'Draft:' prefix on PR title.
  • Verify compilation.
  • Verify result of a basic test (if applicable, depending on changeset).

@RyanWollaeger RyanWollaeger added the enhancement New feature or request label May 23, 2024
@RyanWollaeger RyanWollaeger requested a review from korobkin May 23, 2024 23:12
@RyanWollaeger RyanWollaeger self-assigned this May 23, 2024
@RyanWollaeger RyanWollaeger marked this pull request as draft September 17, 2024 00:42
@RyanWollaeger RyanWollaeger changed the title Draft: Add optional emission opacity array for eventual coronal emissivity Add optional emission opacity array for eventual coronal emissivity Sep 17, 2024
@RyanWollaeger
Copy link
Collaborator Author

Going to hopefully get this ready for review soon. (Merely switched to git's draft decorator rather than prefixing the title for this PR, so no real changes just now.)

+ Add in_doemiss input to switch to using separate emissivity data.
+ Prevent in_doemiss=true when tabular opacity data is not used.
+ Add gas_em_cap and grd_em_cap array (de)allocations.
+ Add MPI gatherv for gas_em_cap and grd_em_cap.
+ Reset gas_em_cap in GAS/gas_update.
+ Throw stop assertion (for now) for emissivity interpolation.
+ Format similar to tabular absorption opacity (but no scattering).
+ Add tb_nelem_em: size(subset of elements with emission opacity).
+ Add tb_em_raw: array to parse subset of emission opacity tables.
+ Add tb_em_cap: coarsened multgroup emission opacity array.
+ Add tb_em_ielem: subset of parsed elements with emission tables.
+ Add lemiss logical argument to read_tbxs and coarsen_tbxs.
+ Parse emission opacity table optionally (lemiss).
+ Toggle emissivity contributions as done for absorption opacity.
+ Add optional (de)allocation for new tbxsmod arrays.
+ Assume single density value for emission opacity (for now).
+ Assume electron temperatures to be the same as for absorption.

Note: TODOs have been added. For example, Planck function needs to
to be evaluated for final emission opacity evaluation (tb_em_cap).
+ Change emission element subset to tabular element mask, per rho.
+ Require emission table temperatures to equal those of the
  equivalent absorption table.
+ Add emission density and element maps to absorption indices.
+ Add element-density mask to avoid parsing missing emission files.
+ Make emission routines loop over density index.
+ Fix emission opacity file name character length.
+ Make both tb_raw and tb_em_raw double-precision.
+ Add temp_em to read_tbxs stack, to verify emission temperatures.
+ Fix sum increment of tb_em_cap in wavelength coarsening.
+ Add 1 cell problem input with in_doemiss=t to Input directory.
+ Add TODO for MPI broadcasting tabular emission data.

Note: tabular_opacity.f was updated in this commit to toggle
between emission and absorption opacity when constructing per-cell
emission opacity, based on data availability, but it is incomplete
and incorrect as of this changeset.
@RyanWollaeger
Copy link
Collaborator Author

The emission parser is still being tested on a one cell problem. It is working with a preliminary emission file, but at the moment the per-cell data is not getting constructed properly.

+ Comment out per-(bb,bf,ff) emissivity.
+ Attempt coarsening test of total emission opacity.
+ Fix density array emissivity sub-index access in coarsening.
+ Use emission opacity in Fleck factor.
+ Toggle pointers with in_doemiss to emission or absorption arrays.
+ Use emission opacity pointers in source and effective scattering.
+ Fix density indexing for emissivity table interpolation.
+ Remove old printout and testing stops.
@RyanWollaeger
Copy link
Collaborator Author

RyanWollaeger commented Feb 10, 2025

Here is the SANd model, comparing with and without using emission opacity tables, where the emission opacity table is also the LTE value, hence the results should look the same. Here are plots of bolometric luminosity and spectra, without this changeset (blue) and with this changeset with in_doemiss=t (orange dashed):
Screen Shot 2025-02-10 at 12 11 04 PM
Screen Shot 2025-02-10 at 12 12 05 PM

@RyanWollaeger RyanWollaeger marked this pull request as ready for review February 21, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant