Outputs EinsteinToolkit data in a format which can be read by SpECTRE’s CCE code for obtaining waveform data at infinity.
This thorn allows the user to output the metric, lapse, and shift data in a format which can be fed directly into SpECTRE’s Cauchy Characteristic Evolution code (documentation for that code here: https://spectre-code.org/tutorial_cce.html). Doing so enables the evolution of gravitational radiation to spatial and temporal infinity as well as the direct extraction of gravitational wave strain.
The format is an h5 file for each desired worldtube radius. Within this h5 file are datasets for the metric, lapse, shift, and their respective radial and time derivatives:
gxx.dat, gxy.dat, gxz.dat, gyy.dat, gyz.dat, gzz.dat Drgxx.dat, Drgxy.dat, Drgxz.dat, Drgyy.dat, Drgyz.dat, Drgzz.dat Dtgxx.dat, Dtgxy.dat, Dtgxz.dat, Dtgyy.dat, Dtgyz.dat, Dtgzz.dat Shiftx.dat, Shifty.dat, Shiftz.dat DrShiftx.dat, DrShifty.dat, DrShiftz.dat DtShiftx.dat, DtShifty.dat, DtShiftz.dat Lapse.dat DrLapse.dat DtLapse.dat
Each dataset is two dimensional with rows signifying timesteps and coluns containing the data decomposed into spin-weight 0 spherical harmonics. The first column denotes the time, and the remaining columns are the real and imaginary coefficients for the modes in m-changes-fastest order:
"time", "Re(0,0)", "Im(0,0)", "Re(1,-1)", "Im(1,-1)", "Re(1,0)", "Im(1,0)", "Re(1,1)", "Im(1,1)", "Re(2,-2)", "Im(2,-2)", "Re(2,-1)", "Im(2,-1)", "Re(2,0)", "Im(2,0)", "Re(2,1)", "Im(2,1)", "Re(2,2)", "Im(2,2)", ...
To accomplish this, the metric, extrinsic curvature, lapse, shift, dtlapse, and dtshift are interpolated onto spheres of the desired radii using CCTK_InterpGridArrays. This interpolater can also return the cartesian derivatives which are then used to compute the radial derivatives for the metric, lapse, and shift.
The metric is computed from the extrinsic curvature, lapse, and shift as:
\begin {equation} K_{ij} = \frac {1}{2 \alpha } \left ( -\partial _0 \gamma _{ij} + \beta ^k \partial _k \gamma _{ij} + \gamma _{ki} \partial _j \beta ^k + \gamma _{kj} \partial _i \beta ^k \right ) \, . \end {equation}
The metric, lapse, shift, and their radial and time derivatives are then decomposed using spin-weight 0 spherical harmonics. As described in the Multipole thorn, this allows us to separate out the angular dependence and represent a field as:
The coefficients \(C^{lm}(t,r)\) are computed as
This thorn uses the same numerical implementation of spherical harmonic decomposition as the Multipole thorn using Simpson’s rule for the integration.
The data is then output into h5 files in the format specified above.
This thorn can be obtained at https://github.com/deborahferguson/CCE_Export and is included as part of the EinsteinToolkit.
The user specifies how many radii they would like to extract at (nradii) and the value of each of those radii in M (radius[]). The user should also specify how often they want to output the data in iterations (out_every). Optionally, the user can also provide a specific location to output the files (out_dir) as well as the desired number of iterations to preallocate in the h5 files (hdf5_chunk_size).
The functionality of this thorn relies upon grid variables set up in ADMBase, specifically those in the groups metric, curv, lapse, shift, dtlapse, and dtshift. These grid variables must all be populated in order to use this thorn. Since some evolution codes do not write the time derivatives of the lapse and shift to these variables, those evolution codes are not compatible with this thorn.
CCE_Export::nradii = 3 CCE_Export::radius[0] = 100.00 CCE_Export::radius[1] = 150.00 CCE_Export::radius[2] = 200.00 CCE_Export::out_every = 32
If any issues arise, please create a ticket on the github (https://github.com/deborahferguson/CCE_Export/issues).
base_file_name | Scope: private | STRING |
Description: Base file name for CCE_Export’s files, will be appended by ’R’ and then the worldtube
radius with 2 sig figs after the decimal
| ||
Range | Default: CCE_Export | |
.+ | A valid base file name
| |
extension | Scope: private | STRING |
Description: Extension for CCE_Extract’s files
| ||
Range | Default: h5 | |
.+ | A nonempty string
| |
hdf5_chunk_size | Scope: private | INT |
Description: How many iterations to preallocate in extensible HDF5 datasets
| ||
Range | Default: 200 | |
1:* | Any integer
| |
nradii | Scope: private | INT |
Description: How many radii to export the data on
| ||
Range | Default: 1 | |
0:100 | number of radii
| |
out_dir | Scope: private | STRING |
Description: Output directory for CCE_Export’s files, overrides IO::out_dir
| ||
Range | Default: (none) | |
.+ | A valid directory name
| |
![]() | An empty string to choose the default from IO::out_dir
| |
out_every | Scope: private | INT |
Description: How often to output the metric data
| ||
Range | Default: 1 | |
no output
| ||
1:* | output every x iterations
| |
radius | Scope: private | REAL |
Description: Radii to export the metric data on
| ||
Range | Default: 0.0 | |
0.0:* | Extraction radius
| |
io_out_dir | Scope: shared from IO | STRING |
Implements:
cce_export
Inherits:
admbase
This section lists all the variables which are assigned storage by thorn EinsteinAnalysis/CCE_Export. 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.
NONE
CCTK_ANALYSIS
cce_export
export metric data on sphere for cce
Language: | c | |
Options: | global | |
Reads: | admbase::metric(everywhere) | |
admbase::curv(everywhere) | ||
admbase::lapse(everywhere) | ||
admbase::shift(everywhere) | ||
admbase::dtlapse(everywhere) | ||
admbase::dtshift(everywhere) | ||
Type: | function | |