spectre.Pipelines.Bbh.ControlId

Functions

control_id(id_input_file_path, control_params)

Control BBH physical parameters.

spectre.Pipelines.Bbh.ControlId.control_id(id_input_file_path: str | Path, control_params: Dict[Literal['mass_A', 'mass_B', 'spin_A', 'spin_B', 'center_of_mass', 'linear_momentum'], float | Sequence[float]], id_run_dir: str | Path | None = None, residual_tolerance: float = DEFAULT_RESIDUAL_TOLERANCE, max_iterations: int = DEFAULT_MAX_ITERATIONS, refinement_level: int = 1, polynomial_order: int = 6)

Control BBH physical parameters.

This function is called after initial data has been generated and horizons have been found in ‘PostprocessId.py’. It uses an iterative scheme to drive the black hole physical parameters (masses and spins) closer to the desired values.

For each iteration, this function does the following:

  • Determine new guesses for ID input parameters.

  • Generate initial data using these guesses.

  • Find horizons in the generated initial data.

  • Measure the difference between the horizon quantities and the desired values.

Suported control parameters (specified as keys of control_params):

mass_A: Mass of the larger black hole. mass_B: Mass of the smaller black hole. spin_A: Dimensionless spin of the larger black hole. spin_B: Dimensionless spin of the smaller black hole. center_of_mass: Center of mass integral in general relativity. linear_momentum: ADM linear momentum.

Example of control_params for an equal-mass non-spinning run with minimal drift of the center of mass:

```py
control_params = dict(

mass_A = 0.5, mass_B = 0.5, spin_A = [0., 0., 0.], spin_B = [0., 0., 0.], center_of_mass = [0., 0., 0.], linear_momentum = [0., 0., 0.],

)

```

Parameters:
  • control_params – Dictionary used to customize control. The keys determine which physical parameters are controlled and the values determine their target result.

  • id_input_file_path – Path to the input file of the first initial data run.

  • id_run_dir – Directory of the first initial data run. If not provided, the directory of the input file is used.

  • residual_tolerance – Residual tolerance used for termination condition. (Default: 1.e-6)

  • max_iterations – Maximum of iterations allowed. Note: each iteration is very expensive as it needs to solve an entire initial data problem. (Default: 30)

  • refinement_level – h-refinement used in control loop.

  • polynomial_order – p-refinement used in control loop.