Reference on jhuki.twopunctures

The twopunctures module provides infrastructure to prepare binary black simulations.

Some functions are provided: - prepare_quasicircular_inspiral(), which returns a TwoPunctures

with parameters set up to lead to a quasi-circular inspiral. The linear momenta required for this are computed with a 3.5PN expansion by NRPyPN.

class jhuki.twopunctures.TwoPunctures(mass_plus, mass_minus, coordinate_distance, momenta_plus=None, momenta_minus=None, chi_plus=None, chi_minus=None, swap_xz=False, give_bare_mass=False, initial_alpha='twopunctures-averaged')[source]

The TwoPunctures class contains all the information related to one or two black holes, their locations, and properties.

This class can set up parameters for the TwoPunctures thorn making sure that the center of mass is in the center of the grid (unless differently specified).

This class is immutable.

Variables
  • mass_plus (float) – Mass of the black hole on the positive side of the x (or z) axis.

  • mass_minus (float) – Mass of the black hole on the negative side of the x (or z) axis.

  • coordinate_separation (float) – Initial coordinate separation.

  • coord_x_plus (float) – Initial coordinate location of the center of the black hole on the positive side of the x (or z) axis.

  • coord_x_minus (float) – Initial coordinate location of the center of the black hole on the negative side of the x (or z) axis.

  • momenta_plus (list/tuple) – Array with the linear momenta along the three directions for the black hole on the positive side of the x (or z) axis.

  • momenta_minus (list/tuple) – Array with the linear momenta along the three directions for the black hole on the positive side of the x (or z) axis.

  • chi_plus (list/tuple) – Array with the dimensionless_spin along the three directions for the black hole on the positive side of the x (or z) axis.

  • chi_minus (list/tuple) – Array with the dimensionless spin along the three directions for the black hole on the positive side of the x (or z) axis.

  • S_plus (list/tuple) – Array with the angular momentum along the three directions for the black hole on the positive side of the x (or z) axis.

  • S_minus (list/tuple) – Array with the angular momentum along the three directions for the black hole on the positive side of the x (or z) axis.

  • center_offset (list/tuple) – Move the geometric center of the system by this amount.

  • swap_xz (bool) – If True, activate the swap_xz parameter in TwoPunctures.

  • give_bare_mass (bool) – If True, set this parameter to True in the parfile.

  • initial_alpha (str) – Prescription to use for the initial lapse.

Constructor.

Parameters
  • mass_plus (float) – Mass of the black hole on the positive side of the x (or z) axis.

  • mass_minus (float) – Mass of the black hole on the negative side of the x (or z) axis.

  • coordinate_separation (float) – Initial coordinate separation.

  • par_b (float) – Half of the initial separation.

  • momenta_plus (list/tuple) –

    Array with the linear momenta along the three directions for the black hole on the positive side of the x (or z) axis. If swap_xz is True, these are the values after swapping. For example (0, 0, 0.5) is a vector along the z axis. (This is the opposite of what happens in TwoPunctures, where

    you have to define the values before swapping)

  • momenta_minus (list/tuple) –

    Array with the linear momenta along the three directions for the black hole on the positive side of the x (or z) axis. If swap_xz is True, these are the values after swapping. For example (0, 0, 0.5) is a vector along the z axis. (This is the opposite of what happens in TwoPunctures, where

    you have to define the values before swapping)

  • chi_plus (list/tuple) –

    Array with the dimensionless_spin along the three directions for the black hole on the positive side of the x (or z) axis.

    If swap_xz is True, these are the values after swapping. For example (0, 0, 0.5) is a vector along the z axis. (This is the opposite of what happens in TwoPunctures, where

    you have to define the values before swapping)

  • chi_minus (list/tuple) –

    Array with the dimensionless spin along the three directions for the black hole on the positive side of the x (or z) axis.

    If swap_xz is True, these are the values after swapping. For example (0, 0, 0.5) is a vector along the z axis. (This is the opposite of what happens in TwoPunctures, where

    you have to define the values before swapping)

  • swap_xz (bool) – If True, activate the swap_xz parameter in TwoPunctures.

  • give_bare_mass (bool) – If True, set this parameter to True in the parfile.

  • initial_alpha (str) – Prescription to use for the initial lapse.

property parfile_code

Return the code you would put in your parfile.

jhuki.twopunctures.prepare_quasicircular_inspiral(mass_ratio, coordinate_distance, total_bare_mass=1, chi_plus=(0, 0, 0), chi_minus=(0, 0, 0), **kwargs)[source]

Return a TwoPunctures that describes a quasi-circular inspiral. We always assume that the plus puncture is the most massive one.

Parameters
  • mass_ratio (float) – Mass ratio of the binary.

  • coordinate_distance (float) – Initial coordinate separation.

  • total_bare_mass (float) – Rescale masses and momenta so that the total bare mass of the system is this.

  • chi_plus (tuple/list with three numbers) – Dimensionless spin of the black hole on the positive side of the x (or z) axis along the three directions.

  • chi_minus (tuple/list with three numbers) – Dimensionless spin of the black hole on the negative side of the x (or z) axis along the three directions.

Unknown arguments are passed to TwoPunctures.

Returns

A TwoPunctures for a quasi-circular inspiral.

Return type

TwoPunctures