The science
Motion. Along the track the car obeys dv/dt = -g sinθ - sgn(v)[μ N/m + ½ρ CdA v²/m] with the normal force per mass N/m = g cosθ + κ v², where θ is the track heading and κ = dθ/ds its curvature. The rider's g-force is N/(mg).
Loop. Without losses energy gives v² = 2g(H - y). At the top (y = 2R) the car stays on the track if N ≥ 0, i.e. v² ≥ gR, so H ≥ 2.5R. At the bottom the rider feels 1 + v²/(gR) = 1 + 2H/(gR)·g g's, which is why real loops are teardrop-shaped (larger radius at the bottom) to keep g tolerable.
Simplifications. A single car as a point mass, Coulomb-type rolling resistance proportional to the normal force, quadratic air drag, a perfectly circular loop (real ones are clothoids), no wheel inertia, no train length, no track flexing. The loop's exit is drawn shifted sideways for clarity; the physics uses the arc length only.