  We use ab initio electronic structure calculations within the generalized
gradient approximation (GGA+U) to density functional theory (DFT) to determine
the microscopic exchange interactions in the series of orthorhombic rare-earth
manganites, o-$R$MnO$_3$. Our motivation is to construct a model Hamiltonian
(excluding effects due to spin-orbit coupling), which can provide an accurate
description of the magnetism in these materials. First, we consider TbMnO$_3$,
which exhibits a spiral magnetic order at low temperatures. We map the exchange
couplings in this compound onto a Heisenberg Hamiltonian and observe a clear
deviation from the Heisenberg-like behavior. We consider first the coupling
between magnetic and orbital degrees of freedom as a potential source of
non-Heisenberg behavior in TbMnO$_3$, but conclude that it does not explain the
observed deviation. We find that higher order magnetic interactions
(biquadratic and four-spin ring couplings) should be taken into account for a
proper treatment of the magnetism in TbMnO$_3$ as well as in the other
representatives of the o-$R$MnO$_3$ series with small radii of the $R$ cation.
