spectre.Pipelines.Bbh.ControlId¶
Functions
|
Control BBH physical parameters. |
- spectre.Pipelines.Bbh.ControlId.control_id(id_input_file_path: str | Path, control_params: List[Literal['MassRatio', 'MassA', 'MassB', 'DimensionlessSpinA', 'DimensionlessSpinB', 'CenterOfMass', 'AdmLinearMomentum', 'AdmMass', 'AdmAngularMomentumZ', 'Eccentricity', 'MeanAnomalyFraction', 'NumOrbits', 'TimeToMerger']], 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.
- Supported control parameters:
MassA: Mass of the larger black hole. MassB: Mass of the smaller black hole. DimensionlessSpinA: Dimensionless spin of the larger black hole. DimensionlessSpinB: Dimensionless spin of the smaller black hole. CenterOfMass: Center of mass integral in general relativity. AdmLinearMomentum: ADM linear momentum.
A subset of these parameters can be chosen as the ‘control_params’. The input file metadata must contain a ‘TargetParams’ dictionary with the corresponding target values. Example of control_params for an equal-mass non-spinning run with minimal drift of the center of mass: ```yaml TargetParams:
MassA: 0.5 MassB: 0.5 DimensionlessSpinA: [0., 0., 0.] DimensionlessSpinB: [0., 0., 0.] CenterOfMass: [0., 0., 0.] AdmLinearMomentum: [0., 0., 0.]
- Parameters:
control_params – List of parameters to control.
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.