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
22 stars 11 forks source link

H211b adaptive time-stepping #105

Open RolfSander opened 4 months ago

RolfSander commented 4 months ago

We already have the solver rosenbrock_posdef_h211b_qssa in the user_contributed directory. Unfortunately, it has not been maintained recently, and it hasn't worked with KPP3. Together with colleagues from Jülich, I have now upgraded it so that it works out-of-the-box. We are also writing a manuscript about the solver which should be ready soon. The new code is in the branch https://github.com/KineticPreProcessor/KPP/tree/feature/h211b. It contains the new solver file int/rosenbrock_h211b_qssa.f90. You can also find a simple test case in examples/mcm_h211b.

I hope that the code will be ready for a pull request soon. In the meantime, please let me know if you have any comments or suggestions...

yantosca commented 4 months ago

Thanks @RolfSander. I pushed a fix to the feature/h211b branch. Also am working on adding C-I tests.

RolfSander commented 4 months ago

Oops. Thanks for the fix!

yantosca commented 4 months ago

I also pushed some fixes for the examples & C-I tests. We now have C-I tests for mcm and `mcm_h211b. Here is a log of the output: ci_log.txt

RolfSander commented 4 months ago

Thanks for adding the C-I tests!

I have a couple of comments/suggestions about the latest commit:

yantosca commented 4 months ago

Thanks @RolfSander. I can revert the changes. The problem that I was having is that the C-I tests were failing because the name of the folder is mcm_h211b but the KPP file is mcm.kpp. I can try to fix that so we don't change the MCM-related code that much.

RolfSander commented 4 months ago

If the only requirement is that the *.kpp file has the same basename as the directory, maybe it is sufficient to rename mcm_h211b/mcm.kpp to mcm_h211b/mcm_h211b.kpp and keep the other files unchanged?

ps: It seems you've reverted everything now, including all the other (very helpful) edits you've made. I hope it will be possible to re-introduce them...

yantosca commented 4 months ago

Thanks @RolfSander. I'll re-introduce what I did. Stay tuned.

yantosca commented 4 months ago

Hi @RolfSander. I pushed some fixes. I edited the C-I test scripts so that you can specify not only the name of the folder but the name of the mechanism. This allows us to use mcm.kpp for both the MCM and MCM_H211b examples.

I also restored the run scripts (now named run_example.csh and run_example.sh) and made sure that the C-I tests build. Should be OK now.

RolfSander commented 4 months ago

Thanks, this looks good now!