Skip to content

[newchem-cpp] Adding dust model with related parameters#511

Open
aqua-hl wants to merge 20 commits intograckle-project:newchem-cppfrom
aqua-hl:harrison-dust-model-new
Open

[newchem-cpp] Adding dust model with related parameters#511
aqua-hl wants to merge 20 commits intograckle-project:newchem-cppfrom
aqua-hl:harrison-dust-model-new

Conversation

@aqua-hl
Copy link

@aqua-hl aqua-hl commented Mar 3, 2026

Summary

  • Adds a new dust_model parameter to chemistry_data (default: 0) to select between dust models
    • dust_model = 0: default behavior (runs calc_grain_size_increment_1d as usual)
    • dust_model = 1: Harrison dust model — skips calc_grain_size_increment_1d and uses custom dust growth/destruction routines
  • Implements dust growth (accretion) and dust destruction (SNe shocks + thermal sputtering) in dust_growth_and_destruction.hpp and dust_growth_and_destruction.cpp
  • Adds associated parameters: dust_destruction_eff, sne_coeff, sne_shockspeed, dust_grainsize, dust_growth_densref, dust_growth_tauref, use_sne_field

Key changes

  • src/include/grackle_chemistry_data.h / grackle_chemistry_data_fields.def: new dust_model parameter and dust physics parameters
  • src/clib/dust_growth_and_destruction.cpp/.hpp: dust growth and destruction implementation
  • src/clib/calc_tdust_3d.cpp, cool1d_multi_g.cpp, dust/lookup_dust_rates1d.hpp: guard calc_grain_size_increment_1d calls with dust_model == 0

@aqua-hl aqua-hl changed the title Adding dust model with related parameters [newchem-cpp] Adding dust model with related parameters Mar 3, 2026
@aqua-hl
Copy link
Author

aqua-hl commented Mar 5, 2026

Note on solver_method default: The golden standard test answers were generated with solver_method=1, so changing the default causes shape and value mismatches in CI (e.g., freefall-primordial_rate_variants-1-0 produced 5725 vs 5739 timesteps).

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.

1 participant