@@ -74,10 +74,6 @@ def eccentricity_control(
74
74
assert (
75
75
target_params ["Eccentricity" ] is not None
76
76
), "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
81
77
82
78
# Find the current eccentricity and determine new parameters to put into
83
79
# generate-id
@@ -123,12 +119,25 @@ def eccentricity_control(
123
119
return
124
120
125
121
# 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" ]
126
128
generate_id (
127
129
target_params ,
128
- # Orbital parameters
130
+ # New orbital parameters
129
131
separation = separation ,
130
132
orbital_angular_velocity = new_orbital_params ["Omega0" ],
131
133
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" ],
132
141
# Scheduling options
133
142
refinement_level = id_params ["control_refinement_level" ],
134
143
polynomial_order = id_params ["control_polynomial_order" ],
0 commit comments