accretionpy 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
accretionpy/__init__.py
ADDED
accretionpy/accretion.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""this code uses user input and Eq 1 from Kummer (2025) to determine what
|
|
2
|
+
kind of BBH accretion will occur in a given system."""
|
|
3
|
+
|
|
4
|
+
import numpy as np
|
|
5
|
+
|
|
6
|
+
with open('initial_conditions.txt', 'r') as file:
|
|
7
|
+
variables = [int(line.strip()) for line in file if line.strip()]
|
|
8
|
+
#mstar, mbh1, mbh2, aout, eout, ain, ein = [int(i) for i in line]
|
|
9
|
+
#print(mstar, mbh1, mbh2, aout, eout, ain, ein)
|
|
10
|
+
|
|
11
|
+
mstar = variables[0]
|
|
12
|
+
mbh1 = variables[1]
|
|
13
|
+
mbh2 = variables[2]
|
|
14
|
+
aout = variables[3]
|
|
15
|
+
eout = variables[4]
|
|
16
|
+
ain = variables[5]
|
|
17
|
+
ein = variables[6]
|
|
18
|
+
|
|
19
|
+
#unit conversions
|
|
20
|
+
#mstar = mstari * 1.989*10**30
|
|
21
|
+
#mbh1 = mbh1i * 1.989*10**30
|
|
22
|
+
#mbh2 = mbh2i * 1.989*10**30
|
|
23
|
+
#aout = aouti * 6.957*10**8
|
|
24
|
+
#ain = aini * 6.957*10**8
|
|
25
|
+
|
|
26
|
+
qout = mstar / (mbh1 + mbh2)
|
|
27
|
+
|
|
28
|
+
print(qout)
|
|
29
|
+
if qout < 1:
|
|
30
|
+
rmin = 0.425 * aout * (1 - eout)*((qout)*(1+qout))
|
|
31
|
+
else:
|
|
32
|
+
rmin = 0.425 * aout * (1 - eout)*((1/qout)*(1+1/qout))
|
|
33
|
+
|
|
34
|
+
print(rmin)
|
|
35
|
+
|
|
36
|
+
aapo = ain * (1 + ein)
|
|
37
|
+
|
|
38
|
+
if aapo > rmin:
|
|
39
|
+
print(f"{aapo:.2f} is greater than {rmin:.2f}")
|
|
40
|
+
print("Ballistic accretion will occur in this system.")
|
|
41
|
+
|
|
42
|
+
if rmin > aapo:
|
|
43
|
+
print(f"{aapo:.2f} is less than {rmin:.2f}")
|
|
44
|
+
print("A circumbinary disk will form in this system.")
|
|
45
|
+
|
|
46
|
+
#acirc = (aout*(0.5 - 0.0986*np.log(qout))**4)*(1+qout)
|
|
47
|
+
#print(acirc)
|
|
48
|
+
#acav = 1.6*acirc
|
|
49
|
+
#print(acav)
|
|
50
|
+
##since acav / abin = 1.68, solve for abin
|
|
51
|
+
#
|
|
52
|
+
#abin = acav / 1.68
|
|
53
|
+
#print(abin)
|
|
54
|
+
#
|
|
55
|
+
#if abin != rmin:
|
|
56
|
+
# print(f"binary sparations not equal: {abin:.2f} Rsun and {rmin} Rsun")
|
|
57
|
+
#
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# eventually add plot with projected accretion path
|
|
62
|
+
# use more robust calculations with modules and functions
|
|
63
|
+
# calculate the critical value for BA accretion
|
|
64
|
+
|
|
65
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
accretionpy/__init__.py,sha256=daEdpEyAJIa8b2VkCqSKcw8PaExcB6Qro80XNes_sHA,2
|
|
2
|
+
accretionpy/accretion.py,sha256=qbNTGc7oa_QvhOjdITtIJ_Qc9_7EGsuNBUKoluzQDfI,1603
|
|
3
|
+
accretionpy-0.0.1.dist-info/licenses/LICENSE,sha256=Qh1pDusI_asSyP76QAiMNptyRkw5dPmyN-h2egumZQ4,1074
|
|
4
|
+
accretionpy-0.0.1.dist-info/METADATA,sha256=dK-DQWxl7ICRAQgJUQ56jVFhWhaq94q7k_x6KLnRLos,120
|
|
5
|
+
accretionpy-0.0.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
6
|
+
accretionpy-0.0.1.dist-info/top_level.txt,sha256=dbwmkdPAwKqzhlNf_NcXD_IOV9poQmYg18njUXXv_1w,12
|
|
7
|
+
accretionpy-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [2026] [Emma Chambers]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
accretionpy
|