Difference between revisions of "User:Tohline/Appendix/Ramblings/Radiation/CodeUnits"

From VistrailsWiki
Jump to navigation Jump to search
(Begin discussion of hydrocode units being used for rad-hydro simulations)
 
m (→‎Determining Code Units: Change large brackets to small brackets; start check of Dominic's logic and numbers)
Line 15: Line 15:
<div align="center">
<div align="center">
<math>
<math>
T_\mathrm{cgs} = \biggl[ \biggl(\frac{c^2}{\Re}\biggr)\biggl(\frac{\tilde{c}^2}{\tilde{r}}\biggr)^{-1} \biggr] T_\mathrm{code} ;
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>
</math>
</div>
</div>
Line 21: Line 21:
<div align="center">
<div align="center">
<math>
<math>
\ell_\mathrm{cgs} = \biggl[\biggl(\frac{\Re^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} ;
\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>
</math>
</div>
</div>
Line 27: Line 27:
<div align="center">
<div align="center">
<math>
<math>
t_\mathrm{cgs} = \biggl[\biggl(\frac{\Re^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} ;
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>
</math>
</div>
</div>
Line 34: Line 34:
<div align="center">
<div align="center">
<math>
<math>
m_\mathrm{cgs} = \biggl[\biggl(\frac{\Re^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} .
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>
</math>
</div>
</div>
Line 40: Line 40:


Now, the SCF-code-generated polytropic binary that Wes Even gave to Dominic had the following properties, in dimensionless code units:
Now, the SCF-code-generated polytropic binary that Wes Even gave to Dominic had the following properties, in dimensionless code units:
* <math>\biggl[M_\mathrm{total}\biggr]_\mathrm{code} = 0.85</math>;
* <math>[M_\mathrm{total}]_\mathrm{code} = 0.85</math>;
* <math>\biggl[R_\mathrm{Accretor}\biggr]_\mathrm{code} = 0.4</math>; and
* <math>[R_\mathrm{Accretor}]_\mathrm{code} = 0.4</math>; and
* <math>\biggl[P_\mathrm{orbit}\biggr]_\mathrm{code} = 0.31</math>.
* <math>[P_\mathrm{orbit}]_\mathrm{code} = 0.31</math>.
According to Dominic's calculations, this means that his simulation represents a real binary system with the following properties:
According to Dominic's calculations &#8212; assuming the mean molecular weight {{User:Tohline/Math/MP_MeanMolecularWeight}} is 2 &#8212; this means that his simulation represents a real binary system with the following properties:
* <math>\biggl[M_\mathrm{total}\biggr]_\mathrm{cgs} = 0.1 M_\odot</math>;
* <math>[M_\mathrm{total}]_\mathrm{cgs} = 0.1 M_\odot</math>;
* <math>\biggl[R_\mathrm{Accretor}\biggr]_\mathrm{cgs} = 0.56 R_\odot</math>; and
* <math>[R_\mathrm{Accretor}]_\mathrm{cgs} = 0.56 R_\odot</math>; and
* <math>\biggl[P_\mathrm{orbit}\biggr]_\mathrm{cgs} = 28~\mathrm{minutes}</math>.
* <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>.
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,
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,
Line 60: Line 60:


===Joel's Check of Dominic's Logic and Numbers===
===Joel's Check of Dominic's Logic and Numbers===
Let's plug in values of the physical units that we have tabulated in a [[User:Tohline/Appendix/Variables_templates|Variables Appendix]] to see if we agree with Dominic's conversions.
<table border="1" align="center" cellpadding="8">
<tr>
  <td align="right">
<math>
\frac{c^2}{\Re}
</math>
  </td>
  <td align="center">
<math>
=
</math>
  </td>
  <td align="left">
<math>
\frac{(3\times 10^{10})^2}{8.314\times 10^7}~\mathrm{cgs}
</math>
  </td>
  <td align="center">
<math>
=
</math>
  </td>
  <td align="left">
<math>
1.083\times 10^{13}~\mathrm{K}
</math>
  </td>
</tr>
<tr>
  <td align="right">
<math>
\biggl(\frac{\Re^4}{c^4 G a_\mathrm{rad}}\biggr)^{1/2}
</math>
  </td>
  <td align="center">
<math>
=
</math>
  </td>
  <td align="left">
<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>
  </td>
  <td align="center">
<math>
=
</math>
  </td>
  <td align="left">
<math>
3.418\times 10^{5}~\mathrm{cm}
</math>
  </td>
</tr>


<tr>
  <td align="right">
<math>
\biggl(\frac{\Re^4}{c^6 G a_\mathrm{rad}}\biggr)^{1/2}
</math>
  </td>
  <td align="center">
<math>
=
</math>
  </td>
  <td align="left">
<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>
  </td>
  <td align="center">
<math>
=
</math>
  </td>
  <td align="left">
<math>
1.140\times 10^{-5}~\mathrm{s}
</math>
  </td>
</tr>
<tr>
  <td align="right">
<math>
\biggl(\frac{\Re^4}{G^3 a_\mathrm{rad}}\biggr)^{1/2}
</math>
  </td>
  <td align="center">
<math>
=
</math>
  </td>
  <td align="left">
<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>
  </td>
  <td align="center">
<math>
=
</math>
  </td>
  <td align="left">
<math>
2.673\times 10^{44}~\mathrm{g}
</math>
  </td>
</tr>
</table>
   
   
&nbsp;<br />
&nbsp;<br />
{{LSU_HBook_footer}}
{{LSU_HBook_footer}}

Revision as of 03:15, 24 July 2010

Whitworth's (1981) Isothermal Free-Energy Surface
|   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>

 

Whitworth's (1981) Isothermal Free-Energy Surface

© 2014 - 2021 by Joel E. Tohline
|   H_Book Home   |   YouTube   |
Appendices: | Equations | Variables | References | Ramblings | Images | myphys.lsu | ADS |
Recommended citation:   Tohline, Joel E. (2021), The Structure, Stability, & Dynamics of Self-Gravitating Fluids, a (MediaWiki-based) Vistrails.org publication, https://www.vistrails.org/index.php/User:Tohline/citation