1

I'm trying to use newton-raphson method for nonlinear systems of equations as discribed in 'Numerical recipies' book in chapter 9.6 to solve the hydrostatic equetion for a polytropic star.

For each iteration, I change the radius vector as discribed in the book like x-> x+delta (delta can be calculated for each iteration) but I can't ignore the fact that it can do shell crossing - meaning the i shell moves to a higer shell then i+1 , this cause a negative volume. I know there is a method to avoid shell crossing by multiplying delta with a factor but I don't know how to calculate it. There is no description in the book about shell crossing.

Do anyone know how to help? thank's

4

0 回答 0