KineticPreProcessor / KPP

The KPP kinetic preprocessor is a software tool that assists the computer simulation of chemical kinetic systems
GNU General Public License v3.0
19 stars 11 forks source link

KPP reaction rates and photolysis coefficient in .eqn file #90

Closed Giorgio4766 closed 6 months ago

Giorgio4766 commented 7 months ago

I am setting up a simulation that includes the presence of photolysis in some reactions. I read in the manual for release 3.0.0 (page 25)

__For photolysis reactions, hv can be specified as one of the reagents to indicate that light (ℎ𝜈) is needed for this reaction, e.g.: NO2 + hv = NO + O : J_NO2;__

J_NO2 defines the photolysis rate. However, should I define J_NO2 (for example) in the ROOT.def file? I struggle a bit with the setting up of this class of reactions.

I am also writing the .eqn files for the MOZART system. The reaction rates I have are not all directly referable to ARR_ab_dp, k3rd_jpl_dp for instance but need to be expressed more or less explicitly like this for instance :

_{1} A + B = C + D : k3rd_jpl_dp(CFACTOR,2.000e-30,4.4,1.400e-12,0.7,0.6) ARR_ab_dp(3.77e26,11000); {2} E + F = G + H : 1.1E-10TEMP ; . . . ._

Would such an .eqn file like this accepted by KPP? Thank you.

RolfSander commented 7 months ago

If you have any external input that affects a reaction rate (e.g., the solar zenith angle affects photolysis reactions), then the best way is to put the definitions into a F90_RCONST block:

https://kpp.readthedocs.io/en/stable/using_kpp/04_input_for_kpp.html?f90-rconst#f90-rconst

KPP accepts pretty much everything between the colon and the semicolon. Whatever is there is transferred to the KPP-generated Fortran files. Thus, in should be a code fragment in valid Fortran syntax.

RolfSander commented 6 months ago

Does this answer solve your problem? If yes, I'd like to close this issue.

Giorgio4766 commented 6 months ago

Yes it does.

From: Rolf Sander @.> Sent: Monday, January 15, 2024 3:42 PM To: KineticPreProcessor/KPP @.> Cc: Taverna, Giorgio Salvatore (IMKTRO) @.>; Author @.> Subject: Re: [KineticPreProcessor/KPP] KPP reaction rates and photolysis coefficient in .eqn file (Issue #90)

Does this answer solve your problem? If yes, I'd like to close this issue.

— Reply to this email directly, view it on GitHubhttps://github.com/KineticPreProcessor/KPP/issues/90#issuecomment-1892303334, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5U3QF6GA4QSNKSZERFTVCDYOU54TAVCNFSM6AAAAABATLK6DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSGMYDGMZTGQ. You are receiving this because you authored the thread.Message ID: @.**@.>>