SpECTRE  v2024.04.12
ScalarWave::BoundaryConditions::ConstraintPreservingSphericalRadiation< Dim > Class Template Referencefinal

Constraint-preserving spherical radiation boundary condition that seeks to avoid ingoing constraint violations and radiation. More...

#include <ConstraintPreservingSphericalRadiation.hpp>

Classes

struct  TypeOptionTag
 

Public Types

using options = tmpl::list< TypeOptionTag >
 
using dg_interior_evolved_variables_tags = tmpl::list< ScalarWave::Tags::Psi, ScalarWave::Tags::Pi, ScalarWave::Tags::Phi< Dim > >
 
using dg_interior_temporary_tags = tmpl::list< domain::Tags::Coordinates< Dim, Frame::Inertial >, Tags::ConstraintGamma2 >
 
using dg_interior_deriv_vars_tags = tmpl::list< ::Tags::deriv< ScalarWave::Tags::Psi, tmpl::size_t< Dim >, Frame::Inertial >, ::Tags::deriv< ScalarWave::Tags::Pi, tmpl::size_t< Dim >, Frame::Inertial >, ::Tags::deriv< ScalarWave::Tags::Phi< Dim >, tmpl::size_t< Dim >, Frame::Inertial > >
 
using dg_gridless_tags = tmpl::list<>
 

Public Member Functions

 ConstraintPreservingSphericalRadiation (detail::ConstraintPreservingSphericalRadiationType type)
 
 ConstraintPreservingSphericalRadiation (CkMigrateMessage *msg)
 
 WRAPPED_PUPable_decl_base_template (domain::BoundaryConditions::BoundaryCondition, ConstraintPreservingSphericalRadiation)
 
auto get_clone () const -> std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > override
 
void pup (PUP::er &p) override
 
std::optional< std::stringdg_time_derivative (gsl::not_null< Scalar< DataVector > * > dt_psi_correction, gsl::not_null< Scalar< DataVector > * > dt_pi_correction, gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > dt_phi_correction, const std::optional< tnsr::I< DataVector, Dim, Frame::Inertial > > &face_mesh_velocity, const tnsr::i< DataVector, Dim, Frame::Inertial > &normal_covector, const Scalar< DataVector > &psi, const Scalar< DataVector > &pi, const tnsr::i< DataVector, Dim, Frame::Inertial > &phi, const tnsr::I< DataVector, Dim, Frame::Inertial > &coords, const Scalar< DataVector > &gamma2, const tnsr::i< DataVector, Dim, Frame::Inertial > &d_psi, const tnsr::i< DataVector, Dim, Frame::Inertial > &d_pi, const tnsr::ij< DataVector, Dim, Frame::Inertial > &d_phi) const
 
- Public Member Functions inherited from ScalarWave::BoundaryConditions::BoundaryCondition< Dim >
 BoundaryCondition (BoundaryCondition &&)=default
 
BoundaryConditionoperator= (BoundaryCondition &&)=default
 
 BoundaryCondition (const BoundaryCondition &)=default
 
BoundaryConditionoperator= (const BoundaryCondition &)=default
 
 BoundaryCondition (CkMigrateMessage *msg)
 
void pup (PUP::er &p) override
 
- Public Member Functions inherited from domain::BoundaryConditions::BoundaryCondition
 BoundaryCondition (BoundaryCondition &&)=default
 
BoundaryConditionoperator= (BoundaryCondition &&)=default
 
 BoundaryCondition (const BoundaryCondition &)=default
 
BoundaryConditionoperator= (const BoundaryCondition &)=default
 
 BoundaryCondition (CkMigrateMessage *const msg)
 
 WRAPPED_PUPable_abstract (BoundaryCondition)
 
virtual auto get_clone () const -> std::unique_ptr< BoundaryCondition >=0
 

Static Public Attributes

static constexpr Options::String help
 
static constexpr evolution::BoundaryConditions::Type bc_type
 

Detailed Description

template<size_t Dim>
class ScalarWave::BoundaryConditions::ConstraintPreservingSphericalRadiation< Dim >

Constraint-preserving spherical radiation boundary condition that seeks to avoid ingoing constraint violations and radiation.

The constraint-preserving part of the boundary condition imposes the following condition on the time derivatives of the characteristic fields:

\begin{align*} d_tw^\Psi&\to d_tw^{\Psi}+\lambda_{\Psi}n^i\mathcal{C}_i, \\ d_tw^0_i&\to d_tw^{0}_i+\lambda_{0}n^jP^k_i\mathcal{C}_{ik}, \end{align*}

where

\begin{align*} P^k{}_i=\delta^k_i-n^kn_i \end{align*}

projects a tensor onto the spatial surface to which \(n_i\) is normal, and \(d_t w\) is the evolved to characteristic field transformation applied to the time derivatives of the evolved fields. That is,

\begin{align*} d_t w^\Psi&=\partial_t \Psi, \\ d_t w_i^0&=(\delta^k_i-n^k n_i)\partial_t \Phi_k, \\ d_t w^{\pm}&=\partial_t\Pi\pm n^k\partial_t\Phi_k - \gamma_2\partial_t\Psi. \end{align*}

The constraints are defined as:

\begin{align*} \mathcal{C}_i&=\partial_i\Psi - \Phi_i=0, \\ \mathcal{C}_{ij}&=\partial_{[i}\Phi_{j]}=0 \end{align*}

Radiation boundary conditions impose a condition on \(\Pi\) or its time derivative. We denote the boundary condition value of the time derivative of \(\Pi\) by \(\partial_t\Pi^{\mathrm{BC}}\). With this, we can impose boundary conditions on the time derivatives of the evolved variables as follows:

\begin{align*} \partial_{t} \Psi&\to\partial_{t}\Psi + \lambda_\Psi n^i \mathcal{C}_i, \\ \partial_{t}\Pi&\to\partial_{t}\Pi-\left(\partial_t\Pi - \partial_t\Pi^{\mathrm{BC}}\right) +\gamma_2\lambda_\Psi n^i \mathcal{C}_i =\partial_t\Pi^{\mathrm{BC}} +\gamma_2\lambda_\Psi n^i \mathcal{C}_i, \\ \partial_{t}\Phi_i&\to\partial_{t}\Phi_i+ 2 \lambda_0n^j \mathcal{C}_{ji}. \end{align*}

Below we assume the normal vector \(n^i\) is the radial unit normal vector. That is, we assume the outer boundary is spherical. A Sommerfeld [167] radiation condition is given by

\begin{align*} \partial_t\Psi=n^i\Phi_i \end{align*}

Or, assuming that \(\partial_tn^i=0\) (or is very small),

\begin{align*} \partial_t\Pi^{\mathrm{BC}}=n^i\partial_t\Phi_i \end{align*}

The Bayliss-Turkel [16] boundary conditions are given by:

\begin{align*} \prod_{l=1}^m\left(\partial_t + \partial_r + \frac{2l-1}{r}\right)\Psi=0 \end{align*}

The first-order form is

\begin{align*} \partial_t\Pi^{\mathrm{BC}}=n^i\partial_t\Phi_i + \frac{1}{r}\partial_t\Psi, \end{align*}

assuming \(\partial_t n^i=0\) and \(\partial_t r=0\).

The second-order boundary condition is given by,

\begin{align*} \partial_t\Pi^{\mathrm{BC}} &=\left(\partial_t\partial_r + \partial_r\partial_t + \partial_r^2+\frac{4}{r}\partial_t +\frac{4}{r}\partial_r + \frac{2}{r^2}\right)\Psi \notag \\ &=n^i(\partial_t\Phi_i-\partial_i\Pi) + n^i n^j\partial_i\Phi_j - \frac{4}{r}\Pi+\frac{4}{r}n^i\Phi_i + \frac{2}{r^2}\Psi \notag \\ &=n^i(\gamma_2(\partial_i\Psi - \Phi_i)-2\partial_i\Pi) + n^i n^j\partial_i\Phi_j - \frac{4}{r}\Pi+\frac{4}{r}n^i\Phi_i + \frac{2}{r^2}\Psi, \end{align*}

where \(\partial_t\) is the derivative with respect to the inertial frame time, and we are assuming \(\partial_t n^i=0\) and \(\partial_t r=0\).

The moving mesh can be accounted for by using

\begin{align*} \partial_t r = \frac{1}{r}x^i\delta_{ij}\partial_t x^j \end{align*}

Note
It is not clear if \(\partial_t\Phi_i\) should be replaced by \(-\partial_i\Pi\), which is the evolution equation but without the constraint.
On a moving mesh the characteristic speeds change according to \(\lambda\to\lambda-v^i_gn_i\) where \(v^i_g\) is the mesh velocity.
For the scalar wave system \(\lambda_0 = \lambda_\psi\)
Warning
The boundary conditions are implemented assuming the outer boundary is spherical. It might be possible to generalize the condition to non-spherical boundaries by using \(x^i/r\) instead of \(n^i\), but this hasn't been tested.
The received time derivatives are in the logical frame, not the inertial frame and would need to first be corrected by subtracting the mesh velocity. Similarly, the time derivative correction is in the logical frame. We instead substitute the evolution equations directly in since the scalar wave system is quite simple.

Member Function Documentation

◆ get_clone()

Member Data Documentation

◆ bc_type

template<size_t Dim>
constexpr evolution::BoundaryConditions::Type ScalarWave::BoundaryConditions::ConstraintPreservingSphericalRadiation< Dim >::bc_type
staticconstexpr
Initial value:
=
evolution::BoundaryConditions::Type::TimeDerivative

◆ help

template<size_t Dim>
constexpr Options::String ScalarWave::BoundaryConditions::ConstraintPreservingSphericalRadiation< Dim >::help
staticconstexpr
Initial value:
{
"Constraint-preserving spherical radiation boundary conditions setting "
"the time derivatives of Psi, Phi, and Pi to avoid incoming constraint "
"violations, and imposing radiation boundary conditions."}

The documentation for this class was generated from the following file: