Rosenbrock method ODE : Abrupt increase during First iteration

In summary, the conversation discusses solving a set of equations by removing components and setting initial conditions. The initial conditions were set to thermal equilibrium values and the problem was solved automatically while attempting to solve another problem.
  • #1
gurbir_s
11
4
TL;DR Summary
I am using Rosenbrock4 method from Odeint library in C++ to solve a set of differential equations. However, I see that it gives an unusual change in the result for first iteration but afterwards, gives good results. How can I solve it?
The set of equations is
1682164625015.png

I have first tried to solve only first two equations (removing the components of other 4 equations from them.)

This is the output, where first column is the time, 2nd - X_p, and 3rd - X_n

1682164726299.png
 
  • Like
Likes Theia
Physics news on Phys.org
  • #2
How are you setting your initial conditions for this solution?
 
  • #3
berkeman said:
How are you setting your initial conditions for this solution?
The ##X_i##'s are elemental abundances during Big Bang Nucleosynthesis. I set the initial conditions equal to their thermal equilibrium values at that point.

I don't know how, but the problem got solved automatically while I was trying to solve another problem. Idk how. Thanks for your reply.
 
  • Like
Likes berkeman

1. What is the Rosenbrock method for solving ODEs?

The Rosenbrock method is a numerical method used to solve ordinary differential equations (ODEs). It is an implicit method that uses a combination of a predictor-corrector approach and a linear multistep method to approximate the solution of the ODE.

2. How does the Rosenbrock method handle abrupt increases during the first iteration?

During the first iteration, the Rosenbrock method uses an initial guess to predict the solution. If there is an abrupt increase in the solution during this first iteration, the method may not accurately capture it. However, in subsequent iterations, the method adjusts the step size and uses the previous solution to improve the prediction, allowing it to handle abrupt changes more effectively.

3. What are the advantages of using the Rosenbrock method for ODEs?

The Rosenbrock method is a highly accurate method for solving ODEs, especially for stiff equations. It is also efficient and has good stability properties. Additionally, it can handle both linear and nonlinear equations, making it a versatile tool for a wide range of applications.

4. Are there any limitations to using the Rosenbrock method for ODEs?

One limitation of the Rosenbrock method is that it requires the evaluation of the Jacobian matrix, which can be computationally expensive for large systems of equations. It also may not perform well for highly oscillatory solutions or equations with discontinuities.

5. How is the Rosenbrock method different from other numerical methods for ODEs?

The Rosenbrock method differs from other numerical methods, such as the Runge-Kutta method, in that it is an implicit method. This means that it uses the solution at the current time step to predict the solution at the next time step, instead of using the derivative at the current time step. This allows it to handle stiff equations more effectively.

Similar threads

Replies
3
Views
793
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
4
Views
2K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
2
Views
1K
Replies
3
Views
2K
Replies
1
Views
1K
Replies
3
Views
2K
  • Differential Equations
Replies
8
Views
2K
Replies
5
Views
3K
Back
Top