[newchem-cpp] Adding dust model with related parameters#511
Open
aqua-hl wants to merge 31 commits intograckle-project:newchem-cppfrom
Open
[newchem-cpp] Adding dust model with related parameters#511aqua-hl wants to merge 31 commits intograckle-project:newchem-cppfrom
aqua-hl wants to merge 31 commits intograckle-project:newchem-cppfrom
Conversation
Author
|
Note on |
mabruzzo
reviewed
Apr 22, 2026
Comment on lines
+10
to
+18
| const double k_boltz = 1.3806504e-16; | ||
| const double m_proton = 1.67262171e-24; | ||
| const double pi_val = 3.141592653589793; | ||
| const double sec_per_year = 3.155e7; | ||
|
|
||
| const double tiny_value = 1.0e-20; | ||
| const double huge_value = 1.0e+20; | ||
|
|
||
| const double t_ref = 20; |
Collaborator
There was a problem hiding this comment.
Is there a reason we redefine constants?
Author
There was a problem hiding this comment.
The main reason is that I forgot to remove them. But for sec_per_year, tiny_value, huge_value I don't think they are defined as global variable? And for t_ref, it is a local variable.
mabruzzo
reviewed
Apr 22, 2026
mabruzzo
reviewed
Apr 22, 2026
…rowth_and_destruction.cpp
…wth_and_destruction.F
…rowth_and_destruction.hpp
…t-model-new # Conflicts: # src/clib/CMakeLists.txt # src/clib/cool1d_multi_g.cpp
…gracklenewchem into harrison-dust-model-new # Conflicts: # src/clib/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dust_modelparameter tochemistry_data(default: 0) to select between dust modelsdust_model = 0: default behavior (runscalc_grain_size_increment_1das usual)dust_model = 1: Harrison dust model — skipscalc_grain_size_increment_1dand uses custom dust growth/destruction routinesdust_growth_and_destruction.hppanddust_growth_and_destruction.cppdust_destruction_eff,sne_coeff,sne_shockspeed,dust_grainsize,dust_growth_densref,dust_growth_tauref,use_sne_fieldKey changes
src/include/grackle_chemistry_data.h/grackle_chemistry_data_fields.def: newdust_modelparameter and dust physics parameterssrc/clib/dust_growth_and_destruction.cpp/.hpp: dust growth and destruction implementationsrc/clib/calc_tdust_3d.cpp,cool1d_multi_g.cpp,dust/lookup_dust_rates1d.hpp: guardcalc_grain_size_increment_1dcalls withdust_model == 0