xx TmunuBase

TmunuBase

Erik Schnetter <schnetter@cct.lsu.edu>

2008-04-07

Abstract

Provide grid functions for the stress-energy tensor , 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 , 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 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 decomposition. The variables provided by TmunuBase are:

The “scalar” part of , its time-time component: eTtt

The “vector” part of , its time-space components: eTtx, eTty, eTtz

The “tensor” part of , 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 stressxenergyxstorage activates storage for and enables the schedule groups which calculate it.

The parameter stressxenergyxatxRHS moves calculating the from the evol bin into the MoLxPostStep group. This increases the order of accuracy of the spacetime–matter coupling, but is only possible

when thorn MoL is used.1 1This was one of the main reason why thorn MoL was instroduced. Generally, this parameter should be set when MoL is used.

The parameter timelevels chooses the number of time levels for . 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 prolongationxtype defines the prolongation operator for mesh refinement boundaries. The default is Lagrange interpolation.

The grid scalar stressxenergyxstate describes whether the variables have storage.

3 Programming with TmunuBase

3.1 Contributing to

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

3.2 Reading from Since the values of change at each time step, or – if a thorn like MoL is used – at each substep, needs to be recalculated frequently. This happens either in the schedule bin evol or in the schedule group MoLxPostStep. may only be accessed after it has been calculated, e.g.xIN MoLxPostStep AFTER SetTmunu. can be freely accessed at other times, e.g.xin MoLxCalcRHS 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

11prolongationxtype 10Scope: privatex01 STRING

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

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

11

11stressxenergyxstorage  10Scope: privatex01  BOOLEAN

11Description: Should the stress-energy tensor have storage?

11                           10  x01  Default: no

11

11timelevels  10Scope: privatex01  INT

11Description: Number of time levels

11  Range  10  x01  Default: 1

110:3  10

11

11stressxenergyxatxrhs  10Scope: restrictedx01  BOOLEAN

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

11                           10  x01  Default: no

11

11supportxoldxcalctmunuxmechanism 10Scope: restrictedx01  BOOLEAN

11Description: Should the old CalcTmunu.inc mechanism be supported? This is deprecated.

11                           10  x01  Default: no

5 Interfaces

General Implements: tmunubase

Inherits: admbase staticconformal

Grid Variables

5.0.1 PUBLIC GROUPS

11x Group Names x10x Variable Names xx01 Details x11x
11 stressxenergyxstate 10 stressxenergyxstate x01  compact110
11                 10  x01 description11State of storage for stress-energy tensor
11                 10  x01 dimensions110
11                 10  x01 distribution11CONSTANT
11                 10  x01 group type11SCALAR
11                 10  x01 timelevels111
11                 10  x01variable type11INT
11stressxenergyxscalar10  x01  compact110
11                 10  eTtt  x01 description11Stress-energy tensor
11                 10  x  x01 description113-scalar part Tx00
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”Scalar” ProlongationParameter=”TmunuBase::prolongationxtype”
11                 10  x01 timelevels113
11                 10  x01variable type11REAL
11stressxenergyxvector10  x01  compact110
11                 10  eTtx  x01 description11Stress-energy tensor
11                 10  x  x01 description113-vector part Tx0i
11                 10  eTty  x01 dimensions113
11                 10  eTtz  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”D” ProlongationParameter=”TmunuBase::prolongationxtype”
11                 10  x01 timelevels113
11                 10  x01variable type11REAL
11stressxenergyxtensor10  x01  compact110
11                 10  eTxx  x01 description11Stress-energy tensor
11                 10  x  x01 description113-tensor part Txij
11                 10  eTxy  x01 dimensions113
11                 10  eTxz  x01 distribution11DEFAULT
11                 10  eTyy  x01 group type11GF
11                 10  eTyz  x01  tags11tensortypealias=”DDxsym” ProlongationParameter=”TmunuBase::prolongationxtype”
11                 10  eTzz  x01 timelevels113
11                 10  x01variable type11REAL

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 x

11Always:  11Conditional:
11stressxenergyxstate11stressxenergyxscalar[timelevels]
11x  11stressxenergyxvector[timelevels]
11x  11stressxenergyxtensor[timelevels]

11x  11x

11

Scheduled Functions

CCTKxWRAGH x tmunubasexsetstressenergystate x set the stressxenergyxstate variable x

11x11Before: 11molxregister
11 x 11Language:11fortran
11 x 11Options: 11global
11 x 11Type: 11function
11 x 11Writes: 11tmunubase::stressxenergyxstate(everywhere)

11

CCTKxPARAMCHECK x tmunubasexparamcheck x check that no deprecated parameters are used. x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

MoLxPostStep (conditional) x settmunu x group for calculating the stress-energy tensor x

11x11After:11admbasexsetadmvars
11 x 11Type:11group

11

SetTmunu (conditional) x tmunubasexzerotmunu x initialise the stress-energy tensor to zero x

11x11Language:11fortran
11 x 11Type: 11function
11 x 11Writes: 11tmunubase::stressxenergyxscalar(everywhere)
11 x 11x  11tmunubase::stressxenergyxvector(everywhere)
11 x 11x  11tmunubase::stressxenergyxtensor(everywhere)

11

SetTmunu (conditional) x addtotmunu x add to the stress-energy tensor here x

11x11After:11tmunubasexsettmunu
11 x 11x  11tmunubasexzerotmunu
11 x 11Type:11group