James Posted December 24, 2023 Share Posted December 24, 2023 Hi, I have a basic question about optimizing X1t runs. When I run my X1t model with built-in mineral dissolution rate laws, the run takes about 18 seconds on my computer - but when I run the same model using custom rate laws that more accurately describe the mineral dissolution, it takes around 550 seconds. This difference becomes more significant if I add more kinetic minerals. Is there a way to optimize my script or configure my runs to speed things up? Any advice would be appreciated. Thanks, James J jj_X1t_OL_PX_Built_In.x1t jj_X1t_OL_PX_Custom.x1t jerdenThermo_2023.tdat IonEx_jj_2023.sdat Quote Link to comment Share on other sites More sharing options...
Jia Wang Posted December 27, 2023 Share Posted December 27, 2023 Hello, I couldn't run your files as they are as I don't have your modified surface datasets for Gibbsite and Goethite. Since your simulation is able to run, I would suggest that you turn on "explain step" (in the Stepping dialogs) and check the 'Follow Output' to see what is limiting the time step size. With these options enabled, you should be able to see what is the limiting constraint to your time steps. I can't be sure how the surface complexation reactions will change your simulation here but it seems like the custom rate laws produce a much higher dissolution rate for olivine than using the Arrhenius equation and the built-in rate law. Faster kinetic reactions will typically require smaller time steps to maintain stability. It is difficult to say how you can reduce run time since I am not really sure what the purpose behind your model. To reduce run time, it would be good to evaluate your reactions and see if they need to be constrained kinetically. Reactions that occur very fast over the course of your simulation may be prescribed as simple equilibrium reactions. Hope this helps, Jia Wang Aqueous Solutions LLC Quote Link to comment Share on other sites More sharing options...
James Posted December 28, 2023 Author Share Posted December 28, 2023 Thanks for the feedback Jia. This is very helpful for narrowing down the issue. James Quote Link to comment Share on other sites More sharing options...
Jia Wang Posted January 3 Share Posted January 3 Hello James, Glad to hear that helped. Best, Jia Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.