1
$\begingroup$

I tried this formula for WW Aur:

$$a(R_\mathrm{nom}) = \sqrt[3]{\frac{P(\mathrm{d})^2}{365.2564^2}[M_1(M_{\mathrm{nom}})+M_2(M_{\mathrm{nom}})]} \cdot \frac{149597870.7}{695700}$$

What is wrong, please?

# WW Aur test

R_sol_km = 695700
year_day = 365.2564
AU_km = 149597870.7



P = 2.52501941 # d
M1 = 1.964     # M_sol
M2 = 1.814     # M_sol
a = 12.15      # R:sol


print('a: should be:', a, 'is:', (P**2/year_day**2*(M1+M2))**(1/3)*AU_km/R_sol_km)

Output:

a: should be: 12.15 is: 0.012941299276573308
$\endgroup$
7
  • 2
    $\begingroup$ It's unit conversion. You're squaring the period in days, but you're not squaring the number of years per day. As a result, the formula you're using is giving an incorrect value. $\endgroup$
    – notovny
    Commented Jul 6, 2022 at 13:19
  • $\begingroup$ Thank you very much. And now? Is factor 1000 missing somewhere, please? $\endgroup$
    – Anna-Kat
    Commented Jul 6, 2022 at 13:47
  • 1
    $\begingroup$ You're probably hitting an Order of operations issue with your exponentiation occurring before the division, so you need to wrap parentheses around (1/3). I also have no idea why you're multiplying the result by AU_km/R_sol_km $\endgroup$
    – notovny
    Commented Jul 6, 2022 at 14:33
  • 2
    $\begingroup$ You aren't showing the values you are using for year_day, AU_km, or R_sol_km in your python code snippet. You should indeed get about 12.15 solar radii. $\endgroup$ Commented Jul 6, 2022 at 14:51
  • 2
    $\begingroup$ @notovny The questioner is trying to express the semi-major axis length of the orbit of the two components of WW Aur about one another in units of solar radii. $\endgroup$ Commented Jul 6, 2022 at 14:52

1 Answer 1

2
$\begingroup$

I tried running your script exactly as it is and it gives me

a: should be: 12.15 is: 12.153517320591716

Try clearing your python console and running it again, it should work!

$\endgroup$
1
  • $\begingroup$ Thank you very much $\endgroup$
    – Anna-Kat
    Commented Jul 7, 2022 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .