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

Compute high-P limit rate coefficients used for ILS in a PDep network #81

Open
alongd opened this issue Aug 15, 2022 · 0 comments
Open

Comments

@alongd
Copy link
Member

alongd commented Aug 15, 2022

Add the following to determine_reactions_based_on_sa() in main:

        # Get the top X entries from the SA.
        for observable_label, sa_list in sa_dict_max.items():
            sa_list_sorted = sorted(sa_list, key=lambda item: item['max_sa'], reverse=True)
            for i in range(min(self.t3['sensitivity']['top_SA_reactions'], len(sa_list_sorted))):
                reaction = get_reaction_by_index(sa_list_sorted[i]['parameter'] - 1, self.rmg_reactions)
                if self.reaction_requires_refinement(reaction=reaction):
                    num = f'{i+1}{get_ordinal_indicator(i+1)} ' if i else ''
                    reason = f'(i {self.iteration}) the {num}most sensitive reaction for {observable_label}'
                    key = self.add_reaction(reaction=reaction, reasons=reason)
                    if key is not None:
                        reaction_keys.append(key)
                if reaction.kinetics.is_pressure_dependent() \
                        and reaction not in [rxn_tup[0] for rxn_tup in pdep_rxns_to_explore] \
                        and self.t3['sensitivity']['pdep_SA_threshold'] is not None:
                    pdep_rxns_to_explore.append((reaction, i, observable_label))

        # write determine_reactions_from_pdep_network()
        # get all low barrier rxns from a network, compute them if not from library
        # Todo: make sure rate coefficients are perturbed in Arkane PDep SA, consider these rxns here
        reaction_keys.extend(self.determine_reactions_from_pdep_network(pdep_rxns_to_explore=pdep_rxns_to_explore))

And implement the determine_reactions_from_pdep_network() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant