foobar[goverl_, rvalue_] := Block[{},
eq1 := η''[t] == η[t] θ'[t]^2 + gg Sin[θ[t]];
eq2 := (gg/2 + r gg η[t]) Cos[θ[t]] == (1/3) θ''[t] + r η[t]^2 θ''[t] + 2 r η[t] η'[t] θ'[t];
gg = goverl; r = rvalue; tmax = 3.0;
soln = NDSolveValue[{eq1, eq2, η[0]==0, η'[0]==0, θ[0]==0, θ'[0]==0}, {η[t], θ[t]}, {t, 0, tmax}];
etasoln = soln[[1]];
thetasoln = soln[[2]];
tvertical = t /. FindRoot[thetasoln==Pi/2, {t, 0.1, 0.11}][[1]];
etavertical = etasoln /. {t -> tvertical};
etavertical
]
foobar[1.0, 0.8]
Plot[etasoln, {t, 0, tmax}]
Plot[thetasoln/(Pi/2), {t, 0, tmax}]
table = Table[{r, foobar[1.0, r]}, {r, {0.001, 0.01, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.5, 2.0, 2.5}}]
ListPlot[table]