I Rosenbrock method ODE : Abrupt increase during First iteration

gurbir_s
Messages
11
Reaction score
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
 
Physics news on Phys.org
How are you setting your initial conditions for this solution?
 
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.
 
There is the following linear Volterra equation of the second kind $$ y(x)+\int_{0}^{x} K(x-s) y(s)\,{\rm d}s = 1 $$ with kernel $$ K(x-s) = 1 - 4 \sum_{n=1}^{\infty} \dfrac{1}{\lambda_n^2} e^{-\beta \lambda_n^2 (x-s)} $$ where $y(0)=1$, $\beta>0$ and $\lambda_n$ is the $n$-th positive root of the equation $J_0(x)=0$ (here $n$ is a natural number that numbers these positive roots in the order of increasing their values), $J_0(x)$ is the Bessel function of the first kind of zero order. I...
Are there any good visualization tutorials, written or video, that show graphically how separation of variables works? I particularly have the time-independent Schrodinger Equation in mind. There are hundreds of demonstrations out there which essentially distill to copies of one another. However I am trying to visualize in my mind how this process looks graphically - for example plotting t on one axis and x on the other for f(x,t). I have seen other good visual representations of...
Back
Top