-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Describe the bug
The ejection velocity of secondary stars seems to be a factor 2 larger than one would expect when comparing to their pre-superova orbital velocities.
Label the issue
urgency_low - This issue is not urgent
severity_minor - This is a minor bug with minimal impact
To Reproduce
As an example, run a grid of binaries with m1=20, m2=15, porb=100d, Z=0.02, each time with a different random kick. Then compare these vaues from the BSE_SUPERNOVAE table for the first supernova: ComponentSpeed(CP) to Orb_Velocity<SN * (Mass_Total@CO(SN) / (Mass_Total@CO(SN) + Mass(CP))). The ratio of these two values is ~2 on average.
Expected behavior
I'd expect that

Screenshots
Here's a histogram of the ratio that I'd expect to be centred around 1

Versioning (please complete the following information):
- OS: Ubuntu 22.04
- COMPAS: v03.01.10
Code snippet for processing data
df_dict = {}
with h5.File("COMPAS_Output.h5") as f:
print(f.keys())
print(f["BSE_Supernovae"].keys())
for k in f["BSE_Supernovae"].keys():
df_dict[k] = f["BSE_Supernovae"][k][...]
df = pd.DataFrame(df_dict).set_index("SEED", drop=False)
df = df.drop_duplicates(subset="SEED", keep="first")
print(f'Disruption rate: {100 - ((df["Unbound"] == 0).sum() / len(df) * 100)}%')
v_orb_2 = df["Orb_Velocity<SN"] * (df["Mass_Total@CO(SN)"] / (df["Mass(CP)"] + df["Mass_Total@CO(SN)"]))
v_orb_2 = v_orb_2.iloc[0]
print(f"v_orb_2 = {v_orb_2}")
natal_kicks = df.rename(columns={"ComponentSpeed(CP)": "vsys_2_total",
"Applied_Kick_Magnitude(SN)": "natal_kick",
"Unbound": "disrupted"})
plt.hist(natal_kicks["vsys_2_total"][natal_kicks["disrupted"] == 1] / v_orb_2, bins=80, range=(0, 4))
plt.xlabel(r"$v_{\rm 2, postSN} / v_{\rm 2, preSN}$ (km/s)")
plt.show()