metricGet_Schwarzschild
Last updated
Create the Schwarzschild spacetime in Cartesian coordinates.
The classic Schwarzschild metric given in pseudo-Cartesian coordinates is:
ds2=−(1−rrs)2dt2+(1−rs/rx2+y2+z2)r2dx2+(x2+1−rs/ry2+z2)r2dy2+(x2+y2+1−rs/rz2)r2dz2+r2(r−rs)2rs(xydxdy+xzdxdz+yzdydz),
where rs is the Schwarzschild radius.
For more details on the Schwarzschild metric please read the following reference (section 2.2.2) or any standard general relativity textbook:
The metric is constructed using the Schwarzschild radius as a unitless pass-in value in Cartesian coordinates.
[metric] = metricGet_Schwarzschild(gridSize,worldCenter,rs, gridScale)
blue are required inputs.
orange are optional inputs with native default values.
blue are required inputs
gridSize
1x4 array
integer
The size of the world specified as:
[t,x,y,z]
worldCenter
1x4 array
double
The center of the world, which defines the center of rs as a 4-vector, specified as:
[t,x,y,z]
rs
1x1 array
double
Schwarzschild radius, in unitless form.
gridScale
1x4 array
double
Unit scaling factor of the grid dimensions defined relative to gridSize. This determines the resolution of the grid along each dimension. Specified as:
[tscale,xscale,yscale,zscale]
The default value is [1, 1, 1, 1].
metric
struct
object
Schwarzschild solution returned as the metric tensor object.
Last updated