Chapter P10
TmunuBase

Author(s): Erik Schnetter <schnetter@cct.lsu.edu>

Date: 2008-04-07



P10.1 Abstract

Provide grid functions for the stress-energy tensor Tμν, and schedule when these grid functions are calculated. This allows different thorns to cooperate without explicitly depending on each other. This thorn is compatible with the CalcTmumu.inc interface, in the sense that thorns using this interface will work correctly with TmunuBase. Thorn TmunuBase is for the stress-energy tensor what thorn ADMBase is for the metric tensor.

P10.2 Introduction

Thorn TmunuBase provides core infrastructure for thorns implementing some kind of energy or matter in general relativity, for example general relativistic hydrodynamics formulations. It provides the basic variables, i.e., the stress-energy tensor Tμν, in addition to a set of parameters to regulate their use. These variables are used to communicate between (possibly multiple) thorns contributing to the stress-energy content of the spacetime, and thorns needing to evaluate the stress-energy tensor such as spacetime evolution methods. It also provides schedule groups to manage when Tμν is calculated and when it is ready for access.

P10.3 Using TmunuBase

P10.3.1 Variables

TmunuBase weakly assumes (but does not require) that the spacetime is described in terms of a 3 + 1 decomposition. The variables provided by TmunuBase are:

These components have the prefix e to avoid naming conflicts with existing variables. Many thorns dealing with matter already use variable names such as Ttt.

These variables have up to three time levels.

P10.3.2 Parameters

By default, the TmunuBase variables have no storage, and TmunuBase is inactive. This makes it possible to add a matter interface to existing vacuum spacetime methods without changing their behaviour.

Several parameters choose how TmunuBase behaves at run time:

The grid scalar stress_energy_state describes whether the Tμν variables have storage.

P10.4 Programming with TmunuBase

P10.4.1 Contributing to Tμν

There may be multiple thorns contributing to Tμν. Therefore, thorn TmunuBase initialises Tμν to zero, and each thorn has to add to the existing values in Tμν. The corresponding routine should be scheduled in the bin AddToTmunu. Note: Do not schedule anything in the schedule bin SetTmunu.

P10.4.2 Reading from Tμν

Since the values of Tμν change at each time step, or – if a thorn like MoL is used – at each substep, Tμν needs to be recalculated frequently. This happens either in the schedule bin evol or in the schedule group MoL_PostStep. Tμν may only be accessed after it has been calculated, e.g. IN MoL_PostStep AFTER SetTmunu. Tμν can be freely accessed at other times, e.g. in MoL_CalcRHS or at poststep or analyisis.

P10.5 Compatibility to ADMCoupling

Cactus provides another interface for contributing to the stress-energy tensor, called CalcTmunu. This alternative interface (which is described in thorn ADMCoupling) requires writing routines in fixed-format Fortran 77 and inserting lines of code into a file CalcTmunu.inc. We suggest to use exactly one of these two interface and not to mix them.

Thorn TmunuBase takes contributions from the CalcTmunu interface automatically into account as well. It also collects the values which are added to its Tμν and provides these to other thorns which use the CalcTmunu.inc interface. That is, thorn TmunuBase is fully backwards compatible.

P10.5.1 Comparison to ADMCoupling

The CalcTmunu interface and this thorn TmunuBase make different space/performance tradeoffs. CalcTmunu does not store any components of the stress-energy tensor, which saves memory and is also more efficient if its components can be quickly calculated from other variables (presumably the state vector of a hydrodynamics thorn).

TmunuBase requires explicit storage for Tμν. This is necessary if Tμν needs to be interpolated e.g. for dynamical horizon calculations. Compared to the overall number of grid function in a typical simulation the number of additional variables is tolerable (typical numbers are 10 additional variables with 200 existing variables). With the exception of the parts ensuring compatibility to CalcTmunu, TmunuBase is also a much simpler and more flexible mechanism.

P10.5.2 Acknowledgements

We thank I. Hawke for designing and implementing thorn MoL, without which a generic high-order coupling between spacetime and hydrodynamics methods would not be possible.

P10.6 Parameters




prolongation_type
Scope: private   STRING



Description: The kind of boundary prolongation for the stress-energy tensor



Range    Default: Lagrange
ˆL  agrange$
standard prolongation (requires several time levels)
ˆn  one$
no prolongation (use this if you do not have enough time levels active)
any other supported prolongation type






stress_energy_storage
Scope: private   BOOLEAN



Description: Should the stress-energy tensor have storage?



   Default: no






timelevels
Scope: private   INT



Description: Number of time levels



Range    Default: 1
0:3






stress_energy_at_rhs
Scope: restricted   BOOLEAN



Description: Should the stress-energy tensor be calculated for the RHS evaluation?



   Default: no






support_old_calctmunu_mechanism
Scope: restricted   BOOLEAN



Description: Should the old CalcTmunu.inc mechanism be supported?



   Default: yes



P10.7 Interfaces

General

Implements:

tmunubase

Inherits:

admbase

staticconformal

Grid Variables

PUBLIC GROUPS




  Group Names    Variable Names     Details   




stress_energy_state    compact0
stress_energy_state    descriptionState of storage for stress-energy tensor
   dimensions0
   distributionCONSTANT
   group typeSCALAR
   stagger typeNONE
   timelevels1
  variable typeINT




stress_energy_scalar    compact0
eTtt    descriptionStress-energy tensor
     description3-scalar part T_00
   dimensions3
   distributionDEFAULT
   group typeGF
   stagger typeNONE
   tagstensortypealias=”Scalar” ProlongationParameter=”TmunuBase::prolongation_type”
   timelevels3
  variable typeREAL




stress_energy_vector    compact0
eTtx    descriptionStress-energy tensor
     description3-vector part T_0i
eTty    dimensions3
eTtz    distributionDEFAULT
   group typeGF
   stagger typeNONE
   tagstensortypealias=”D” ProlongationParameter=”TmunuBase::prolongation_type”
   timelevels3
  variable typeREAL




stress_energy_tensor    compact0
eTxx    descriptionStress-energy tensor
     description3-tensor part T_ij
eTxy    dimensions3
eTxz    distributionDEFAULT
eTyy    group typeGF
eTyz    stagger typeNONE
eTzz    tagstensortypealias=”DD_sym” ProlongationParameter=”TmunuBase::prolongation_type”
   timelevels3
  variable typeREAL




PROTECTED GROUPS




  Group Names     Variable Names     Details   




stress_energy_2_state    compact0
stress_energy_2_state   descriptionState of storage for stress-energy tensor
   dimensions0
   distributionCONSTANT
   group typeSCALAR
   stagger typeNONE
   timelevels1
  variable typeINT




stress_energy_2_scalar    compact0
eT2tt    descriptionStress-energy tensor
     description3-scalar part T_00
   dimensions3
   distributionDEFAULT
   group typeGF
   stagger typeNONE
   tagstensortypealias=”Scalar” checkpoint=”no” prolongation=”none”
   timelevels1
  variable typeREAL




stress_energy_2_vector    compact0
eT2tx    descriptionStress-energy tensor
     description3-vector part T_0i
eT2ty    dimensions3
eT2tz    distributionDEFAULT
   group typeGF
   stagger typeNONE
   tagstensortypealias=”D” checkpoint=”no” prolongation=”none”
   timelevels1
  variable typeREAL




stress_energy_2_tensor    compact0
eT2xx    descriptionStress-energy tensor
     description3-tensor part T_ij
eT2xy    dimensions3
eT2xz    distributionDEFAULT
eT2yy    group typeGF
eT2yz    stagger typeNONE
eT2zz    tagstensortypealias=”DD_sym” checkpoint=”no” prolongation=”none”
   timelevels1
  variable typeREAL




P10.8 Schedule

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

 

Always: Conditional:
stress_energy_statestress_energy_2_state
  stress_energy_tensor[3]
  stress_energy_2_scalar
  stress_energy_2_vector
  stress_energy_2_tensor
  stress_energy_scalar[1]
  stress_energy_vector[1]
  stress_energy_tensor[1]
  stress_energy_scalar[2]
  stress_energy_vector[2]
  stress_energy_tensor[2]
  stress_energy_scalar[3]
  stress_energy_vector[3]
   

Scheduled Functions

CCTK_BASEGRID

  tmunubase_setstressenergystate

  set the stress_energy_state variable

 

 Language:fortran
 Options: global
 Type: function

CCTK_INITIAL (conditional)

  settmunu

  calculate the stress-energy tensor

 

 After:admbase_initialdata
   
   admbase_initialgauge
  
   whisky_initial
 Type:group

MoL_PostStep (conditional)

  settmunu

  group for calculating the stress-energy tensor

 

 After:admbase_setadmvars
 Type:group

SetTmunu (conditional)

  tmunubase_settmunu

  calculate the stress-energy tensor using the old calctmunu mechanism

 

 Language:fortran
 Type: function

SetTmunu (conditional)

  tmunubase_zerotmunu

  initialise the stress-energy tensor to zero

 

 Language:fortran
 Type: function

SetTmunu (conditional)

  addtotmunu

  add to the stress-energy tensor here

 

 After:tmunubase_settmunu
 Type:group

SetTmunu (conditional)

  tmunubase_copytmunu

  copy the stress-energy tensor

 

 After: addtotmunu
  Language:fortran
 Type: function

1This was one of the main reason why thorn MoL was instroduced.