  Previously Casetti, Clementi and Pettini [\textbf{Phys.Rev.E
\textbf{54},6,(1996)}] have investigated the Lyapunov spectrum of Hamiltonian
flows for several Hamiltonian systems by making use of the Riemannian geometry.
Basically the Lyapunov stability analysis was substituted by the Ricci
sectional curvature analysis. In this report we apply Pettini's geometrical
framework to determine the potential energy of a twisted magnetic flux tube,
from its curved Riemannian geometry. Actually the Lyapunov exponents, are
connected to a Riemann metric tensor, of the twisted magnetic flux tubes
(MFTs). The Hamiltonian flow inside the tube is actually given by Perelman
Ricci flows constraints in twisted magnetic flux tubes, where the Lyapunov
eigenvalue spectra for the Ricci tensor associated with the Ricci flow equation
in MFTs leads to a finite-time Lyapunov exponential stretching along the
toroidal direction of the tube and a contraction along the radial direction of
the tube. The Jacobi equation for the MFTs is shown to have a constant
sectional Ricci curvature which allows us to compute the Jacobi-Levi-Civita
(JLC) geodesic deviation for the spread of lines on the tube manifold and
chaotic action through the greatest of its Lyapunov exponents. By analyzing the
spectra of the twisted MFT, it is shown that the greater exponent is positive
and proportional to the random radial flow of the tube, which allows the onset
of chaos is guaranted. The randomness in the twisted flow reminds a discussed
here is similar of a recent work by Shukurov, Stepanov, and Sokoloff on dynamo
action on Moebius flow [\textbf{Phys Rev E 78 (2008)}]. The dynamo action in
twisted flux tubes discussed here may also serve as model for dynamo
experiments in laboratory.
