metricGet_Schwarzschild
Description
Create the Schwarzschild spacetime in Cartesian coordinates.
For more details on the Schwarzschild metric please read the following reference (section 2.2.2) or any standard general relativity textbook:
Method
The metric is constructed using the Schwarzschild radius as a unitless pass-in value in Cartesian coordinates.
Syntax
[metric] = metricGet_Schwarzschild(gridSize,worldCenter,rs, gridScale)
Input Arguments
blue are required inputs
gridSize
1x4 array
integer
The size of the world specified as:
worldCenter
1x4 array
double
The center of the world, which defines the center of as a 4-vector, specified as:
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:
The default value is [1, 1, 1, 1].
Output Arguments
metric
struct
object
Schwarzschild solution returned as the metric tensor object.
Last updated