Namespaces | Functions
GeneralizedHarmonic::gauges Namespace Reference

Gauge conditions for generalized harmonic evolution systems. More...

Namespaces

 OptionTags
 Input option tags for the generalized harmonic evolution system.
 

Functions

template<size_t SpatialDim, typename Frame >
void damped_harmonic_rollon (gsl::not_null< tnsr::a< DataVector, SpatialDim, Frame > * > gauge_h, gsl::not_null< tnsr::ab< DataVector, SpatialDim, Frame > * > d4_gauge_h, const tnsr::a< DataVector, SpatialDim, Frame > &gauge_h_init, const tnsr::ab< DataVector, SpatialDim, Frame > &dgauge_h_init, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, SpatialDim, Frame > &shift, const tnsr::a< DataVector, SpatialDim, Frame > &spacetime_unit_normal_one_form, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::II< DataVector, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::aa< DataVector, SpatialDim, Frame > &spacetime_metric, const tnsr::aa< DataVector, SpatialDim, Frame > &pi, const tnsr::iaa< DataVector, SpatialDim, Frame > &phi, double time, const tnsr::I< DataVector, SpatialDim, Frame > &coords, double amp_coef_L1, double amp_coef_L2, double amp_coef_S, int exp_L1, int exp_L2, int exp_S, double rollon_start_time, double rollon_width, double sigma_r) noexcept
 Damped harmonic gauge source function and its spacetime derivative. More...
 
template<size_t SpatialDim, typename Frame >
void damped_harmonic (gsl::not_null< tnsr::a< DataVector, SpatialDim, Frame > * > gauge_h, gsl::not_null< tnsr::ab< DataVector, SpatialDim, Frame > * > d4_gauge_h, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, SpatialDim, Frame > &shift, const tnsr::a< DataVector, SpatialDim, Frame > &spacetime_unit_normal_one_form, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::II< DataVector, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::aa< DataVector, SpatialDim, Frame > &spacetime_metric, const tnsr::aa< DataVector, SpatialDim, Frame > &pi, const tnsr::iaa< DataVector, SpatialDim, Frame > &phi, const tnsr::I< DataVector, SpatialDim, Frame > &coords, double amp_coef_L1, double amp_coef_L2, double amp_coef_S, int exp_L1, int exp_L2, int exp_S, double sigma_r) noexcept
 Damped harmonic gauge source function and its spacetime derivative. More...
 

Detailed Description

Gauge conditions for generalized harmonic evolution systems.

Function Documentation

◆ damped_harmonic()

template<size_t SpatialDim, typename Frame >
void GeneralizedHarmonic::gauges::damped_harmonic ( gsl::not_null< tnsr::a< DataVector, SpatialDim, Frame > * >  gauge_h,
gsl::not_null< tnsr::ab< DataVector, SpatialDim, Frame > * >  d4_gauge_h,
const Scalar< DataVector > &  lapse,
const tnsr::I< DataVector, SpatialDim, Frame > &  shift,
const tnsr::a< DataVector, SpatialDim, Frame > &  spacetime_unit_normal_one_form,
const Scalar< DataVector > &  sqrt_det_spatial_metric,
const tnsr::II< DataVector, SpatialDim, Frame > &  inverse_spatial_metric,
const tnsr::aa< DataVector, SpatialDim, Frame > &  spacetime_metric,
const tnsr::aa< DataVector, SpatialDim, Frame > &  pi,
const tnsr::iaa< DataVector, SpatialDim, Frame > &  phi,
const tnsr::I< DataVector, SpatialDim, Frame > &  coords,
double  amp_coef_L1,
double  amp_coef_L2,
double  amp_coef_S,
int  exp_L1,
int  exp_L2,
int  exp_S,
double  sigma_r 
)
noexcept

Damped harmonic gauge source function and its spacetime derivative.

Details

The gauge condition has been taken from [60] and [19]. We provide both a "rollon" version (damped_harmonic_rollon), and a "non-rollon" version (damped_harmonic). In the non-rollon version the rollon function \(R(t)=1\).

Warning
Only the non-rollon version can be used with a moving mesh.

The covariant form of the source function \(H_a\) is written as:

\begin{align*} H_a := [1 - R(t)] H_a^\mathrm{init} + [\mu_{L1} \mathrm{log}(\sqrt{g}/N) + \mu_{L2} \mathrm{log}(1/N)] t_a - \mu_S g_{ai} N^i / N \end{align*}

where \(N, N^k\) are the lapse and shift respectively, \(t_a\) is the unit normal one-form to the spatial slice, and \(g_{ab}\) is the spatial metric (obtained by projecting the spacetime metric onto the 3-slice, i.e. \(g_{ab} = \psi_{ab} + t_a t_b\)). The prefactors are:

\begin{align*} \mu_{L1} &= A_{L1} R(t) W(x^i) \mathrm{log}(\sqrt{g}/N)^{e_{L1}}, \\ \mu_{L2} &= A_{L2} R(t) W(x^i) \mathrm{log}(1/N)^{e_{L2}}, \\ \mu_{S} &= A_{S} R(t) W(x^i) \mathrm{log}(\sqrt{g}/N)^{e_{S}}, \end{align*}

temporal roll-on function \( R(t)\) is:

\begin{align*} \begin{array}{ll} R(t) & = 0, & t< t_{0} \\ & = 1 - \exp[-((t - t_{0})/ \sigma_t)^4], & t\geq t_{0} \\ \end{array} \end{align*}

and the spatial weight function is:

\begin{align*} W(x^i) = \exp[-(r/\sigma_r)^2]. \end{align*}

This weight function can be written with multiple constant factors in the exponent in literature [19], but we absorb them all into \( \sigma_r\) here. The coordinate \( r\) is the Euclidean radius in Inertial coordinates.

Note that for the last three terms in \(H_a\) (with \( X = \{L1, L2, S\} \)):

  • Amplitude factors \( A_{X} \) are taken as input here as amp_coef_X
  • Exponents \( e_X\) are taken as input here as exp_X.
  • Spatial weight function \(W\) is specified completely by \(\sigma_r\), which is taken as input here as sigma_r.

Also computes spacetime derivatives, i.e. \(\partial_a H_b\), of the damped harmonic source function H. Using notation from damped_harmonic_h(), we rewrite the same as:

\begin{align*} \partial_a H_b =& \partial_a T_1 + \partial_a T_2 + \partial_a T_3, \\ H_a =& T_1 + T_2 + T_3, \end{align*}

where:

\begin{align*} T_1 =& [1 - R(t)] H_a^\mathrm{init}, \\ T_2 =& [\mu_{L1} \mathrm{log}(\sqrt{g}/N) + \mu_{L2} \mathrm{log}(1/N)] t_a, \\ T_3 =& - \mu_S g_{ai} N^i / N. \end{align*}

Derivation:

\(\blacksquare\) For \( T_1 \), the derivatives are:

\begin{align*} \partial_a T_1 = (1 - R(t)) \partial_a H_b^\mathrm{init} - H_b^\mathrm{init} \partial_a R. \end{align*}

\(\blacksquare\) Write \( T_2 \equiv (\mu_1 + \mu_2) t_b \). Then:

\begin{align*} \partial_a T_2 =& (\partial_a \mu_1 + \partial_a \mu_2) t_b \\ +& (\mu_1 + \mu_2) \partial_a t_b, \end{align*}

where

\begin{align*} \partial_a t_b =& \left(-\partial_a N, 0, 0, 0\right) \\ \partial_a \mu_1 =& \partial_a [A_{L1} R(t) W(x^i) \mathrm{log}(\sqrt{g}/N)^{e_{L1} + 1}], \\ =& A_{L1} R(t) W(x^i) \partial_a [\mathrm{log}(\sqrt{g}/N)^{e_{L1} + 1}] \\ +& A_{L1} \mathrm{log}(\sqrt{g}/N)^{e_{L1} + 1} \partial_a [R(t) W(x^i)],\\ \partial_a \mu_2 =& \partial_a [A_{L2} R(t) W(x^i) \mathrm{log}(1/N)^{e_{L2} + 1}], \\ =& A_{L2} R(t) W(x^i) \partial_a [\mathrm{log}(1/N)^{e_{L2} + 1}] \\ +& A_{L2} \mathrm{log}(1/N)^{e_{L2} + 1} \partial_a [R(t) W(x^i)], \end{align*}

where \(\partial_a [R W] = \left(\partial_0 R(t), \partial_i W(x^j)\right)\).

\(\blacksquare\) Finally, the derivatives of \( T_3 \) are:

\[ \partial_a T_3 = -\partial_a(\mu_S/N) g_{bi} N^i -(\mu_S/N) \partial_a(g_{bi}) N^i -(\mu_S/N) g_{bi}\partial_a N^i, \]

where

\begin{align*} \partial_a(\mu_S / N) =& (1/N)\partial_a \mu_S - \frac{\mu_S}{N^2}\partial_a N, \,\,\mathrm{and}\\ \partial_a \mu_S =& \partial_a [A_S R(t) W(x^i) \mathrm{log}(\sqrt{g}/N)^{e_S}], \\ =& A_S R(t) W(x^i) \partial_a [\mathrm{log}(\sqrt{g}/N)^{e_S}] \\ +& A_S \mathrm{log}(\sqrt{g} / N)^{e_S} \partial_a [R(t) W(x^i)]. \end{align*}

◆ damped_harmonic_rollon()

template<size_t SpatialDim, typename Frame >
void GeneralizedHarmonic::gauges::damped_harmonic_rollon ( gsl::not_null< tnsr::a< DataVector, SpatialDim, Frame > * >  gauge_h,
gsl::not_null< tnsr::ab< DataVector, SpatialDim, Frame > * >  d4_gauge_h,
const tnsr::a< DataVector, SpatialDim, Frame > &  gauge_h_init,
const tnsr::ab< DataVector, SpatialDim, Frame > &  dgauge_h_init,
const Scalar< DataVector > &  lapse,
const tnsr::I< DataVector, SpatialDim, Frame > &  shift,
const tnsr::a< DataVector, SpatialDim, Frame > &  spacetime_unit_normal_one_form,
const Scalar< DataVector > &  sqrt_det_spatial_metric,
const tnsr::II< DataVector, SpatialDim, Frame > &  inverse_spatial_metric,
const tnsr::aa< DataVector, SpatialDim, Frame > &  spacetime_metric,
const tnsr::aa< DataVector, SpatialDim, Frame > &  pi,
const tnsr::iaa< DataVector, SpatialDim, Frame > &  phi,
double  time,
const tnsr::I< DataVector, SpatialDim, Frame > &  coords,
double  amp_coef_L1,
double  amp_coef_L2,
double  amp_coef_S,
int  exp_L1,
int  exp_L2,
int  exp_S,
double  rollon_start_time,
double  rollon_width,
double  sigma_r 
)
noexcept

Damped harmonic gauge source function and its spacetime derivative.

Details

The gauge condition has been taken from [60] and [19]. We provide both a "rollon" version (damped_harmonic_rollon), and a "non-rollon" version (damped_harmonic). In the non-rollon version the rollon function \(R(t)=1\).

Warning
Only the non-rollon version can be used with a moving mesh.

The covariant form of the source function \(H_a\) is written as:

\begin{align*} H_a := [1 - R(t)] H_a^\mathrm{init} + [\mu_{L1} \mathrm{log}(\sqrt{g}/N) + \mu_{L2} \mathrm{log}(1/N)] t_a - \mu_S g_{ai} N^i / N \end{align*}

where \(N, N^k\) are the lapse and shift respectively, \(t_a\) is the unit normal one-form to the spatial slice, and \(g_{ab}\) is the spatial metric (obtained by projecting the spacetime metric onto the 3-slice, i.e. \(g_{ab} = \psi_{ab} + t_a t_b\)). The prefactors are:

\begin{align*} \mu_{L1} &= A_{L1} R(t) W(x^i) \mathrm{log}(\sqrt{g}/N)^{e_{L1}}, \\ \mu_{L2} &= A_{L2} R(t) W(x^i) \mathrm{log}(1/N)^{e_{L2}}, \\ \mu_{S} &= A_{S} R(t) W(x^i) \mathrm{log}(\sqrt{g}/N)^{e_{S}}, \end{align*}

temporal roll-on function \( R(t)\) is:

\begin{align*} \begin{array}{ll} R(t) & = 0, & t< t_{0} \\ & = 1 - \exp[-((t - t_{0})/ \sigma_t)^4], & t\geq t_{0} \\ \end{array} \end{align*}

and the spatial weight function is:

\begin{align*} W(x^i) = \exp[-(r/\sigma_r)^2]. \end{align*}

This weight function can be written with multiple constant factors in the exponent in literature [19], but we absorb them all into \( \sigma_r\) here. The coordinate \( r\) is the Euclidean radius in Inertial coordinates.

Note that for the last three terms in \(H_a\) (with \( X = \{L1, L2, S\} \)):

  • Amplitude factors \( A_{X} \) are taken as input here as amp_coef_X
  • Exponents \( e_X\) are taken as input here as exp_X.
  • Spatial weight function \(W\) is specified completely by \(\sigma_r\), which is taken as input here as sigma_r.

Also computes spacetime derivatives, i.e. \(\partial_a H_b\), of the damped harmonic source function H. Using notation from damped_harmonic_h(), we rewrite the same as:

\begin{align*} \partial_a H_b =& \partial_a T_1 + \partial_a T_2 + \partial_a T_3, \\ H_a =& T_1 + T_2 + T_3, \end{align*}

where:

\begin{align*} T_1 =& [1 - R(t)] H_a^\mathrm{init}, \\ T_2 =& [\mu_{L1} \mathrm{log}(\sqrt{g}/N) + \mu_{L2} \mathrm{log}(1/N)] t_a, \\ T_3 =& - \mu_S g_{ai} N^i / N. \end{align*}

Derivation:

\(\blacksquare\) For \( T_1 \), the derivatives are:

\begin{align*} \partial_a T_1 = (1 - R(t)) \partial_a H_b^\mathrm{init} - H_b^\mathrm{init} \partial_a R. \end{align*}

\(\blacksquare\) Write \( T_2 \equiv (\mu_1 + \mu_2) t_b \). Then:

\begin{align*} \partial_a T_2 =& (\partial_a \mu_1 + \partial_a \mu_2) t_b \\ +& (\mu_1 + \mu_2) \partial_a t_b, \end{align*}

where

\begin{align*} \partial_a t_b =& \left(-\partial_a N, 0, 0, 0\right) \\ \partial_a \mu_1 =& \partial_a [A_{L1} R(t) W(x^i) \mathrm{log}(\sqrt{g}/N)^{e_{L1} + 1}], \\ =& A_{L1} R(t) W(x^i) \partial_a [\mathrm{log}(\sqrt{g}/N)^{e_{L1} + 1}] \\ +& A_{L1} \mathrm{log}(\sqrt{g}/N)^{e_{L1} + 1} \partial_a [R(t) W(x^i)],\\ \partial_a \mu_2 =& \partial_a [A_{L2} R(t) W(x^i) \mathrm{log}(1/N)^{e_{L2} + 1}], \\ =& A_{L2} R(t) W(x^i) \partial_a [\mathrm{log}(1/N)^{e_{L2} + 1}] \\ +& A_{L2} \mathrm{log}(1/N)^{e_{L2} + 1} \partial_a [R(t) W(x^i)], \end{align*}

where \(\partial_a [R W] = \left(\partial_0 R(t), \partial_i W(x^j)\right)\).

\(\blacksquare\) Finally, the derivatives of \( T_3 \) are:

\[ \partial_a T_3 = -\partial_a(\mu_S/N) g_{bi} N^i -(\mu_S/N) \partial_a(g_{bi}) N^i -(\mu_S/N) g_{bi}\partial_a N^i, \]

where

\begin{align*} \partial_a(\mu_S / N) =& (1/N)\partial_a \mu_S - \frac{\mu_S}{N^2}\partial_a N, \,\,\mathrm{and}\\ \partial_a \mu_S =& \partial_a [A_S R(t) W(x^i) \mathrm{log}(\sqrt{g}/N)^{e_S}], \\ =& A_S R(t) W(x^i) \partial_a [\mathrm{log}(\sqrt{g}/N)^{e_S}] \\ +& A_S \mathrm{log}(\sqrt{g} / N)^{e_S} \partial_a [R(t) W(x^i)]. \end{align*}