  The understanding of self-organization in the twist-bend nematic
$(N_\text{TB})$ phase, identified in 2011 in liquid crystal dimers, is at the
forefront of soft matter research worldwide. This new nematic phase develops
structural chirality in the isotropic $(I)$ and the uniaxial nematic
$(N_\text{U})$ phases, despite the fact that the molecules forming the
structure are chemically achiral. Molecular, shape-induced flexopolarization
provides a viable mechanism for a qualitative understanding of $N_\text{TB}$
and the related phase transitions. The key question that remains is whether
with this mechanism one can also explain quantitatively the presently existing
experimental data. To address this issue we propose a generalization of the
mesoscopic Landau-de Gennes theory of nematics, where higher-order elastic
terms of the alignment tensor are taken into account, in addition to the
lowest-order flexopolarization coupling. The theory is not only capable of
explaining the appearance of $N_\text{TB}$ but also stays in quantitative
agreement with experimental data. In exemplary calculations, we take the data
known for CB7CB flexible dimer - the "drosophila fly" in the studies of
$N_\text{TB}$ [A. J\'{a}kli et al., Rev. Mod. Phys. 90, 045004 (2018)] - and
estimate the constitutive parameters of the model from temperature variation of
the nematic order parameter and the Frank elastic constants in the nematic
phase. Then we seek for relative stability and properties of the isotropic,
uniaxial nematic and twist-bend nematic phases. In particular, we evaluate
various properties of $N_\text{TB}$, like temperature variation of the
structure's wave vector, conical angle, flexopolarization, and remaining order
parameters. We also look into the fine structure of $N_\text{TB}$, like its
biaxiality - the property, which is difficult to access experimentally at the
nanoscale.
