User:Tohline/Appendix/Ramblings/Radiation/CodeUnits
| Tiled Menu | Tables of Content | Banner Video | Tohline Home Page | |
Marcello's Radiation-Hydro Simulations
Determining Code Units
Logic Used by Dominic Marcello
At our group meeting on 21 July 2010, Dominic explained how he had established the values of various coupling constants in his first, long, <math>q_0 = 0.7</math> simulations. In place of the physical constants, <math>~G</math>, <math>~c</math>, <math>~\Re</math>, and <math>~a_\mathrm{rad}</math>, he used the following code-unit values:
- <math>\tilde{g} = 1</math>
- <math>\tilde{c} = 198</math>
- <math>\tilde{r} = 0.44</math>
- <math>\tilde{a} = 0.044</math>
This means that any temperature in the simulation that has a value <math>T_\mathrm{code}</math> in code units must represent an actual physical temperature <math>T_\mathrm{cgs}</math> in cgs units (i.e., measured in Kelvins) of,
<math> T_\mathrm{cgs} = \biggl[ \biggl(\frac{c^2}{\Re \bar{\mu}^{-1}}\biggr)\biggl(\frac{\tilde{c}^2}{\tilde{r}}\biggr)^{-1} \biggr] T_\mathrm{code} ; </math>
any length-scale in the simulation that has a value <math>\ell_\mathrm{code}</math> must represent an actual physical length <math>\ell_\mathrm{cgs}</math> in cgs units of,
<math> \ell_\mathrm{cgs} = \biggl[\biggl(\frac{\Re^4 \bar{\mu}^{-4}}{c^4 G a_\mathrm{rad}}\biggr)\biggl(\frac{\tilde{r}^4}{\tilde{c}^4 \tilde{g}\tilde{a}}\biggr)^{-1}\biggr]^{1/2} \ell_\mathrm{code} ; </math>
any time in the simulation that has a value <math>t_\mathrm{code}</math> must represent an actual physical time <math>t_\mathrm{cgs}</math> in cgs units of,
<math> t_\mathrm{cgs} = \biggl[\biggl(\frac{\Re^4 \bar{\mu}^{-4}}{c^6 G a_\mathrm{rad}}\biggr)\biggl(\frac{\tilde{r}^4}{\tilde{c}^6 \tilde{g}\tilde{a}}\biggr)^{-1}\biggr]^{1/2} t_\mathrm{code} ; </math>
and, finally, any mass in the simulation that has a value <math>m_\mathrm{code}</math> must represent an actual physical mass <math>m_\mathrm{cgs}</math> in cgs units of,
<math> m_\mathrm{cgs} = \biggl[\biggl(\frac{\Re^4 \bar{\mu}^{-4}}{G^3 a_\mathrm{rad}}\biggr)\biggl(\frac{\tilde{r}^4}{\tilde{g}^3 \tilde{a}}\biggr)^{-1}\biggr]^{1/2} m_\mathrm{code} . </math>
Now, the SCF-code-generated polytropic binary that Wes Even gave to Dominic had the following properties, in dimensionless code units:
- <math>[M_\mathrm{total}]_\mathrm{code} = 0.85</math>;
- <math>[R_\mathrm{Accretor}]_\mathrm{code} = 0.4</math>; and
- <math>[P_\mathrm{orbit}]_\mathrm{code} = 0.31</math>.
According to Dominic's calculations — assuming the mean molecular weight <math>~\bar{\mu}</math> is 2 — this means that his simulation represents a real binary system with the following properties:
- <math>[M_\mathrm{total}]_\mathrm{cgs} = 0.1 M_\odot</math>;
- <math>[R_\mathrm{Accretor}]_\mathrm{cgs} = 0.56 R_\odot</math>; and
- <math>[P_\mathrm{orbit}]_\mathrm{cgs} = 28~\mathrm{minutes}</math>.
Conversely, since in cgs units the Thompson cross-section is <math>[\sigma_T]_\mathrm{cgs} = 0.2~\mathrm{cm}^2~\mathrm{g}^{-1}</math>, Dominic determined that, in the code, he needed to set the Thompson cross-section value to <math>[\sigma_T]_\mathrm{code} = 8\times 10^{12}</math>. Finally, Dominic pointed out that the characteristic size of a grid cell in the code is <math>[\Delta z]_\mathrm{code} = 0.025</math>. Hence, if only the Thompson cross-section is relevant, the mean-free-path of a photon will equal the size of one grid cell if,
<math>
\biggl[\frac{1}{\sigma_T\rho}\biggr]_\mathrm{code} = [\Delta z]_\mathrm{code}
</math>
<math> \Rightarrow ~~~~~ [\rho]_\mathrm{code} = \biggl[\frac{1}{\sigma_T(\Delta z)}\biggr]_\mathrm{code} = \frac{1}{2\times 10^{11}} . </math>
Joel's Check of Dominic's Logic and Numbers
Let's plug in values of the physical units that we have tabulated in a Variables Appendix to see if we agree with Dominic's conversions.
<math> \frac{c^2}{\Re} </math> |
<math> = </math> |
<math> \frac{(3\times 10^{10})^2}{8.314\times 10^7}~\mathrm{cgs} </math> |
<math> = </math> |
<math> 1.083\times 10^{13}~\mathrm{K} </math> |
<math> \biggl(\frac{\Re^4}{c^4 G a_\mathrm{rad}}\biggr)^{1/2} </math> |
<math> = </math> |
<math> \frac{(8.314\times 10^7)^2}{(3\times 10^{10})^2 (6.674\times 10^{-8})^{1/2}(7.566\times 10^{-15})^{1/2}}~\mathrm{cgs} </math> |
<math> = </math> |
<math> 3.418\times 10^{5}~\mathrm{cm} </math> |
<math> \biggl(\frac{\Re^4}{c^6 G a_\mathrm{rad}}\biggr)^{1/2} </math> |
<math> = </math> |
<math> \frac{(8.314\times 10^7)^2}{(3\times 10^{10})^3 (6.674\times 10^{-8})^{1/2}(7.566\times 10^{-15})^{1/2}}~\mathrm{cgs} </math> |
<math> = </math> |
<math> 1.140\times 10^{-5}~\mathrm{s} </math> |
<math> \biggl(\frac{\Re^4}{G^3 a_\mathrm{rad}}\biggr)^{1/2} </math> |
<math> = </math> |
<math> \frac{(8.314\times 10^7)^2}{(6.674\times 10^{-8})^{3/2}(7.566\times 10^{-15})^{1/2}}~\mathrm{cgs} </math> |
<math> = </math> |
<math> 2.673\times 10^{44}~\mathrm{g} </math> |
© 2014 - 2021 by Joel E. Tohline |