1
0
Fork 0
mirror of https://github.com/Findus23/rebound-collisions.git synced 2024-09-19 15:53:48 +02:00

fix mass loss/retention mixup

This commit is contained in:
Lukas Winkler 2021-11-27 14:16:53 +01:00
parent d2f2ca44d8
commit 3245e1e62f
Signed by: lukas
GPG key ID: 54DE4D798D244853

View file

@ -24,9 +24,9 @@ class LeiZhouMassloss(Massloss):
def estimate(self, alpha, velocity, projectile_mass, gamma) -> Tuple[float, float, float]: def estimate(self, alpha, velocity, projectile_mass, gamma) -> Tuple[float, float, float]:
rand_water = self.rng.random() rand_water = self.rng.random()
rand_mass = self.rng.random() rand_mass = self.rng.random()
water_retention = self.delta_w_low + rand_water * (self.delta_w_up - self.delta_w_low) water_loss = self.delta_w_low + rand_water * (self.delta_w_up - self.delta_w_low)
mantle_retention = self.delta_m_low + rand_mass * (self.delta_m_up - self.delta_m_low) mantle_loss = self.delta_m_low + rand_mass * (self.delta_m_up - self.delta_m_low)
# the paper only considers objects with a core and water shell # the paper only considers objects with a core and water shell
# so we assume the same mass retention for mantle and core # so we assume the same mass retention for mantle and core
core_retention = mantle_retention core_loss = mantle_loss
return water_retention, mantle_retention, core_retention return 1 - water_loss, 1 - mantle_loss, 1 - core_loss