I am running into an issue with getting my CADET simulation to run. It would be greatly appreciated for someone else to try to get this to run, as I am pretty stuck at this point.
I have included the simulation hdf5 in the following google drive link, since it is too big to attach here.
The error: “Error in simulation: Error in IDASolve: IDA_TOO_MUCH_WORK at t = 1736.000000”
For context:
I am simulating protein elution on a multimodal cation exchange column with weak cationic groups. The inlet profile salt and pH traces are being obtained from a separate MATLAB routine I developed that solves the DAE system of the ideal chromatography model (see Pabst and Carta 2007). Mixing and tubing dispersion are being accounted for in a initial simulation done before the aforementioned subroutine. The resulting inlet profile is used for the CADET simulation to predict the protein elution profile, also in MATLAB.
The error is occurring during the protein loading phase of the simulation, where there is an increase and subsequent decrease in pH due to the kinetics of H+ ions that adsorb and desorb as function of the salt concentration. I am using the GIEX model with the pH dependent terms and five protein components. I think that the changes in pH are causing the kA value to have very large swings (ranging from 6.89e-3 to 7.77e+4) which might be leading to numerical instability. I have tried playing around with the solver tolerances, initial step size, number of time steps, as well as the max number of Newton iterations, error tests, and convergence tests—all no dice. I have also tried different reference concentrations, but this didn’t seem to help.
Hey Scott, I had a quick look at the .h5 file, it looks like the IDA solver is stuck at t=1736 repeatedly and couldn’t solve for the next time step. The solver is complaining about that he couldn’t reach the user-defined t_{end} within the user-defined max_steps.
Thanks for the response, Flynn. I have the same error when I run the simulation from MATLAB. I looked at those links you shared but they didn’t really provide any suggestions on what parameters to tweak to get the simulation to run. When I change the salt concentration during loading (this greatly affects the extent of the pH shift), the simulation runs. So I think that it is probably being caused by the large swings in kA during the loading phase. Changing this salt concentration isn’t representative of the experiment though, so I don’t like this workaround.
Do you have any suggestions on what I can tweak to get the simulation to run? Or is this simply a case of when the DAE is too stiff and the simulation is not possible?
Hey Scott, there is a quick but dirty way to avoid this problem, increase your ABSTOL and RELTOL values.
I was able to get it run by setting both to 1E-3. However, you should try to decrease this value as much as the simulation permits, since it will impact the accuracy of the numerical solution.
Maybe others have smarter ways to deal with this issue.
I was able to get it to run after all by increasing the tolerances to around 5e-5 which ended up still providing reasonable results. Thanks for the help!