Message Boards Message Boards


How to solve the TOV equation?

Posted 8 years ago
2 Replies
0 Total Likes

The TOV equation,
For a real example?

dP(r)/dr=-G/c^2   (((c^2 ?(r))(c^2 M(r)+4?r^3 P(r))))/(r(c^2-2Gm(r)))      
dM(r)/dr=4?r^2 ?(r)    

in which?G is Gravitational constant?approximately 6.673×10?11 N·(m/kg)2?and c is Speed of light?approximately 3×10 8 m/s, R&?_0 are two constant which can be self selected. I try to solve this equation through NDSolve function,but do not get the correct M-r revelation.The Output is {}. Please give me some advices, thank you! \(???)/

POSTED BY: Lingxiao Wang
2 Replies

Did you input values for the constants? NDSolve is a numeric algorithm.

POSTED BY: Frank Kampas
Posted 8 years ago

Yes.After a night, I give the right code(Maybe).But now I meet new problem, I can't give the right values for the initial parameters. Thank you all the same.

POSTED BY: Lingxiao Wang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract