# Trying to solve a large system of highly stiff differential equations

**URL:** <https://discourse.julialang.org/t/trying-to-solve-a-large-system-of-highly-stiff-differential-equations/114728>\
**Category:** Numerics\
**Tags:** ode, differentialequation\
**Created:** [May 25, 2024, 4:53pm UTC](https://discourse.julialang.org/t/trying-to-solve-a-large-system-of-highly-stiff-differential-equations/114728 "2024-05-25T16:53:42Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![balaji\_sriram](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/balaji_sriram/32/208000_2.png) [@balaji\_sriram](https://discourse.julialang.org/u/balaji_sriram)\
**Post date:** [June 1, 2024, 12:08pm UTC](https://discourse.julialang.org/t/trying-to-solve-a-large-system-of-highly-stiff-differential-equations/114728/11 "2024-06-01T12:08:41Z")

</div>

Tried using both expv and expv\_timestep from ExponentialUtilities.jl. Used the below codes:

**EXPV:** u0 = 100\*ones(62500);t\_end= 1e-3;  
@time U = expv(t\_end, Jacobianmat, u0; tol=1e-15);

**RESULT:** expv gives correct results only until a t\_end value of 1e-9 seconds, beyond which the values are 0 everywhere, but i need results till a time-span of atleast 1e-3 seconds.  
Note: The max values in the jacobian are of the order 1e12, the minimum nonzero values are 1e-3 and i want to solve the problem till a span of 1e-3 seconds (a large time-span considering the fastest dynamics are 9 orders faster than the slowest dynamics)

**EXPV\_TIMESTEP:** u0 = 100\*ones(62500);ts= (10.0).^Array(-10:0.5:-3);  
@time U = expv\_timestep(ts, Jacobianmat, u0; adaptive=true, tol=1e-7,verbose=true)

**RESULT:** expv\_timestep gives more accurate solutions but the ‘dt’ value was not adaptive (although i set adaptive= true) and the ‘dt’ value was always around 1e-10 seconds (I simulated for about 2-3 days and i only got until 1e-6 seconds. CVODE\_BDF did much better and was able to solve until 200e-6 seconds within 20 hours of simulation time. However CVODE\_BDF too became unstable later on)

Will update the results of adaptive exponential RK methods exprb32 and exprb43 soon.  
Also, I did not want to try fixed time step exponential methods such as exponential RK and exponential propagation iterative methods because I want the results over a large timespan.

---

_[View the full topic](https://discourse.julialang.org/t/trying-to-solve-a-large-system-of-highly-stiff-differential-equations/114728)._
