Is the particle in a box concept analogous to an electron in an orbital? If so, can we apply the equation for the allowed energies of a particle in a box
$$E = \frac{h^2n^2}{8mL^2}$$
to the allowed energies of electrons in orbitals? Are the orbitals degenerate because this equation only includes the quantum number $n$ and not the others and therefore all orbitals in a subshell will roughly be degenerate?
Finally, if this equation can be used to explain the allowed energies of orbitals/electrons, what would $L$ be in this instance?