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

Genchiaki merge2 #143

Draft
wants to merge 40 commits into
base: main
Choose a base branch
from
Draft

Conversation

genchiaki
Copy link

@genchiaki genchiaki commented Mar 23, 2023

This is a re-issue of PR #78 with many, but not all, upstream changes merged in. Gen has tested this extensively with results shown here.

Below is the original description from PR #78.

Metal/dust chemistry/cooling is included into grackle.
Each new feature can be switched on/off with corresponding parameters:

primordial_chemistry = 4
switch to solve chemistry for 3 extra primordial species (D-, HD+, and HeH+)
metal_chemistry
switch to solve metal chemistry
grain_growth
switch to solve the growth of dust grains
multi_metals
This switch enables to consider multiple metal sources (e.g. supernovae with different metal yields).
Now this version includes

  0. metal/dust abundances of local ISM (Pollack et al. 1994)
  1-4. Pop III normal core-collapse supernovae (Nozawa et al. 2007)
    with progenitor masses 13, 20, 25 and 30 Msun
  5-8. Pop III faint supernovae (Marassi et al. 2014)
    with progenitor masses 13, 50 and 80 Msun
  9-10. Pop III pair-instability supernovae (Nozawa et al. 2007)
    with progenitor masses 170 and 200 Msun
  11. simple dust model (only include silicate and graphite; Yajima et al. 2019)

metal_abundances
If multi_metals = 0, you can select a single metal/dust yield from the list above.
dust_species
You can consider multiple grain species

  1. enstatite + amorphous carbon
  2. + metallic silicon + metallic iron + forsterite + magnetite + silica + magnesia + troilite + alumina
  3. + water ice + volatile organics + refractory organics

dust_temperature_multi
switch to consider different dust temperature for each species if dust_species > 0
dust_sublimation
switch to include dust sublimation

Also photochemistry of metal species is included
radiative_transfer_HDI_diss
photodissociation of HD molecules
radiative_transfer_metal_ion
photoionization of C and O atoms
radiative_transfer_metal_diss
photodissociation of CO, OH and H2O molecules

@@ -594,60 +864,298 @@ cdef class chemistry_data:
cdef double[:] memview = <double[:self.NumberOfTemperatureBins]>(<double*> self.rates.k58)
return np.asarray(memview)

property h2dust:
property k125:
Copy link
Contributor

Choose a reason for hiding this comment

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

Did the return statement get lost here?

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the comment.
In addition to this bug, there are still many conflicts in pygrackle. I'll fix them in the later commit.

src/clib/cool1d_multi_g.F Outdated Show resolved Hide resolved
src/clib/cool1d_multi_g.F Outdated Show resolved Hide resolved
src/clib/cool1d_multi_g.F Outdated Show resolved Hide resolved
src/clib/cool1d_multi_g.F Outdated Show resolved Hide resolved
@brittonsmith brittonsmith added this to the 3.3 milestone May 1, 2023
@brittonsmith brittonsmith mentioned this pull request May 22, 2023
@@ -0,0 +1,20 @@
#include <stdio.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is automatically generated by the build system. Can you delete this file?

Comment on lines +156 to +162
int radiative_transfer_H2II_diss;
int radiative_transfer_HDI_diss;
int radiative_transfer_metal_ion;
int radiative_transfer_metal_diss;

/* flag to H2 self-shielding in hydro code */
int radiative_transfer_use_H2_shielding;
Copy link
Contributor

Choose a reason for hiding this comment

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

These parameters need defaults set in grackle_chemistry_data_fields.def.

Comment on lines +197 to +201
/* flags for alternative rate calculations */
int use_palla_salpeter_stahler_1983; //Alternative k13dd calculation scheme
int use_stancil_lepp_dalgarno_1998; //Alternative calculation scheme for k50-k56
int use_omukai_gas_grain; //Alternative calculation scheme for gas_grain
int use_uniform_grain_dist_gamma_isrf; //Alternative calculation scheme for gamma_isrf
Copy link
Contributor

Choose a reason for hiding this comment

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

These parameters need defaults set in grackle_chemistry_data_fields.def.

This was referenced Mar 1, 2024
@brittonsmith brittonsmith removed this from the 3.3 milestone Apr 25, 2024
@brittonsmith brittonsmith marked this pull request as draft June 5, 2024 13:27
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.

5 participants