SphericalHarmonicRecon

Yosef Zlochower <yosef@astro.rit.edu>

June 18 2009

Abstract

This thorn is used to reconstruct the metric data saved by SphericalHarmonicDecomp. It also provides aliased functions that are used by NullSHRExtract to construct the boundary data for CCE.

1 Introduction

2 Using and Filtering Cauchy data from SphericalHarmonicDecomp

The thorn SphericalHarmonicDecomp uses a least-squares fit of the metric data in some spherical shell to a set of spectral functions (Chebyshev in R and Ylm in angle). These data are dumped into files with names metric_obs_0_Decomp.h5, metric_obs_1_Decomp.h5, etc., where the 0,1,etc. refer to the spherical shell (several are allowed).

This thorn takes the data in one of these files and passes it to NullSHRExtract, which uses them to construct the null boundary data. Several utilities are provided in order to view and modify these data files. These include a program to filter the data via an FFT and calculate a smooth time derivative, which may be important in order to obtain accurate waveforms.

These utilities require the HDF5 and FFTW3 libraries and are compiled using the gamke CONFIGNAME-utils mechanism.

To filter the Cauchy data:

In general a simulation will be run over multiple jobs, each one producing an individual metric_decomp.h5 file. You will need to combine these files using hdf5_merge.

For example  
  hdf5\_merge Run1/metric_obs\_0\_Decomp.h5 \  
             Run2/metric\_obs\_0\_Decomp.h5 \  
             metric\_obs\_0\_Decomp.h5

Once the files are merged, you will need to find the last timestep using the ”findlast” command

./findlast  metric\_obs\_0\_Decomp.h5  
   8086: 4.010913e+02

Here 8086 is the last timestep, which corresponds to a time of 401.0913.

Next it is a good idea to examine the data in one of the higher modes you will use. In this case we will examine the n=1, l=4,m=4 mode of gxx (the 0 below corresponds to gxx, see the source)

./ascii\_output 8086 1 4 4 0 metric\_obs\_0\_Decomp.h5  > test\_out

We will use this data to ensure that only high-frequency junk is filtered. In this case it was found that the true signal frequency is smaller than 0.5 (omega). To be safe, we’ll set the maximum allowed frequency to 2.

./fftwfilter 8086 2 1 metric\_obs\_0\_Decomp.h5

Here the ”2” corresponds to the maximum frequency, while the ”1” corresponds to the damping length. Note that the maximum frequency is in units of 2*pi/(physical time), while the damping length is units of integer frequency. Choosing a large damping length can lead to suppression of the true signal.

The output file is metric_obs_0_Decomp_ft.h5, which contains the filtered metric data and the time derivatives of these data (which the original file did not contain). The filtered data can now be used in a Characteristic evolution.

In order to use the Cauchy extraction data in a subsequent Characteristic evolution, you need to know the timestep in the Cauchy data and the region in radius that the data cover. The program ”readmeta” will give you this region.

./readmeta metric\_obs\_0\_Decomp\_ft.h5  
Run Parameters  
... nn = 7  
... na = 49  
... Rin = 1.800000e+01  
... Rout = 2.200000e+01

Here we see that the data covers the interval 18¡r¡22. In this case, we would choose an extraction radius of 20 and set the following parameters in the parfile

 #Extraction radius---------------  
 SphericalHarmonicRecon::r\_extract=20.0  
 NullSHRExtract::cr = 20.0  
 NullGrid::null\_rwt = 20.0  
 
 SphericalHarmonicRecon::time\_derivative\_in\_file = "yes"  
 SphericalHarmonicRecon::metric\_data\_filename = "metric\_obs\_0\_Decomp\_ft.h5"

Choosing a timestep for the characteristic evolution that is an integer multiple of the Cauchy dump times will remove time interpolation errors and can lead to smoother signals. To find these dump time, use the ”printtime” command. The syntax is ”printtime iteration file”

./printtime 1 metric\_obs\_0\_Decomp\_ft.h5  
1: 4.960317e-02

In this case the dump times are separated by 0.04960317.

For complete example parfiles for both the initial Cauchy evolution, and subsequent null evolution, see SphericalHarmonicDecomp/par/ and SphericalHarmonicRecon/par/

2.1 Parameters

SphericalHarmonicRecon::order order used in time interpolation /  
         differentiation. Options are 2 or 4.  
 
SphericalHarmonicRecon::r_extract the radius of the worldtube. This  
        must be consistent with the setup of the null grid  
 
SphericalHarmonicRecon::metric_data_filename filename for the cauchy  
            metric data  
 
SphericalHarmonicRecon::time_derivative_in_file flag that indicates if  
        the  time derivative of the metric is in the cauchy file. The  
        time derivative may be generated via the fftwfilter program mentioned  
        above.  
 
# the following parameters should only be used if the  
# hdf5 was corrupted and extraction parameters  
# are not recoverable. Of course, we should actually  
# fix the extraction code so that this does not happen  
BOOLEAN override_extraction_parameters "never set this"  
{  
} no  
 
CCTK_INT override_spin "spin: never set this"  
{  
 *:* :: "anything, but you probably want 0"  
} 0  
 
CCTK_INT override_nn "number of Chabyshev coefficients: never use this"  
{  
  1:* :: "positive: must actualy match the extraction run"  
} 1  
 
CCTK_INT override_na "number of angular coefficients: never use this"  
{  
  1:* :: "positive: must actualy match the extraction run"  
} 1  
 
CCTK_REAL override_Rin "inner radius of extraction zone: ..."  
{  
  (0:* :: "positive"  
} 1  
 
CCTK_REAL override_Rout "outer radius of extraction zone: ..."  
{  
  (0:* :: "positive"  
} 1

3 Physical System

4 Numerical Implementation

5 Using This Thorn

5.1 Obtaining This Thorn

5.2 Basic Usage

5.3 Special Behaviour

5.4 Interaction With Other Thorns

5.5 Examples

5.6 Support and Feedback

6 History

6.1 Thorn Source Code

6.2 Thorn Documentation

6.3 Acknowledgements

References

7 Parameters




metric_data_filename
Scope: private  STRING



Description: filename for the cauchy metric data



Range   Default: metric_Decomp.h5
.*
the Cauchy metric data






order
Scope: private  INT



Description: order used in time interpolation / differentiation



Range   Default: 4
2
two or four
4
two or four






override_extraction_parameters
Scope: private  BOOLEAN



Description: never set this



  Default: no






override_na
Scope: private  INT



Description: number of angular coefficition: never use this



Range   Default: 1
1:*
positive: must actualy match the extraction run






override_nn
Scope: private  INT



Description: number of Chabyshev coefficition: never use this



Range   Default: 1
1:*
positive: must actualy match the extraction run






override_rin
Scope: private  REAL



Description: inner radius of extraction zone: ...



Range   Default: 1
(0:*
positive






override_rout
Scope: private  REAL



Description: outer radius of extraction zone: ...



Range   Default: 1
(0:*
positive






override_spin
Scope: private  INT



Description: spin: never set this



Range   Default: (none)
*:*
anything, but you probably want 0






r_extract
Scope: private  REAL



Description: the radius of the worldtube



Range   Default: 50.0
(0:*
positive






time_derivative_in_file
Scope: private  BOOLEAN



Description: is the time derivative of the metric in the cauchy file



  Default: no



8 Interfaces

General

Implements:

sphericalharmonicrecon

Provides:

GetCurrentExtractionCoefs to

GetExtractionParameters to

9 Schedule

This section lists all the variables which are assigned storage by thorn PITTNullCode/SphericalHarmonicRecon. 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.

Storage

NONE

Scheduled Functions

SphericalHarmonicReconRead

  metricreconstruction

  group for use by external thorns to use the metric

 

 After: sphericalharmonicrecon_readdata
 Before:sphericalharmonicrecon_poststep
 Type: group

SphericalHarmonicReconRead

  sphericalharmonicrecon_readdata

  read the world tube data and set the data flag to read

 

 Language:c
 Type: function

SphericalHarmonicReconRead

  sphericalharmonicrecon_poststep

  set data flag to unread

 

 After: sphericalharmonicrecon_readdata
 Language:c
 Options: global
 Type: function

CCTK_WRAGH

  sphericalharmonicrecon_startup

  startup

 

 Language:c
 Options: global
 Type: function