Quantcast
  • Register
PhysicsOverflow is a next-generation academic platform for physicists and astronomers, including a community peer review system and a postgraduate-level discussion forum analogous to MathOverflow.

Welcome to PhysicsOverflow! PhysicsOverflow is an open platform for community peer review and graduate-level Physics discussion.

Please help promote PhysicsOverflow ads elsewhere if you like it.

News

PO is now at the Physics Department of Bielefeld University!

New printer friendly PO pages!

Migration to Bielefeld University was successful!

Please vote for this year's PhysicsOverflow ads!

Please do help out in categorising submissions. Submit a paper to PhysicsOverflow!

... see more

Tools for paper authors

Submit paper
Claim Paper Authorship

Tools for SE users

Search User
Reclaim SE Account
Request Account Merger
Nativise imported posts
Claim post (deleted users)
Import SE post

Users whose questions have been imported from Physics Stack Exchange, Theoretical Physics Stack Exchange, or any other Stack Exchange site are kindly requested to reclaim their account and not to register as a new user.

Public \(\beta\) tools

Report a bug with a feature
Request a new functionality
404 page design
Send feedback

Attributions

(propose a free ad)

Site Statistics

206 submissions , 164 unreviewed
5,103 questions , 2,249 unanswered
5,355 answers , 22,794 comments
1,470 users with positive rep
820 active unimported users
More ...

  Numerical solution for Friedmann equations

+ 1 like - 0 dislike
2825 views

My problem today is to solve the Friedmann equations, for those who aren't familiar with them, here they are (in my specific case):

$$ \left ( \frac{\dot{a}}{a^2} \right )^2 = \frac{\rho_1}{a^4} - \frac{\rho_2}{a^6} $$

So, my idea for solving this is to discretise in time, namely, write: $$ \dot{a} = \pm \sqrt{\rho_1 - \frac{\rho_2}{a^2} }$$ And then $$ \dot{a} = \frac{a_{i+1} - a_{i}}{dt}$$ Now, I want to start with $\dot{a} < 0$, and make it "bounce". Namely, if you solve these equations analytically, you get: $$ a(t) = \sqrt{\rho_1 t^2 + \frac{\rho_2}{\rho_1}} $$ Meaning that $a(t)$ has a minimum value, at $t = 0$. However, using time discretisation one gets( in the phase when $\dot{a}<0$ $$ a_{i+1} = a_i - dt \sqrt{\rho_1 - \frac{\rho_2}{a_i^2} }$$ Which at some point becomes complex.

This procedure has obviously some flaws, how can I correct it? I would like to write an algorithm that solves numerically using some sort of time discretisation, since I later will need to implement for a time variable $\rho_2(t)$. The algorithm must reproduce the analytical solution, with the feature that, once we have reached the minimum value for $a(t)$, it stops decreasing and starts increasing.

Any help is appreciated.

This post imported from StackExchange Physics at 2015-03-23 08:53 (UTC), posted by SE-user MrFermiMr
asked Dec 24, 2014 in Astronomy by MrFermiMr (5 points) [ no revision ]
Would Computational Science be a better home for this question?

This post imported from StackExchange Physics at 2015-03-23 08:53 (UTC), posted by SE-user Qmechanic
You need an implicit differential equation solver.

This post imported from StackExchange Physics at 2015-03-23 08:53 (UTC), posted by SE-user CuriousOne
Pulsar's answer to this question may be useful. See also Did the Big Bang happen at a point? and How does the Hubble parameter change with the age of the universe?, which use Pulsar's results to calculate $a(t)$.

This post imported from StackExchange Physics at 2015-03-23 08:53 (UTC), posted by SE-user John Rennie

1 Answer

+ 3 like - 0 dislike

Rearranging your first equation you get $$\dot{a}^2 = \rho_1 - \frac{\rho_2}{a^2}$$ In this case you need only to give an initial condition $a(0)>\sqrt{\rho_2/\rho_1}$.

If you want to reach the bounce, integrate with a negative velocity forward in time (or vice versa), i.e. $\dot{a}=-\sqrt{\rho_1 -\rho_2/a^2}, \Delta t > 0$. Once you reach the bounce $a^2=\rho_2/\rho_1$ (or $\dot{a}=0$), switch the sign of the velocity so that your universe grows instead of shrinking. (Beware of NaNs from square-rooting a negative number!)

Note that the solution is not uniquely determined at the very point of the bounce - there are two possible branches, a real and a complex one, corresponding to negative and positive velocity. We choose the real one because of physical reasons. (See Picard theorem on existence and uniqueness of first order ODEs.)

This post imported from StackExchange Physics at 2015-03-23 08:53 (UTC), posted by SE-user Void
answered Dec 24, 2014 by Void (1,645 points) [ no revision ]
No, the equation and the solutions are correct. The solution to your equation is also a bounce, but given by logarithm.. But thanks anyway, i'll try the change of sign..

This post imported from StackExchange Physics at 2015-03-23 08:53 (UTC), posted by SE-user MrFermiMr
@MrFermiMr Yes, sorry, I misread your first equation which is usually given in terms of $\dot{a}^2/a^2$ rather than $\dot{a}^2/a^4$ on the left hand side. Corrected.

This post imported from StackExchange Physics at 2015-03-23 08:53 (UTC), posted by SE-user Void
Yes, it's written in conformal time $dt = a(t') \; dt'$.. Actually i think that's precisely what happens: the solution goes and then, precisely at $a = \sqrt{\rho_1/\rho_2}$ the solution becomes complex. It is just a matter of telling mathematica to change sign when the complex part becomes non zero, and i should be good.

This post imported from StackExchange Physics at 2015-03-23 08:53 (UTC), posted by SE-user MrFermiMr

Your answer

Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead.
To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL.
Please consult the FAQ for as to how to format your post.
This is the answer box; if you want to write a comment instead, please use the 'add comment' button.
Live preview (may slow down editor)   Preview
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:
p$\hbar$ysics$\varnothing$verflow
Then drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds).
Please complete the anti-spam verification




user contributions licensed under cc by-sa 3.0 with attribution required

Your rights
...