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

Setting ROS3 solver #85

Closed Giorgio4766 closed 6 months ago

Giorgio4766 commented 7 months ago

Ask a question about KPP:

I think I need help to make sure I set the ROS3 solver for my final simulations. Here are some details.

-ICNTRL_U(3)=2 in kpp/int/rosenbrock.f90 -I build the mechanism with the command kpp my_experiment.kpp

Only if I manually change ICNTRL_U(3)=2in my_experiment_Main.f90, becoming inICNTRL_U = (/ 0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /)I get the right solver (ROS3). A print statement in my_experiment_Integrator.f90 shows that.

Adding ICNTRL_U(3)=2 in kpp/int/rosenbrock.f90 is irrelevant.

I think that ICNTRL_U = (/ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /) in my_experiment_Main.f90 was not originally there. I added it, but I might be wrong.

I hope it is clear. I wonder if there is a more efficient way (probably) to set up the ROS3 solver. If this is the case please let me know. Thanks.

RolfSander commented 7 months ago

Your file my_experiment_Main.f90 seems to be created from drv/general.f90 in KPP version 2.

In the new KPP version 3, drv/general.f90 is slightly different:

https://github.com/KineticPreProcessor/KPP/blob/main/drv/general.f90

Now, the array ICNTRL is defined and used as input for CALL INTEGRATE. Each element can be set indiviually, if you want some non-default behaviour. For example, you can add ICNTRL(3)=2 before CALL INTEGRATE.

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:43 PM To: KineticPreProcessor/KPP @.> Cc: Taverna, Giorgio Salvatore (IMKTRO) @.>; Author @.> Subject: Re: [KineticPreProcessor/KPP] Setting ROS3 solver (Issue #85)

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/85#issuecomment-1892304850, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5U3QFYRSYRYZYROSC26TQDYOU575AVCNFSM6AAAAABAGW7SGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSGMYDIOBVGA. You are receiving this because you authored the thread.Message ID: @.**@.>>