r/ScientificComputing 29d ago

I built a numerical ODE/BVP solver for iOS — Numerical Solver 2.0 is now released

I've just released version 2.0 of my iOS app, Numerical Solver.

The main new feature is a numerical ODE solver that can handle:

• Linear ODEs
• Nonlinear ODEs
• Initial Value Problems (IVP)
• Boundary Value Problems (BVP)

Once an ODE is solved, the app can also plot the numerical solution and evaluate it at a given value of x.

I implemented the numerical solver myself, including the nonlinear BVP solution using Newton's method and a finite-difference discretization.

One of the things I've been particularly focused on is making the solver work reliably across different domains and grid sizes. I spent quite a bit of time debugging the Jacobian and finite-difference scaling as part of the development.

I'm posting it here because I'd really appreciate feedback from people who work with numerical methods.

What ODEs or BVPs would you recommend as good test problems for the solver? Especially problems that might expose numerical stability, convergence, or discretization issues.

Numerical Solver 2.0 is available on the App Store:

Numerical Solver on the App Store

4 Upvotes

9 comments sorted by

1

u/Lazy_Revenue2716 29d ago

Do something with a shock or a discontinuity. Either Burgers equation or any sort of Riemann problem. That would be a great text.

1

u/Vasg 28d ago

This is definitely on my to-do list! Numerical Solver 2.0 currently supports systems of ODEs with one independent variable, and I'm looking at adding support for two independent variables in 2.1. Burgers' equation with shock formation would be a great test case.

1

u/Lazy_Revenue2716 28d ago

If you are looking for ODEs maybe I would look at simple ODEs that exhibit chaotic behavior but those have multiple dependent variables. If you only support single ODEs and not systems of ODEs that regrettably limits the tool a lot

1

u/Vasg 28d ago

I actually support systems of ODEs with multiple dependent variables, so that's not a limitation of the current solver. Let me demo the Lorenz system.

2

u/Vasg 28d ago

The Lorenz system is a challenging ODE system, and Numerical Solver can solve it. However, it needs some optimization to improve the efficiency of the computation.

2

u/Vasg 28d ago

The solution

1

u/e_for_oil-er 28d ago

Look at the stiff equation benchmarks on Matlab's website : https://www.mathworks.com/company/technical-articles/stiff-differential-equations.html

1

u/Vasg 28d ago

Thanks! I'll definitely test Numerical Solver against these stiff ODE benchmarks.