uploading the implicit12 solver files#101
uploading the implicit12 solver files#101maqsoodrajput wants to merge 1 commit intoKineticPreProcessor:devfrom
Conversation
I have designed a new solver that is faster than the default Rosenbrock solvers. This new solver is inspired by the IMEX solver. I developed it using the standard BE and Sdirk2a because an explicit method would not work for stiff problems. This new solver gave me a 5X speed-up when I used it with the ICON-ART model. The speed-up outweighed the minor loss in accuracy. There are two files added: - implicit12.f90 - implicit12.def
|
Thanks @maqsoodrajput for this. I am at the International GEOS-Chem Conference this week so I may be slow to get to this PR. But this sounds like a great new feature for KPP. I can also try to set up the C-I tests for this integrator. Also tagging @RolfSander @obin1 @msl3v @jimmielin |
|
@maqsoodrajput excellent! |
|
Thanks @maqsoodrajput for providing the new KPP integrator! I will run |
|
@maqsoodrajput @RolfSander: I have been running into an issue where the updated time isn't getting passed back via RSTATUS. I set up a test case with the small_strato mechanism. 0.0%. T=0.432E+05 O1D= 0.9906E+02; O= 0.6624E+09; O3= 0.5326E+12; NO= 0.8725E+09; NO2= 0.2240E+09; O2= 0.1697E+17;
### TIN, TOUT, in main 43200.000000000000 44100.000000000000
### ierr:, in sdirk 0
### tinitial, tfinal, in sdirk before calling sdirk_integrator: 43200.000000000000 44100.000000000000
### RSTATUS in Sdirk: 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
### RSTATE in Main 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
### T 0.0000000000000000 I'm still digging but this means that the simulation is basically stuck in an infinite loop on the same timestep. Feedback greatly appreciated! My updates are in the |
I've added the following code at the end of SDirk_Integrator, which solves the issue in the previous comment: !~~~> End of simplified Newton iterations
! Successful return
Ierr = 1
! Return updated time
RSTATUS(Ntexit) = Tfinal
RSTATUS(Nhexit) = H
END SUBROUTINE SDIRK_IntegratorLet me know if you all think this isn't the right thing to do. |
yantosca
left a comment
There was a problem hiding this comment.
I now approve as I was able to get the C-I test for implicit 12 to work properly.
|
@maqsoodrajput: Would you like to write a few lines about your new |
|
@maqsoodrajput: I may try your new integrator within the GEOS-Chem mechanism. Would you have a paper reference that I can cite (and that we can add to the KPP documentation)? |
|
Hi @yantosca, apologies for not responding. I could not secure funding for this project, therefore I could not finish the documentation/paper. I would be happy to participate in a paper. I have tested the solver in the box model and it also works well for ICON-ART. It would be great to run it with GEOS-Chem mechanism. |
Hi, apologies for super late response. The project did get extension so I had to stop on this one. I can find some time now and write documentation. |
|
@maqsoodrajput mentioned that he can find some time now to write the |
|
@RolfSander yes we can wait. |
I have designed a new solver that is faster than the default Rosenbrock solvers. This new solver is inspired by the IMEX solver. I developed it using the standard BE and Sdirk2a because an explicit method would not work for stiff problems. This new solver gave me a 5X speed-up when I used it with the ICON-ART model. The speed-up outweighed the minor loss in accuracy.
There are two files added: