The massless wave equation for a scalar field \(\phi \) can be written as
where \(\gamma ^{\mu \nu }=\sqrt {-g}g^{\mu \nu }\), and \(d_{\mu }\equiv \partial _{\mu }\phi \). Using the expressions \(\sqrt {-g} = \alpha \sqrt {h}\) and \begin {displaymath} g^{\mu \nu } = \left ( \begin {array}{cc} -1/\alpha ^2 & \beta ^i/\alpha ^2 \\ \beta ^j/\alpha ^2 & \gamma ^{ij} - \beta ^i \beta ^j/\alpha ^2 \end {array} \right ), \end {displaymath} where \(\gamma ^{ij}\) is the inverse of the three metric, the equation can be rewritten as
with \(H^{ij} \equiv \alpha ^2 \gamma ^{ij} - \beta ^i \beta ^j\). The non-shift speed modes with respect to a boundary with normal \(n_i\) are
and the shift speed modes are \(d_A\), with \(A\) transversal directions.
The physical energy is
and the way the equations above have been written this energy is not increasing in the stationary background case if homogeneous boundary conditions are given at outer boundaries, also at the discrete level (replacing above \(\partial _i\) by \(D_i\)).
The implementation of the field equations in the code differs slightly from the above. Assuming a stationary background and expanding out the derivative operator, we obtain the equations in the final form
Simple addition to the wave multi-patch toy to get started on this.
This is just a non-linear wave equation obtained, a very minor modification to the wave equation thorn adding a different initial data and a slight modification to the right hand side. A reference to this is in a paper by Liebling to appear in Phys. Rev. D (2005). The non-linear wave equation is written as
where \(\gamma ^{\mu \nu }=\sqrt {-g}g^{\mu \nu }\), and \(d_{\mu }=\partial _{\mu }\phi \) and \(p\) must be an odd integer \(\ge 3\).
The initial data coded is given by
with \(\tilde r^2 = \epsilon _x x^2 + \epsilon _y y^2 + z^2\).
The parameters used for this initial data are given some distinct names to avoid conflicts with existing ones and are as follows:
initial-data = GaussianNonLinear (choose the above mentioned initial data)
nonlinearrhs = turn on/off the right hand side for testing. a boolean variable.
powerrhs = power \(p\) above.
epsx = \(\epsilon _x\)
epsy = \(\epsilon _y\)
ANL = \(A\)
deltaNL = \(\delta \)
omeNL = \(\Omega \)
RNL = R
Note, as the solution is not known, one must set for now the incoming fields to \(0\). CPBC might one day be put... though who knows :-)
Setting \(\rho = \partial _t u\).
RHS:
Propagation matrix:
Eigensystem:
Setting \(\rho = \mathcal {L}_n u\) with \(n_a = D_a t\), leading to \(\rho = \partial _0 u = (1/\alpha ) \partial _t u - (1/\alpha ) \beta ^i \partial _i u\).
RHS:
Propagation matrix:
Eigensystem:
(This section very probably contains errors, say Erik on 2005-04-13.)
Setting \(\rho = \mathcal {L}_k u\) with a “Killing” vector \(k^a = \partial _t x^a\), leading to \(\rho = (1/\alpha ) \partial _t u\).
RHS:
Propagation matrix:
Eigensystem:
[1] Gioel Calabrese, Luis Lehner, Dave Neilsen, Jorge Pullin, Oscar Reula, Olivier Sarbach, Manuel Tiglio, Novel finite-differencing techniques for numerical relativity: application to black-hole excision, Class. Quantum Grav. 20, L245 (2003), gr-qc/0302072.
amplitude | Scope: private | REAL |
Description: Amplitude
| ||
Range | Default: 1.0 | |
*:* | ||
anl | Scope: private | REAL |
Description: Amplitude of the non-linear Gaussian
| ||
Range | Default: 0.0 | |
*:* | ||
bound | Scope: private | STRING |
Description: Boundary condition
| ||
Range | Default: static | |
.* | any registered boundary condition
| |
compute_second_derivative_from_first_derivative | Scope: private | BOOLEAN |
Description: Take first derivative twice to compute second derivate
| ||
Default: no | ||
deltanl | Scope: private | REAL |
Description: sigma of the non-linear Gaussian
| ||
Range | Default: 0.0 | |
*:* | ||
eps | Scope: private | REAL |
Description: A small number
| ||
Range | Default: 1.0e-10 | |
0:* | ||
epsx | Scope: private | REAL |
Description: eps in x-direction of the non-linear Gaussian
| ||
Range | Default: 0.0 | |
*:* | ||
epsy | Scope: private | REAL |
Description: eps in y-direction of the non-linear Gaussian
| ||
Range | Default: 0.0 | |
*:* | ||
initial_data | Scope: private | KEYWORD |
Description: Type of initial data
| ||
Range | Default: plane | |
linear | x and y coordinates
| |
plane | Plane wave
| |
Gaussian | Gaussian wave packet
| |
GaussianNonLinear | Gaussian wave packet for the non-linear RHS
| |
GeneralMultipole | Multipole with arbitrary l and m
| |
multipole | L=1 initial data, Gaussian in r
| |
multipole l=1, m=0 | L=1 m=0 initial data, Gaussian in r, u=0
| |
multipole l=1, m=1 | L=1 m=1 initial data, Gaussian in r, u=0
| |
multipole l=1, m=-1 | L=1 m=-1 initial data, Gaussian in r, u=0
| |
multipole l=2 | L=2 initial data, Gaussian in r
| |
multipole l=2, u=0 | L=2 initial data, Gaussian in r, u=0
| |
multipole l=2, m=1 | L=2 m=1 initial data, Gaussian in r, u=0
| |
multipole l=2, m=-1 | L=2 m=-1 initial data, Gaussian in r, u=0
| |
multipole l=2, m=2 | L=2 m=2 initial data, Gaussian in r, u=0
| |
multipole l=2, m=-2 | L=2 m=-2 initial data, Gaussian in r, u=0
| |
multipole l=2, m=-2 | L=2 m=-2 initial data, Gaussian in r, u=0
| |
multipole l=4, m=0 | L=4 m=0 initial data, Gaussian in r, u=0
| |
multipole l=4, m=1 | L=4 m=1 initial data, Gaussian in r, u=0
| |
multipole l=4, m=-1 | L=4 m=-1 initial data, Gaussian in r, u=0
| |
multipole l=4, m=2 | L=4 m=-2 initial data, Gaussian in r, u=0
| |
multipole l=4, m=-2 | L=4 m=-2 initial data, Gaussian in r, u=0
| |
multipole l=4, m=3 | L=4 m=3 initial data, Gaussian in r, u=0
| |
multipole l=4, m=-3 | L=4 m=-3 initial data, Gaussian in r, u=0
| |
multipole l=4, m=4 | L=4 m=4 initial data, Gaussian in r, u=0
| |
multipole l=4, m=-4 | L=4 m=-4 initial data, Gaussian in r, u=0
| |
noise | Random noise
| |
debug | number of current patch and grid point index
| |
initial_data_analytic_derivatives | Scope: private | BOOLEAN |
Description: Calculate spatial derivatives of the initial data analytically?
| ||
Default: no | ||
lapse | Scope: private | REAL |
Description: Lapse function multiplier
| ||
Range | Default: 1.0 | |
*:* | must not be zero
| |
mass | Scope: private | REAL |
Description: Mass M
| ||
Range | Default: 1.0 | |
*:* | ||
metric | Scope: private | KEYWORD |
Description: Global metric
| ||
Range | Default: Minkowski | |
Minkowski | Minkowski
| |
Kerr-Schild | Kerr-Schild
| |
Kerr | Kerr Black Hole
| |
multipole_l | Scope: private | INT |
Description: For GeneralMultipole initial data: degree of spherical harmonic function
| ||
Range | Default: 2 | |
0:* | A positive integer
| |
multipole_m | Scope: private | INT |
Description: For GeneralMultipole initial data: order of spherical harmonic function
| ||
Range | Default: 2 | |
*:* | An integer -l<=m<=l
| |
multipole_s | Scope: private | INT |
Description: For GeneralMultipole initial data: spin weight spherical harmonic function
| ||
Range | Default: (none) | |
*:* | A positive integer
| |
munl | Scope: private | REAL |
Description: Speed of the non-linear Gaussian
| ||
Range | Default: 0.0 | |
*:* | ||
nonlinearrhs | Scope: private | BOOLEAN |
Description: Add a non-linear term to the RHS?
| ||
Default: no | ||
numevolvedvars | Scope: private | INT |
Description: The number of evolved variables in this thorn
| ||
Range | Default: 5 | |
5:5 | five
| |
omenl | Scope: private | REAL |
Description: Omega of the non-linear Gaussian
| ||
Range | Default: 0.0 | |
*:* | ||
outer_bound | Scope: private | STRING |
Description: outer boundary
| ||
Range | Default: solution | |
zero | set all characteristics to zero
| |
solution | use the same analytic solution as for the initial data
| |
dirichlet | set all fields to zero
| |
radiative | radiative boundary
| |
none | no boundary condition
| |
outer_penalty_bound | Scope: private | STRING |
Description: outer penalty boundary
| ||
Range | Default: zero | |
zero | set all characteristics to zero
| |
solution | use the same analytic solution as for the initial data
| |
powerrhs | Scope: private | REAL |
Description: Exponent in the non-linear RHS term
| ||
Range | Default: 5.0 | |
3.0:13.0 | ||
radius | Scope: private | REAL |
Description: Radius of the Gaussian
| ||
Range | Default: 0.0 | |
0:* | ||
recalculate_rhs | Scope: private | BOOLEAN |
Description: Recalculate the RHSs in the ANALYSIS timebin
| ||
Default: yes | ||
rhsbound | Scope: private | STRING |
Description: Boundary condition during RHS evaluation
| ||
Range | Default: none | |
.* | any registered boundary condition
| |
rnl | Scope: private | REAL |
Description: How fat the non-linear Gaussian is (r-R)
| ||
Range | Default: 0.0 | |
*:* | ||
shift | Scope: private | REAL |
Description: Shift vector addition
| ||
Range | Default: 0.0 | |
*:* | ||
shift_interpolation_type | Scope: private | KEYWORD |
Description: Setting for the interpolating vector field bî (only used for the db formulation)
| ||
Range | Default: shift | |
shift | Set bî = betaî (corresponds to d0 formulation)
| |
zero | Set bî = 0 (corresponds to dk formulation)
| |
shift_omega | Scope: private | REAL |
Description: Rotational shift vector addition about z axis
| ||
Range | Default: 0.0 | |
*:* | ||
space_offset | Scope: private | REAL |
Description: Space offset
| ||
Range | Default: 0.0 | |
*:* | ||
spin | Scope: private | REAL |
Description: Spin a=J/M
| ||
Range | Default: 0.0 | |
-1:+1 | ||
time_offset | Scope: private | REAL |
Description: Time offset
| ||
Range | Default: 0.0 | |
*:* | ||
wave_number | Scope: private | REAL |
Description: Wave number
| ||
Range | Default: 0.0 | |
*:* | ||
width | Scope: private | REAL |
Description: Width of the Gaussian
| ||
Range | Default: 1.0 | |
(0:* | ||
mol_num_evolved_vars | Scope: shared from METHODOFLINES | INT |
Implements:
llamawavetoy
Inherits:
grid
coordinates
globalderivative
summationbyparts
interpolate
Group Names | Variable Names | Details | |
scalar | compact | 0 | |
u | description | The scalar of the scalar wave equation fame | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” | ||
timelevels | 2 | ||
variable type | REAL | ||
density | compact | 0 | |
rho | description | Time derivative of u | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” | ||
timelevels | 2 | ||
variable type | REAL | ||
dx_scalar | compact | 0 | |
dx_u | description | Spatial derivatives of u | |
dy_u | dimensions | 3 | |
dz_u | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”scalar” | ||
timelevels | 2 | ||
variable type | REAL | ||
dxx_scalar | compact | 0 | |
dxx_u | description | Spatial derivatives of u | |
dyy_u | dimensions | 3 | |
dzz_u | distribution | DEFAULT | |
dxy_u | group type | GF | |
dxz_u | tags | tensortypealias=”scalar” | |
dyz_u | timelevels | 2 | |
variable type | REAL | ||
dx_density | compact | 0 | |
dx_rho | description | Spatial derivatives of rho | |
dy_rho | dimensions | 3 | |
dz_rho | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”scalar” | ||
timelevels | 2 | ||
variable type | REAL | ||
velocity | compact | 0 | |
vx | description | Spatial derivative of u | |
vy | dimensions | 3 | |
vz | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”scalar” | ||
timelevels | 2 | ||
variable type | REAL | ||
Group Names | Variable Names | Details | |
debug | compact | 0 | |
vxdebug | description | Spatial derivative of u | |
vydebug | dimensions | 3 | |
vzdebug | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”scalar” | ||
timelevels | 1 | ||
variable type | REAL | ||
scalardot | compact | 0 | |
udot | description | RHS of u | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
densitydot | compact | 0 | |
rhodot | description | RHS of rho | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
velocitydot | compact | 0 | |
vxdot | description | RHS ov v | |
vydot | dimensions | 3 | |
vzdot | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
constraints | compact | 0 | |
wx | description | Integrability condition | |
wy | dimensions | 3 | |
wz | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”scalar” tensorparity=-1 Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
difference_v | compact | 0 | |
diff_vx | description | Difference between v_i and d/dxî u | |
diff_vy | dimensions | 3 | |
diff_vz | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
Group Names | Variable Names | Details | |
velocity_squared | compact | 0 | |
v2 | description | Velocity squared | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
scalarenergy | compact | 0 | |
energy | description | Energy of the scalar field | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
errors | compact | 0 | |
error | description | Error of the solution | |
error_rho | dimensions | 3 | |
error_vx | distribution | DEFAULT | |
error_vy | group type | GF | |
error_vz | tags | tensortypealias=”scalar” Prolongation=”None” | |
exact | timelevels | 1 | |
exact_rho | variable type | REAL | |
errorsperiodic | compact | 0 | |
errorperiodic | description | Error for a solution which is known to be periodic | |
errorperiodic_rho | dimensions | 3 | |
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
metric | compact | 0 | |
gxx | description | Spatial background metric | |
gxy | dimensions | 3 | |
gxz | distribution | DEFAULT | |
gyy | group type | GF | |
gyz | tags | tensortypealias=”scalar” Prolongation=”None” | |
gzz | timelevels | 1 | |
variable type | REAL | ||
inverse_metric | compact | 0 | |
guxx | description | Inverse of the spatial background metric | |
guxy | dimensions | 3 | |
guxz | distribution | DEFAULT | |
guyy | group type | GF | |
guyz | tags | tensortypealias=”scalar” Prolongation=”None” | |
guzz | timelevels | 1 | |
variable type | REAL | ||
Group Names | Variable Names | Details | |
lapse | compact | 0 | |
alpha | description | Spatial background metric | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
shift | compact | 0 | |
betax | description | Spatial background metric | |
betay | dimensions | 3 | |
betaz | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
volume_element | compact | 0 | |
epsilon | description | Volume element due to the spatial background metric | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
min_spacing | min_spacing | compact | 0 |
description | Minimum grid spacing | ||
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”scalar” Prolongation=”None” | ||
timelevels | 1 | ||
variable type | REAL | ||
This section lists all the variables which are assigned storage by thorn Llama/LlamaWaveToy. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.
Always: | |
scalar[2] density[2] velocity[2] | |
dx_scalar[2] | |
dxx_scalar[2] | |
dx_density[2] | |
errors | |
metric inverse_metric lapse shift volume_element | |
scalardot densitydot velocitydot | |
CCTK_STARTUP
lwt_startup
register banner with cactus
Language: | c | |
Options: | meta | |
Type: | function | |
MoL_Register (conditional)
lwt_register_mol
register variables with mol
Language: | c | |
Options: | meta | |
Type: | function | |
CCTK_ANALYSIS (conditional)
lwt_calc_rhs
calculate the rhs
Language: | fortran | |
Storage: | scalardot | |
densitydot | ||
velocitydot | ||
Sync: | scalardot | |
densitydot | ||
velocitydot | ||
Triggers: | scalardot | |
densitydot | ||
velocitydot | ||
Type: | function | |
CCTK_ANALYSIS
lwt_calcenergy
calculate the energy of the scalar field
Language: | fortran | |
Storage: | scalarenergy | |
Sync: | scalarenergy | |
Triggers: | scalarenergy | |
Type: | function | |
CCTK_ANALYSIS
lwt_error
calculate errors of the solution
Language: | fortran | |
Storage: | errorsperiodic | |
Triggers: | errors | |
errorsperiodic | ||
Type: | function | |
CCTK_ANALYSIS
lwt_min_spacing
calculate the smallest grid spacing
Language: | fortran | |
Storage: | min_spacing | |
Sync: | min_spacing | |
Triggers: | min_spacing | |
Type: | function | |
CCTK_INITIAL
lwt_init_metric
initialise the metric
Language: | fortran | |
Type: | function | |
CCTK_INITIAL
lwt_calc_inverse_metric
transform the metric
After: | lwt_init_metric | |
Language: | fortran | |
Type: | function | |
CCTK_INITIAL
lwt_init
initialise the system
After: | lwt_init_metric | |
Language: | fortran | |
Type: | function | |
MoL_CalcRHS
lwt_calc_rhs
calculate the rhs
Language: | fortran | |
Type: | function | |
MoL_PostStep
lwt_outerboundary
apply outer boundaries
Language: | fortran | |
Type: | function | |
MoL_RHSBoundaries
lwt_rhs_outerboundary
apply mol rhs outer boundaries (eg. radiative boundary condition)
Language: | fortran | |
Type: | function | |
MoL_PostStep
lwt_boundaries
select the boundary condition
After: | lwt_outerbound | |
Language: | fortran | |
Options: | level | |
Sync: | scalar | |
density | ||
velocity | ||
Type: | function | |
MoL_PostStep
applybcs
apply boundary conditions
After: | lwt_boundaries | |
Type: | group | |
Alias Name: | Function Name: |
ApplyBCs | LWT_ApplyBCs |