User:Tohline/Appendix/Ramblings/Radiation/CodeUnits
From VisTrailsWiki
 Tiled Menu  Tables of Content  Banner Video  Tohline Home Page  
Contents 
Marcello's RadiationHydro 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, q_{0} = 0.7 simulations. In place of the physical constants, , , , and , Dominic used the following codeunit values — hereafter referred to as Case A:
This means that any temperature in the simulation that has a value T_{code} in code units must represent an actual physical temperature T_{cgs} in cgs units (i.e., measured in Kelvins) of,
any lengthscale in the simulation that has a value must represent an actual physical length in cgs units of,
any time in the simulation that has a value t_{code} must represent an actual physical time t_{cgs} in cgs units of,
and, finally, any mass in the simulation that has a value m_{code} must represent an actual physical mass m_{cgs} in cgs units of,
Now, the SCFcodegenerated polytropic binary that Wes Even gave to Dominic had the following properties, in dimensionless code units:
 [M_{total}]_{code} = 0.85;
 [R_{Accretor}]_{code} = 0.4; and
 [P_{orbit}]_{code} = 31.
According to Dominic's calculations this means that his simulation represents a real binary system with the following properties:
 ;
 ; and
 .
Conversely — assuming pure helium, that is, a mean molecular weight of 2 — since the Thompson crosssection is , Dominic determined that, in the code, he needed to set the Thompson crosssection value to . Finally, Dominic pointed out that the characteristic size of a grid cell in the code is [Δz]_{code} = 0.025. Hence, if only the Thompson crosssection is relevant, the meanfreepath of a photon will equal the size of one grid cell if,
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.

= 

= 


= 

= 


= 

= 


= 

= 

Hence,
General Relations 


= 


= 


= 


= 

For the Case A parameter values adopted by Dominic, above, and for the particular SCFcodegenerated model provided by Wes, I derive,
Case A 

R_{Accretor} 
= 

= 

P_{orbit} 
= 

= 

M_{total} 
= 

= 

These values do not agree with the ones derived by Dominic.
Possible Point of Confusion/Disagreement 
NOTE: Either Dominic wrote the wrong values on my whiteboard or I copied them down incorrectly, but based on the SCFcode parameters that were given to me by Wes Even, in dimensionless code units the model parameters should be: [M_{total}]_{code} = 0.0237 and [R_{Accretor}]_{code} = 0.273 and [P_{orbit}]_{code} = 31.19; the orbital separation is [a_{separation}]_{code} = 0.83938. Combining these values with Dominic's Case A parameter values gives:

On 7/24/2010, Joel checked this boxedin group of numbers against a "polytropic unit conversion spreadsheet" that he developed while at the Lorentz Institute in the Fall of 2010. They are all consistent with Wes Even's SCFgenerated Q07 model. 
Response from Dominic
What he wrote on my whiteboard contained some mistakes. For example, the correct code units for various quantities are:
 [ρ_{max}]_{code} = 1.000;
 [M_{Accretor}]_{code} = 0.403;
 [R_{Accretor}]_{code} = 0.850;
 [P_{orbit}]_{code} = 31.2;
 [M_{total}]_{code} = 0.685; and
 [a_{separation}]_{code} = 2.58.
And when he applies the unit conversions, he gets:
 ;
 ;
 ;
 ;
 ; and
 .
Two other pieces of information are needed in order to reconcile our numbers. First, Dominic has included a value of = 4 / 3 in his cgs value of , that is, he has set . Second, the lengthscale he has adopted in his radhydro code is different from the one that Wes provided straight from the SCF code. In particular, Dominic thinks Wes sets,
whereas, in order to conform to the constraints imposed by HAD, Dominic sets,
Hence, in order to transform from the code units used by Wes (and the SCF code) to code units used by Dominic, every quantity that includes a unit of length must be multiplied by,
Other Thoughts
Notice that Dominic's method for converting from code units to cgs units frequently involves the following ratio of physical constants:
In terms of this new physical constant,



Corrected Logic
Taking all of the above into consideration, the expressions that should be used to convert from Dominic's code units to real units are the following:
General Relations (taking into account) 


Hence, for Dominic's first simulation (Case A), the following conversions apply.
Case A: 

 

When using the above tabulated Case A conversion units, it must be understood that the "code unit" values refer to units used in Dominic's radhydro code. But it should also be appreciated, as discussed above, that the initial model provided to Dominic by Wes — which had been generated by the SCF code — used a different unit of length from Dominic. The conversion factor from SCFcode lengths to the length's used in Dominic's code is:
Hence, beginning with the values of various binary system parameters as generated by the SCF code, we conclude that the initial model used by Dominic in his Case A radhydro simulations has the following properties:
Properties of Initial Q0.7 Polytropic Binary 

Quantity 
SCFcode 
Conversion 
RadHydrocode 
Case A 
M_{Accretor} 
0.01394 

0.4025 

M_{Donor} 
0.009761 

0.2819 

ρ_{Accretor} 
1.000 
1 
1.000 

a_{separation} 
0.8394 

2.575 

P_{orbit} 
31.19 
1 
31.19 

Chandrasekhar Mass and Radius
Review
The characteristic mass, length, and time scales that are associated with a selfgravitating, degenerateelectron gas are identified in an accompanying Wiki page in the context of our discussion of the structure of spherically symmetric white dwarfs and the Chandrasekhar mass. All three of these scales depend on the characteristic Fermi pressure, , and characteristic Fermi density, , that are familiar to the condensedmatter community. As recorded in our accompanying variables appendix, the definition of these two condensedmatter relevant quantities is, respectively,
and,
and the characteristic, astrophysically relevant mass (M_{Ch}) and length scales identified by Chandrasekhar are,
and,
where the dimensionless coefficient m_{3} = 2.01824. We could just as well define a characteristic dynamical timescale associated with white dwarfs as,
.
Application to Unit Conversion Expressions
Rewriting M_{Ch} only in terms of the fundamental physical constants, we obtain,
But also note that,
Hence, we can also write,

= 


= 


= 

Similarly,
so,

= 


= 

And,
so,

= 


= 

Opacities
How should an opacity coefficient be introduced into Dominic's radhydrocode? Let's examine the simplest case of freefree absorption, κ_{T} (i.e., Thompson scattering):
where, , , and are all physical constants defined in an accompanying appendix. Therefore, for Case A (which assumes pure helium, so X = 0), the value of this freefree (Thompson) opacity in code units is,
.
When Thompson scattering dominates the opacity, the meanfreepath of a photon is,
This means that, in Dominic's radhydrocode, will be less than or equal to the size of one radial grid zone, (ΔR)_{Nic_code}, whenever,
It is perhaps more instructive to write this last expression in a form that will permit us to determine how this threshold value of ρ_{code} depends on the chosen set of scaling parameters. Specifically, we can write,
To check this relation, note that when Case A parameter values are used, the combination of factors inside the last set of square brackets gives , which produces the same value for ρ_{threshold} (in code units) as before.
Ratio of Gas Pressure to Radiation Pressure
Let's define the following pressure ratios:
and,
Following Dominic's definition of code units, above: T^{3} should be normalized by ; the mass density should be normalized by the quantity ; and should be replaced by . Hence, the ratio of gas pressure to radiation pressure can be written as,
We might, in addition, ask what the central temperature is in an n = 3 / 2 polytrope. Well, if the gas pressure dominates (i.e., if ),
and in code units,
Hence,
T_{code} 
= 


= 


= 


= 

This, in turn, tells us that at the center of a polytropic star,
This derivation will need to be modified to handle the more general case when Γ is not necessarily large.
SuperEddington Accretion
In the simplest case of spherically symmetric accretion, the Eddington luminosity and accretion luminosity are defined, respectively, as
L_{Edd} 


L_{acc} 


where, , , , and are physical constants defined in an accompanying appendix; M_{a} and R_{a} are the mass and radius of the accreting star; and is the mass accretion rate. Expressed in code units, these two expressions become,

= 


= 


= 


= 

Hence,
that is, the accretion will be superEddington (f_{acc} > 1) if,
For Case A parameters and for the Q0.7 polytropic binary model in which [R_{a}]_{code} = 0.85, the condition for superEddington accretion is,
For purposes of comparison with results from some previously published masstransfer simulations, we should normalize to , where the subscript "0" means initial values. Doing this gives the following condition for superEddington accretion:
© 2014  2019 by Joel E. Tohline 