Skip to content

Commit 9dcbefa

Browse files
committed
BBH pipeline: set ID control initial guesses during ecc control
1 parent 151685b commit 9dcbefa

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

support/Pipelines/Bbh/EccentricityControl.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ def eccentricity_control(
7474
assert (
7575
target_params["Eccentricity"] is not None
7676
), "For eccentricity control the target eccentricity must be set."
77-
id_params = id_metadata["Next"]["With"]
78-
binary_data = id_input_file["Background"]["Binary"]
79-
x_B, x_A = binary_data["XCoords"]
80-
separation = x_A - x_B
8177

8278
# Find the current eccentricity and determine new parameters to put into
8379
# generate-id
@@ -123,12 +119,25 @@ def eccentricity_control(
123119
return
124120

125121
# Generate new initial data based on updated orbital parameters
122+
id_params = id_metadata["Next"]["With"]
123+
binary_data = id_input_file["Background"]["Binary"]
124+
x_B, x_A = binary_data["XCoords"]
125+
separation = x_A - x_B
126+
x_offset = x_A - target_params["MassB"] * separation
127+
y_offset, z_offset = binary_data["CenterOfMassOffset"]
126128
generate_id(
127129
target_params,
128-
# Orbital parameters
130+
# New orbital parameters
129131
separation=separation,
130132
orbital_angular_velocity=new_orbital_params["Omega0"],
131133
radial_expansion_velocity=new_orbital_params["adot0"],
134+
# Initial guesses for ID control
135+
conformal_mass_a=binary_data["ObjectRight"]["KerrSchild"]["Mass"],
136+
conformal_mass_b=binary_data["ObjectLeft"]["KerrSchild"]["Mass"],
137+
conformal_spin_a=binary_data["ObjectRight"]["KerrSchild"]["Spin"],
138+
conformal_spin_b=binary_data["ObjectLeft"]["KerrSchild"]["Spin"],
139+
center_of_mass_offset=[x_offset, y_offset, z_offset],
140+
linear_velocity=binary_data["LinearVelocity"],
132141
# Scheduling options
133142
refinement_level=id_params["control_refinement_level"],
134143
polynomial_order=id_params["control_polynomial_order"],

tests/support/Pipelines/Bbh/Test_EccentricityControl.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,13 @@ def create_yaml_file(self):
9898
-self.initial_separation / 2.0,
9999
self.initial_separation / 2.0,
100100
],
101-
"ObjectLeft": {"KerrSchild": {"Mass": 0.5}},
102-
"ObjectRight": {"KerrSchild": {"Mass": 0.5}},
101+
"ObjectLeft": {
102+
"KerrSchild": {"Mass": 0.5, "Spin": [0.0, 0.0, 0.0]}
103+
},
104+
"ObjectRight": {
105+
"KerrSchild": {"Mass": 0.5, "Spin": [0.0, 0.0, 0.0]}
106+
},
107+
"CenterOfMassOffset": [0.0, 0.0],
103108
},
104109
}
105110
}

0 commit comments

Comments
 (0)