SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
gh::BoundaryConditions::Bjorhus Namespace Reference

Detailed implementation of Bjorhus-type boundary corrections. More...

Functions

template<size_t VolumeDim, typename DataType >
void constraint_preserving_bjorhus_corrections_dt_v_psi (gsl::not_null< tnsr::aa< DataType, VolumeDim, Frame::Inertial > * > bc_dt_v_psi, const tnsr::I< DataType, VolumeDim, Frame::Inertial > &unit_interface_normal_vector, const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &three_index_constraint, const std::array< DataType, 4 > &char_speeds)
 Computes the expression needed to set boundary conditions on the time derivative of the characteristic field vabψ. More...
 
template<size_t VolumeDim, typename DataType >
void constraint_preserving_bjorhus_corrections_dt_v_zero (gsl::not_null< tnsr::iaa< DataType, VolumeDim, Frame::Inertial > * > bc_dt_v_zero, const tnsr::I< DataType, VolumeDim, Frame::Inertial > &unit_interface_normal_vector, const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &four_index_constraint, const std::array< DataType, 4 > &char_speeds)
 Computes the expression needed to set boundary conditions on the time derivative of the characteristic field viab0. More...
 
template<size_t VolumeDim, typename DataType >
void constraint_preserving_bjorhus_corrections_dt_v_minus (gsl::not_null< tnsr::aa< DataType, VolumeDim, Frame::Inertial > * > bc_dt_v_minus, const Scalar< DataType > &gamma2, const tnsr::I< DataType, VolumeDim, Frame::Inertial > &inertial_coords, const tnsr::a< DataType, VolumeDim, Frame::Inertial > &incoming_null_one_form, const tnsr::a< DataType, VolumeDim, Frame::Inertial > &outgoing_null_one_form, const tnsr::A< DataType, VolumeDim, Frame::Inertial > &incoming_null_vector, const tnsr::A< DataType, VolumeDim, Frame::Inertial > &outgoing_null_vector, const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &projection_ab, const tnsr::Ab< DataType, VolumeDim, Frame::Inertial > &projection_Ab, const tnsr::AA< DataType, VolumeDim, Frame::Inertial > &projection_AB, const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &char_projected_rhs_dt_v_psi, const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &char_projected_rhs_dt_v_minus, const tnsr::a< DataType, VolumeDim, Frame::Inertial > &constraint_char_zero_plus, const tnsr::a< DataType, VolumeDim, Frame::Inertial > &constraint_char_zero_minus, const std::array< DataType, 4 > &char_speeds)
 Computes the expression needed to set boundary conditions on the time derivative of the characteristic field vab. More...
 
template<size_t VolumeDim, typename DataType >
void constraint_preserving_physical_bjorhus_corrections_dt_v_minus (gsl::not_null< tnsr::aa< DataType, VolumeDim, Frame::Inertial > * > bc_dt_v_minus, const Scalar< DataType > &gamma2, const tnsr::I< DataType, VolumeDim, Frame::Inertial > &inertial_coords, const tnsr::i< DataType, VolumeDim, Frame::Inertial > &unit_interface_normal_one_form, const tnsr::I< DataType, VolumeDim, Frame::Inertial > &unit_interface_normal_vector, const tnsr::A< DataType, VolumeDim, Frame::Inertial > &spacetime_unit_normal_vector, const tnsr::a< DataType, VolumeDim, Frame::Inertial > &incoming_null_one_form, const tnsr::a< DataType, VolumeDim, Frame::Inertial > &outgoing_null_one_form, const tnsr::A< DataType, VolumeDim, Frame::Inertial > &incoming_null_vector, const tnsr::A< DataType, VolumeDim, Frame::Inertial > &outgoing_null_vector, const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &projection_ab, const tnsr::Ab< DataType, VolumeDim, Frame::Inertial > &projection_Ab, const tnsr::AA< DataType, VolumeDim, Frame::Inertial > &projection_AB, const tnsr::II< DataType, VolumeDim, Frame::Inertial > &inverse_spatial_metric, const tnsr::ii< DataType, VolumeDim, Frame::Inertial > &extrinsic_curvature, const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &spacetime_metric, const tnsr::AA< DataType, VolumeDim, Frame::Inertial > &inverse_spacetime_metric, const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &three_index_constraint, const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &char_projected_rhs_dt_v_psi, const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &char_projected_rhs_dt_v_minus, const tnsr::a< DataType, VolumeDim, Frame::Inertial > &constraint_char_zero_plus, const tnsr::a< DataType, VolumeDim, Frame::Inertial > &constraint_char_zero_minus, const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &phi, const tnsr::ijaa< DataType, VolumeDim, Frame::Inertial > &d_phi, const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &d_pi, const std::array< DataType, 4 > &char_speeds)
 Computes the expression needed to set boundary conditions on the time derivative of the characteristic field vab. More...
 

Detailed Description

Detailed implementation of Bjorhus-type boundary corrections.

Function Documentation

◆ constraint_preserving_bjorhus_corrections_dt_v_minus()

template<size_t VolumeDim, typename DataType >
void gh::BoundaryConditions::Bjorhus::constraint_preserving_bjorhus_corrections_dt_v_minus ( gsl::not_null< tnsr::aa< DataType, VolumeDim, Frame::Inertial > * >  bc_dt_v_minus,
const Scalar< DataType > &  gamma2,
const tnsr::I< DataType, VolumeDim, Frame::Inertial > &  inertial_coords,
const tnsr::a< DataType, VolumeDim, Frame::Inertial > &  incoming_null_one_form,
const tnsr::a< DataType, VolumeDim, Frame::Inertial > &  outgoing_null_one_form,
const tnsr::A< DataType, VolumeDim, Frame::Inertial > &  incoming_null_vector,
const tnsr::A< DataType, VolumeDim, Frame::Inertial > &  outgoing_null_vector,
const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &  projection_ab,
const tnsr::Ab< DataType, VolumeDim, Frame::Inertial > &  projection_Ab,
const tnsr::AA< DataType, VolumeDim, Frame::Inertial > &  projection_AB,
const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &  char_projected_rhs_dt_v_psi,
const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &  char_projected_rhs_dt_v_minus,
const tnsr::a< DataType, VolumeDim, Frame::Inertial > &  constraint_char_zero_plus,
const tnsr::a< DataType, VolumeDim, Frame::Inertial > &  constraint_char_zero_minus,
const std::array< DataType, 4 > &  char_speeds 
)

Computes the expression needed to set boundary conditions on the time derivative of the characteristic field vab.

Details

In the Bjorhus scheme, the time derivatives of evolved variables are characteristic projected. Constraint-preserving correction terms TabC, Sommerfeld condition terms for gauge degrees of freedom TabG, and terms constraining physical degrees of freedom TabP are added here to the resulting characteristic (time-derivative) field:

(1)Δtvab=TabC+TabG+TabP.

These terms are given by Eq. (64) of [127] :

(2)TabC=12(2kckdlalbkclbPadkclaPbdkdlbPackdlaPbc+PcdPab)tvcd+12λcc0^(lalbkc+PablcPbclaPaclb)

where la(la) is the outgoing null vector (one-form), ka(ka) is the incoming null vector (one-form), Pab,Pab,Pba are spacetime projection operators defined in transverse_projection_operator(), tvab is the characteristic projected time derivative of evolved variables (corresponding to the v field), and ca0^± are characteristic modes of the constraint evolution system:

ca0^±=FankCka,

where Fa is the generalized-harmonic (GH) F constraint [Eq. (43) of [127]], Cka is the GH 2-index constraint [Eq. (44) of [127]], and nk is the unit spatial normal to the outer boundary. Boundary correction terms that prevent strong reflections of gauge perturbations are given by Eq. (25) of [173] :

(3)TabG=(kaPbcld+kbPacld(kalbkcld+kblakcld+kakblcld))(γ21r)tvcdψ

where r is the radial coordinate at the outer boundary, which is assumed to be spherical, γ2 is a GH constraint damping parameter, and tvabψ is the characteristic projected time derivative of evolved variables (corresponding to the vψ field). Finally, we constrain physical degrees of freedom using corrections from Eq. (68) of [127] :

(4)TabP=(PacPbd12PabPcd)(tvcd+λ(Ucd3γ2niCicd)),

where Cicd is the GH 3-index constraint [c.f. Eq. (26) of [127], see also three_index_constraint()], and

Uab3=2PaiPbjUij8

is the inward propagating characteristic mode of the Weyl tensor evolution Uab8 [c.f. Eq. 75 of [110] ] projected onto the outer boundary using the spatial-spacetime projection operators Pai. Note that (A) the covariant derivative of extrinsic curvature needed to get the Weyl propagating modes is calculated substituting the evolved variable Φiab for spatial derivatives of the spacetime metric; and (B) the spatial Ricci tensor used in the same calculation is also calculated using the same substituion, and also includes corrections proportional to the GH 4-index constraint Cijab [c.f. Eq. (45) of [127] , see also four_index_constraint()]:

RijRij+C(iklj)+12nkqaC(ikj)a,

where qa is the future-directed spacetime normal vector.

◆ constraint_preserving_bjorhus_corrections_dt_v_psi()

template<size_t VolumeDim, typename DataType >
void gh::BoundaryConditions::Bjorhus::constraint_preserving_bjorhus_corrections_dt_v_psi ( gsl::not_null< tnsr::aa< DataType, VolumeDim, Frame::Inertial > * >  bc_dt_v_psi,
const tnsr::I< DataType, VolumeDim, Frame::Inertial > &  unit_interface_normal_vector,
const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &  three_index_constraint,
const std::array< DataType, 4 > &  char_speeds 
)

Computes the expression needed to set boundary conditions on the time derivative of the characteristic field vabψ.

Details

In the Bjorhus scheme, the time derivatives of evolved variables are characteristic projected. A constraint-preserving correction term is added here to the resulting characteristic (time-derivative) field:

(5)Δtvabψ=λψniCiab

where ni is the local unit normal to the external boundary, Ciab=iψabΦiab is the three-index constraint, and λψ is the characteristic speed of the field vabψ.

◆ constraint_preserving_bjorhus_corrections_dt_v_zero()

template<size_t VolumeDim, typename DataType >
void gh::BoundaryConditions::Bjorhus::constraint_preserving_bjorhus_corrections_dt_v_zero ( gsl::not_null< tnsr::iaa< DataType, VolumeDim, Frame::Inertial > * >  bc_dt_v_zero,
const tnsr::I< DataType, VolumeDim, Frame::Inertial > &  unit_interface_normal_vector,
const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &  four_index_constraint,
const std::array< DataType, 4 > &  char_speeds 
)

Computes the expression needed to set boundary conditions on the time derivative of the characteristic field viab0.

Details

In the Bjorhus scheme, the time derivatives of evolved variables are characteristic projected. A constraint-preserving correction term is added here to the resulting characteristic (time-derivative) field viab0:

(6)Δtviab0=λ0njCjiab

where ni is the local unit normal to the external boundary, Cijab=iΦjabjΦiab is the four-index constraint, and λ0 is the characteristic speed of the field viab0.

Note
In 3D, only the non-zero and unique components of the four-index constraint are stored, as C^iab=ϵijkCjkab. In 2D the input expected here is C^0ab=C01ab,C^1ab=C10ab, and in 1D C^0ab=0.

◆ constraint_preserving_physical_bjorhus_corrections_dt_v_minus()

template<size_t VolumeDim, typename DataType >
void gh::BoundaryConditions::Bjorhus::constraint_preserving_physical_bjorhus_corrections_dt_v_minus ( gsl::not_null< tnsr::aa< DataType, VolumeDim, Frame::Inertial > * >  bc_dt_v_minus,
const Scalar< DataType > &  gamma2,
const tnsr::I< DataType, VolumeDim, Frame::Inertial > &  inertial_coords,
const tnsr::i< DataType, VolumeDim, Frame::Inertial > &  unit_interface_normal_one_form,
const tnsr::I< DataType, VolumeDim, Frame::Inertial > &  unit_interface_normal_vector,
const tnsr::A< DataType, VolumeDim, Frame::Inertial > &  spacetime_unit_normal_vector,
const tnsr::a< DataType, VolumeDim, Frame::Inertial > &  incoming_null_one_form,
const tnsr::a< DataType, VolumeDim, Frame::Inertial > &  outgoing_null_one_form,
const tnsr::A< DataType, VolumeDim, Frame::Inertial > &  incoming_null_vector,
const tnsr::A< DataType, VolumeDim, Frame::Inertial > &  outgoing_null_vector,
const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &  projection_ab,
const tnsr::Ab< DataType, VolumeDim, Frame::Inertial > &  projection_Ab,
const tnsr::AA< DataType, VolumeDim, Frame::Inertial > &  projection_AB,
const tnsr::II< DataType, VolumeDim, Frame::Inertial > &  inverse_spatial_metric,
const tnsr::ii< DataType, VolumeDim, Frame::Inertial > &  extrinsic_curvature,
const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &  spacetime_metric,
const tnsr::AA< DataType, VolumeDim, Frame::Inertial > &  inverse_spacetime_metric,
const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &  three_index_constraint,
const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &  char_projected_rhs_dt_v_psi,
const tnsr::aa< DataType, VolumeDim, Frame::Inertial > &  char_projected_rhs_dt_v_minus,
const tnsr::a< DataType, VolumeDim, Frame::Inertial > &  constraint_char_zero_plus,
const tnsr::a< DataType, VolumeDim, Frame::Inertial > &  constraint_char_zero_minus,
const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &  phi,
const tnsr::ijaa< DataType, VolumeDim, Frame::Inertial > &  d_phi,
const tnsr::iaa< DataType, VolumeDim, Frame::Inertial > &  d_pi,
const std::array< DataType, 4 > &  char_speeds 
)

Computes the expression needed to set boundary conditions on the time derivative of the characteristic field vab.

Details

In the Bjorhus scheme, the time derivatives of evolved variables are characteristic projected. Constraint-preserving correction terms TabC, Sommerfeld condition terms for gauge degrees of freedom TabG, and terms constraining physical degrees of freedom TabP are added here to the resulting characteristic (time-derivative) field:

(7)Δtvab=TabC+TabG+TabP.

These terms are given by Eq. (64) of [127] :

(8)TabC=12(2kckdlalbkclbPadkclaPbdkdlbPackdlaPbc+PcdPab)tvcd+12λcc0^(lalbkc+PablcPbclaPaclb)

where la(la) is the outgoing null vector (one-form), ka(ka) is the incoming null vector (one-form), Pab,Pab,Pba are spacetime projection operators defined in transverse_projection_operator(), tvab is the characteristic projected time derivative of evolved variables (corresponding to the v field), and ca0^± are characteristic modes of the constraint evolution system:

ca0^±=FankCka,

where Fa is the generalized-harmonic (GH) F constraint [Eq. (43) of [127]], Cka is the GH 2-index constraint [Eq. (44) of [127]], and nk is the unit spatial normal to the outer boundary. Boundary correction terms that prevent strong reflections of gauge perturbations are given by Eq. (25) of [173] :

(9)TabG=(kaPbcld+kbPacld(kalbkcld+kblakcld+kakblcld))(γ21r)tvcdψ

where r is the radial coordinate at the outer boundary, which is assumed to be spherical, γ2 is a GH constraint damping parameter, and tvabψ is the characteristic projected time derivative of evolved variables (corresponding to the vψ field). Finally, we constrain physical degrees of freedom using corrections from Eq. (68) of [127] :

(10)TabP=(PacPbd12PabPcd)(tvcd+λ(Ucd3γ2niCicd)),

where Cicd is the GH 3-index constraint [c.f. Eq. (26) of [127], see also three_index_constraint()], and

Uab3=2PaiPbjUij8

is the inward propagating characteristic mode of the Weyl tensor evolution Uab8 [c.f. Eq. 75 of [110] ] projected onto the outer boundary using the spatial-spacetime projection operators Pai. Note that (A) the covariant derivative of extrinsic curvature needed to get the Weyl propagating modes is calculated substituting the evolved variable Φiab for spatial derivatives of the spacetime metric; and (B) the spatial Ricci tensor used in the same calculation is also calculated using the same substituion, and also includes corrections proportional to the GH 4-index constraint Cijab [c.f. Eq. (45) of [127] , see also four_index_constraint()]:

RijRij+C(iklj)+12nkqaC(ikj)a,

where qa is the future-directed spacetime normal vector.