A glitch in Jorrie’s Cosmo-Calculator?

  • I
  • Thread starter JimJCW
  • Start date
In summary: The other in main() if (s > 0.9999999 && s < 1.0000001) { z = 0; // the 'now' line, force z to zero } else { z = s - 1; // redshift s=z + 1
  • #106
JimJCW said:
I noticed some discrepancies in results from LightCone8. Let’s use the following input values:
...
Conclusion: The values of Ωm and ΩT calculated with LightCone8 are questionable.
Thanks, I think this is related to https://github.com/light-cone-calc/light-cone-calc/issues/6
but that should have been fixed by https://github.com/light-cone-calc/light-cone-calc/commit/88c1c7324e53476bcc81fd49b23a4280fccb8755
More investigation required, probably over the weekend.
 
Space news on Phys.org
  • #107
Hi @Jorrie and @pbuk,

Would you please let me know where in Jorrie 2021 calculator the circled number shown below is calculated and printed, for example, lines numbers in Calculation.js. I am trying to understand the discrepancy discussed in Post #105.

1657159866487.png
 
  • #108
It is calculated in the main html program, not in Calculate.js

line 356 var OmegaM = (Omega-Ynow * Ynow / Yinf / Yinf) * s_eq / (1+s_eq);

I'm not sure if this should have been "z_eq / (1+z_eq) "
Also take note that it is expressly rounded to 4 decimals for that calculation.
When calculated later in the tables, it is rounded to the requested number pf decimals.

Ps: The densities for the tables are calculated in
Calculation.js line 27: var Om = (Omega - Ol) * (s_eq + 1) / (s_eq + 2);
The (s_eq + 1) / (s_eq + 2) is a mistake that has been prviously pinted out and corrected in Lightcone8 by @pbuk. There is some further processing in lines 243 to 250.
These line numbers are only relevant to the LightCone7-2021-03-12 Version
 
Last edited:
  • #109
Jorrie said:
It is calculated in the main html program, not in Calculate.js . . .

Thanks! This is helpful. The situation is that using the same input, two different values of Ωm,0 are obtained from the calculator, 0.3089 from the main html program and 0.3090 from Calculation.js:

1657275186044.png


1657275224673.png

This suggests that there is an error in the calculator program. @pbuk
 
  • #110
JimJCW said:
This suggests that there is an error in the calculator program. @pbuk
I think the error is in the UI: we should have ## \Omega_{m,0} = \Omega - \Omega_{\Lambda,0} = 1 - 0.691 = 0.309 ##.
 
  • #111
pbuk said:
I think the error is in the UI: we should have ## \Omega_{m,0} = \Omega - \Omega_{\Lambda,0} = 1 - 0.691 = 0.309 ##.

In Calculation.js:

var Ok = 1 - Om - Or - Ol; // curvature density par
 
  • #112
pbuk said:
I think the error is in the UI: we should have ## \Omega_{m,0} = \Omega - \Omega_{\Lambda,0} = 1 - 0.691 = 0.309 ##.
I have checked the UI calculation and it seems to be right if radiation density is included, as it should.
##\Omega_{m,0} = 1-\Omega_{\Lambda,0} - \Omega_{r,0}= 1 - 0,691 - 0,000091637 = 0,308908363##
I obtained the value of ##\Omega_{r,0}## by substituting ##\Omega_{m,0} = S_{eq} \Omega_{r,0}## into the balancing equation.
On the other hand, if I set the columns for enough decimal places in Ligtcone8, ##\Omega_{T,0}## does not equal 1.

1657358364838.png

So the error seems to lie in calculation.js for the columns.
 
  • #113
Jorrie said:
I have checked the UI calculation and it seems to be right if radiation density is included, as it should.
##\Omega_{m,0} = 1-\Omega_{\Lambda,0} - \Omega_{r,0}= 1 - 0,691 - 0,000091637 = 0,308908363##
I obtained the value of ##\Omega_{r,0}## by substituting ##\Omega_{m,0} = S_{eq} \Omega_{r,0}## into the balancing equation.
On the other hand, if I set the columns for enough decimal places in Ligtcone8, ##\Omega_{T,0}## does not equal 1.

View attachment 303936
So the error seems to lie in calculation.js for the columns.

It's the same in LightCone7 (bar imprecision)
1657452255017.png

this isn't surprising as I've used essentially the same calculation as LightCone7
JavaScript:
          rholNow = rhocritNow * Ol;
          rhol = rholNow;
          rhomNow = rhoNow - rhol;
          rhom = rhomNow *s*s*s;
          rhorNow = rhomNow/s_eq;
          rhor = rhorNow *s*s*s*s;
i.e. ## \rho_{m,0} = \rho_{0} - \rho_{\Lambda,0} ##. I guess you are saying this should be ## \rho_{m,0} = \rho_{0} - \rho_{\Lambda,0} - \rho_{R,0} ##?

There's a few other oddities I'm coming across, I think I'm going to end up rewriting the physics from scratch (which means I'm going to have to learn it first!)
 
  • #114
pbuk said:
I guess you are saying this should be ## \rho_{m,0} = \rho_{0} - \rho_{\Lambda,0} - \rho_{R,0} ##?
Yes, at any time, ##\rho_{0} = \rho_{r,0} + \rho_{m,0} + \rho_{\Lambda,0}##. In the case ##\Omega = 1##, this is subject to the constraint$$\rho_{0} = \rho_\mathrm{critical} = \frac{3 H_0^2 }{8 \pi G},$$
since ##\Omega := \rho/\rho_\mathrm{critical}##.
 
  • Like
Likes pbuk
  • #115
pbuk said:
There's a few other oddities I'm coming across, I think I'm going to end up rewriting the physics from scratch (which means I'm going to have to learn it first!)
Yes, the same differences occur in Lightcone7, but it is calculated differently than the value in the UI. I will check that part and make it compatible, because I still feel that the value in the UI is correct.
 
  • #116
Jorrie said:
Yes, the same differences occur in Lightcone7, but it is calculated differently than the value in the UI. I will check that part and make it compatible, because I still feel that the value in the UI is correct.
Minor corrections (red) in Calculation.js required to improve the issue:

var Ol = (Ynow / Yinf) * (Ynow / Yinf); // Lambda density parameter
var Om = (Omega - Ol) * s_eq / (s_eq + 1); // matter density parameter (corrected for radiation)
var Or = Om / s_eq; // Radiation density parameter (corrected for error; was /(s_eq+1)
var Ok = 1 - Om - Or - Ol; // curvature density par

rholNow = rhocritNow * Ol;
rhol = rholNow; // vacuum energy density remains constant
rhomNow = (rhoNow - rhol)*s_eq/(s_eq+1); // Matter energy density corrected for radiation
rhom = rhomNow *s*s*s; // Matter density at time T
rhorNow = rhomNow/s_eq; //radiation at present
rhor = rhorNow *s*s*s*s; // radiation density at time T
rhoT = rhol+rhom+rhor; // total energy density at time T
rhocrit = rhoConst*(H_t/secInGy)*(H_t/secInGy); // critical density at time T
OmegaMatterT = rhom/rhocrit; // Omegas at time T
OmegaLambdaT = rhol/rhocrit;
OmegaRadiationT = rhor/rhocrit;
OmegaTotalT = rhoT/rhocrit;
In Lightconne 7, it gives the correct matter density of 0.308908 at z=0 and a more accurate OmegaT. The drift in OmegaT may be rounding off in Lightcone 7. It will be interesting to see what it does in Lightcone8 with its improved calculation module.

1657527383446.png
 
Last edited:
  • #117
George Jones said:
Yes, at any time, ##\rho_{0} = \rho_{r,0} + \rho_{m,0} + \rho_{\Lambda,0}##. In the case ##\Omega = 1##, this is subject to the constraint$$\rho_{0} = \rho_\mathrm{critical} = \frac{3 H_0^2 }{8 \pi G},$$
since ##\Omega := \rho/\rho_\mathrm{critical}##.
George, how do the equations change in the case where ##\Omega \ne 1##?
I'm asking because I don't think Lightcone7 gives the correct results in such a case.
 
  • #118
Jorrie said:
George, how do the equations change in the case where ##\Omega \ne 1##?
I'm asking because I don't think Lightcone7 gives the correct results in such a case.
I am not sure which equations you mean. ##\Omega = \Omega_r + \Omega_m + \Omega_\Lambda## is always true, as is ##\Omega + \Omega_k = 1##. If ##\Omega = 1##, then ##\Omega_k =0##, but if f ##\Omega \neq 1##, then ##\Omega_k \neq 0##.

Did you have other equations in mind?
 
  • #119
George Jones said:
I am not sure which equations you mean. ##\Omega = \Omega_r + \Omega_m + \Omega_\Lambda## is always true, as is ##\Omega + \Omega_k = 1##. If ##\Omega = 1##, then ##\Omega_k =0##, but if f ##\Omega \neq 1##, then ##\Omega_k \neq 0##.

Did you have other equations in mind?
I suspect @Jorrie is suffering from the same problem as I am with the confusing terminology. I am working on increasing consistency for my rewrite:

Parameters at any particular time: we calculate these.
  • ## \Omega_{m} ## omegaM - density of mass as a fraction of the critical density.
  • ## \Omega_{\Lambda} ## omegaLambda - density of the cosmological constant as a fraction of the critical density.
  • ## \Omega_{rad} ## omegaRad - density of radiation as a fraction of the critical density.
  • ## \Omega ## omega - total density of [stuff] as a fraction of the critical density ## \Omega = \Omega_{m} + \Omega_{\Lambda} + \Omega_{rad} ##.
  • ## \Omega_{K} ## omegaK - Do we bother with this?
Parameters now: we measure these.
  • ## \Omega_{[m,0]} ## omegaM0 - density of mass now as a fraction of the critical density now.
  • ## \Omega_{[\Lambda,0]} ## omegaLambda0 - density of the cosmological constant now as a fraction of the critical density now.
  • ## \Omega_{[rad,0]} ## omegaRad0 - density of radiation now as a fraction of the critical density now.
  • ## \Omega_{0} ## omega0 - total density of [stuff] now as a fraction of the critical density now ## \Omega_{0} = \Omega_{[m,0]} + \Omega_{[\Lambda,0]} + \Omega_{[rad,0]} ##.
  • ## \Omega_{[K,0]} ## omegaK0 - curvature now as a fraction of the critical density now (is this actually constant in all models?) ## \Omega_{[K,0]} = 1 - \Omega_{0} ##.
Now we have a very important equation from a computational point of view:
$$ [something] = \Omega_{[m,0]} s^3 + \Omega_{[rad,0]} s^4 + \Omega_{[\Lambda,0]} s^{3(1+w)} + \Omega_{[K,0]} s^3 $$
Yes I know that ## [something] = \frac{H^2}{H_0^2} ##, but we need a name for this: density parameter?
 
  • #120
pbuk said:
Now we have a very important equation from a computational point of view:
$$ [something] = \Omega_{[m,0]} s^3 + \Omega_{[rad,0]} s^4 + \Omega_{[\Lambda,0]} s^{3(1+w)} + \Omega_{[K,0]} s^3 $$
Yes I know that ## [something] = \frac{H^2}{H_0^2} ##, but we need a name for this: density parameter?
Common practice in cosmology is to write "something" in terms of redshift ##z##, i.e., to substitute ##s = 1 + z## for every ##s##. Common cosmological notation is ## [something] = \frac{H\left(z\right)^2}{H_0^2} =: E\left(z\right)^2##. I am not sure why.
 
  • Love
Likes pbuk
  • #121
George Jones said:
Common cosmological notation is ## [something] = \frac{H\left(z\right)^2}{H_0^2} =: E\left(z\right)^2##.
Excellent, thank you, so adapting that slightly I can write:
$$ E(s)^2 = \Omega_{[m,0]} s^3 + \Omega_{[rad,0]} s^4 + \Omega_{[\Lambda,0]} s^{3(1+w)} + \Omega_{[K,0]} s^2 $$
[The last term in the equation above was corrected from ## \Omega_{[K,0]} s^3 ##.]

Which I can implement for w = -1 as:
const getESquaredAtS = (s) => {
    const s2 = s * s;
    return omegaM0 * s2 * s + omegaLambda0 + omegaRad0 * s2 * s2 + OmegaK * s2;
};
.. and that saves a LOT of calculating square roots and then squaring, converting to different units and then back again.
 
Last edited:
  • Like
Likes George Jones
  • #122
pbuk said:
Excellent, thank you, so adapting that slightly I can write:
$$ E(s)^2 = \Omega_{[m,0]} s^3 + \Omega_{[rad,0]} s^4 + \Omega_{[\Lambda,0]} s^{3(1+w)} + \Omega_{[K,0]} s^3 $$
I think the last term should be ##\Omega_{[K,0]} s^2 ##, because curvature dilates by an inverse square law of the expansion factor.
I see in the code piece you have it right... :wink:
 
  • Like
Likes pbuk and George Jones
  • #123
George Jones said:
I am not sure which equations you mean. ##\Omega = \Omega_r + \Omega_m + \Omega_\Lambda## is always true, as is ##\Omega + \Omega_k = 1##. If ##\Omega = 1##, then ##\Omega_k =0##, but if f ##\Omega \neq 1##, then ##\Omega_k \neq 0##.

Did you have other equations in mind?
No, I just wanted confirmation of my intuition, but I still need to think how to implement it in code.
Perhaps @pbuk has an implementation in mind.
 
  • #124
Jorrie said:
I see in the code piece you have it right... :wink:
Yes, ## \LaTeX ## copy and paste error, thanks.
 
  • #125
Jorrie said:
No, I just wanted confirmation of my intuition, but I still need to think how to implement it in code.
Perhaps @pbuk has an implementation in mind.
I might be able to help, but I do not understand the notation. I have figured out "s" for "stretch". To start, I would like to ask about stuff in the following post.

Jorrie said:
It is calculated in the main html program, not in Calculate.js

line 356 var OmegaM = (Omega-Ynow * Ynow / Yinf / Yinf) * s_eq / (1+s_eq);

I'm not sure if this should have been "z_eq / (1+z_eq) "
Also take note that it is expressly rounded to 4 decimals for that calculation.
When calculated later in the tables, it is rounded to the requested number pf decimals.

Ps: The densities for the tables are calculated in
Calculation.js line 27: var Om = (Omega - Ol) * (s_eq + 1) / (s_eq + 2);
The (s_eq + 1) / (s_eq + 2) is a mistake that has been prviously pinted out and corrected in Lightcone8 by @pbuk. There is some further processing in lines 243 to 250.
These line numbers are only relevant to the LightCone7-2021-03-12 Version
Does OmegaM represent ##\Omega_{m,0}## or ##\Omega_m \left(t\right)##?

What are Ynow and Yinf?
 
  • #126
Jorrie said:
Perhaps @pbuk has an implementation in mind.
I do: by eliminating unnecessary conversions I have got the calculations down to this:
JavaScript:
  const getParamsAtStretch = (s: number): LcdmModelVariables => {
    const eSquared = getESquaredAtStretch(s);
    const s2 = s * s;
    const h = h0 * Math.sqrt(eSquared);
    const omegaM = (omegaM0 * s2 * s) / eSquared;
    const omegaLambda = omegaLambda0 / eSquared;
    const omegaRad = (omegaRad0 * s2 * s2) / eSquared;
    return {
      h,
      omegaM,
      omegaLambda,
      omegaRad,
      temperature: cmbTemperature * s,
      rhoCrit: rhoCrit0 * eSquared,
    };
  };
... and this:
JavaScript:
  for (let i = integrationResults.length - 1; i >= 0; --i) {
    const { s, t, dNow: dUnsafe, dPar } = integrationResults[i];

    const params = model.getParamsAtStretch(s);
    const hGy = params.h * model.kmsmpscToGyr;

    // Force dNow to zero at zero redshift.
    const dNow = s === 1 ? 0 : dUnsafe;

    results.push({
      z: s - 1,
      a: 1 / s,
      s,
      t,
      dNow,
      d: dNow / s,
      r: 1 / hGy,
      dPar,
      vGen: params.h / (s * model.h0),
      vNow: dNow * model.h0Gy,
      v: (dNow * hGy) / s,
      ...params,
    });
  }

I only have one variable I don't quite understand - I've called it vGen, it's called XDpar in the LightCone7 code but displayed in the table as ## V_{gen} / c ## and has the description
1657592419757.png

Is there anything snappier/more descriptive than vGen?
 
  • #127
George Jones said:
Does OmegaM represent ##\Omega_{m,0}## or ##\Omega_m \left(t\right)##?

What are Ynow and Yinf?
Yes, good questions, but the work is done moving away from that code now as in my last post. You can see the work in progress at https://github.com/light-cone-calc/light-cone-calc/blob/refactor/src/model.ts.

My next focus is on the calculation of the current density parameters, here is what we have now (## \Omega, \Omega_{[\Lambda,0]} ## and ## s_{eq} = z_{eq} + 1 ## are provided as parameters e.g. from Planck 2015).
JavaScript:
  const rhoCrit0 = rhoConst * h0Seconds * h0Seconds;
  const omegaM0 = ((omega - omegaLambda0) * seq) / (seq + 1);
  const omegaRad0 = omegaM0 / seq;
  const OmegaK0 = 1 - omegaM0 - omegaRad0 - omegaLambda0;
 
  • Like
Likes George Jones
  • #128
pbuk said:
My next focus is on the calculation of the current density parameters, here is what we have now (## \Omega, \Omega_{[\Lambda,0]} ## and ## s_{eq} = z_{eq} + 1 ## are provided as parameters e.g. from Planck 2015).
##\Omega## or ##\Omega_0##? If ##\Omega_0##, then this is equivalent to taking ##\Omega_{r,0}##, ##\Omega_{m,0}##, and ##\Omega_{\Lambda,0}## as input parameters.

pbuk said:
JavaScript:
  const rhoCrit0 = rhoConst * h0Seconds * h0Seconds;
  const omegaM0 = ((omega - omegaLambda0) * seq) / (seq + 1);
  const omegaRad0 = omegaM0 / seq;
  const OmegaK0 = 1 - omegaM0 - omegaRad0 - omegaLambda0;
At the risk of outlining what folks already know ... radiation-matter equilibrium happens when ##\rho_r = \rho_m##, or, equivalently, when
$$\begin{align}
\Omega_{r,eq} &= \Omega_{m,eq} \\
\Omega_{r,0} s_{eq}^4 &= \Omega_{m,0} s_{eq}^3 \\
\Omega_{r,0} &= \Omega_{m,0} / s_{eq},
\end{align}$$
which is the second-last line in the above code.

To get the second line in the above code, use ##\Omega = \Omega_r + \Omega_m + \Omega_\Lambda## to substitute for ##\Omega_{r,0}##.
$$\begin{align}
\Omega_{r,0} &= \Omega_{m,0} / s_{eq} \\
\Omega_0 - \Omega_{m,0} - \Omega_{\Lambda,0} &= \Omega_{m,0} / s_{eq}. \\
\end{align}$$

Solving for ##\Omega_{m,0}## gives the second line of the code.
 
  • #129
George Jones said:
Does OmegaM represent ##\Omega_{m,0}## or ##\Omega_m \left(t\right)##?

What are Ynow and Yinf?
OmegaM represents ##\Omega_{m,0}##. Later on OmegaMatterT represents ##\Omega_m \left(t\right)##

Ynow and Yinf are inverse Hubble values, i.e. Hubble times now and at t -> infinity
These still come from the late Marcus's inputs.
 
Last edited:
  • Like
Likes George Jones
  • #130
pbuk said:
I only have one variable I don't quite understand - I've called it vGen, it's called XDpar in the LightCone7 code but displayed in the table as ## V_{gen} / c ## and has the description
View attachment 304033
Is there anything snappier/more descriptive than vGen?
AFAICR, the late Marcus and I were thinking of the worldlines of generic particles that presently cross our Hubble sphere. The variable XDpar appeared in the discussion as the ratio Vthen/Vnow and it was specifically included in the columns for purposes of plotting that interesting wordline mentioned. This is how Vgen[eric] came to be. It shows "dramatically" how a particle could enter the Hubble sphere early on and then be accelerated to cross it again, in the generic case, right now.
We used it to work out the crossing and inflection points.
1657604812499.png
 
  • #131
George Jones said:
##\Omega## or ##\Omega_0##? If ##\Omega_0##, then this is equivalent to taking ##\Omega_{r,0}##, ##\Omega_{m,0}##, and ##\Omega_{\Lambda,0}## as input parameters.
Good catch - yes this should be ##\Omega_0##, I will change the variable name.

George Jones said:
At the risk of outlining what folks already know
...
Solving for ##\Omega_{m,0}## gives the second line of the code.
Many thanks, it's good to have it confirmed.
 
  • #132
Jorrie said:
OmegaM represents ##\Omega_{m,0}##. Later on OmegaMatterT represents ##\Omega_m \left(t\right)##

Ynow and Yinf are inverse Hubble values, i.e. Hubble times now and at t -> infinity
These still come from the late Marcus's inputs.

Then, in
Jorrie said:
line 356 var OmegaM = (Omega-Ynow * Ynow / Yinf / Yinf) * s_eq / (1+s_eq);
$$\frac{Y_{now}^2}{Y_\infty ^2} = \frac{H_\infty ^2}{H_0^2} = \Omega_{r,0} s^4 + \Omega_{m,0} s^3 + \Omega_{\Lambda,0} + \Omega_{k,0} s^2$$
when ##w = -1## for dark energy.

If ##R## is used for the universe's scale factor, then ##s := R_0 /R##. In universes close to our own, ##R \rightarrow \infty## as ##t \rightarrow \infty##. Consequently, ##s \rightarrow 0## and ##H\infty ^2 /H_0^2 \rightarrow \Omega_{\Lambda,0}## as ##t \rightarrow \infty##.

Thus, in universes close to our own,
Jorrie said:
line 356 var OmegaM = (Omega-Ynow * Ynow / Yinf / Yinf) * s_eq / (1+s_eq);
is equivalent to
pbuk said:
const omegaM0 = ((omega - omegaLambda0) * seq) / (seq + 1);

The version with ##\Omega_{\Lambda,0}## should also work in universes that are not close to our own.
 
Last edited:
  • #133
I think I'm all done now, I've updated LightCone8 at https://light-cone-calc.github.io/, everything should work including unit conversions and all. One final thing: LightCone7 uses a CMB temperature of 2.75 K, I have been using 2.7548 K in LightCone8, hope that is OK.

The recession rate chart is exactly the same as LightCone7.
1657644886118.png
 
  • #134
George Jones said:
The version with ##\Omega_{\Lambda,0}## should also work in universes that are not close to our own.
That's good as that's what I've used and the UI allows entering the parameters to suit different universes!
 
  • #135
pbuk said:
think I'm all done now, I've updated LightCone8 at https://light-cone-calc.github.io/, everything should work including unit conversions and all. One final thing: LightCone7 uses a CMB temperature of 2.75 K, I have been using 2.7548 K in LightCone8, hope that is OK.
Great Job! Now we have the UI and the tables agreeing on ##\Omega_m## and also ##\Omega## staying at precisely 1. 00... I have also checked that for ##\Omega \ne 1## the behavior seems to be as expected (and interesting!).
1657689993777.png

1657699652979.png


##\Omega## had to start very much closer to 1 and diverged to the requested 1.1 at present, but then the cosmological constant will drive it back towards 1 (for ##w=-1## at least)
 

Attachments

  • 1657690059467.png
    1657690059467.png
    8.6 KB · Views: 72
Last edited:
  • #136
Jorrie said:
Minor corrections (red) in Calculation.js required to improve the issue:

var Ol = (Ynow / Yinf) * (Ynow / Yinf); // Lambda density parameter
var Om = (Omega - Ol) * s_eq / (s_eq + 1); // matter density parameter (corrected for radiation)
var Or = Om / s_eq; // Radiation density parameter (corrected for error; was /(s_eq+1)
var Ok = 1 - Om - Or - Ol; // curvature density par

rholNow = rhocritNow * Ol;
rhol = rholNow; // vacuum energy density remains constant
rhomNow = (rhoNow - rhol)*s_eq/(s_eq+1); // Matter energy density corrected for radiation
rhom = rhomNow *s*s*s; // Matter density at time T

I think these changes are incorrect. The following statements near Line 27 and Line 325 in Calculation.js,

1657708115020.png

correctly represent the following equations (note that s_eq = zeq in LightCone7),

Ωm = (Ω – ΩΛ) (zeq + 1) / (zeq + 2)​
ΩR = Ωm / (zeq + 1) .​

They are consistent with equations in Tutorial, part III:

Ωm = (Ω - ΩΛ) Seq / (1 + Seq)​
ΩR = Ωm / Seq ,​

where Seq = zeq + 1.

However, the following statements near Line 261,

1657708388535.png

should be changed to,

rhomNow = (rhoNow - rhol) * (s_eq + 1) / (s_eq + 2);​
rhom = rhomNow *s*s*s;​
rhorNow = rhomNow / (s_eq + 1);​

I believe this is the source of the error discussed in Post #109. @pbuk
 
  • #137
JimJCW said:
I think these changes are incorrect.
...
should be changed to,

rhomNow = (rhoNow - rhol) * (s_eq + 1) / (s_eq + 2);​
rhom = rhomNow *s*s*s;​
rhorNow = rhomNow / (s_eq + 1);​

I believe this is the source of the error discussed in Post #109. @pbuk
Yes you are probably right, however LightCone8 now calculates everything differently as discussed above. By going back to square one on the Physics, aided by @George Jones cross-check to the equations used, I have eliminated the intermediate calculations involving the various densities as below:

https://github.com/cosmic-expansion...bc785935a20b65cda6beb725897/src/model.ts#L201

JavaScript:
      const eSquared = getESquaredAtStretch(s);
      const s2 = s * s;
      const h = h0 * Math.sqrt(eSquared);
      const omegaM = (omegaM0 * s2 * s) / eSquared;
      const omegaLambda = omegaLambda0 / eSquared;
      const omegaRad = (omegaRad0 * s2 * s2) / eSquared;
      return {
        h,
        omegaM,
        omegaLambda,
        omegaRad,
        omega: omegaM + omegaLambda + omegaRad,
        temperature: temperature0 * s,
        rhoCrit: rhoCrit0 * eSquared,
      };
 
  • #138
pbuk said:
aided by @George Jones cross-check to the equations used
@Jorrie and @pbuk have done tremendous work on LightCone; I haven't done that much. All the stuff I have done in this thread has been performed at coffee shops while "on vacation" at my in-laws' place (11 loud people in the house), and while 3300km from my books. Flying home today.

Sent from my Tim Hortons at Major MacK and Jane.
 
  • Like
Likes pbuk
  • #139
George Jones said:
@Jorrie and @pbuk have done tremendous work on LightCone; I haven't done that much.
That's exactly why your contribution has been valuable - it is always important to have eyes on the detail from outside the core team.
 
  • #140
I have updated the Lightcone Tutorial sections to reflect the present status. Will the other members of the core team please comment, specifically on what we should have in Part III, the calculation section.
 

Similar threads

Replies
15
Views
2K
  • Cosmology
3
Replies
100
Views
5K
Replies
18
Views
2K
Replies
4
Views
2K
Replies
17
Views
2K
Replies
1
Views
1K
Replies
5
Views
3K
  • Astronomy and Astrophysics
Replies
19
Views
4K
Replies
1
Views
3K
  • Special and General Relativity
2
Replies
66
Views
12K
Back
Top