#ifndef SWIFT_DUST_T20_PROPERTIES_H #define SWIFT_DUST_T20_PROPERTIES_H /* Config parameters. */ #include /* Standard includes */ #include /* Local includes. */ #include "chemistry_struct.h" #include "cooling_properties.h" #include "dust_struct.h" #include "feedback_properties.h" #include "physical_constants.h" #include "units.h" /** * @brief Stores AGB and SNII dust yields */ struct dust_yield_table { /* Array to read dust yield tables into */ double* yield; /* Array to store IMF-resampled dust yield tables */ double* yield_IMF_resampled; }; /** * @brief Properties of the dust evolution model. */ struct dustevo_props { /* ------------ Main operation modes ------------- */ /*! Are we doing grain destruction by sputtering? */ int with_sputtering; /*! Are we doing grain destruction by SNII? */ int with_SNII_destruction; /*! Are we doing grain growth by accretion? */ int with_accretion; /*! Are we using the subgrid T and rho? */ int with_subgrid_props; /*! Are we pairing the dust fractions to cooling? */ int pair_to_cooling; /* ------------ Global parameters ------------- */ /*! Clumping factor assumed for accretion at a given density (default 10.)*/ float clumping_factor; /*! Boost (> 1.) or reduction (< 1.) factor applied to dust diffusion rates * (default 1.) */ float diffusion_rate_boost; /*! Fraction of Fe silicate grains (fayalite) as opposed to Mg (forsterite) * (default 0.5)*/ float nu; /* ----------- Correcting cooling tables ---------- */ /* array of element fractions assumed to be in the dust-phase */ float* logfD; /* ------------ Dust yield tables ----------------- */ /* Yield tables for AGB and SNII */ struct dust_yield_table dyield_AGB; struct dust_yield_table dyield_SNII; /* Path to AGB dust yield table */ char AGB_dyield_path[200]; /* ------------- Dust Mapping -------------------- */ /* metallicity of the Sun */ float solar_metallicity; /* initial abundance of dust species */ float initial_grain_mass_fraction[dust_grain_species_count]; /* mass fraction of each grain type constituted by given element */ float* grain_element_mfrac[dust_grain_species_count]; /* indices of chemistry array for element contributing to each grain */ int* grain_element_indices[dust_grain_species_count]; /* set element count contributing to each grain */ int grain_element_count[dust_grain_species_count]; /* Wiersma solar abundance patterns, for consistency with chemical yields */ double abundance_pattern[chemistry_element_count]; /* Element atomic weights */ float atomic_weight[chemistry_element_count]; /* Element condensation fractions */ float condensation_frac[dust_grain_species_count]; /* Grain accretion coeficients (cgs)*/ float accretion_coeff[dust_grain_species_count]; /* --------------- Other Constants --------------- */ float specific_numSNII; }; /** * @brief initialise structure housing global dust parametrisation. * In particular, flags and values set in the parameter file, * and any hard-coded properties * * @param dp Global dust parameters for initialisation * @param params The parsed parameter file. * @param phys_const The physical constants in internal units. * @param us The current internal system of units. */ void dustevo_props_init_backend(struct dustevo_props* dp, struct swift_params* params, struct feedback_props* fp, struct cooling_function_data* cooling, const struct phys_const* phys_const, const struct unit_system* us); #endif /* SWIFT_DUST_T20_PROPERTIES_H */