metricGet_Schwarzschild
Last updated
Last updated
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:
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:
worldCenter
1x4 array
double
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].
metric
struct
object
Schwarzschild solution returned as the metric tensor object.
The center of the world, which defines the center of as a 4-vector, specified as: