Load Metrics package

<<Metrics`LoadMetric`

$DefInfoQ=False;
$CVVerbose=False;
$UndefInfoQ=False;

Minkowski

LoadMetric["Minkowski"]

MetricCompute[g,Minkowski,"Einstein"[-1,-1],CVSimplify->Simplify];

ComponentArray[EinsteinCD[-a,-b]//ToBasis[Minkowski]]/.TensorValues[EinsteinCD]

UnloadMetric[]

Gauge wave

LoadMetric["GaugeWave"]

MetricCompute[g,GaugeWave,"Einstein"[-1,-1],CVSimplify->Simplify];

RuleToSet[EinsteinCD]

ComponentArray[EinsteinCD[-a,-b]//ToBasis[GaugeWave]]/.TensorValues[EinsteinCD]

UnloadMetric[]

Shifted gauge wave

LoadMetric["ShiftedGaugeWave"]

MetricCompute[g,ShiftedGaugeWave,"Einstein"[-1,-1],CVSimplify->Simplify];

ComponentArray[EinsteinCD[-a,-b]//ToBasis[ShiftedGaugeWave]]/.TensorValues[EinsteinCD]

UnloadMetric[]

Kerr-Schild

LoadMetric["KerrSchild"]

SimplifyWithR[expr_]:=Module[{expr2},
expr2=expr/.{Derivative[1,0,0][r][x[],y[],z[]]->((r[x[],y[],z[]]x[])/((a^2)+2 ((r[x[],y[],z[]])^2)-((x[])^2)-((y[])^2)-((z[])^2))),Derivative[0,1,0][r][x[],y[],z[]]->((r[x[],y[],z[]]y[])/((a^2)+2 ((r[x[],y[],z[]])^2)-((x[])^2)-((y[])^2)-((z[])^2))),Derivative[0,0,1][r][x[],y[],z[]]->-(((a^2+r[x[],y[],z[]]^2)*z[])/(r[x[],y[],z[]]*(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2))),Derivative[2,0,0][r][x[],y[],z[]]->(r[x[],y[],z[]]*(4*r[x[],y[],z[]]^2*x[]^2+3*x[]^2*(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)-(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)^2))/(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)^3,Derivative[0,2,0][r][x[],y[],z[]]->(r[x[],y[],z[]]*(4*r[x[],y[],z[]]^2*y[]^2+3*y[]^2*(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)-(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)^2))/(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)^3,Derivative[0,0,2][r][x[],y[],z[]]->-(((a^2+r[x[],y[],z[]]^2)*(r[x[],y[],z[]]^2*(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2)^2-(a^4+a^2*(5*r[x[],y[],z[]]^2-x[]^2-y[]^2)+r[x[],y[],z[]]^2*(2*r[x[],y[],z[]]^2+x[]^2+y[]^2))*z[]^2+(a^2-2*r[x[],y[],z[]]^2)*z[]^4))/(r[x[],y[],z[]]^3*(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)^3)),Derivative[1,1,0][r][x[],y[],z[]]->-((r[x[],y[],z[]]*x[]*y[]*(3*a^2+2*r[x[],y[],z[]]^2-3*(x[]^2+y[]^2+z[]^2)))/(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)^3),Derivative[1,0,1][r][x[],y[],z[]]->(x[]*z[]*(-a^4+a^2*(-r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)+r[x[],y[],z[]]^2*(-2*r[x[],y[],z[]]^2+3*(x[]^2+y[]^2+z[]^2))))/(r[x[],y[],z[]]*(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)^3),Derivative[0,1,1][r][x[],y[],z[]]->(y[]*z[]*(-a^4+a^2*(-r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)+r[x[],y[],z[]]^2*(-2*r[x[],y[],z[]]^2+3*(x[]^2+y[]^2+z[]^2))))/(r[x[],y[],z[]]*(-a^2-2*r[x[],y[],z[]]^2+x[]^2+y[]^2+z[]^2)^3)};
expr2
]

MetricCompute[g,KerrSchild,"Einstein"[-1,-1],CVSimplify->SimplifyWithR];

simprule=(((r[x,y,z])^4)-(a^2) (z^2)+((r[x,y,z])^2) ((a^2)-(x^2)-(y^2)-(z^2)))->Simplify[(((r[x,y,z])^4)-(a^2) (z^2)+((r[x,y,z])^2) ((a^2)-(x^2)-(y^2)-(z^2)))/.{r[__]->Sqrt[(x^2+y^2+z^2-a^2+Sqrt[(x^2+y^2+z^2-a^2)^2+4 a^2 z^2])/2],x[]->x,y[]->y,z[]->z}]

In this case, we just check that the Ricci tensor is 0 for simplicity

Simplify[(ComponentArray[RicciCD[-b,-c]//ToBasis[KerrSchild]]/.TensorValues[RicciCD])]/.simprule

Vaidya

LoadMetric["Vaidya"]

SimplifyWithR[expr_]:=Module[{expr2},
expr2=expr/.{Derivative[1,0,0][r][x[],y[],z[]]->x[]/r[x[],y[],z[]],Derivative[0,1,0][r][x[],y[],z[]]->y[]/r[x[],y[],z[]],Derivative[0,0,1][r][x[],y[],z[]]->z[]/r[x[],y[],z[]],Derivative[2,0,0][r][x[],y[],z[]]->(r[x[],y[],z[]]^2-x[]^2)/r[x[],y[],z[]]^3,Derivative[0,2,0][r][x[],y[],z[]]->(r[x[],y[],z[]]^2-y[]^2)/r[x[],y[],z[]]^3,Derivative[0,0,2][r][x[],y[],z[]]->((-2*r[x[],y[],z[]]^2+x[]^2+y[]^2)^2-(2*r[x[],y[],z[]]^2+x[]^2+y[]^2)*z[]^2-2*z[]^4)/r[x[],y[],z[]]^5,Derivative[1,1,0][r][x[],y[],z[]]->-((x[]*y[])/r[x[],y[],z[]]^3),Derivative[1,0,1][r][x[],y[],z[]]->-((x[]*z[])/r[x[],y[],z[]]^3),Derivative[0,1,1][r][x[],y[],z[]]->-((y[]*z[])/r[x[],y[],z[]]^3)};
expr2
]

MetricCompute[g,Vaidya,"Einstein"[-1,-1],CVSimplify->SimplifyWithR];

Simplify[(ComponentArray[RicciCD[-b,-c]//ToBasis[Vaidya]]/.TensorValues[RicciCD]),Assumptions->r[x[],y[],z[]]==Sqrt[((x[])^2)+((y[])^2)+((z[])^2)]&&r[x[],y[],z[]]>0]

ricci=%/.Sqrt[((x[])^2)+((y[])^2)+((z[])^2)]->r[x[],y[],z[]];

For dM->0, we should have Schwarzschild (i.e. vacuum)

Flatten[ricci/.{dM->0}]

riccix=Simplify[ricci/.{r[__]->x[],y[]->0,z[]->0}]

Plot[Evaluate[Flatten[Simplify[riccix/.{M->1,t[]->0,dM->1/2,x[]->xx}]]],{xx,0,10},PlotRange->{0,10}]