## TmunuBase

2008-04-07

### Abstract

Provide grid functions for the stress-energy tensor ${T}_{\mu \nu }$, and schedule when these grid functions are calculated. This allows different thorns to cooperate without explicitly depending on each other. Thorn TmunuBase is for the stress-energy tensor what thorn ADMBase is for the metric tensor.

### 1 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}_{\mu \nu }$, 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}_{\mu \nu }$ is calculated and when it is ready for access.

### 2 Using TmunuBase

#### 2.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:

• The “scalar” part of ${T}_{\mu \nu }$, its time-time component: eTtt

• The “vector” part of ${T}_{\mu \nu }$, its time-space components: eTtx, eTty, eTtz

• The “tensor” part of ${T}_{\mu \nu }$, its space-space components: eTxx, eTxy, eTxz, eTyy, eTyz, eTzz

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.

#### 2.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 parameter stress_energy_storage activates storage for ${T}_{\mu \nu }$ and enables the schedule groups which calculate it.

• The parameter stress_energy_at_RHS moves calculating the ${T}_{\mu \nu }$ from the evol bin into the MoL_PostStep group. This increases the order of accuracy of the spacetime–matter coupling, but is only possible when thorn MoL is used.1 Generally, this parameter should be set when MoL is used.

• The parameter timelevels chooses the number of time levels for ${T}_{\mu \nu }$. The default is a single time level, which is sufficient for unigrid simulation. Mesh refinement simulation may require several time levels if mesh refinement boundaries require correct values.

• The parameter prolongation_type defines the prolongation operator for mesh refinement boundaries. The default is Lagrange interpolation.

The grid scalar stress_energy_state describes whether the ${T}_{\mu \nu }$ variables have storage.

### 3 Programming with TmunuBase

#### 3.1 Contributing to ${T}_{\mu \nu }$

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

#### 3.2 Reading from ${T}_{\mu \nu }$

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

#### 3.3 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.

### 4 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? This is deprecated. Default: no

### 5 Interfaces

Implements:

tmunubase

Inherits:

staticconformal

#### Grid Variables

##### 5.0.1 PUBLIC GROUPS
 Group Names Variable Names Details stress_energy_state stress_energy_state compact 0 description State of storage for stress-energy tensor dimensions 0 distribution CONSTANT group type SCALAR timelevels 1 variable type INT stress_energy_scalar compact 0 eTtt description Stress-energy tensor description 3-scalar part T_00 dimensions 3 distribution DEFAULT group type GF tags tensortypealias=”Scalar” ProlongationParameter=”TmunuBase::prolongation_type” timelevels 3 variable type REAL stress_energy_vector compact 0 eTtx description Stress-energy tensor description 3-vector part T_0i eTty dimensions 3 eTtz distribution DEFAULT group type GF tags tensortypealias=”D” ProlongationParameter=”TmunuBase::prolongation_type” timelevels 3 variable type REAL stress_energy_tensor compact 0 eTxx description Stress-energy tensor description 3-tensor part T_ij eTxy dimensions 3 eTxz distribution DEFAULT eTyy group type GF eTyz tags tensortypealias=”DD_sym” ProlongationParameter=”TmunuBase::prolongation_type” eTzz timelevels 3 variable type REAL

### 6 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_state 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] stress_energy_tensor[3]

#### Scheduled Functions

CCTK_WRAGH

tmunubase_setstressenergystate

set the stress_energy_state variable

 Before: mol_register Language: fortran Options: global Type: function Writes: tmunubase::stress_energy_state(everywhere)

CCTK_PARAMCHECK

tmunubase_paramcheck

check that no deprecated parameters are used.

 Language: c Options: global Type: function

MoL_PostStep (conditional)

settmunu

group for calculating the stress-energy tensor

SetTmunu (conditional)

tmunubase_zerotmunu

initialise the stress-energy tensor to zero

 Language: fortran Type: function Writes: tmunubase::stress_energy_scalar(everywhere) tmunubase::stress_energy_vector(everywhere) tmunubase::stress_energy_tensor(everywhere)

SetTmunu (conditional)