I’m trying to use NDSolve to solve a set of ~400k equations. The problem I met is: when I ran the evaluation, Mathematica (version 11.0) raised an error:
NDSolve::ntdv: Cannot solve to find an explicit formula for the derivatives. Consider using the option Method->{"EquationSimplification"->"Residual"}.
However, after I added the option Method->{"EquationSimplification"->"Residual"} into the evaluation, it took almost 24h to get the anwsers.
So, what does the option Method->{"EquationSimplification"->"Residual"} really means? Are there other ways I can get the equations solved correctly and quickly, maybe in 1h?
Are there any useful suggestions to speed up my evaluation?
Thanks a lot!!!
I have a fast machine but it took only 20 minutes. I am using Mathematica 12. I suspect your machine has a physical bottleneck (too little RAM, or some other issue)
Try stepping up to successively larger problems to see where the problem is. For example, When I run this:
My suggestion is to start with a smaller problem and try various solver options in the documentation here or advanced topics. and time the solve (as above). Find the settings that work best for your problem and then scale back up to the larger problems.
You asked about Method->{“EquationSimplification”->“Residual”}. Instead of solving the equations in the form y'[t] = f[y[t]], Mathematica uses a DAE solver on your unaltered equations. There are more details in the links above.